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

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

Planet of the Forklift Kid.swf

This is the info page for
Flash #42311

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


ActionScript [AS3]
Section 1
//b2BoxDef (Box2D.Collision.Shapes.b2BoxDef) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; public class b2BoxDef extends b2ShapeDef { public var extents:b2Vec2; public function b2BoxDef(){ type = b2Shape.e_boxShape; extents = new b2Vec2(1, 1); } } }//package Box2D.Collision.Shapes
Section 2
//b2CircleDef (Box2D.Collision.Shapes.b2CircleDef) package Box2D.Collision.Shapes { public class b2CircleDef extends b2ShapeDef { public var radius:Number; public function b2CircleDef(){ type = b2Shape.e_circleShape; radius = 1; } } }//package Box2D.Collision.Shapes
Section 3
//b2CircleShape (Box2D.Collision.Shapes.b2CircleShape) package Box2D.Collision.Shapes { import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2CircleShape extends b2Shape { public var m_localPosition:b2Vec2; public var m_radius:Number; public function b2CircleShape(_arg1:b2ShapeDef, _arg2:b2Body, _arg3:b2Vec2){ var _local5:Number; var _local6:Number; m_localPosition = new b2Vec2(); super(_arg1, _arg2); var _local4:b2CircleDef = (_arg1 as b2CircleDef); m_localPosition.Set((_arg1.localPosition.x - _arg3.x), (_arg1.localPosition.y - _arg3.y)); m_type = b2Shape.e_circleShape; m_radius = _local4.radius; m_R.SetM(m_body.m_R); _local5 = ((m_R.col1.x * m_localPosition.x) + (m_R.col2.x * m_localPosition.y)); _local6 = ((m_R.col1.y * m_localPosition.x) + (m_R.col2.y * m_localPosition.y)); m_position.x = (m_body.m_position.x + _local5); m_position.y = (m_body.m_position.y + _local6); m_maxRadius = (Math.sqrt(((_local5 * _local5) + (_local6 * _local6))) + m_radius); var _local7:b2AABB = new b2AABB(); _local7.minVertex.Set((m_position.x - m_radius), (m_position.y - m_radius)); _local7.maxVertex.Set((m_position.x + m_radius), (m_position.y + m_radius)); var _local8:b2BroadPhase = m_body.m_world.m_broadPhase; if (_local8.InRange(_local7)){ m_proxyId = _local8.CreateProxy(_local7, this); } else { m_proxyId = b2Pair.b2_nullProxy; }; if (m_proxyId == b2Pair.b2_nullProxy){ m_body.Freeze(); }; } override public function Synchronize(_arg1:b2Vec2, _arg2:b2Mat22, _arg3:b2Vec2, _arg4:b2Mat22):void{ m_R.SetM(_arg4); m_position.x = (((_arg4.col1.x * m_localPosition.x) + (_arg4.col2.x * m_localPosition.y)) + _arg3.x); m_position.y = (((_arg4.col1.y * m_localPosition.x) + (_arg4.col2.y * m_localPosition.y)) + _arg3.y); if (m_proxyId == b2Pair.b2_nullProxy){ return; }; var _local5:Number = (_arg1.x + ((_arg2.col1.x * m_localPosition.x) + (_arg2.col2.x * m_localPosition.y))); var _local6:Number = (_arg1.y + ((_arg2.col1.y * m_localPosition.x) + (_arg2.col2.y * m_localPosition.y))); var _local7:Number = Math.min(_local5, m_position.x); var _local8:Number = Math.min(_local6, m_position.y); var _local9:Number = Math.max(_local5, m_position.x); var _local10:Number = Math.max(_local6, m_position.y); var _local11:b2AABB = new b2AABB(); _local11.minVertex.Set((_local7 - m_radius), (_local8 - m_radius)); _local11.maxVertex.Set((_local9 + m_radius), (_local10 + m_radius)); var _local12:b2BroadPhase = m_body.m_world.m_broadPhase; if (_local12.InRange(_local11)){ _local12.MoveProxy(m_proxyId, _local11); } else { m_body.Freeze(); }; } override public function Support(_arg1:Number, _arg2:Number, _arg3:b2Vec2):void{ var _local4:Number = Math.sqrt(((_arg1 * _arg1) + (_arg2 * _arg2))); _arg1 = (_arg1 / _local4); _arg2 = (_arg2 / _local4); _arg3.Set((m_position.x + (m_radius * _arg1)), (m_position.y + (m_radius * _arg2))); } override public function QuickSync(_arg1:b2Vec2, _arg2:b2Mat22):void{ m_R.SetM(_arg2); m_position.x = (((_arg2.col1.x * m_localPosition.x) + (_arg2.col2.x * m_localPosition.y)) + _arg1.x); m_position.y = (((_arg2.col1.y * m_localPosition.x) + (_arg2.col2.y * m_localPosition.y)) + _arg1.y); } override public function TestPoint(_arg1:b2Vec2):Boolean{ var _local2:b2Vec2 = new b2Vec2(); _local2.SetV(_arg1); _local2.Subtract(m_position); return ((b2Math.b2Dot(_local2, _local2) <= (m_radius * m_radius))); } override public function ResetProxy(_arg1:b2BroadPhase):void{ if (m_proxyId == b2Pair.b2_nullProxy){ return; }; var _local2:b2Proxy = _arg1.GetProxy(m_proxyId); _arg1.DestroyProxy(m_proxyId); _local2 = null; var _local3:b2AABB = new b2AABB(); _local3.minVertex.Set((m_position.x - m_radius), (m_position.y - m_radius)); _local3.maxVertex.Set((m_position.x + m_radius), (m_position.y + m_radius)); if (_arg1.InRange(_local3)){ m_proxyId = _arg1.CreateProxy(_local3, this); } else { m_proxyId = b2Pair.b2_nullProxy; }; if (m_proxyId == b2Pair.b2_nullProxy){ m_body.Freeze(); }; } } }//package Box2D.Collision.Shapes
Section 4
//b2MassData (Box2D.Collision.Shapes.b2MassData) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; public class b2MassData { public var mass:Number;// = 0 public var center:b2Vec2; public var I:Number;// = 0 public function b2MassData(){ center = new b2Vec2(0, 0); super(); } } }//package Box2D.Collision.Shapes
Section 5
//b2PolyDef (Box2D.Collision.Shapes.b2PolyDef) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2PolyDef extends b2ShapeDef { public var vertices:Array; public var vertexCount:int; public function b2PolyDef(){ vertices = new Array(b2Settings.b2_maxPolyVertices); super(); type = b2Shape.e_polyShape; vertexCount = 0; var _local1:int; while (_local1 < b2Settings.b2_maxPolyVertices) { vertices[_local1] = new b2Vec2(); _local1++; }; } } }//package Box2D.Collision.Shapes
Section 6
//b2PolyShape (Box2D.Collision.Shapes.b2PolyShape) package Box2D.Collision.Shapes { import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2PolyShape extends b2Shape { public var m_vertexCount:int; private var syncMat:b2Mat22; public var m_vertices:Array; public var m_coreVertices:Array; public var m_localCentroid:b2Vec2; public var m_normals:Array; private var syncAABB:b2AABB; public var m_localOBB:b2OBB; private static var tempVec:b2Vec2 = new b2Vec2(); private static var tAbsR:b2Mat22 = new b2Mat22(); public function b2PolyShape(_arg1:b2ShapeDef, _arg2:b2Body, _arg3:b2Vec2){ var _local4:int; var _local5:Number; var _local6:Number; var _local7:b2Vec2; var _local8:b2AABB; var _local9:b2Mat22; var _local14:int; var _local15:int; var _local19:b2BoxDef; var _local20:Number; var _local21:Number; var _local22:b2PolyDef; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; var _local27:Number; var _local28:b2Vec2; syncAABB = new b2AABB(); syncMat = new b2Mat22(); m_localCentroid = new b2Vec2(); m_localOBB = new b2OBB(); super(_arg1, _arg2); _local8 = new b2AABB(); m_vertices = new Array(b2Settings.b2_maxPolyVertices); m_coreVertices = new Array(b2Settings.b2_maxPolyVertices); m_normals = new Array(b2Settings.b2_maxPolyVertices); m_type = b2Shape.e_polyShape; _local9 = new b2Mat22(_arg1.localRotation); if (_arg1.type == b2Shape.e_boxShape){ m_localCentroid.x = (_arg1.localPosition.x - _arg3.x); m_localCentroid.y = (_arg1.localPosition.y - _arg3.y); _local19 = (_arg1 as b2BoxDef); m_vertexCount = 4; _local5 = _local19.extents.x; _local6 = _local19.extents.y; _local20 = Math.max(0, (_local5 - (2 * b2Settings.b2_linearSlop))); _local21 = Math.max(0, (_local6 - (2 * b2Settings.b2_linearSlop))); _local7 = (m_vertices[0] = new b2Vec2()); _local7.x = ((_local9.col1.x * _local5) + (_local9.col2.x * _local6)); _local7.y = ((_local9.col1.y * _local5) + (_local9.col2.y * _local6)); _local7 = (m_vertices[1] = new b2Vec2()); _local7.x = ((_local9.col1.x * -(_local5)) + (_local9.col2.x * _local6)); _local7.y = ((_local9.col1.y * -(_local5)) + (_local9.col2.y * _local6)); _local7 = (m_vertices[2] = new b2Vec2()); _local7.x = ((_local9.col1.x * -(_local5)) + (_local9.col2.x * -(_local6))); _local7.y = ((_local9.col1.y * -(_local5)) + (_local9.col2.y * -(_local6))); _local7 = (m_vertices[3] = new b2Vec2()); _local7.x = ((_local9.col1.x * _local5) + (_local9.col2.x * -(_local6))); _local7.y = ((_local9.col1.y * _local5) + (_local9.col2.y * -(_local6))); _local7 = (m_coreVertices[0] = new b2Vec2()); _local7.x = ((_local9.col1.x * _local20) + (_local9.col2.x * _local21)); _local7.y = ((_local9.col1.y * _local20) + (_local9.col2.y * _local21)); _local7 = (m_coreVertices[1] = new b2Vec2()); _local7.x = ((_local9.col1.x * -(_local20)) + (_local9.col2.x * _local21)); _local7.y = ((_local9.col1.y * -(_local20)) + (_local9.col2.y * _local21)); _local7 = (m_coreVertices[2] = new b2Vec2()); _local7.x = ((_local9.col1.x * -(_local20)) + (_local9.col2.x * -(_local21))); _local7.y = ((_local9.col1.y * -(_local20)) + (_local9.col2.y * -(_local21))); _local7 = (m_coreVertices[3] = new b2Vec2()); _local7.x = ((_local9.col1.x * _local20) + (_local9.col2.x * -(_local21))); _local7.y = ((_local9.col1.y * _local20) + (_local9.col2.y * -(_local21))); } else { _local22 = (_arg1 as b2PolyDef); m_vertexCount = _local22.vertexCount; PolyCentroid(_local22.vertices, _local22.vertexCount, tempVec); _local23 = tempVec.x; _local24 = tempVec.y; m_localCentroid.x = ((_arg1.localPosition.x + ((_local9.col1.x * _local23) + (_local9.col2.x * _local24))) - _arg3.x); m_localCentroid.y = ((_arg1.localPosition.y + ((_local9.col1.y * _local23) + (_local9.col2.y * _local24))) - _arg3.y); _local4 = 0; while (_local4 < m_vertexCount) { m_vertices[_local4] = new b2Vec2(); m_coreVertices[_local4] = new b2Vec2(); _local5 = (_local22.vertices[_local4].x - _local23); _local6 = (_local22.vertices[_local4].y - _local24); m_vertices[_local4].x = ((_local9.col1.x * _local5) + (_local9.col2.x * _local6)); m_vertices[_local4].y = ((_local9.col1.y * _local5) + (_local9.col2.y * _local6)); _local25 = m_vertices[_local4].x; _local26 = m_vertices[_local4].y; _local27 = Math.sqrt(((_local25 * _local25) + (_local26 * _local26))); if (_local27 > Number.MIN_VALUE){ _local25 = (_local25 * (1 / _local27)); _local26 = (_local26 * (1 / _local27)); }; m_coreVertices[_local4].x = (m_vertices[_local4].x - ((2 * b2Settings.b2_linearSlop) * _local25)); m_coreVertices[_local4].y = (m_vertices[_local4].y - ((2 * b2Settings.b2_linearSlop) * _local26)); _local4++; }; }; var _local10:Number = Number.MAX_VALUE; var _local11:Number = Number.MAX_VALUE; var _local12:Number = -(Number.MAX_VALUE); var _local13:Number = -(Number.MAX_VALUE); m_maxRadius = 0; _local4 = 0; while (_local4 < m_vertexCount) { _local28 = m_vertices[_local4]; _local10 = Math.min(_local10, _local28.x); _local11 = Math.min(_local11, _local28.y); _local12 = Math.max(_local12, _local28.x); _local13 = Math.max(_local13, _local28.y); m_maxRadius = Math.max(m_maxRadius, _local28.Length()); _local4++; }; m_localOBB.R.SetIdentity(); m_localOBB.center.Set(((_local10 + _local12) * 0.5), ((_local11 + _local13) * 0.5)); m_localOBB.extents.Set(((_local12 - _local10) * 0.5), ((_local13 - _local11) * 0.5)); _local4 = 0; while (_local4 < m_vertexCount) { m_normals[_local4] = new b2Vec2(); _local14 = _local4; _local15 = (((_local4 + 1) < m_vertexCount)) ? (_local4 + 1) : 0; m_normals[_local4].x = (m_vertices[_local15].y - m_vertices[_local14].y); m_normals[_local4].y = -((m_vertices[_local15].x - m_vertices[_local14].x)); m_normals[_local4].Normalize(); _local4++; }; _local4 = 0; while (_local4 < m_vertexCount) { _local14 = _local4; _local15 = (((_local4 + 1) < m_vertexCount)) ? (_local4 + 1) : 0; _local4++; }; m_R.SetM(m_body.m_R); m_position.x = (m_body.m_position.x + ((m_R.col1.x * m_localCentroid.x) + (m_R.col2.x * m_localCentroid.y))); m_position.y = (m_body.m_position.y + ((m_R.col1.y * m_localCentroid.x) + (m_R.col2.y * m_localCentroid.y))); tAbsR.col1.x = ((m_R.col1.x * m_localOBB.R.col1.x) + (m_R.col2.x * m_localOBB.R.col1.y)); tAbsR.col1.y = ((m_R.col1.y * m_localOBB.R.col1.x) + (m_R.col2.y * m_localOBB.R.col1.y)); tAbsR.col2.x = ((m_R.col1.x * m_localOBB.R.col2.x) + (m_R.col2.x * m_localOBB.R.col2.y)); tAbsR.col2.y = ((m_R.col1.y * m_localOBB.R.col2.x) + (m_R.col2.y * m_localOBB.R.col2.y)); tAbsR.Abs(); _local5 = ((tAbsR.col1.x * m_localOBB.extents.x) + (tAbsR.col2.x * m_localOBB.extents.y)); _local6 = ((tAbsR.col1.y * m_localOBB.extents.x) + (tAbsR.col2.y * m_localOBB.extents.y)); var _local16:Number = (m_position.x + ((m_R.col1.x * m_localOBB.center.x) + (m_R.col2.x * m_localOBB.center.y))); var _local17:Number = (m_position.y + ((m_R.col1.y * m_localOBB.center.x) + (m_R.col2.y * m_localOBB.center.y))); _local8.minVertex.x = (_local16 - _local5); _local8.minVertex.y = (_local17 - _local6); _local8.maxVertex.x = (_local16 + _local5); _local8.maxVertex.y = (_local17 + _local6); var _local18:b2BroadPhase = m_body.m_world.m_broadPhase; if (_local18.InRange(_local8)){ m_proxyId = _local18.CreateProxy(_local8, this); } else { m_proxyId = b2Pair.b2_nullProxy; }; if (m_proxyId == b2Pair.b2_nullProxy){ m_body.Freeze(); }; } override public function QuickSync(_arg1:b2Vec2, _arg2:b2Mat22):void{ m_R.SetM(_arg2); m_position.x = (_arg1.x + ((_arg2.col1.x * m_localCentroid.x) + (_arg2.col2.x * m_localCentroid.y))); m_position.y = (_arg1.y + ((_arg2.col1.y * m_localCentroid.x) + (_arg2.col2.y * m_localCentroid.y))); } override public function Support(_arg1:Number, _arg2:Number, _arg3:b2Vec2):void{ var _local9:Number; var _local4:Number = ((_arg1 * m_R.col1.x) + (_arg2 * m_R.col1.y)); var _local5:Number = ((_arg1 * m_R.col2.x) + (_arg2 * m_R.col2.y)); var _local6:int; var _local7:Number = ((m_coreVertices[0].x * _local4) + (m_coreVertices[0].y * _local5)); var _local8 = 1; while (_local8 < m_vertexCount) { _local9 = ((m_coreVertices[_local8].x * _local4) + (m_coreVertices[_local8].y * _local5)); if (_local9 > _local7){ _local6 = _local8; _local7 = _local9; }; _local8++; }; _arg3.Set((m_position.x + ((m_R.col1.x * m_coreVertices[_local6].x) + (m_R.col2.x * m_coreVertices[_local6].y))), (m_position.y + ((m_R.col1.y * m_coreVertices[_local6].x) + (m_R.col2.y * m_coreVertices[_local6].y)))); } override public function Synchronize(_arg1:b2Vec2, _arg2:b2Mat22, _arg3:b2Vec2, _arg4:b2Mat22):void{ var _local5:Number; var _local6:Number; m_R.SetM(_arg4); m_position.x = (m_body.m_position.x + ((_arg4.col1.x * m_localCentroid.x) + (_arg4.col2.x * m_localCentroid.y))); m_position.y = (m_body.m_position.y + ((_arg4.col1.y * m_localCentroid.x) + (_arg4.col2.y * m_localCentroid.y))); if (m_proxyId == b2Pair.b2_nullProxy){ return; }; var _local7:b2Vec2 = _arg2.col1; var _local8:b2Vec2 = _arg2.col2; var _local9:b2Vec2 = m_localOBB.R.col1; var _local10:b2Vec2 = m_localOBB.R.col2; syncMat.col1.x = ((_local7.x * _local9.x) + (_local8.x * _local9.y)); syncMat.col1.y = ((_local7.y * _local9.x) + (_local8.y * _local9.y)); syncMat.col2.x = ((_local7.x * _local10.x) + (_local8.x * _local10.y)); syncMat.col2.y = ((_local7.y * _local10.x) + (_local8.y * _local10.y)); syncMat.Abs(); _local5 = (m_localCentroid.x + m_localOBB.center.x); _local6 = (m_localCentroid.y + m_localOBB.center.y); var _local11:Number = (_arg1.x + ((_arg2.col1.x * _local5) + (_arg2.col2.x * _local6))); var _local12:Number = (_arg1.y + ((_arg2.col1.y * _local5) + (_arg2.col2.y * _local6))); _local5 = ((syncMat.col1.x * m_localOBB.extents.x) + (syncMat.col2.x * m_localOBB.extents.y)); _local6 = ((syncMat.col1.y * m_localOBB.extents.x) + (syncMat.col2.y * m_localOBB.extents.y)); syncAABB.minVertex.x = (_local11 - _local5); syncAABB.minVertex.y = (_local12 - _local6); syncAABB.maxVertex.x = (_local11 + _local5); syncAABB.maxVertex.y = (_local12 + _local6); _local7 = _arg4.col1; _local8 = _arg4.col2; _local9 = m_localOBB.R.col1; _local10 = m_localOBB.R.col2; syncMat.col1.x = ((_local7.x * _local9.x) + (_local8.x * _local9.y)); syncMat.col1.y = ((_local7.y * _local9.x) + (_local8.y * _local9.y)); syncMat.col2.x = ((_local7.x * _local10.x) + (_local8.x * _local10.y)); syncMat.col2.y = ((_local7.y * _local10.x) + (_local8.y * _local10.y)); syncMat.Abs(); _local5 = (m_localCentroid.x + m_localOBB.center.x); _local6 = (m_localCentroid.y + m_localOBB.center.y); _local11 = (_arg3.x + ((_arg4.col1.x * _local5) + (_arg4.col2.x * _local6))); _local12 = (_arg3.y + ((_arg4.col1.y * _local5) + (_arg4.col2.y * _local6))); _local5 = ((syncMat.col1.x * m_localOBB.extents.x) + (syncMat.col2.x * m_localOBB.extents.y)); _local6 = ((syncMat.col1.y * m_localOBB.extents.x) + (syncMat.col2.y * m_localOBB.extents.y)); syncAABB.minVertex.x = Math.min(syncAABB.minVertex.x, (_local11 - _local5)); syncAABB.minVertex.y = Math.min(syncAABB.minVertex.y, (_local12 - _local6)); syncAABB.maxVertex.x = Math.max(syncAABB.maxVertex.x, (_local11 + _local5)); syncAABB.maxVertex.y = Math.max(syncAABB.maxVertex.y, (_local12 + _local6)); var _local13:b2BroadPhase = m_body.m_world.m_broadPhase; if (_local13.InRange(syncAABB)){ _local13.MoveProxy(m_proxyId, syncAABB); } else { m_body.Freeze(); }; } override public function TestPoint(_arg1:b2Vec2):Boolean{ var _local4:b2Vec2; var _local5:Number; var _local2:b2Vec2 = new b2Vec2(); _local2.SetV(_arg1); _local2.Subtract(m_position); _local2.MulTM(m_R); var _local3:int; while (_local3 < m_vertexCount) { _local4 = new b2Vec2(); _local4.SetV(_local2); _local4.Subtract(m_vertices[_local3]); _local5 = b2Math.b2Dot(m_normals[_local3], _local4); if (_local5 > 0){ return (false); }; _local3++; }; return (true); } override public function ResetProxy(_arg1:b2BroadPhase):void{ if (m_proxyId == b2Pair.b2_nullProxy){ return; }; var _local2:b2Proxy = _arg1.GetProxy(m_proxyId); _arg1.DestroyProxy(m_proxyId); _local2 = null; var _local3:b2Mat22 = b2Math.b2MulMM(m_R, m_localOBB.R); var _local4:b2Mat22 = b2Math.b2AbsM(_local3); var _local5:b2Vec2 = b2Math.b2MulMV(_local4, m_localOBB.extents); var _local6:b2Vec2 = b2Math.b2MulMV(m_R, m_localOBB.center); _local6.Add(m_position); var _local7:b2AABB = new b2AABB(); _local7.minVertex.SetV(_local6); _local7.minVertex.Subtract(_local5); _local7.maxVertex.SetV(_local6); _local7.maxVertex.Add(_local5); if (_arg1.InRange(_local7)){ m_proxyId = _arg1.CreateProxy(_local7, this); } else { m_proxyId = b2Pair.b2_nullProxy; }; if (m_proxyId == b2Pair.b2_nullProxy){ m_body.Freeze(); }; } } }//package Box2D.Collision.Shapes
Section 7
//b2Shape (Box2D.Collision.Shapes.b2Shape) package Box2D.Collision.Shapes { import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2Shape { public var m_position:b2Vec2; public var m_maxRadius:Number; public var m_next:b2Shape; public var m_type:int; public var m_R:b2Mat22; public var m_friction:Number; public var m_proxyId:uint; public var m_maskBits:uint; public var m_groupIndex:int; public var m_userData;// = null public var m_body:b2Body; public var m_restitution:Number; public var m_categoryBits:uint; public static const e_boxShape:int = 1; public static const e_unknownShape:int = -1; public static const e_lineShape:int = 4; public static const e_shapeTypeCount:int = 5; public static const e_circleShape:int = 0; public static const e_meshShape:int = 3; public static const e_polyShape:int = 2; public function b2Shape(_arg1:b2ShapeDef, _arg2:b2Body){ m_R = new b2Mat22(); m_position = new b2Vec2(); super(); m_userData = _arg1.userData; m_friction = _arg1.friction; m_restitution = _arg1.restitution; m_body = _arg2; m_proxyId = b2Pair.b2_nullProxy; m_maxRadius = 0; m_categoryBits = _arg1.categoryBits; m_maskBits = _arg1.maskBits; m_groupIndex = _arg1.groupIndex; } public function GetMaxRadius():Number{ return (m_maxRadius); } public function ResetProxy(_arg1:b2BroadPhase):void{ } public function QuickSync(_arg1:b2Vec2, _arg2:b2Mat22):void{ } public function GetNext():b2Shape{ return (m_next); } public function GetType():int{ return (m_type); } public function GetUserData(){ return (m_userData); } public function Support(_arg1:Number, _arg2:Number, _arg3:b2Vec2):void{ } public function Synchronize(_arg1:b2Vec2, _arg2:b2Mat22, _arg3:b2Vec2, _arg4:b2Mat22):void{ } public function GetRotationMatrix():b2Mat22{ return (m_R); } public function GetBody():b2Body{ return (m_body); } public function DestroyProxy():void{ if (m_proxyId != b2Pair.b2_nullProxy){ m_body.m_world.m_broadPhase.DestroyProxy(m_proxyId); m_proxyId = b2Pair.b2_nullProxy; }; } public function TestPoint(_arg1:b2Vec2):Boolean{ return (false); } public function GetPosition():b2Vec2{ return (m_position); } public static function Destroy(_arg1:b2Shape):void{ if (_arg1.m_proxyId != b2Pair.b2_nullProxy){ _arg1.m_body.m_world.m_broadPhase.DestroyProxy(_arg1.m_proxyId); }; } public static function PolyMass(_arg1:b2MassData, _arg2:Array, _arg3:int, _arg4:Number):void{ var _local11:b2Vec2; var _local12:b2Vec2; var _local13:b2Vec2; var _local14:b2Vec2; var _local15:b2Vec2; var _local16:Number; var _local17:Number; var _local18:b2Vec2; 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 _local5:b2Vec2 = new b2Vec2(); _local5.SetZero(); var _local6:Number = 0; var _local7:Number = 0; var _local8:b2Vec2 = new b2Vec2(0, 0); var _local9:Number = (1 / 3); var _local10:int; while (_local10 < _arg3) { _local11 = _local8; _local12 = _arg2[_local10]; _local13 = (((_local10 + 1) < _arg3)) ? _arg2[(_local10 + 1)] : _arg2[0]; _local14 = b2Math.SubtractVV(_local12, _local11); _local15 = b2Math.SubtractVV(_local13, _local11); _local16 = b2Math.b2CrossVV(_local14, _local15); _local17 = (0.5 * _local16); _local6 = (_local6 + _local17); _local18 = new b2Vec2(); _local18.SetV(_local11); _local18.Add(_local12); _local18.Add(_local13); _local18.Multiply((_local9 * _local17)); _local5.Add(_local18); _local19 = _local11.x; _local20 = _local11.y; _local21 = _local14.x; _local22 = _local14.y; _local23 = _local15.x; _local24 = _local15.y; _local25 = ((_local9 * ((0.25 * (((_local21 * _local21) + (_local23 * _local21)) + (_local23 * _local23))) + ((_local19 * _local21) + (_local19 * _local23)))) + ((0.5 * _local19) * _local19)); _local26 = ((_local9 * ((0.25 * (((_local22 * _local22) + (_local24 * _local22)) + (_local24 * _local24))) + ((_local20 * _local22) + (_local20 * _local24)))) + ((0.5 * _local20) * _local20)); _local7 = (_local7 + (_local16 * (_local25 + _local26))); _local10++; }; _arg1.mass = (_arg4 * _local6); _local5.Multiply((1 / _local6)); _arg1.center = _local5; _local7 = (_arg4 * (_local7 - (_local6 * b2Math.b2Dot(_local5, _local5)))); _arg1.I = _local7; } public static function PolyCentroid(_arg1:Array, _arg2:int, _arg3:b2Vec2):void{ 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 _local4:Number = 0; var _local5:Number = 0; var _local6:Number = 0; var _local7:Number = 0; var _local8:Number = 0; var _local9:Number = (1 / 3); var _local10:int; while (_local10 < _arg2) { _local11 = _local7; _local12 = _local8; _local13 = _arg1[_local10].x; _local14 = _arg1[_local10].y; _local15 = (((_local10 + 1) < _arg2)) ? _arg1[(_local10 + 1)].x : _arg1[0].x; _local16 = (((_local10 + 1) < _arg2)) ? _arg1[(_local10 + 1)].y : _arg1[0].y; _local17 = (_local13 - _local11); _local18 = (_local14 - _local12); _local19 = (_local15 - _local11); _local20 = (_local16 - _local12); _local21 = ((_local17 * _local20) - (_local18 * _local19)); _local22 = (0.5 * _local21); _local6 = (_local6 + _local22); _local4 = (_local4 + ((_local22 * _local9) * ((_local11 + _local13) + _local15))); _local5 = (_local5 + ((_local22 * _local9) * ((_local12 + _local14) + _local16))); _local10++; }; _local4 = (_local4 * (1 / _local6)); _local5 = (_local5 * (1 / _local6)); _arg3.Set(_local4, _local5); } public static function Create(_arg1:b2ShapeDef, _arg2:b2Body, _arg3:b2Vec2):b2Shape{ switch (_arg1.type){ case e_circleShape: return (new b2CircleShape(_arg1, _arg2, _arg3)); case e_boxShape: case e_polyShape: return (new b2PolyShape(_arg1, _arg2, _arg3)); case e_lineShape: return (new LineShape(_arg1, _arg2, _arg3)); }; return (null); } } }//package Box2D.Collision.Shapes
Section 8
//b2ShapeDef (Box2D.Collision.Shapes.b2ShapeDef) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2ShapeDef { public var type:int; public var groupIndex:int; public var localPosition:b2Vec2; public var categoryBits:int; public var localRotation:Number; public var density:Number; public var restitution:Number; public var userData;// = null public var maskBits:int; public var friction:Number; public function b2ShapeDef(){ type = b2Shape.e_unknownShape; userData = null; localPosition = new b2Vec2(0, 0); localRotation = 0; friction = 0.2; restitution = 0; density = 0; categoryBits = 1; maskBits = 0xFFFF; groupIndex = 0; } public function ComputeMass(_arg1:b2MassData):void{ var _local2:b2CircleDef; var _local3:b2BoxDef; var _local4:b2PolyDef; var _local5:LineDef; _arg1.center = new b2Vec2(0, 0); if (density == 0){ _arg1.mass = 0; _arg1.center.Set(0, 0); _arg1.I = 0; }; switch (type){ case b2Shape.e_circleShape: _local2 = (this as b2CircleDef); _arg1.mass = (((density * b2Settings.b2_pi) * _local2.radius) * _local2.radius); _arg1.center.Set(0, 0); _arg1.I = (((0.5 * _arg1.mass) * _local2.radius) * _local2.radius); break; case b2Shape.e_boxShape: _local3 = (this as b2BoxDef); _arg1.mass = (((4 * density) * _local3.extents.x) * _local3.extents.y); _arg1.center.Set(0, 0); _arg1.I = ((_arg1.mass / 3) * b2Math.b2Dot(_local3.extents, _local3.extents)); break; case b2Shape.e_polyShape: _local4 = (this as b2PolyDef); b2Shape.PolyMass(_arg1, _local4.vertices, _local4.vertexCount, density); break; case b2Shape.e_lineShape: _local5 = (this as LineDef); _arg1.mass = 0; _arg1.center.Set(0, 0); _arg1.I = 0; break; default: _arg1.mass = 0; _arg1.center.Set(0, 0); _arg1.I = 0; break; }; } } }//package Box2D.Collision.Shapes
Section 9
//LineDef (Box2D.Collision.Shapes.LineDef) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; public class LineDef extends b2ShapeDef { public var start:b2Vec2; public var end:b2Vec2; public function LineDef(){ type = b2Shape.e_lineShape; start = new b2Vec2(); end = new b2Vec2(); } public function setStart(_arg1:Number, _arg2:Number):void{ start.Set(_arg1, _arg2); } public function setEnd(_arg1:Number, _arg2:Number):void{ end.Set(_arg1, _arg2); } public function extend(_arg1:Number, _arg2:Number):void{ start.Set(end.x, end.y); end.Set(_arg1, _arg2); } } }//package Box2D.Collision.Shapes
Section 10
//LineShape (Box2D.Collision.Shapes.LineShape) package Box2D.Collision.Shapes { import flash.geom.*; import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class LineShape extends b2Shape { public var m_localPosition:b2Vec2; public var m_perp:b2Vec2; public var m_end:b2Vec2; public var m_norm:b2Vec2; public var m_start:b2Vec2; public var m_length:Number; public function LineShape(_arg1:b2ShapeDef, _arg2:b2Body, _arg3:b2Vec2){ var _local4:LineDef; m_perp = new b2Vec2(); m_norm = new b2Vec2(); m_localPosition = new b2Vec2(); m_start = new b2Vec2(); m_end = new b2Vec2(); super(_arg1, _arg2); _local4 = (_arg1 as LineDef); m_norm = _local4.end.Copy(); m_norm.Subtract(_local4.start); m_length = m_norm.Length(); m_norm.Normalize(); m_perp.x = m_norm.y; m_perp.y = -(m_norm.x); m_type = b2Shape.e_lineShape; m_start = _local4.start.Copy(); m_end = _local4.end.Copy(); m_R.SetM(m_body.m_R); m_maxRadius = (new Point((m_start.x - m_end.x), (m_start.y - m_end.y)).length / 2); var _local5:b2AABB = new b2AABB(); _local5.minVertex.Set(Math.min(m_start.x, m_end.x), Math.min(m_start.y, m_end.y)); _local5.maxVertex.Set(Math.max(m_start.x, m_end.x), Math.max(m_start.y, m_end.y)); var _local6:b2BroadPhase = m_body.m_world.m_broadPhase; if (_local6.InRange(_local5)){ m_proxyId = _local6.CreateProxy(_local5, this); } else { m_proxyId = b2Pair.b2_nullProxy; m_body.Freeze(); }; } override public function QuickSync(_arg1:b2Vec2, _arg2:b2Mat22):void{ } override public function Support(_arg1:Number, _arg2:Number, _arg3:b2Vec2):void{ } override public function Synchronize(_arg1:b2Vec2, _arg2:b2Mat22, _arg3:b2Vec2, _arg4:b2Mat22):void{ } override public function TestPoint(_arg1:b2Vec2):Boolean{ return (false); } override public function ResetProxy(_arg1:b2BroadPhase):void{ if (m_proxyId == b2Pair.b2_nullProxy){ return; }; var _local2:b2Proxy = _arg1.GetProxy(m_proxyId); _arg1.DestroyProxy(m_proxyId); _local2 = null; var _local3:b2AABB = new b2AABB(); _local3.minVertex.Set(Math.min(m_start.x, m_end.x), Math.min(m_start.y, m_end.y)); _local3.maxVertex.Set(Math.max(m_start.x, m_end.x), Math.max(m_start.y, m_end.y)); if (_arg1.InRange(_local3)){ m_proxyId = _arg1.CreateProxy(_local3, this); } else { m_proxyId = b2Pair.b2_nullProxy; m_body.Freeze(); }; } } }//package Box2D.Collision.Shapes
Section 11
//b2AABB (Box2D.Collision.b2AABB) package Box2D.Collision { import Box2D.Common.Math.*; public class b2AABB { public var minVertex:b2Vec2; public var maxVertex:b2Vec2; public function b2AABB(){ minVertex = new b2Vec2(); maxVertex = new b2Vec2(); super(); } public function IsValid():Boolean{ var _local1:Number = maxVertex.x; var _local2:Number = maxVertex.y; _local1 = maxVertex.x; _local2 = maxVertex.y; _local1 = (_local1 - minVertex.x); _local2 = (_local2 - minVertex.y); var _local3:Boolean = (((_local1 >= 0)) && ((_local2 >= 0))); _local3 = ((((_local3) && (minVertex.IsValid()))) && (maxVertex.IsValid())); return (_local3); } } }//package Box2D.Collision
Section 12
//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 13
//b2BoundValues (Box2D.Collision.b2BoundValues) package Box2D.Collision { public class b2BoundValues { public var lowerValues:Array; public var upperValues:Array; public function b2BoundValues(){ lowerValues = [0, 0]; upperValues = [0, 0]; super(); } } }//package Box2D.Collision
Section 14
//b2BroadPhase (Box2D.Collision.b2BroadPhase) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2BroadPhase { 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 = 0xFFFF; public static const b2_invalid:uint = 0xFFFF; 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.maxVertex.x; var _local5:Number = _arg1.maxVertex.y; _local4 = (_local4 - _arg1.minVertex.x); _local5 = (_local5 - _arg1.minVertex.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.minVertex.x; var _local5:Number = _arg3.minVertex.y; _local4 = b2Math.b2Min(_local4, m_worldAABB.maxVertex.x); _local5 = b2Math.b2Min(_local5, m_worldAABB.maxVertex.y); _local4 = b2Math.b2Max(_local4, m_worldAABB.minVertex.x); _local5 = b2Math.b2Max(_local5, m_worldAABB.minVertex.y); var _local6:Number = _arg3.maxVertex.x; var _local7:Number = _arg3.maxVertex.y; _local6 = b2Math.b2Min(_local6, m_worldAABB.maxVertex.x); _local7 = b2Math.b2Min(_local7, m_worldAABB.maxVertex.y); _local6 = b2Math.b2Max(_local6, m_worldAABB.minVertex.x); _local7 = b2Math.b2Max(_local7, m_worldAABB.minVertex.y); _arg1[0] = (uint((m_quantizationFactor.x * (_local4 - m_worldAABB.minVertex.x))) & (b2Settings.USHRT_MAX - 1)); _arg2[0] = ((uint((m_quantizationFactor.x * (_local6 - m_worldAABB.minVertex.x))) & 0xFFFF) | 1); _arg1[1] = (uint((m_quantizationFactor.y * (_local5 - m_worldAABB.minVertex.y))) & (b2Settings.USHRT_MAX - 1)); _arg2[1] = ((uint((m_quantizationFactor.y * (_local7 - m_worldAABB.minVertex.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.minVertex.x; _local3 = _arg1.minVertex.y; _local2 = (_local2 - m_worldAABB.maxVertex.x); _local3 = (_local3 - m_worldAABB.maxVertex.y); _local4 = m_worldAABB.minVertex.x; _local5 = m_worldAABB.minVertex.y; _local4 = (_local4 - _arg1.maxVertex.x); _local5 = (_local5 - _arg1.maxVertex.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 15
//b2BufferedPair (Box2D.Collision.b2BufferedPair) package Box2D.Collision { public class b2BufferedPair { public var proxyId1:uint; public var proxyId2:uint; } }//package Box2D.Collision
Section 16
//b2Collision (Box2D.Collision.b2Collision) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2Collision { public static const b2_nullFeature:uint = 0xFF; private static var b2CollidePolyTempVec:b2Vec2 = new b2Vec2(); public static function CollidePolyAndLine(_arg1:b2Manifold, _arg2:b2PolyShape, _arg3:LineShape, _arg4:Boolean):void{ var _local7:int; var _local8:int; var _local11:b2ContactPoint; var _local12:b2Vec2; var _local22:Number; var _local23:b2Vec2; var _local24:Number; var _local25:int; var _local26:Boolean; _arg1.pointCount = 0; var _local5:b2Vec2 = b2Math.b2MulTMV(_arg2.m_R, b2Math.SubtractVV(_arg3.m_start, _arg2.m_position)); var _local6:b2Vec2 = b2Math.b2MulTMV(_arg2.m_R, _arg3.m_perp); if (b2Math.b2Dot(_local5, _local6) > 0){ return; }; var _local9:b2Vec2 = b2Math.b2MulTMV(_arg2.m_R, b2Math.SubtractVV(_arg3.m_end, _arg2.m_position)); var _local10:b2Vec2 = b2Math.b2MulTMV(_arg2.m_R, _arg3.m_norm); if (_arg2.m_body.m_invI == 0){ _local22 = -(b2Math.b2Dot(_local5, _local10)); if (_local22 < 0){ _local23 = _local5; _local12 = _arg3.m_start; } else { if (_local22 > _arg3.m_length){ _local23 = _local9; _local12 = _arg3.m_end; }; }; if (_local23 != null){ _local24 = Number.NEGATIVE_INFINITY; _local7 = 0; while (_local7 < _arg2.m_vertexCount) { _local22 = b2Math.b2Dot(_arg2.m_normals[_local7], b2Math.SubtractVV(_local23, (_arg2.m_vertices[_local7] as b2Vec2))); if (_local22 > 0){ return; }; if (_local22 > _local24){ _local24 = _local22; _local8 = _local7; }; _local7++; }; _local7 = _local8; _arg1.pointCount = 1; _arg1.normal = b2Math.b2MulMV(_arg2.m_R, _arg2.m_normals[_local25]); _local11 = _arg1.points[0]; _local11.id.key = 0; _local11.position = _local12.Copy(); _local11.separation = -(_local22); return; }; }; var _local13:Array = new Array((_arg2.m_vertexCount + 2)); var _local14:Array = new Array((_arg2.m_vertexCount + 2)); var _local15:Array = new Array(); var _local16:Boolean; var _local17:Boolean; var _local18:Boolean; var _local19:int = _arg2.m_vertexCount; _local14[0] = b2Math.b2Dot(_local5, _local10); var _local20 = (_local14[0] > 0); var _local21 = (_local14[0] < -(_arg3.m_length)); _local7 = 0; while (_local7 < _arg2.m_vertexCount) { _local12 = b2Math.SubtractVV((_arg2.m_vertices[_local7] as b2Vec2), _local5); _local13[_local7] = b2Math.b2Dot(_local12, _local6); _local14[_local7] = b2Math.b2Dot(_local12, _local10); _local16 = ((_local16) || ((_local13[_local7] <= 0))); _local20 = ((_local20) && ((((_local13[_local7] <= 0)) || ((_local14[_local7] < 0))))); _local21 = ((_local21) && ((((_local13[_local7] <= 0)) || ((_local14[_local7] > _arg3.m_length))))); if ((((((_local13[_local7] <= 0)) && ((_local14[_local7] >= 0)))) && ((_local14[_local7] <= _arg3.m_length)))){ _local15.push(_local7); }; _local7++; }; if (!_local16){ return; }; if (_local15.length > 0){ _local7 = (_arg2.m_vertexCount - 1); _local8 = 0; if (_local20){ while (_local8 < _arg2.m_vertexCount) { if ((((_local13[_local8] <= 0)) && ((_local13[_local7] > 0)))){ _arg1.pointCount = 1; _arg1.normal = b2Math.b2MulMV(_arg2.m_R, _arg2.m_normals[_local7]); _local11 = _arg1.points[0]; _local11.id.key = 0; if (_local26){ _local11.position = _arg3.m_start.Copy(); _local11.separation = ((_arg2.m_normals[_local7].x * (_local5.x - _arg2.m_vertices[_local7].x)) + (_arg2.m_normals[_local7].y * (_local5.y - _arg2.m_vertices[_local7].y))); } else { _local11.position = _arg3.m_end.Copy(); _local11.separation = ((_arg2.m_normals[_local7].x * (_local9.x - _arg2.m_vertices[_local7].x)) + (_arg2.m_normals[_local7].y * (_local9.y - _arg2.m_vertices[_local7].y))); }; return; }; _local7 = _local8; _local8++; }; }; if (_local21){ while (_local8 < _arg2.m_vertexCount) { if ((((_local13[_local8] > 0)) && ((_local13[_local7] <= 0)))){ _arg1.pointCount = 1; _arg1.normal = b2Math.b2MulMV(_arg2.m_R, _arg2.m_normals[_local7]); _local11 = _arg1.points[0]; _local11.id.key = 0; if (_local26){ _local11.position = _arg3.m_start.Copy(); _local11.separation = ((_arg2.m_normals[_local7].x * (_local5.x - _arg2.m_vertices[_local7].x)) + (_arg2.m_normals[_local7].y * (_local5.y - _arg2.m_vertices[_local7].y))); } else { _local11.position = _arg3.m_end.Copy(); _local11.separation = ((_arg2.m_normals[_local7].x * (_local9.x - _arg2.m_vertices[_local7].x)) + (_arg2.m_normals[_local7].y * (_local9.y - _arg2.m_vertices[_local7].y))); }; return; }; _local7 = _local8; _local8++; }; }; while (_local8 < _arg2.m_vertexCount) { if ((((_local13[_local8] <= 0)) && ((_local13[_local7] <= 0)))){ if ((((_local14[_local7] > _arg3.m_length)) && ((_local14[_local8] <= _arg3.m_length)))){ _local12 = intersect(_arg2.m_vertices[_local7], _arg2.m_vertices[_local8], _local9, b2Math.AddVV(_local9, _local6)); _local12.Subtract(_local5); _local13[_local19] = b2Math.b2Dot(_local12, _local6); _local14[_local19] = b2Math.b2Dot(_local12, _local10); _local15.push(_local19); _local19++; }; if ((((_local14[_local7] >= 0)) && ((_local14[_local8] <= 0)))){ _local12 = intersect(_arg2.m_vertices[_local7], _arg2.m_vertices[_local8], _local5, b2Math.AddVV(_local5, _local6)); _local12.Subtract(_local5); _local13[_local19] = b2Math.b2Dot(_local12, _local6); _local14[_local19] = b2Math.b2Dot(_local12, _local10); _local15.push(_local19); _local19++; }; }; _local7 = _local8; _local8++; }; } else { _local7 = (_arg2.m_vertexCount - 1); _local8 = 0; while (_local8 < _arg2.m_vertexCount) { if ((((_local13[_local8] <= 0)) || ((_local13[_local7] <= 0)))){ if ((((_local14[_local7] > _arg3.m_length)) && ((_local14[_local8] <= _arg3.m_length)))){ _local12 = intersect(_arg2.m_vertices[_local7], _arg2.m_vertices[_local8], _local9, b2Math.AddVV(_local9, _local6)); _local12.Subtract(_local5); _local13[_local19] = b2Math.b2Dot(_local12, _local6); if (_local13[_local19] <= 0){ _local14[_local19] = b2Math.b2Dot(_local12, _local10); _local15.push(_local19); _local25 = _local7; _local26 = false; _local19++; }; }; if ((((_local14[_local7] >= 0)) && ((_local14[_local8] <= 0)))){ _local12 = intersect(_arg2.m_vertices[_local7], _arg2.m_vertices[_local8], _local5, b2Math.AddVV(_local5, _local6)); _local12.Subtract(_local5); _local13[_local19] = b2Math.b2Dot(_local12, _local6); if (_local13[_local19] <= 0){ _local14[_local19] = b2Math.b2Dot(_local12, _local10); _local15.push(_local19); _local25 = _local7; _local26 = true; _local19++; }; }; }; _local7 = _local8; _local8++; }; if (_local15.length == 1){ _arg1.pointCount = 1; _arg1.normal = b2Math.b2MulMV(_arg2.m_R, _arg2.m_normals[_local25]); _local11 = _arg1.points[0]; _local11.id.key = 0; if (_local26){ _local11.position = _arg3.m_start.Copy(); _local11.separation = ((_arg2.m_normals[_local25].x * (_local5.x - _arg2.m_vertices[_local25].x)) + (_arg2.m_normals[_local25].y * (_local5.y - _arg2.m_vertices[_local25].y))); } else { _local11.position = _arg3.m_end.Copy(); _local11.separation = ((_arg2.m_normals[_local25].x * (_local9.x - _arg2.m_vertices[_local25].x)) + (_arg2.m_normals[_local25].y * (_local9.y - _arg2.m_vertices[_local25].y))); }; return; }; }; if (_local15.length == 0){ return; }; _local7 = -1; _local8 = -1; for each (_local19 in _local15) { if ((((_local7 == -1)) || ((_local13[_local19] < _local13[_local7])))){ _local8 = _local7; _local7 = _local19; } else { if ((((_local8 == -1)) || ((_local13[_local19] < _local13[_local8])))){ _local8 = _local19; }; }; }; _arg1.normal = _arg3.m_perp.Copy(); _arg1.normal.Multiply(-1); _arg1.pointCount = 1; _local11 = _arg1.points[0]; _local11.id.key = 0; _local11.position = _arg3.m_start.Copy(); _local11.position.Add(b2Math.MulFV(_local14[_local7], _arg3.m_norm)); _local11.position.Add(b2Math.MulFV(_local13[_local7], _arg3.m_perp)); _local11.separation = _local13[_local7]; if (_local8 == -1){ return; }; _arg1.pointCount = 2; _local11 = _arg1.points[1]; _local11.id.key = 0; _local11.position = _arg3.m_start.Copy(); _local11.position.Add(b2Math.MulFV(_local14[_local8], _arg3.m_norm)); _local11.position.Add(b2Math.MulFV(_local13[_local8], _arg3.m_perp)); _local11.separation = _local13[_local8]; _local11.normalImpulse = 0; _local11.tangentImpulse = 0; } public static function EdgeSeparation(_arg1:b2PolyShape, _arg2:int, _arg3:b2PolyShape):Number{ var _local21:b2Vec2; var _local22:Number; var _local4:Array = _arg1.m_vertices; var _local5:int = _arg3.m_vertexCount; var _local6:Array = _arg3.m_vertices; var _local7:Number = _arg1.m_normals[_arg2].x; var _local8:Number = _arg1.m_normals[_arg2].y; var _local9:Number = _local7; var _local10:b2Mat22 = _arg1.m_R; _local7 = ((_local10.col1.x * _local9) + (_local10.col2.x * _local8)); _local8 = ((_local10.col1.y * _local9) + (_local10.col2.y * _local8)); var _local11:Number = _local7; var _local12:Number = _local8; _local10 = _arg3.m_R; _local9 = ((_local11 * _local10.col1.x) + (_local12 * _local10.col1.y)); _local12 = ((_local11 * _local10.col2.x) + (_local12 * _local10.col2.y)); _local11 = _local9; var _local13:int; var _local14:Number = Number.MAX_VALUE; var _local15:int; while (_local15 < _local5) { _local21 = _local6[_local15]; _local22 = ((_local21.x * _local11) + (_local21.y * _local12)); if (_local22 < _local14){ _local14 = _local22; _local13 = _local15; }; _local15++; }; _local10 = _arg1.m_R; var _local16:Number = (_arg1.m_position.x + ((_local10.col1.x * _local4[_arg2].x) + (_local10.col2.x * _local4[_arg2].y))); var _local17:Number = (_arg1.m_position.y + ((_local10.col1.y * _local4[_arg2].x) + (_local10.col2.y * _local4[_arg2].y))); _local10 = _arg3.m_R; var _local18:Number = (_arg3.m_position.x + ((_local10.col1.x * _local6[_local13].x) + (_local10.col2.x * _local6[_local13].y))); var _local19:Number = (_arg3.m_position.y + ((_local10.col1.y * _local6[_local13].x) + (_local10.col2.y * _local6[_local13].y))); _local18 = (_local18 - _local16); _local19 = (_local19 - _local17); var _local20:Number = ((_local18 * _local7) + (_local19 * _local8)); return (_local20); } public static function b2TestOverlap(_arg1:b2AABB, _arg2:b2AABB):Boolean{ var _local3:b2Vec2 = _arg2.minVertex; var _local4:b2Vec2 = _arg1.maxVertex; var _local5:Number = (_local3.x - _local4.x); var _local6:Number = (_local3.y - _local4.y); _local3 = _arg1.minVertex; _local4 = _arg2.maxVertex; 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:b2PolyShape, _arg3:int, _arg4:b2PolyShape):void{ var _local21:int; var _local22:int; var _local25:ClipVertex; var _local26:int; var _local27:int; var _local28:Number; var _local29:Number; var _local30:Number; var _local5:int = _arg2.m_vertexCount; var _local6:Array = _arg2.m_vertices; var _local7:int = _arg4.m_vertexCount; var _local8:Array = _arg4.m_vertices; var _local9:int = _arg3; var _local10:int = (((_arg3 + 1) == _local5)) ? 0 : (_arg3 + 1); var _local11:b2Vec2 = _local6[_local10]; var _local12:Number = _local11.x; var _local13:Number = _local11.y; _local11 = _local6[_local9]; _local12 = (_local12 - _local11.x); _local13 = (_local13 - _local11.y); var _local14:Number = _local12; _local12 = _local13; _local13 = -(_local14); var _local15:Number = (1 / Math.sqrt(((_local12 * _local12) + (_local13 * _local13)))); _local12 = (_local12 * _local15); _local13 = (_local13 * _local15); var _local16:Number = _local12; var _local17:Number = _local13; _local14 = _local16; var _local18:b2Mat22 = _arg2.m_R; _local16 = ((_local18.col1.x * _local14) + (_local18.col2.x * _local17)); _local17 = ((_local18.col1.y * _local14) + (_local18.col2.y * _local17)); var _local19:Number = _local16; var _local20:Number = _local17; _local18 = _arg4.m_R; _local14 = ((_local19 * _local18.col1.x) + (_local20 * _local18.col1.y)); _local20 = ((_local19 * _local18.col2.x) + (_local20 * _local18.col2.y)); _local19 = _local14; var _local23:Number = Number.MAX_VALUE; var _local24:int; while (_local24 < _local7) { _local26 = _local24; _local27 = (((_local24 + 1) < _local7)) ? (_local24 + 1) : 0; _local11 = _local8[_local27]; _local28 = _local11.x; _local29 = _local11.y; _local11 = _local8[_local26]; _local28 = (_local28 - _local11.x); _local29 = (_local29 - _local11.y); _local14 = _local28; _local28 = _local29; _local29 = -(_local14); _local15 = (1 / Math.sqrt(((_local28 * _local28) + (_local29 * _local29)))); _local28 = (_local28 * _local15); _local29 = (_local29 * _local15); _local30 = ((_local28 * _local19) + (_local29 * _local20)); if (_local30 < _local23){ _local23 = _local30; _local21 = _local26; _local22 = _local27; }; _local24++; }; _local25 = _arg1[0]; _local11 = _local25.v; _local11.SetV(_local8[_local21]); _local11.MulM(_arg4.m_R); _local11.Add(_arg4.m_position); _local25.id.features.referenceFace = _arg3; _local25.id.features.incidentEdge = _local21; _local25.id.features.incidentVertex = _local21; _local25 = _arg1[1]; _local11 = _local25.v; _local11.SetV(_local8[_local22]); _local11.MulM(_arg4.m_R); _local11.Add(_arg4.m_position); _local25.id.features.referenceFace = _arg3; _local25.id.features.incidentEdge = _local21; _local25.id.features.incidentVertex = _local22; } public static function b2CollidePolyAndCircle(_arg1:b2Manifold, _arg2:b2PolyShape, _arg3:b2CircleShape, _arg4:Boolean):void{ var _local5:b2ContactPoint; var _local6:Number; var _local7:Number; var _local12:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:b2Vec2; _arg1.pointCount = 0; var _local8:Number = (_arg3.m_position.x - _arg2.m_position.x); var _local9:Number = (_arg3.m_position.y - _arg2.m_position.y); var _local10:b2Mat22 = _arg2.m_R; var _local11:Number = ((_local8 * _local10.col1.x) + (_local9 * _local10.col1.y)); _local9 = ((_local8 * _local10.col2.x) + (_local9 * _local10.col2.y)); _local8 = _local11; var _local13:int; var _local14:Number = -(Number.MAX_VALUE); var _local15:Number = _arg3.m_radius; var _local16:int; while (_local16 < _arg2.m_vertexCount) { _local25 = ((_arg2.m_normals[_local16].x * (_local8 - _arg2.m_vertices[_local16].x)) + (_arg2.m_normals[_local16].y * (_local9 - _arg2.m_vertices[_local16].y))); if (_local25 > _local15){ return; }; if (_local25 > _local14){ _local14 = _local25; _local13 = _local16; }; _local16++; }; if (_local14 < Number.MIN_VALUE){ _arg1.pointCount = 1; _local26 = _arg2.m_normals[_local13]; _arg1.normal.x = ((_local10.col1.x * _local26.x) + (_local10.col2.x * _local26.y)); _arg1.normal.y = ((_local10.col1.y * _local26.x) + (_local10.col2.y * _local26.y)); _local5 = _arg1.points[0]; _local5.id.features.incidentEdge = _local13; _local5.id.features.incidentVertex = b2_nullFeature; _local5.id.features.referenceFace = b2_nullFeature; _local5.id.features.flip = 0; _local5.position.x = (_arg3.m_position.x - (_local15 * _arg1.normal.x)); _local5.position.y = (_arg3.m_position.y - (_local15 * _arg1.normal.y)); _local5.separation = (_local14 - _local15); return; }; var _local17:int = _local13; var _local18:int = (((_local17 + 1) < _arg2.m_vertexCount)) ? (_local17 + 1) : 0; var _local19:Number = (_arg2.m_vertices[_local18].x - _arg2.m_vertices[_local17].x); var _local20:Number = (_arg2.m_vertices[_local18].y - _arg2.m_vertices[_local17].y); var _local21:Number = Math.sqrt(((_local19 * _local19) + (_local20 * _local20))); _local19 = (_local19 / _local21); _local20 = (_local20 / _local21); if (_local21 < Number.MIN_VALUE){ _local6 = (_local8 - _arg2.m_vertices[_local17].x); _local7 = (_local9 - _arg2.m_vertices[_local17].y); _local12 = Math.sqrt(((_local6 * _local6) + (_local7 * _local7))); _local6 = (_local6 / _local12); _local7 = (_local7 / _local12); if (_local12 > _local15){ return; }; _arg1.pointCount = 1; _arg1.normal.Set(((_local10.col1.x * _local6) + (_local10.col2.x * _local7)), ((_local10.col1.y * _local6) + (_local10.col2.y * _local7))); _local5 = _arg1.points[0]; _local5.id.features.incidentEdge = b2_nullFeature; _local5.id.features.incidentVertex = _local17; _local5.id.features.referenceFace = b2_nullFeature; _local5.id.features.flip = 0; _local5.position.x = (_arg3.m_position.x - (_local15 * _arg1.normal.x)); _local5.position.y = (_arg3.m_position.y - (_local15 * _arg1.normal.y)); _local5.separation = (_local12 - _local15); return; }; var _local22:Number = (((_local8 - _arg2.m_vertices[_local17].x) * _local19) + ((_local9 - _arg2.m_vertices[_local17].y) * _local20)); _local5 = _arg1.points[0]; _local5.id.features.incidentEdge = b2_nullFeature; _local5.id.features.incidentVertex = b2_nullFeature; _local5.id.features.referenceFace = b2_nullFeature; _local5.id.features.flip = 0; if (_local22 <= 0){ _local23 = _arg2.m_vertices[_local17].x; _local24 = _arg2.m_vertices[_local17].y; _local5.id.features.incidentVertex = _local17; } else { if (_local22 >= _local21){ _local23 = _arg2.m_vertices[_local18].x; _local24 = _arg2.m_vertices[_local18].y; _local5.id.features.incidentVertex = _local18; } else { _local23 = ((_local19 * _local22) + _arg2.m_vertices[_local17].x); _local24 = ((_local20 * _local22) + _arg2.m_vertices[_local17].y); _local5.id.features.incidentEdge = _local17; }; }; _local6 = (_local8 - _local23); _local7 = (_local9 - _local24); _local12 = Math.sqrt(((_local6 * _local6) + (_local7 * _local7))); _local6 = (_local6 / _local12); _local7 = (_local7 / _local12); if (_local12 > _local15){ return; }; _arg1.pointCount = 1; _arg1.normal.Set(((_local10.col1.x * _local6) + (_local10.col2.x * _local7)), ((_local10.col1.y * _local6) + (_local10.col2.y * _local7))); _local5.position.x = (_arg3.m_position.x - (_local15 * _arg1.normal.x)); _local5.position.y = (_arg3.m_position.y - (_local15 * _arg1.normal.y)); _local5.separation = (_local12 - _local15); } public static function FindMaxSeparation(_arg1:Array, _arg2:b2PolyShape, _arg3:b2PolyShape, _arg4:Boolean):Number{ var _local18:int; var _local19:Number; var _local20:int; var _local21:Number; var _local5:int = _arg2.m_vertexCount; var _local6:Number = (_arg3.m_position.x - _arg2.m_position.x); var _local7:Number = (_arg3.m_position.y - _arg2.m_position.y); var _local8:Number = ((_local6 * _arg2.m_R.col1.x) + (_local7 * _arg2.m_R.col1.y)); var _local9:Number = ((_local6 * _arg2.m_R.col2.x) + (_local7 * _arg2.m_R.col2.y)); var _local10:int; var _local11:Number = -(Number.MAX_VALUE); var _local12:int; while (_local12 < _local5) { _local21 = ((_arg2.m_normals[_local12].x * _local8) + (_arg2.m_normals[_local12].y * _local9)); if (_local21 > _local11){ _local11 = _local21; _local10 = _local12; }; _local12++; }; var _local13:Number = EdgeSeparation(_arg2, _local10, _arg3); if ((((_local13 > 0)) && ((_arg4 == false)))){ return (_local13); }; var _local14:int = (((_local10 - 1) >= 0)) ? (_local10 - 1) : (_local5 - 1); var _local15:Number = EdgeSeparation(_arg2, _local14, _arg3); if ((((_local15 > 0)) && ((_arg4 == false)))){ return (_local15); }; var _local16:int = (((_local10 + 1) < _local5)) ? (_local10 + 1) : 0; var _local17:Number = EdgeSeparation(_arg2, _local16, _arg3); if ((((_local17 > 0)) && ((_arg4 == false)))){ return (_local17); }; if ((((_local15 > _local13)) && ((_local15 > _local17)))){ _local20 = -1; _local18 = _local14; _local19 = _local15; } else { if (_local17 > _local13){ _local20 = 1; _local18 = _local16; _local19 = _local17; } else { _arg1[0] = _local10; return (_local13); }; }; while (true) { if (_local20 == -1){ _local10 = (((_local18 - 1) >= 0)) ? (_local18 - 1) : (_local5 - 1); } else { _local10 = (((_local18 + 1) < _local5)) ? (_local18 + 1) : 0; }; _local13 = EdgeSeparation(_arg2, _local10, _arg3); if ((((_local13 > 0)) && ((_arg4 == false)))){ return (_local13); }; if (_local13 > _local19){ _local18 = _local10; _local19 = _local13; } else { break; }; }; _arg1[0] = _local18; return (_local19); } 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, _arg2[0].v) - _arg4); var _local9:Number = (b2Math.b2Dot(_arg3, _arg2[1].v) - _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 CollideLineAndCircle(_arg1:b2Manifold, _arg2:LineShape, _arg3:b2CircleShape, _arg4:Boolean):void{ var _local7:b2ContactPoint; if (b2Math.b2Dot(b2Math.SubtractVV(_arg3.m_position, _arg2.m_start), _arg2.m_perp) < 0){ return; }; _arg1.pointCount = 0; var _local5:b2Vec2 = _arg3.m_position.Copy(); _local5.Subtract(_arg2.m_start); var _local6:Number = ((_local5.x * _arg2.m_norm.x) + (_local5.y * _arg2.m_norm.y)); if (_local6 < 0){ _local6 = _local5.Length(); if (_local6 < _arg3.m_radius){ _arg1.normal = _local5; _arg1.normal.Multiply((1 / _local6)); } else { return; }; } else { if (_local6 > _arg2.m_length){ _local5 = _arg3.m_position.Copy(); _local5.Subtract(_arg2.m_end); _local6 = _local5.Length(); if (_local6 < _arg3.m_radius){ _arg1.normal = _local5; _arg1.normal.Multiply((1 / _local6)); } else { return; }; } else { _local6 = ((_local5.x * _arg2.m_perp.x) + (_local5.y * _arg2.m_perp.y)); if ((((_local6 < _arg3.m_radius)) && ((_local6 > -(_arg3.m_radius))))){ _arg1.normal = _arg2.m_perp; } else { return; }; }; }; _arg1.pointCount = 1; _local7 = _arg1.points[0]; _local7.id.key = 0; _local7.separation = (_local6 - _arg3.m_radius); _local7.position.x = (_arg3.m_position.x - (_arg3.m_radius * _arg1.normal.x)); _local7.position.y = (_arg3.m_position.y - (_arg3.m_radius * _arg1.normal.y)); } public static function b2CollidePoly(_arg1:b2Manifold, _arg2:b2PolyShape, _arg3:b2PolyShape, _arg4:Boolean):void{ var _local11:b2PolyShape; var _local12:b2PolyShape; var _local13:int; var _local14:int; var _local40:int; var _local43:b2Vec2; var _local44:Number; var _local45:b2ContactPoint; _arg1.pointCount = 0; var _local5:int; var _local6:Array = [_local5]; var _local7:Number = FindMaxSeparation(_local6, _arg2, _arg3, _arg4); _local5 = _local6[0]; if ((((_local7 > 0)) && ((_arg4 == false)))){ return; }; var _local8:int; var _local9:Array = [_local8]; var _local10:Number = FindMaxSeparation(_local9, _arg3, _arg2, _arg4); _local8 = _local9[0]; if ((((_local10 > 0)) && ((_arg4 == false)))){ return; }; var _local15:Number = 0.98; var _local16:Number = 0.001; if (_local10 > ((_local15 * _local7) + _local16)){ _local11 = _arg3; _local12 = _arg2; _local13 = _local8; _local14 = 1; } else { _local11 = _arg2; _local12 = _arg3; _local13 = _local5; _local14 = 0; }; var _local17:Array = [new ClipVertex(), new ClipVertex()]; FindIncidentEdge(_local17, _local11, _local13, _local12); var _local18:int = _local11.m_vertexCount; var _local19:Array = _local11.m_vertices; var _local20:b2Vec2 = _local19[_local13]; var _local21:b2Vec2 = (((_local13 + 1) < _local18)) ? _local19[(_local13 + 1)] : _local19[0]; var _local22:Number = (_local21.x - _local20.x); var _local23:Number = (_local21.y - _local20.y); var _local24:Number = (_local21.x - _local20.x); var _local25:Number = (_local21.y - _local20.y); var _local26:Number = _local24; var _local27:b2Mat22 = _local11.m_R; _local24 = ((_local27.col1.x * _local26) + (_local27.col2.x * _local25)); _local25 = ((_local27.col1.y * _local26) + (_local27.col2.y * _local25)); var _local28:Number = (1 / Math.sqrt(((_local24 * _local24) + (_local25 * _local25)))); _local24 = (_local24 * _local28); _local25 = (_local25 * _local28); var _local29:Number = _local24; var _local30:Number = _local25; _local26 = _local29; _local29 = _local30; _local30 = -(_local26); var _local31:Number = _local20.x; var _local32:Number = _local20.y; _local26 = _local31; _local27 = _local11.m_R; _local31 = ((_local27.col1.x * _local26) + (_local27.col2.x * _local32)); _local32 = ((_local27.col1.y * _local26) + (_local27.col2.y * _local32)); _local31 = (_local31 + _local11.m_position.x); _local32 = (_local32 + _local11.m_position.y); var _local33:Number = _local21.x; var _local34:Number = _local21.y; _local26 = _local33; _local27 = _local11.m_R; _local33 = ((_local27.col1.x * _local26) + (_local27.col2.x * _local34)); _local34 = ((_local27.col1.y * _local26) + (_local27.col2.y * _local34)); _local33 = (_local33 + _local11.m_position.x); _local34 = (_local34 + _local11.m_position.y); var _local35:Number = ((_local29 * _local31) + (_local30 * _local32)); var _local36:Number = -(((_local24 * _local31) + (_local25 * _local32))); var _local37:Number = ((_local24 * _local33) + (_local25 * _local34)); var _local38:Array = [new ClipVertex(), new ClipVertex()]; var _local39:Array = [new ClipVertex(), new ClipVertex()]; b2CollidePolyTempVec.Set(-(_local24), -(_local25)); _local40 = ClipSegmentToLine(_local38, _local17, b2CollidePolyTempVec, _local36); if (_local40 < 2){ return; }; b2CollidePolyTempVec.Set(_local24, _local25); _local40 = ClipSegmentToLine(_local39, _local38, b2CollidePolyTempVec, _local37); if (_local40 < 2){ return; }; if (_local14){ _arg1.normal.Set(-(_local29), -(_local30)); } else { _arg1.normal.Set(_local29, _local30); }; var _local41:int; var _local42:int; while (_local42 < b2Settings.b2_maxManifoldPoints) { _local43 = _local39[_local42].v; _local44 = (((_local29 * _local43.x) + (_local30 * _local43.y)) - _local35); if ((((_local44 <= 0)) || ((_arg4 == true)))){ _local45 = _arg1.points[_local41]; _local45.separation = _local44; _local45.position.SetV(_local39[_local42].v); _local45.id.Set(_local39[_local42].id); _local45.id.features.flip = _local14; _local41++; }; _local42++; }; _arg1.pointCount = _local41; } public static function b2CollideCircle(_arg1:b2Manifold, _arg2:b2CircleShape, _arg3:b2CircleShape, _arg4:Boolean):void{ var _local9:Number; var _local11:Number; var _local12:Number; _arg1.pointCount = 0; var _local5:Number = (_arg3.m_position.x - _arg2.m_position.x); var _local6:Number = (_arg3.m_position.y - _arg2.m_position.y); var _local7:Number = ((_local5 * _local5) + (_local6 * _local6)); var _local8:Number = (_arg2.m_radius + _arg3.m_radius); if ((((_local7 > (_local8 * _local8))) && ((_arg4 == false)))){ return; }; if (_local7 < Number.MIN_VALUE){ _local9 = -(_local8); _arg1.normal.Set(0, 1); } else { _local11 = Math.sqrt(_local7); _local9 = (_local11 - _local8); _local12 = (1 / _local11); _arg1.normal.x = (_local12 * _local5); _arg1.normal.y = (_local12 * _local6); }; _arg1.pointCount = 1; var _local10:b2ContactPoint = _arg1.points[0]; _local10.id.key = 0; _local10.separation = _local9; _local10.position.x = (_arg3.m_position.x - (_arg3.m_radius * _arg1.normal.x)); _local10.position.y = (_arg3.m_position.y - (_arg3.m_radius * _arg1.normal.y)); } private static function intersect(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Vec2, _arg4:b2Vec2):b2Vec2{ var _local5:Number = (_arg2.y - _arg1.y); var _local6:Number = (_arg2.x - _arg1.x); var _local7:Number = ((_arg2.x * _arg1.y) - (_arg1.x * _arg2.y)); var _local8:Number = (_arg4.y - _arg3.y); var _local9:Number = (_arg4.x - _arg3.x); var _local10:Number = ((_arg4.x * _arg3.y) - (_arg3.x * _arg4.y)); var _local11:Number = ((_local5 * _local9) - (_local8 * _local6)); var _local12:b2Vec2 = new b2Vec2(); _local12.Set((((_local6 * _local10) - (_local9 * _local7)) / _local11), (-(((_local8 * _local7) - (_local5 * _local10))) / _local11)); return (_local12); } } }//package Box2D.Collision
Section 17
//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 18
//b2ContactPoint (Box2D.Collision.b2ContactPoint) package Box2D.Collision { import Box2D.Common.Math.*; public class b2ContactPoint { public var tangentImpulse:Number; public var separation:Number; public var position:b2Vec2; public var id:b2ContactID; public var normalImpulse:Number; public function b2ContactPoint(){ position = new b2Vec2(); id = new b2ContactID(); super(); } } }//package Box2D.Collision
Section 19
//b2Manifold (Box2D.Collision.b2Manifold) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2Manifold { public var points:Array; public var normal:b2Vec2; public var pointCount:int; public function b2Manifold(){ points = new Array(b2Settings.b2_maxManifoldPoints); var _local1:int; while (_local1 < b2Settings.b2_maxManifoldPoints) { points[_local1] = new b2ContactPoint(); _local1++; }; normal = new b2Vec2(); } } }//package Box2D.Collision
Section 20
//b2OBB (Box2D.Collision.b2OBB) package Box2D.Collision { import Box2D.Common.Math.*; public class b2OBB { public var R:b2Mat22; public var center:b2Vec2; public var extents:b2Vec2; public function b2OBB(){ R = new b2Mat22(); center = new b2Vec2(); extents = new b2Vec2(); super(); } } }//package Box2D.Collision
Section 21
//b2Pair (Box2D.Collision.b2Pair) package Box2D.Collision { 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 = 0xFFFF; public static var e_pairBuffered:uint = 1; public static var b2_nullProxy:uint = 0xFFFF; public static var b2_tableCapacity:int = 8192; public function SetBuffered():void{ status = (status | e_pairBuffered); } public function IsBuffered():Boolean{ return (((status & e_pairBuffered) == e_pairBuffered)); } public function IsFinal():Boolean{ return (((status & e_pairFinal) == e_pairFinal)); } public function ClearRemoved():void{ status = (status & ~(e_pairRemoved)); } public function SetFinal():void{ status = (status | e_pairFinal); } public function IsRemoved():Boolean{ return (((status & e_pairRemoved) == e_pairRemoved)); } public function ClearBuffered():void{ status = (status & ~(e_pairBuffered)); } public function SetRemoved():void{ status = (status | e_pairRemoved); } } }//package Box2D.Collision
Section 22
//b2PairCallback (Box2D.Collision.b2PairCallback) package Box2D.Collision { public class b2PairCallback { public function PairRemoved(_arg1, _arg2, _arg3):void{ } public function PairAdded(_arg1, _arg2){ return (null); } } }//package Box2D.Collision
Section 23
//b2PairManager (Box2D.Collision.b2PairManager) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2PairManager { public var m_pairCount:int; public var m_pairBuffer:Array; public var m_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; } 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 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
//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 26
//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 27
//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 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 28
//b2Math (Box2D.Common.Math.b2Math) package Box2D.Common.Math { public class b2Math { 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 b2Swap(_arg1:Array, _arg2:Array):void{ var _local3:* = _arg1[0]; _arg1[0] = _arg2[0]; _arg2[0] = _local3; } public static function b2Abs(_arg1:Number):Number{ return (((_arg1 > 0)) ? _arg1 : -(_arg1)); } 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 b2CrossVV(_arg1:b2Vec2, _arg2:b2Vec2):Number{ return (((_arg1.x * _arg2.y) - (_arg1.y * _arg2.x))); } 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 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 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 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 MulFV(_arg1:Number, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2 = new b2Vec2((_arg1 * _arg2.x), (_arg1 * _arg2.y)); return (_local3); } public static function b2MulTMV(_arg1:b2Mat22, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2 = new b2Vec2(b2Dot(_arg2, _arg1.col1), b2Dot(_arg2, _arg1.col2)); return (_local3); } public static function 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 29
//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 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 = Length(); 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 30
//b2Settings (Box2D.Common.b2Settings) package Box2D.Common { import Box2D.Common.Math.*; public class b2Settings { public static const b2_lengthUnitsPerMeter:Number = 5; public static const b2_angularSleepTolerance:Number = 0.0111111111111111; public static const b2_linearSleepTolerance:Number = 0.05; public static const b2_angularSlop:Number = 0.0349065850398866; public static const b2_linearSlop:Number = 0.025; public static const b2_pi:Number = 3.14159265358979; public static const b2_maxShapesPerBody:int = 64; public static const b2_maxProxies:int = 0x0400; public static const b2_velocityThreshold:Number = 5; public static const b2_timeToSleep:Number = 0.5; public static const b2_contactBaumgarte:Number = 0.2; public static const b2_maxPairs:int = 8192; public static const b2_maxManifoldPoints:int = 2; public static const b2_massUnitsPerKilogram:Number = 1; public static const b2_maxAngularCorrection:Number = 0.139626340159546; public static const USHRT_MAX:int = 0xFFFF; public static const b2_maxLinearCorrection:Number = 1; public static const b2_maxPolyVertices:int = 8; public static const b2_timeUnitsPerSecond:Number = 1; public static function b2Assert(_arg1:Boolean):void{ var _local2:b2Vec2; if (!_arg1){ _local2.x++; }; } } }//package Box2D.Common
Section 31
//b2CircleContact (Box2D.Dynamics.Contacts.b2CircleContact) package Box2D.Dynamics.Contacts { import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2CircleContact extends b2Contact { public var m_manifold:Array; public function b2CircleContact(_arg1:b2Shape, _arg2:b2Shape){ m_manifold = [new b2Manifold()]; super(_arg1, _arg2); m_manifold[0].pointCount = 0; m_manifold[0].points[0].normalImpulse = 0; m_manifold[0].points[0].tangentImpulse = 0; } override public function Evaluate():void{ b2Collision.b2CollideCircle(m_manifold[0], (m_shape1 as b2CircleShape), (m_shape2 as b2CircleShape), false); if (m_manifold[0].pointCount > 0){ m_manifoldCount = 1; } else { m_manifoldCount = 0; }; } override public function GetManifolds():Array{ return (m_manifold); } 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 32
//b2Contact (Box2D.Dynamics.Contacts.b2Contact) package Box2D.Dynamics.Contacts { import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2Contact { public var m_shape1:b2Shape; public var m_shape2:b2Shape; public var m_next:b2Contact; public var m_prev:b2Contact; public var m_friction:Number; public var m_manifoldCount:int; public var m_node1:b2ContactNode; public var m_node2:b2ContactNode; public var m_restitution:Number; public var m_flags:uint; public static var s_registers:Array; public static var s_initialized:Boolean = false; public static var e_islandFlag:uint = 1; public static var e_destroyFlag:uint = 2; public function b2Contact(_arg1:b2Shape=null, _arg2:b2Shape=null){ m_node1 = new b2ContactNode(); m_node2 = new b2ContactNode(); super(); m_flags = 0; if (((!(_arg1)) || (!(_arg2)))){ m_shape1 = null; m_shape2 = null; return; }; m_shape1 = _arg1; m_shape2 = _arg2; m_manifoldCount = 0; m_friction = Math.sqrt((m_shape1.m_friction * m_shape2.m_friction)); m_restitution = b2Math.b2Max(m_shape1.m_restitution, m_shape2.m_restitution); m_prev = null; m_next = null; m_node1.contact = null; m_node1.prev = null; m_node1.next = null; m_node1.other = null; m_node2.contact = null; m_node2.prev = null; m_node2.next = null; m_node2.other = null; } public function GetShape1():b2Shape{ return (m_shape1); } public function GetShape2():b2Shape{ return (m_shape2); } public function GetManifoldCount():int{ return (m_manifoldCount); } public function GetNext():b2Contact{ return (m_next); } public function GetManifolds():Array{ return (null); } public function Evaluate():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_polyShape, b2Shape.e_circleShape); AddType(b2PolyContact.Create, b2PolyContact.Destroy, b2Shape.e_polyShape, b2Shape.e_polyShape); AddType(LineAndCircleContact.Create, LineAndCircleContact.Destroy, b2Shape.e_lineShape, b2Shape.e_circleShape); AddType(PolyAndLineContact.Create, PolyAndLineContact.Destroy, b2Shape.e_polyShape, b2Shape.e_lineShape); } public static function Destroy(_arg1:b2Contact, _arg2):void{ if (_arg1.GetManifoldCount() > 0){ _arg1.m_shape1.m_body.WakeUp(); _arg1.m_shape2.m_body.WakeUp(); }; var _local3:int = _arg1.m_shape1.m_type; var _local4:int = _arg1.m_shape2.m_type; var _local5:* = 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 33
//b2ContactConstraint (Box2D.Dynamics.Contacts.b2ContactConstraint) package Box2D.Dynamics.Contacts { import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2ContactConstraint { public var points:Array; public var 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 34
//b2ContactConstraintPoint (Box2D.Dynamics.Contacts.b2ContactConstraintPoint) package Box2D.Dynamics.Contacts { import Box2D.Common.Math.*; public class b2ContactConstraintPoint { public var separation:Number; public var positionImpulse:Number; public var normalImpulse:Number; public var tangentImpulse:Number; public var localAnchor1:b2Vec2; public var localAnchor2:b2Vec2; public var tangentMass:Number; public var normalMass:Number; public var velocityBias:Number; public function b2ContactConstraintPoint(){ localAnchor1 = new b2Vec2(); localAnchor2 = new b2Vec2(); super(); } } }//package Box2D.Dynamics.Contacts
Section 35
//b2ContactNode (Box2D.Dynamics.Contacts.b2ContactNode) package Box2D.Dynamics.Contacts { import Box2D.Dynamics.*; public class b2ContactNode { public var other:b2Body; public var prev:b2ContactNode; public var contact:b2Contact; public var next:b2ContactNode; } }//package Box2D.Dynamics.Contacts
Section 36
//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 37
//b2ContactSolver (Box2D.Dynamics.Contacts.b2ContactSolver) package Box2D.Dynamics.Contacts { import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2ContactSolver { public var m_constraintCount:int; public var m_constraints:Array; public var m_allocator; public function b2ContactSolver(_arg1:Array, _arg2:int, _arg3){ var _local4:int; var _local5:b2Vec2; var _local6:b2Mat22; var _local8:b2Contact; var _local9:b2Body; var _local10:b2Body; var _local11:int; var _local12:Array; 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:int; var _local22:b2Manifold; var _local23:Number; var _local24:Number; var _local25:b2ContactConstraint; var _local26:uint; var _local27:b2ContactPoint; var _local28:b2ContactConstraintPoint; var _local29:Number; var _local30:Number; var _local31:Number; var _local32:Number; var _local33:Number; var _local34:Number; var _local35:Number; var _local36:Number; var _local37:Number; var _local38:Number; var _local39:Number; var _local40:Number; var _local41:Number; var _local42:Number; var _local43:Number; var _local44:Number; var _local45:Number; m_constraints = new Array(); super(); m_allocator = _arg3; m_constraintCount = 0; _local4 = 0; while (_local4 < _arg2) { m_constraintCount = (m_constraintCount + _arg1[_local4].GetManifoldCount()); _local4++; }; _local4 = 0; while (_local4 < m_constraintCount) { m_constraints[_local4] = new b2ContactConstraint(); _local4++; }; var _local7:int; _local4 = 0; while (_local4 < _arg2) { _local8 = _arg1[_local4]; _local9 = _local8.m_shape1.m_body; _local10 = _local8.m_shape2.m_body; _local11 = _local8.GetManifoldCount(); _local12 = _local8.GetManifolds(); _local13 = _local8.m_friction; _local14 = _local8.m_restitution; _local15 = _local9.m_linearVelocity.x; _local16 = _local9.m_linearVelocity.y; _local17 = _local10.m_linearVelocity.x; _local18 = _local10.m_linearVelocity.y; _local19 = _local9.m_angularVelocity; _local20 = _local10.m_angularVelocity; _local21 = 0; while (_local21 < _local11) { _local22 = _local12[_local21]; _local23 = _local22.normal.x; _local24 = _local22.normal.y; _local25 = m_constraints[_local7]; _local25.body1 = _local9; _local25.body2 = _local10; _local25.manifold = _local22; _local25.normal.x = _local23; _local25.normal.y = _local24; _local25.pointCount = _local22.pointCount; _local25.friction = _local13; _local25.restitution = _local14; _local26 = 0; while (_local26 < _local25.pointCount) { _local27 = _local22.points[_local26]; _local28 = _local25.points[_local26]; _local28.normalImpulse = _local27.normalImpulse; _local28.tangentImpulse = _local27.tangentImpulse; _local28.separation = _local27.separation; _local29 = (_local27.position.x - _local9.m_position.x); _local30 = (_local27.position.y - _local9.m_position.y); _local31 = (_local27.position.x - _local10.m_position.x); _local32 = (_local27.position.y - _local10.m_position.y); _local5 = _local28.localAnchor1; _local6 = _local9.m_R; _local5.x = ((_local29 * _local6.col1.x) + (_local30 * _local6.col1.y)); _local5.y = ((_local29 * _local6.col2.x) + (_local30 * _local6.col2.y)); _local5 = _local28.localAnchor2; _local6 = _local10.m_R; _local5.x = ((_local31 * _local6.col1.x) + (_local32 * _local6.col1.y)); _local5.y = ((_local31 * _local6.col2.x) + (_local32 * _local6.col2.y)); _local33 = ((_local29 * _local29) + (_local30 * _local30)); _local34 = ((_local31 * _local31) + (_local32 * _local32)); _local35 = ((_local29 * _local23) + (_local30 * _local24)); _local36 = ((_local31 * _local23) + (_local32 * _local24)); _local37 = (_local9.m_invMass + _local10.m_invMass); _local37 = (_local37 + ((_local9.m_invI * (_local33 - (_local35 * _local35))) + (_local10.m_invI * (_local34 - (_local36 * _local36))))); _local28.normalMass = (1 / _local37); _local38 = _local24; _local39 = -(_local23); _local40 = ((_local29 * _local38) + (_local30 * _local39)); _local41 = ((_local31 * _local38) + (_local32 * _local39)); _local42 = (_local9.m_invMass + _local10.m_invMass); _local42 = (_local42 + ((_local9.m_invI * (_local33 - (_local40 * _local40))) + (_local10.m_invI * (_local34 - (_local41 * _local41))))); _local28.tangentMass = (1 / _local42); _local28.velocityBias = 0; if (_local28.separation > 0){ _local28.velocityBias = (-60 * _local28.separation); }; _local43 = (((_local17 + (-(_local20) * _local32)) - _local15) - (-(_local19) * _local30)); _local44 = (((_local18 + (_local20 * _local31)) - _local16) - (_local19 * _local29)); _local45 = ((_local25.normal.x * _local43) + (_local25.normal.y * _local44)); if (_local45 < -(b2Settings.b2_velocityThreshold)){ _local28.velocityBias = (_local28.velocityBias + (-(_local25.restitution) * _local45)); }; _local26++; }; _local7++; _local21++; }; _local4++; }; } 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:int; var _local32:Number; var _local33:Number; var _local34: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); _local31 = _local16.pointCount; _local1 = 0; while (_local1 < _local31) { _local2 = _local16.points[_local1]; _local13 = _local17.m_R; _local14 = _local2.localAnchor1; _local3 = ((_local13.col1.x * _local14.x) + (_local13.col2.x * _local14.y)); _local4 = ((_local13.col1.y * _local14.x) + (_local13.col2.y * _local14.y)); _local13 = _local18.m_R; _local14 = _local2.localAnchor2; _local5 = ((_local13.col1.x * _local14.x) + (_local13.col2.x * _local14.y)); _local6 = ((_local13.col1.y * _local14.x) + (_local13.col2.y * _local14.y)); _local7 = (((_local22.x + (-(_local21) * _local6)) - _local20.x) - (-(_local19) * _local4)); _local8 = (((_local22.y + (_local21 * _local5)) - _local20.y) - (_local19 * _local3)); _local32 = ((_local7 * _local27) + (_local8 * _local28)); _local9 = (-(_local2.normalMass) * (_local32 - _local2.velocityBias)); _local10 = b2Math.b2Max((_local2.normalImpulse + _local9), 0); _local9 = (_local10 - _local2.normalImpulse); _local11 = (_local9 * _local27); _local12 = (_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.normalImpulse = _local10; _local7 = (((_local22.x + (-(_local21) * _local6)) - _local20.x) - (-(_local19) * _local4)); _local8 = (((_local22.y + (_local21 * _local5)) - _local20.y) - (_local19 * _local3)); _local33 = ((_local7 * _local29) + (_local8 * _local30)); _local9 = (_local2.tangentMass * -(_local33)); _local34 = (_local16.friction * _local2.normalImpulse); _local10 = b2Math.b2Clamp((_local2.tangentImpulse + _local9), -(_local34), _local34); _local9 = (_local10 - _local2.tangentImpulse); _local11 = (_local9 * _local29); _local12 = (_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.tangentImpulse = _local10; _local1++; }; _local17.m_angularVelocity = _local19; _local18.m_angularVelocity = _local21; _local15++; }; } public function PreSolve():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:int; var _local17:int; var _local18:b2ContactConstraintPoint; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25: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){ _local17 = _local5.pointCount; _local16 = 0; while (_local16 < _local17) { _local18 = _local5.points[_local16]; _local19 = ((_local18.normalImpulse * _local12) + (_local18.tangentImpulse * _local14)); _local20 = ((_local18.normalImpulse * _local13) + (_local18.tangentImpulse * _local15)); _local3 = _local6.m_R; _local1 = _local18.localAnchor1; _local21 = ((_local3.col1.x * _local1.x) + (_local3.col2.x * _local1.y)); _local22 = ((_local3.col1.y * _local1.x) + (_local3.col2.y * _local1.y)); _local3 = _local7.m_R; _local1 = _local18.localAnchor2; _local23 = ((_local3.col1.x * _local1.x) + (_local3.col2.x * _local1.y)); _local24 = ((_local3.col1.y * _local1.x) + (_local3.col2.y * _local1.y)); _local6.m_angularVelocity = (_local6.m_angularVelocity - (_local9 * ((_local21 * _local20) - (_local22 * _local19)))); _local6.m_linearVelocity.x = (_local6.m_linearVelocity.x - (_local8 * _local19)); _local6.m_linearVelocity.y = (_local6.m_linearVelocity.y - (_local8 * _local20)); _local7.m_angularVelocity = (_local7.m_angularVelocity + (_local11 * ((_local23 * _local20) - (_local24 * _local19)))); _local7.m_linearVelocity.x = (_local7.m_linearVelocity.x + (_local10 * _local19)); _local7.m_linearVelocity.y = (_local7.m_linearVelocity.y + (_local10 * _local20)); _local18.positionImpulse = 0; _local16++; }; } else { _local17 = _local5.pointCount; _local16 = 0; while (_local16 < _local17) { _local25 = _local5.points[_local16]; _local25.normalImpulse = 0; _local25.tangentImpulse = 0; _local25.positionImpulse = 0; _local16++; }; }; _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:Number; var _local20:Number; var _local21:int; var _local22:int; var _local23:b2ContactConstraintPoint; var _local24:Number; var _local25:Number; var _local26:Number; var _local27:Number; var _local28:Number; var _local29:Number; var _local30:Number; var _local31:Number; var _local32:Number; var _local33:Number; var _local34:Number; var _local35:Number; var _local36:Number; var _local37:Number; var _local38:Number; var _local39:Number; var _local2:Number = 0; var _local5:int; while (_local5 < m_constraintCount) { _local6 = m_constraints[_local5]; _local7 = _local6.body1; _local8 = _local6.body2; _local9 = _local7.m_position; _local10 = _local7.m_rotation; _local11 = _local8.m_position; _local12 = _local8.m_rotation; _local13 = _local7.m_invMass; _local14 = _local7.m_invI; _local15 = _local8.m_invMass; _local16 = _local8.m_invI; _local17 = _local6.normal.x; _local18 = _local6.normal.y; _local19 = _local18; _local20 = -(_local17); _local21 = _local6.pointCount; _local22 = 0; while (_local22 < _local21) { _local23 = _local6.points[_local22]; _local3 = _local7.m_R; _local4 = _local23.localAnchor1; _local24 = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y)); _local25 = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y)); _local3 = _local8.m_R; _local4 = _local23.localAnchor2; _local26 = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y)); _local27 = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y)); _local28 = (_local9.x + _local24); _local29 = (_local9.y + _local25); _local30 = (_local11.x + _local26); _local31 = (_local11.y + _local27); _local32 = (_local30 - _local28); _local33 = (_local31 - _local29); _local34 = (((_local32 * _local17) + (_local33 * _local18)) + _local23.separation); _local2 = b2Math.b2Min(_local2, _local34); _local35 = (_arg1 * b2Math.b2Clamp((_local34 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0)); _local36 = (-(_local23.normalMass) * _local35); _local37 = _local23.positionImpulse; _local23.positionImpulse = b2Math.b2Max((_local37 + _local36), 0); _local36 = (_local23.positionImpulse - _local37); _local38 = (_local36 * _local17); _local39 = (_local36 * _local18); _local9.x = (_local9.x - (_local13 * _local38)); _local9.y = (_local9.y - (_local13 * _local39)); _local10 = (_local10 - (_local14 * ((_local24 * _local39) - (_local25 * _local38)))); _local7.m_R.Set(_local10); _local11.x = (_local11.x + (_local15 * _local38)); _local11.y = (_local11.y + (_local15 * _local39)); _local12 = (_local12 + (_local16 * ((_local26 * _local39) - (_local27 * _local38)))); _local8.m_R.Set(_local12); _local22++; }; _local7.m_rotation = _local10; _local8.m_rotation = _local12; _local5++; }; return ((_local2 >= -(b2Settings.b2_linearSlop))); } public function PostSolve():void{ var _local2:b2ContactConstraint; var _local3:b2Manifold; var _local4:int; var _local5:b2ContactPoint; var _local6:b2ContactConstraintPoint; var _local1:int; while (_local1 < m_constraintCount) { _local2 = m_constraints[_local1]; _local3 = _local2.manifold; _local4 = 0; while (_local4 < _local2.pointCount) { _local5 = _local3.points[_local4]; _local6 = _local2.points[_local4]; _local5.normalImpulse = _local6.normalImpulse; _local5.tangentImpulse = _local6.tangentImpulse; _local4++; }; _local1++; }; } } }//package Box2D.Dynamics.Contacts
Section 38
//b2NullContact (Box2D.Dynamics.Contacts.b2NullContact) package Box2D.Dynamics.Contacts { public class b2NullContact extends b2Contact { public function b2NullContact():void{ } override public function Evaluate():void{ } override public function GetManifolds():Array{ return (null); } } }//package Box2D.Dynamics.Contacts
Section 39
//b2PolyAndCircleContact (Box2D.Dynamics.Contacts.b2PolyAndCircleContact) package Box2D.Dynamics.Contacts { import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2PolyAndCircleContact extends b2Contact { public var m_manifold:Array; public function b2PolyAndCircleContact(_arg1:b2Shape, _arg2:b2Shape){ m_manifold = [new b2Manifold()]; super(_arg1, _arg2); m_manifold[0].pointCount = 0; m_manifold[0].points[0].normalImpulse = 0; m_manifold[0].points[0].tangentImpulse = 0; } override public function Evaluate():void{ b2Collision.b2CollidePolyAndCircle(m_manifold[0], (m_shape1 as b2PolyShape), (m_shape2 as b2CircleShape), false); if (m_manifold[0].pointCount > 0){ m_manifoldCount = 1; } else { m_manifoldCount = 0; }; } override public function GetManifolds():Array{ return (m_manifold); } 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 40
//b2PolyContact (Box2D.Dynamics.Contacts.b2PolyContact) package Box2D.Dynamics.Contacts { import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2PolyContact extends b2Contact { public var m_manifold:Array; private var m0:b2Manifold; public function b2PolyContact(_arg1:b2Shape, _arg2:b2Shape):void{ m0 = new b2Manifold(); m_manifold = [new b2Manifold()]; super(_arg1, _arg2); m_manifold[0].pointCount = 0; } override public function Evaluate():void{ var _local4:b2ContactPoint; var _local5:b2ContactPoint; var _local6:Array; var _local7:int; var _local8:b2ContactPoint; var _local9:uint; var _local10:int; var _local11:b2ContactPoint; var _local12:b2ContactID; var _local1:b2Manifold = m_manifold[0]; var _local2:Array = m0.points; var _local3:int; while (_local3 < _local1.pointCount) { _local4 = _local2[_local3]; _local5 = _local1.points[_local3]; _local4.normalImpulse = _local5.normalImpulse; _local4.tangentImpulse = _local5.tangentImpulse; _local4.id = _local5.id.Copy(); _local3++; }; m0.pointCount = _local1.pointCount; b2Collision.b2CollidePoly(_local1, (m_shape1 as b2PolyShape), (m_shape2 as b2PolyShape), false); if (_local1.pointCount > 0){ _local6 = [false, false]; _local7 = 0; while (_local7 < _local1.pointCount) { _local8 = _local1.points[_local7]; _local8.normalImpulse = 0; _local8.tangentImpulse = 0; _local9 = _local8.id.key; _local10 = 0; while (_local10 < m0.pointCount) { if (_local6[_local10] == true){ } else { _local11 = m0.points[_local10]; _local12 = _local11.id; if (_local12.key == _local9){ _local6[_local10] = true; _local8.normalImpulse = _local11.normalImpulse; _local8.tangentImpulse = _local11.tangentImpulse; break; }; }; _local10++; }; _local7++; }; m_manifoldCount = 1; } else { m_manifoldCount = 0; }; } override public function GetManifolds():Array{ return (m_manifold); } public static function Destroy(_arg1:b2Contact, _arg2):void{ } public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{ return (new b2PolyContact(_arg1, _arg2)); } } }//package Box2D.Dynamics.Contacts
Section 41
//LineAndCircleContact (Box2D.Dynamics.Contacts.LineAndCircleContact) package Box2D.Dynamics.Contacts { import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class LineAndCircleContact extends b2Contact { public var m_manifold:Array; public function LineAndCircleContact(_arg1:b2Shape, _arg2:b2Shape){ m_manifold = [new b2Manifold()]; super(_arg1, _arg2); b2Settings.b2Assert((m_shape1.m_type == b2Shape.e_lineShape)); b2Settings.b2Assert((m_shape2.m_type == b2Shape.e_circleShape)); m_manifold[0].pointCount = 0; m_manifold[0].points[0].normalImpulse = 0; m_manifold[0].points[0].tangentImpulse = 0; } override public function Evaluate():void{ b2Collision.CollideLineAndCircle(m_manifold[0], (m_shape1 as LineShape), (m_shape2 as b2CircleShape), false); if (m_manifold[0].pointCount > 0){ m_manifoldCount = 1; } else { m_manifoldCount = 0; }; } override public function GetManifolds():Array{ return (m_manifold); } public static function Destroy(_arg1:b2Contact, _arg2):void{ } public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{ return (new LineAndCircleContact(_arg1, _arg2)); } } }//package Box2D.Dynamics.Contacts
Section 42
//PolyAndLineContact (Box2D.Dynamics.Contacts.PolyAndLineContact) package Box2D.Dynamics.Contacts { import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class PolyAndLineContact extends b2Contact { public var m_manifold:Array; public function PolyAndLineContact(_arg1:b2Shape, _arg2:b2Shape){ m_manifold = [new b2Manifold()]; super(_arg1, _arg2); m_manifold[0].pointCount = 0; m_manifold[0].points[0].normalImpulse = 0; m_manifold[0].points[0].tangentImpulse = 0; } override public function Evaluate():void{ b2Collision.CollidePolyAndLine(m_manifold[0], (m_shape1 as b2PolyShape), (m_shape2 as LineShape), false); if (m_manifold[0].pointCount > 0){ m_manifoldCount = 1; } else { m_manifoldCount = 0; }; } override public function GetManifolds():Array{ return (m_manifold); } public static function Destroy(_arg1:b2Contact, _arg2):void{ } public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{ return (new PolyAndLineContact(_arg1, _arg2)); } } }//package Box2D.Dynamics.Contacts
Section 43
//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_impulse:Number; public var m_length: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); _local2 = m_body1.m_R; _local3 = (_arg1.anchorPoint1.x - m_body1.m_position.x); _local4 = (_arg1.anchorPoint1.y - m_body1.m_position.y); m_localAnchor1.x = ((_local3 * _local2.col1.x) + (_local4 * _local2.col1.y)); m_localAnchor1.y = ((_local3 * _local2.col2.x) + (_local4 * _local2.col2.y)); _local2 = m_body2.m_R; _local3 = (_arg1.anchorPoint2.x - m_body2.m_position.x); _local4 = (_arg1.anchorPoint2.y - m_body2.m_position.y); m_localAnchor2.x = ((_local3 * _local2.col1.x) + (_local4 * _local2.col1.y)); m_localAnchor2.y = ((_local3 * _local2.col2.x) + (_local4 * _local2.col2.y)); _local3 = (_arg1.anchorPoint2.x - _arg1.anchorPoint1.x); _local4 = (_arg1.anchorPoint2.y - _arg1.anchorPoint1.y); m_length = Math.sqrt(((_local3 * _local3) + (_local4 * _local4))); m_impulse = 0; } override public function GetAnchor1():b2Vec2{ return (b2Math.AddVV(m_body1.m_position, b2Math.b2MulMV(m_body1.m_R, m_localAnchor1))); } override public function GetAnchor2():b2Vec2{ return (b2Math.AddVV(m_body2.m_position, b2Math.b2MulMV(m_body2.m_R, m_localAnchor2))); } override public function GetReactionTorque(_arg1:Number):Number{ return (0); } override public function GetReactionForce(_arg1:Number):b2Vec2{ var _local2:b2Vec2 = new b2Vec2(); _local2.SetV(m_u); _local2.Multiply((m_impulse * _arg1)); return (_local2); } override public function SolvePositionConstraints():Boolean{ var _local1:b2Mat22; _local1 = m_body1.m_R; var _local2:Number = ((_local1.col1.x * m_localAnchor1.x) + (_local1.col2.x * m_localAnchor1.y)); var _local3:Number = ((_local1.col1.y * m_localAnchor1.x) + (_local1.col2.y * m_localAnchor1.y)); _local1 = m_body2.m_R; var _local4:Number = ((_local1.col1.x * m_localAnchor2.x) + (_local1.col2.x * m_localAnchor2.y)); var _local5:Number = ((_local1.col1.y * m_localAnchor2.x) + (_local1.col2.y * m_localAnchor2.y)); var _local6:Number = (((m_body2.m_position.x + _local4) - m_body1.m_position.x) - _local2); var _local7:Number = (((m_body2.m_position.y + _local5) - m_body1.m_position.y) - _local3); var _local8:Number = Math.sqrt(((_local6 * _local6) + (_local7 * _local7))); _local6 = (_local6 / _local8); _local7 = (_local7 / _local8); var _local9:Number = (_local8 - m_length); _local9 = b2Math.b2Clamp(_local9, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection); var _local10:Number = (-(m_mass) * _local9); m_u.Set(_local6, _local7); var _local11:Number = (_local10 * m_u.x); var _local12:Number = (_local10 * m_u.y); m_body1.m_position.x = (m_body1.m_position.x - (m_body1.m_invMass * _local11)); m_body1.m_position.y = (m_body1.m_position.y - (m_body1.m_invMass * _local12)); m_body1.m_rotation = (m_body1.m_rotation - (m_body1.m_invI * ((_local2 * _local12) - (_local3 * _local11)))); m_body2.m_position.x = (m_body2.m_position.x + (m_body2.m_invMass * _local11)); m_body2.m_position.y = (m_body2.m_position.y + (m_body2.m_invMass * _local12)); m_body2.m_rotation = (m_body2.m_rotation + (m_body2.m_invI * ((_local4 * _local12) - (_local5 * _local11)))); m_body1.m_R.Set(m_body1.m_rotation); m_body2.m_R.Set(m_body2.m_rotation); return ((b2Math.b2Abs(_local9) < b2Settings.b2_linearSlop)); } override public function PrepareVelocitySolver():void{ var _local1:b2Mat22; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local9:Number; var _local10:Number; _local1 = m_body1.m_R; _local2 = ((_local1.col1.x * m_localAnchor1.x) + (_local1.col2.x * m_localAnchor1.y)); _local3 = ((_local1.col1.y * m_localAnchor1.x) + (_local1.col2.y * m_localAnchor1.y)); _local1 = m_body2.m_R; _local4 = ((_local1.col1.x * m_localAnchor2.x) + (_local1.col2.x * m_localAnchor2.y)); _local5 = ((_local1.col1.y * m_localAnchor2.x) + (_local1.col2.y * m_localAnchor2.y)); m_u.x = (((m_body2.m_position.x + _local4) - m_body1.m_position.x) - _local2); m_u.y = (((m_body2.m_position.y + _local5) - m_body1.m_position.y) - _local3); var _local6:Number = Math.sqrt(((m_u.x * m_u.x) + (m_u.y * m_u.y))); if (_local6 > b2Settings.b2_linearSlop){ m_u.Multiply((1 / _local6)); } else { m_u.SetZero(); }; var _local7:Number = ((_local2 * m_u.y) - (_local3 * m_u.x)); var _local8:Number = ((_local4 * m_u.y) - (_local5 * m_u.x)); m_mass = (((m_body1.m_invMass + ((m_body1.m_invI * _local7) * _local7)) + m_body2.m_invMass) + ((m_body2.m_invI * _local8) * _local8)); m_mass = (1 / m_mass); if (b2World.s_enableWarmStarting){ _local9 = (m_impulse * m_u.x); _local10 = (m_impulse * m_u.y); m_body1.m_linearVelocity.x = (m_body1.m_linearVelocity.x - (m_body1.m_invMass * _local9)); m_body1.m_linearVelocity.y = (m_body1.m_linearVelocity.y - (m_body1.m_invMass * _local10)); m_body1.m_angularVelocity = (m_body1.m_angularVelocity - (m_body1.m_invI * ((_local2 * _local10) - (_local3 * _local9)))); m_body2.m_linearVelocity.x = (m_body2.m_linearVelocity.x + (m_body2.m_invMass * _local9)); m_body2.m_linearVelocity.y = (m_body2.m_linearVelocity.y + (m_body2.m_invMass * _local10)); m_body2.m_angularVelocity = (m_body2.m_angularVelocity + (m_body2.m_invI * ((_local4 * _local10) - (_local5 * _local9)))); } else { m_impulse = 0; }; } override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Mat22; _local2 = m_body1.m_R; var _local3:Number = ((_local2.col1.x * m_localAnchor1.x) + (_local2.col2.x * m_localAnchor1.y)); var _local4:Number = ((_local2.col1.y * m_localAnchor1.x) + (_local2.col2.y * m_localAnchor1.y)); _local2 = m_body2.m_R; var _local5:Number = ((_local2.col1.x * m_localAnchor2.x) + (_local2.col2.x * m_localAnchor2.y)); var _local6:Number = ((_local2.col1.y * m_localAnchor2.x) + (_local2.col2.y * m_localAnchor2.y)); var _local7:Number = (m_body1.m_linearVelocity.x + (-(m_body1.m_angularVelocity) * _local4)); var _local8:Number = (m_body1.m_linearVelocity.y + (m_body1.m_angularVelocity * _local3)); var _local9:Number = (m_body2.m_linearVelocity.x + (-(m_body2.m_angularVelocity) * _local6)); var _local10:Number = (m_body2.m_linearVelocity.y + (m_body2.m_angularVelocity * _local5)); var _local11:Number = ((m_u.x * (_local9 - _local7)) + (m_u.y * (_local10 - _local8))); var _local12:Number = (-(m_mass) * _local11); m_impulse = (m_impulse + _local12); var _local13:Number = (_local12 * m_u.x); var _local14:Number = (_local12 * m_u.y); m_body1.m_linearVelocity.x = (m_body1.m_linearVelocity.x - (m_body1.m_invMass * _local13)); m_body1.m_linearVelocity.y = (m_body1.m_linearVelocity.y - (m_body1.m_invMass * _local14)); m_body1.m_angularVelocity = (m_body1.m_angularVelocity - (m_body1.m_invI * ((_local3 * _local14) - (_local4 * _local13)))); m_body2.m_linearVelocity.x = (m_body2.m_linearVelocity.x + (m_body2.m_invMass * _local13)); m_body2.m_linearVelocity.y = (m_body2.m_linearVelocity.y + (m_body2.m_invMass * _local14)); m_body2.m_angularVelocity = (m_body2.m_angularVelocity + (m_body2.m_invI * ((_local5 * _local14) - (_local6 * _local13)))); } } }//package Box2D.Dynamics.Joints
Section 44
//b2DistanceJointDef (Box2D.Dynamics.Joints.b2DistanceJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; public class b2DistanceJointDef extends b2JointDef { public var anchorPoint1:b2Vec2; public var anchorPoint2:b2Vec2; public function b2DistanceJointDef(){ anchorPoint1 = new b2Vec2(); anchorPoint2 = new b2Vec2(); super(); type = b2Joint.e_distanceJoint; } } }//package Box2D.Dynamics.Joints
Section 45
//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_revolute2:b2RevoluteJoint; public var m_localAnchor1:b2Vec2; public var m_localAnchor2:b2Vec2; public var m_ratio:Number; public var m_mass:Number; public var m_impulse: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_impulse = 0; } override public function GetAnchor1():b2Vec2{ var _local1:b2Mat22 = m_body1.m_R; return (new b2Vec2((m_body1.m_position.x + ((_local1.col1.x * m_localAnchor1.x) + (_local1.col2.x * m_localAnchor1.y))), (m_body1.m_position.y + ((_local1.col1.y * m_localAnchor1.x) + (_local1.col2.y * m_localAnchor1.y))))); } override public function GetAnchor2():b2Vec2{ var _local1:b2Mat22 = m_body2.m_R; return (new b2Vec2((m_body2.m_position.x + ((_local1.col1.x * m_localAnchor2.x) + (_local1.col2.x * m_localAnchor2.y))), (m_body2.m_position.y + ((_local1.col1.y * m_localAnchor2.x) + (_local1.col2.y * m_localAnchor2.y))))); } override public function PrepareVelocitySolver():void{ var _local3:b2Body; var _local4:b2Body; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:b2Mat22; var _local10:b2Vec2; var _local11:Number; var _local1:b2Body = m_ground1; var _local2:b2Body = m_ground2; _local3 = m_body1; _local4 = m_body2; var _local12:Number = 0; m_J.SetZero(); if (m_revolute1){ m_J.angular1 = -1; _local12 = (_local12 + _local3.m_invI); } else { _local9 = _local1.m_R; _local10 = m_prismatic1.m_localXAxis1; _local5 = ((_local9.col1.x * _local10.x) + (_local9.col2.x * _local10.y)); _local6 = ((_local9.col1.y * _local10.x) + (_local9.col2.y * _local10.y)); _local9 = _local3.m_R; _local7 = ((_local9.col1.x * m_localAnchor1.x) + (_local9.col2.x * m_localAnchor1.y)); _local8 = ((_local9.col1.y * m_localAnchor1.x) + (_local9.col2.y * m_localAnchor1.y)); _local11 = ((_local7 * _local6) - (_local8 * _local5)); m_J.linear1.Set(-(_local5), -(_local6)); m_J.angular1 = -(_local11); _local12 = (_local12 + (_local3.m_invMass + ((_local3.m_invI * _local11) * _local11))); }; if (m_revolute2){ m_J.angular2 = -(m_ratio); _local12 = (_local12 + ((m_ratio * m_ratio) * _local4.m_invI)); } else { _local9 = _local2.m_R; _local10 = m_prismatic2.m_localXAxis1; _local5 = ((_local9.col1.x * _local10.x) + (_local9.col2.x * _local10.y)); _local6 = ((_local9.col1.y * _local10.x) + (_local9.col2.y * _local10.y)); _local9 = _local4.m_R; _local7 = ((_local9.col1.x * m_localAnchor2.x) + (_local9.col2.x * m_localAnchor2.y)); _local8 = ((_local9.col1.y * m_localAnchor2.x) + (_local9.col2.y * m_localAnchor2.y)); _local11 = ((_local7 * _local6) - (_local8 * _local5)); m_J.linear2.Set((-(m_ratio) * _local5), (-(m_ratio) * _local6)); m_J.angular2 = (-(m_ratio) * _local11); _local12 = (_local12 + ((m_ratio * m_ratio) * (_local4.m_invMass + ((_local4.m_invI * _local11) * _local11)))); }; m_mass = (1 / _local12); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local3.m_invMass * m_impulse) * m_J.linear1.x)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local3.m_invMass * m_impulse) * m_J.linear1.y)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local3.m_invI * m_impulse) * m_J.angular1)); _local4.m_linearVelocity.x = (_local4.m_linearVelocity.x + ((_local4.m_invMass * m_impulse) * m_J.linear2.x)); _local4.m_linearVelocity.y = (_local4.m_linearVelocity.y + ((_local4.m_invMass * m_impulse) * m_J.linear2.y)); _local4.m_angularVelocity = (_local4.m_angularVelocity + ((_local4.m_invI * m_impulse) * m_J.angular2)); } override public function GetReactionTorque(_arg1:Number):Number{ return (0); } override public function GetReactionForce(_arg1:Number):b2Vec2{ return (new b2Vec2()); } 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_position.x = (_local2.m_position.x + ((_local2.m_invMass * _local7) * m_J.linear1.x)); _local2.m_position.y = (_local2.m_position.y + ((_local2.m_invMass * _local7) * m_J.linear1.y)); _local2.m_rotation = (_local2.m_rotation + ((_local2.m_invI * _local7) * m_J.angular1)); _local3.m_position.x = (_local3.m_position.x + ((_local3.m_invMass * _local7) * m_J.linear2.x)); _local3.m_position.y = (_local3.m_position.y + ((_local3.m_invMass * _local7) * m_J.linear2.y)); _local3.m_rotation = (_local3.m_rotation + ((_local3.m_invI * _local7) * m_J.angular2)); _local2.m_R.Set(_local2.m_rotation); _local3.m_R.Set(_local3.m_rotation); 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 = (-(m_mass) * _local4); m_impulse = (m_impulse + _local5); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local2.m_invMass * _local5) * m_J.linear1.x)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local2.m_invMass * _local5) * m_J.linear1.y)); _local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local2.m_invI * _local5) * m_J.angular1)); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local3.m_invMass * _local5) * m_J.linear2.x)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local3.m_invMass * _local5) * m_J.linear2.y)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local3.m_invI * _local5) * m_J.angular2)); } } }//package Box2D.Dynamics.Joints
Section 46
//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 47
//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 48
//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_collideConnected:Boolean; public var m_prev:b2Joint; public var m_next:b2Joint; public var m_type:int; public var m_node1:b2JointNode; public var m_node2:b2JointNode; 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 b2JointNode(); m_node2 = new b2JointNode(); super(); m_type = _arg1.type; m_prev = null; m_next = null; m_body1 = _arg1.body1; m_body2 = _arg1.body2; m_collideConnected = _arg1.collideConnected; m_islandFlag = false; m_userData = _arg1.userData; } public function GetAnchor1():b2Vec2{ return (null); } public function GetAnchor2():b2Vec2{ return (null); } public function GetNext():b2Joint{ return (m_next); } public function GetType():int{ return (m_type); } public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ } public function PrepareVelocitySolver():void{ } public function PreparePositionSolver():void{ } public function GetReactionTorque(_arg1:Number):Number{ return (0); } public function GetUserData(){ return (m_userData); } public function GetReactionForce(_arg1:Number):b2Vec2{ return (null); } public function SolvePositionConstraints():Boolean{ return (false); } public function GetBody1():b2Body{ return (m_body1); } public function GetBody2():b2Body{ return (m_body2); } 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 49
//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 50
//b2JointNode (Box2D.Dynamics.Joints.b2JointNode) package Box2D.Dynamics.Joints { import Box2D.Dynamics.*; public class b2JointNode { public var other:b2Body; public var next:b2JointNode; public var prev:b2JointNode; public var joint:b2Joint; } }//package Box2D.Dynamics.Joints
Section 51
//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; public var m_beta:Number; private var K:b2Mat22; private var K2:b2Mat22; public var m_target:b2Vec2; public var m_gamma:Number; public var m_impulse:b2Vec2; public var m_ptpMass:b2Mat22; public var m_C:b2Vec2; public var m_maxForce:Number; public var m_localAnchor:b2Vec2; public function b2MouseJoint(_arg1:b2MouseJointDef){ var _local3:Number; K = new b2Mat22(); K1 = new b2Mat22(); K2 = new b2Mat22(); m_localAnchor = new b2Vec2(); m_target = new b2Vec2(); m_impulse = new b2Vec2(); m_ptpMass = new b2Mat22(); m_C = new b2Vec2(); super(_arg1); m_target.SetV(_arg1.target); var _local2:Number = (m_target.x - m_body2.m_position.x); _local3 = (m_target.y - m_body2.m_position.y); m_localAnchor.x = ((_local2 * m_body2.m_R.col1.x) + (_local3 * m_body2.m_R.col1.y)); m_localAnchor.y = ((_local2 * m_body2.m_R.col2.x) + (_local3 * m_body2.m_R.col2.y)); m_maxForce = _arg1.maxForce; m_impulse.SetZero(); var _local4:Number = m_body2.m_mass; var _local5:Number = ((2 * b2Settings.b2_pi) * _arg1.frequencyHz); var _local6:Number = (((2 * _local4) * _arg1.dampingRatio) * _local5); var _local7:Number = ((_local4 * _local5) * _local5); m_gamma = (1 / (_local6 + (_arg1.timeStep * _local7))); m_beta = ((_arg1.timeStep * _local7) / (_local6 + (_arg1.timeStep * _local7))); } public function SetTarget(_arg1:b2Vec2):void{ m_body2.WakeUp(); m_target = _arg1; } override public function GetAnchor2():b2Vec2{ var _local1:b2Vec2 = b2Math.b2MulMV(m_body2.m_R, m_localAnchor); _local1.Add(m_body2.m_position); return (_local1); } override public function GetAnchor1():b2Vec2{ return (m_target); } override public function PrepareVelocitySolver():void{ var _local1:b2Body; var _local2:b2Mat22; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; _local1 = m_body2; _local2 = _local1.m_R; _local3 = ((_local2.col1.x * m_localAnchor.x) + (_local2.col2.x * m_localAnchor.y)); _local4 = ((_local2.col1.y * m_localAnchor.x) + (_local2.col2.y * m_localAnchor.y)); _local5 = _local1.m_invMass; _local6 = _local1.m_invI; K1.col1.x = _local5; K1.col2.x = 0; K1.col1.y = 0; K1.col2.y = _local5; K2.col1.x = ((_local6 * _local4) * _local4); K2.col2.x = ((-(_local6) * _local3) * _local4); K2.col1.y = ((-(_local6) * _local3) * _local4); K2.col2.y = ((_local6 * _local3) * _local3); 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_ptpMass); m_C.x = ((_local1.m_position.x + _local3) - m_target.x); m_C.y = ((_local1.m_position.y + _local4) - m_target.y); _local1.m_angularVelocity = (_local1.m_angularVelocity * 0.98); var _local7:Number = m_impulse.x; var _local8:Number = m_impulse.y; _local1.m_linearVelocity.x = (_local1.m_linearVelocity.x + (_local5 * _local7)); _local1.m_linearVelocity.y = (_local1.m_linearVelocity.y + (_local5 * _local8)); _local1.m_angularVelocity = (_local1.m_angularVelocity + (_local6 * ((_local3 * _local8) - (_local4 * _local7)))); } override public function GetReactionTorque(_arg1:Number):Number{ return (0); } override public function GetReactionForce(_arg1:Number):b2Vec2{ var _local2:b2Vec2 = new b2Vec2(); _local2.SetV(m_impulse); _local2.Multiply(_arg1); return (_local2); } override public function SolvePositionConstraints():Boolean{ return (true); } override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local3:b2Mat22; var _local2:b2Body = m_body2; _local3 = _local2.m_R; var _local4:Number = ((_local3.col1.x * m_localAnchor.x) + (_local3.col2.x * m_localAnchor.y)); var _local5:Number = ((_local3.col1.y * m_localAnchor.x) + (_local3.col2.y * m_localAnchor.y)); var _local6:Number = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local5)); var _local7:Number = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local4)); _local3 = m_ptpMass; var _local8:Number = ((_local6 + ((m_beta * _arg1.inv_dt) * m_C.x)) + (m_gamma * m_impulse.x)); var _local9:Number = ((_local7 + ((m_beta * _arg1.inv_dt) * m_C.y)) + (m_gamma * m_impulse.y)); var _local10:Number = -(((_local3.col1.x * _local8) + (_local3.col2.x * _local9))); var _local11:Number = -(((_local3.col1.y * _local8) + (_local3.col2.y * _local9))); var _local12:Number = m_impulse.x; var _local13:Number = m_impulse.y; m_impulse.x = (m_impulse.x + _local10); m_impulse.y = (m_impulse.y + _local11); var _local14:Number = m_impulse.Length(); if (_local14 > (_arg1.dt * m_maxForce)){ m_impulse.Multiply(((_arg1.dt * m_maxForce) / _local14)); }; _local10 = (m_impulse.x - _local12); _local11 = (m_impulse.y - _local13); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local10)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local11)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local4 * _local11) - (_local5 * _local10)))); } } }//package Box2D.Dynamics.Joints
Section 52
//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 53
//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_initialAngle:Number; public var m_localXAxis1:b2Vec2; public var m_lowerTranslation:Number; public var m_angularMass:Number; public var m_enableLimit:Boolean; public var m_maxMotorForce:Number; public var m_limitState:int; public var m_localYAxis1:b2Vec2; public var m_motorMass:Number; public var m_linearImpulse:Number; public var m_upperTranslation:Number; public var m_localAnchor1:b2Vec2; public var m_localAnchor2:b2Vec2; public var m_angularImpulse:Number; public var m_linearMass:Number; public var m_motorImpulse:Number; public var m_limitImpulse: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); _local2 = m_body1.m_R; _local3 = (_arg1.anchorPoint.x - m_body1.m_position.x); _local4 = (_arg1.anchorPoint.y - m_body1.m_position.y); m_localAnchor1.Set(((_local3 * _local2.col1.x) + (_local4 * _local2.col1.y)), ((_local3 * _local2.col2.x) + (_local4 * _local2.col2.y))); _local2 = m_body2.m_R; _local3 = (_arg1.anchorPoint.x - m_body2.m_position.x); _local4 = (_arg1.anchorPoint.y - m_body2.m_position.y); m_localAnchor2.Set(((_local3 * _local2.col1.x) + (_local4 * _local2.col1.y)), ((_local3 * _local2.col2.x) + (_local4 * _local2.col2.y))); _local2 = m_body1.m_R; _local3 = _arg1.axis.x; _local4 = _arg1.axis.y; m_localXAxis1.Set(((_local3 * _local2.col1.x) + (_local4 * _local2.col1.y)), ((_local3 * _local2.col2.x) + (_local4 * _local2.col2.y))); m_localYAxis1.x = -(m_localXAxis1.y); m_localYAxis1.y = m_localXAxis1.x; m_initialAngle = (m_body2.m_rotation - m_body1.m_rotation); m_linearJacobian.SetZero(); m_linearMass = 0; m_linearImpulse = 0; m_angularMass = 0; m_angularImpulse = 0; m_motorJacobian.SetZero(); m_motorMass = 0; m_motorImpulse = 0; m_limitImpulse = 0; m_limitPositionImpulse = 0; m_lowerTranslation = _arg1.lowerTranslation; m_upperTranslation = _arg1.upperTranslation; m_maxMotorForce = _arg1.motorForce; m_motorSpeed = _arg1.motorSpeed; m_enableLimit = _arg1.enableLimit; m_enableMotor = _arg1.enableMotor; } override public function GetAnchor1():b2Vec2{ var _local1:b2Body = m_body1; var _local2:b2Vec2 = new b2Vec2(); _local2.SetV(m_localAnchor1); _local2.MulM(_local1.m_R); _local2.Add(_local1.m_position); return (_local2); } override public function GetAnchor2():b2Vec2{ var _local1:b2Body = m_body2; var _local2:b2Vec2 = new b2Vec2(); _local2.SetV(m_localAnchor2); _local2.MulM(_local1.m_R); _local2.Add(_local1.m_position); return (_local2); } override public function PrepareVelocitySolver():void{ var _local3:b2Mat22; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; var _local1:b2Body = m_body1; var _local2:b2Body = m_body2; _local3 = _local1.m_R; var _local4:Number = ((_local3.col1.x * m_localAnchor1.x) + (_local3.col2.x * m_localAnchor1.y)); var _local5:Number = ((_local3.col1.y * m_localAnchor1.x) + (_local3.col2.y * m_localAnchor1.y)); _local3 = _local2.m_R; var _local6:Number = ((_local3.col1.x * m_localAnchor2.x) + (_local3.col2.x * m_localAnchor2.y)); var _local7:Number = ((_local3.col1.y * m_localAnchor2.x) + (_local3.col2.y * m_localAnchor2.y)); var _local8:Number = _local1.m_invMass; var _local9:Number = _local2.m_invMass; var _local10:Number = _local1.m_invI; var _local11:Number = _local2.m_invI; _local3 = _local1.m_R; var _local12:Number = ((_local3.col1.x * m_localYAxis1.x) + (_local3.col2.x * m_localYAxis1.y)); var _local13:Number = ((_local3.col1.y * m_localYAxis1.x) + (_local3.col2.y * m_localYAxis1.y)); var _local14:Number = ((_local2.m_position.x + _local6) - _local1.m_position.x); var _local15:Number = ((_local2.m_position.y + _local7) - _local1.m_position.y); m_linearJacobian.linear1.x = -(_local12); m_linearJacobian.linear1.y = -(_local13); m_linearJacobian.linear2.x = _local12; m_linearJacobian.linear2.y = _local13; m_linearJacobian.angular1 = -(((_local14 * _local13) - (_local15 * _local12))); m_linearJacobian.angular2 = ((_local6 * _local13) - (_local7 * _local12)); m_linearMass = (((_local8 + ((_local10 * m_linearJacobian.angular1) * m_linearJacobian.angular1)) + _local9) + ((_local11 * m_linearJacobian.angular2) * m_linearJacobian.angular2)); m_linearMass = (1 / m_linearMass); m_angularMass = (1 / (_local10 + _local11)); if (((m_enableLimit) || (m_enableMotor))){ _local3 = _local1.m_R; _local16 = ((_local3.col1.x * m_localXAxis1.x) + (_local3.col2.x * m_localXAxis1.y)); _local17 = ((_local3.col1.y * m_localXAxis1.x) + (_local3.col2.y * m_localXAxis1.y)); m_motorJacobian.linear1.x = -(_local16); m_motorJacobian.linear1.y = -(_local17); m_motorJacobian.linear2.x = _local16; m_motorJacobian.linear2.y = _local17; m_motorJacobian.angular1 = -(((_local14 * _local17) - (_local15 * _local16))); m_motorJacobian.angular2 = ((_local6 * _local17) - (_local7 * _local16)); m_motorMass = (((_local8 + ((_local10 * m_motorJacobian.angular1) * m_motorJacobian.angular1)) + _local9) + ((_local11 * m_motorJacobian.angular2) * m_motorJacobian.angular2)); m_motorMass = (1 / m_motorMass); if (m_enableLimit){ _local18 = (_local14 - _local4); _local19 = (_local15 - _local5); _local20 = ((_local16 * _local18) + (_local17 * _local19)); if (b2Math.b2Abs((m_upperTranslation - m_lowerTranslation)) < (2 * b2Settings.b2_linearSlop)){ m_limitState = e_equalLimits; } else { if (_local20 <= m_lowerTranslation){ if (m_limitState != e_atLowerLimit){ m_limitImpulse = 0; }; m_limitState = e_atLowerLimit; } else { if (_local20 >= m_upperTranslation){ if (m_limitState != e_atUpperLimit){ m_limitImpulse = 0; }; m_limitState = e_atUpperLimit; } else { m_limitState = e_inactiveLimit; m_limitImpulse = 0; }; }; }; }; }; if (m_enableMotor == false){ m_motorImpulse = 0; }; if (m_enableLimit == false){ m_limitImpulse = 0; }; if (b2World.s_enableWarmStarting){ _local21 = ((m_linearImpulse * m_linearJacobian.linear1.x) + ((m_motorImpulse + m_limitImpulse) * m_motorJacobian.linear1.x)); _local22 = ((m_linearImpulse * m_linearJacobian.linear1.y) + ((m_motorImpulse + m_limitImpulse) * m_motorJacobian.linear1.y)); _local23 = ((m_linearImpulse * m_linearJacobian.linear2.x) + ((m_motorImpulse + m_limitImpulse) * m_motorJacobian.linear2.x)); _local24 = ((m_linearImpulse * m_linearJacobian.linear2.y) + ((m_motorImpulse + m_limitImpulse) * m_motorJacobian.linear2.y)); _local25 = (((m_linearImpulse * m_linearJacobian.angular1) - m_angularImpulse) + ((m_motorImpulse + m_limitImpulse) * m_motorJacobian.angular1)); _local26 = (((m_linearImpulse * m_linearJacobian.angular2) + m_angularImpulse) + ((m_motorImpulse + m_limitImpulse) * m_motorJacobian.angular2)); _local1.m_linearVelocity.x = (_local1.m_linearVelocity.x + (_local8 * _local21)); _local1.m_linearVelocity.y = (_local1.m_linearVelocity.y + (_local8 * _local22)); _local1.m_angularVelocity = (_local1.m_angularVelocity + (_local10 * _local25)); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local9 * _local23)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local9 * _local24)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local11 * _local26)); } else { m_linearImpulse = 0; m_angularImpulse = 0; m_limitImpulse = 0; m_motorImpulse = 0; }; m_limitPositionImpulse = 0; } public function GetJointTranslation():Number{ var _local3:b2Mat22; var _local1:b2Body = m_body1; var _local2:b2Body = m_body2; _local3 = _local1.m_R; var _local4:Number = ((_local3.col1.x * m_localAnchor1.x) + (_local3.col2.x * m_localAnchor1.y)); var _local5:Number = ((_local3.col1.y * m_localAnchor1.x) + (_local3.col2.y * m_localAnchor1.y)); _local3 = _local2.m_R; var _local6:Number = ((_local3.col1.x * m_localAnchor2.x) + (_local3.col2.x * m_localAnchor2.y)); var _local7:Number = ((_local3.col1.y * m_localAnchor2.x) + (_local3.col2.y * m_localAnchor2.y)); var _local8:Number = (_local1.m_position.x + _local4); var _local9:Number = (_local1.m_position.y + _local5); var _local10:Number = (_local2.m_position.x + _local6); var _local11:Number = (_local2.m_position.y + _local7); var _local12:Number = (_local10 - _local8); var _local13:Number = (_local11 - _local9); _local3 = _local1.m_R; var _local14:Number = ((_local3.col1.x * m_localXAxis1.x) + (_local3.col2.x * m_localXAxis1.y)); var _local15:Number = ((_local3.col1.y * m_localXAxis1.x) + (_local3.col2.y * m_localXAxis1.y)); var _local16:Number = ((_local14 * _local12) + (_local15 * _local13)); return (_local16); } override public function GetReactionForce(_arg1:Number):b2Vec2{ var _local3:b2Mat22; var _local2:Number = (_arg1 * m_limitImpulse); _local3 = m_body1.m_R; var _local4:Number = (_local2 * ((_local3.col1.x * m_localXAxis1.x) + (_local3.col2.x * m_localXAxis1.y))); var _local5:Number = (_local2 * ((_local3.col1.y * m_localXAxis1.x) + (_local3.col2.y * m_localXAxis1.y))); var _local6:Number = (_local2 * ((_local3.col1.x * m_localYAxis1.x) + (_local3.col2.x * m_localYAxis1.y))); var _local7:Number = (_local2 * ((_local3.col1.y * m_localYAxis1.x) + (_local3.col2.y * m_localYAxis1.y))); return (new b2Vec2((_local4 + _local6), (_local5 + _local7))); } override public function SolvePositionConstraints():Boolean{ var _local1:Number; var _local2:Number; var _local9:b2Mat22; var _local28:Number; var _local29:Number; var _local30:Number; var _local31: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_R; var _local10:Number = ((_local9.col1.x * m_localAnchor1.x) + (_local9.col2.x * m_localAnchor1.y)); var _local11:Number = ((_local9.col1.y * m_localAnchor1.x) + (_local9.col2.y * m_localAnchor1.y)); _local9 = _local4.m_R; var _local12:Number = ((_local9.col1.x * m_localAnchor2.x) + (_local9.col2.x * m_localAnchor2.y)); var _local13:Number = ((_local9.col1.y * m_localAnchor2.x) + (_local9.col2.y * m_localAnchor2.y)); var _local14:Number = (_local3.m_position.x + _local10); var _local15:Number = (_local3.m_position.y + _local11); var _local16:Number = (_local4.m_position.x + _local12); var _local17:Number = (_local4.m_position.y + _local13); var _local18:Number = (_local16 - _local14); var _local19:Number = (_local17 - _local15); _local9 = _local3.m_R; var _local20:Number = ((_local9.col1.x * m_localYAxis1.x) + (_local9.col2.x * m_localYAxis1.y)); var _local21:Number = ((_local9.col1.y * m_localYAxis1.x) + (_local9.col2.y * m_localYAxis1.y)); var _local22:Number = ((_local20 * _local18) + (_local21 * _local19)); _local22 = b2Math.b2Clamp(_local22, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection); var _local23:Number = (-(m_linearMass) * _local22); _local3.m_position.x = (_local3.m_position.x + ((_local5 * _local23) * m_linearJacobian.linear1.x)); _local3.m_position.y = (_local3.m_position.y + ((_local5 * _local23) * m_linearJacobian.linear1.y)); _local3.m_rotation = (_local3.m_rotation + ((_local7 * _local23) * m_linearJacobian.angular1)); _local4.m_position.x = (_local4.m_position.x + ((_local6 * _local23) * m_linearJacobian.linear2.x)); _local4.m_position.y = (_local4.m_position.y + ((_local6 * _local23) * m_linearJacobian.linear2.y)); _local4.m_rotation = (_local4.m_rotation + ((_local8 * _local23) * m_linearJacobian.angular2)); var _local24:Number = b2Math.b2Abs(_local22); var _local25:Number = ((_local4.m_rotation - _local3.m_rotation) - m_initialAngle); _local25 = b2Math.b2Clamp(_local25, -(b2Settings.b2_maxAngularCorrection), b2Settings.b2_maxAngularCorrection); var _local26:Number = (-(m_angularMass) * _local25); _local3.m_rotation = (_local3.m_rotation - (_local3.m_invI * _local26)); _local3.m_R.Set(_local3.m_rotation); _local4.m_rotation = (_local4.m_rotation + (_local4.m_invI * _local26)); _local4.m_R.Set(_local4.m_rotation); var _local27:Number = b2Math.b2Abs(_local25); if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){ _local9 = _local3.m_R; _local10 = ((_local9.col1.x * m_localAnchor1.x) + (_local9.col2.x * m_localAnchor1.y)); _local11 = ((_local9.col1.y * m_localAnchor1.x) + (_local9.col2.y * m_localAnchor1.y)); _local9 = _local4.m_R; _local12 = ((_local9.col1.x * m_localAnchor2.x) + (_local9.col2.x * m_localAnchor2.y)); _local13 = ((_local9.col1.y * m_localAnchor2.x) + (_local9.col2.y * m_localAnchor2.y)); _local14 = (_local3.m_position.x + _local10); _local15 = (_local3.m_position.y + _local11); _local16 = (_local4.m_position.x + _local12); _local17 = (_local4.m_position.y + _local13); _local18 = (_local16 - _local14); _local19 = (_local17 - _local15); _local9 = _local3.m_R; _local28 = ((_local9.col1.x * m_localXAxis1.x) + (_local9.col2.x * m_localXAxis1.y)); _local29 = ((_local9.col1.y * m_localXAxis1.x) + (_local9.col2.y * m_localXAxis1.y)); _local30 = ((_local28 * _local18) + (_local29 * _local19)); _local31 = 0; if (m_limitState == e_equalLimits){ _local1 = b2Math.b2Clamp(_local30, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection); _local31 = (-(m_motorMass) * _local1); _local24 = b2Math.b2Max(_local24, b2Math.b2Abs(_local25)); } else { if (m_limitState == e_atLowerLimit){ _local1 = (_local30 - m_lowerTranslation); _local24 = b2Math.b2Max(_local24, -(_local1)); _local1 = b2Math.b2Clamp((_local1 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0); _local31 = (-(m_motorMass) * _local1); _local2 = m_limitPositionImpulse; m_limitPositionImpulse = b2Math.b2Max((m_limitPositionImpulse + _local31), 0); _local31 = (m_limitPositionImpulse - _local2); } else { if (m_limitState == e_atUpperLimit){ _local1 = (_local30 - m_upperTranslation); _local24 = b2Math.b2Max(_local24, _local1); _local1 = b2Math.b2Clamp((_local1 - b2Settings.b2_linearSlop), 0, b2Settings.b2_maxLinearCorrection); _local31 = (-(m_motorMass) * _local1); _local2 = m_limitPositionImpulse; m_limitPositionImpulse = b2Math.b2Min((m_limitPositionImpulse + _local31), 0); _local31 = (m_limitPositionImpulse - _local2); }; }; }; _local3.m_position.x = (_local3.m_position.x + ((_local5 * _local31) * m_motorJacobian.linear1.x)); _local3.m_position.y = (_local3.m_position.y + ((_local5 * _local31) * m_motorJacobian.linear1.y)); _local3.m_rotation = (_local3.m_rotation + ((_local7 * _local31) * m_motorJacobian.angular1)); _local3.m_R.Set(_local3.m_rotation); _local4.m_position.x = (_local4.m_position.x + ((_local6 * _local31) * m_motorJacobian.linear2.x)); _local4.m_position.y = (_local4.m_position.y + ((_local6 * _local31) * m_motorJacobian.linear2.y)); _local4.m_rotation = (_local4.m_rotation + ((_local8 * _local31) * m_motorJacobian.angular2)); _local4.m_R.Set(_local4.m_rotation); }; return ((((_local24 <= b2Settings.b2_linearSlop)) && ((_local27 <= 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_R; var _local4:Number = ((_local3.col1.x * m_localAnchor1.x) + (_local3.col2.x * m_localAnchor1.y)); var _local5:Number = ((_local3.col1.y * m_localAnchor1.x) + (_local3.col2.y * m_localAnchor1.y)); _local3 = _local2.m_R; var _local6:Number = ((_local3.col1.x * m_localAnchor2.x) + (_local3.col2.x * m_localAnchor2.y)); var _local7:Number = ((_local3.col1.y * m_localAnchor2.x) + (_local3.col2.y * m_localAnchor2.y)); var _local8:Number = (_local1.m_position.x + _local4); var _local9:Number = (_local1.m_position.y + _local5); var _local10:Number = (_local2.m_position.x + _local6); var _local11:Number = (_local2.m_position.y + _local7); var _local12:Number = (_local10 - _local8); var _local13:Number = (_local11 - _local9); _local3 = _local1.m_R; var _local14:Number = ((_local3.col1.x * m_localXAxis1.x) + (_local3.col2.x * m_localXAxis1.y)); var _local15:Number = ((_local3.col1.y * m_localXAxis1.x) + (_local3.col2.y * m_localXAxis1.y)); 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 = (((_local12 * (-(_local18) * _local15)) + (_local13 * (_local18 * _local14))) + ((_local14 * (((_local17.x + (-(_local19) * _local7)) - _local16.x) - (-(_local18) * _local5))) + (_local15 * (((_local17.y + (_local19 * _local6)) - _local16.y) - (_local18 * _local4))))); return (_local20); } public function GetMotorForce(_arg1:Number):Number{ return ((_arg1 * m_motorImpulse)); } public function SetMotorForce(_arg1:Number):void{ m_maxMotorForce = _arg1; } override public function GetReactionTorque(_arg1:Number):Number{ return ((_arg1 * m_angularImpulse)); } override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local8:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17: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 = (-(m_linearMass) * _local9); m_linearImpulse = (m_linearImpulse + _local10); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local4 * _local10) * m_linearJacobian.linear1.x)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local4 * _local10) * m_linearJacobian.linear1.y)); _local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local6 * _local10) * m_linearJacobian.angular1)); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local5 * _local10) * m_linearJacobian.linear2.x)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local5 * _local10) * m_linearJacobian.linear2.y)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local7 * _local10) * m_linearJacobian.angular2)); var _local11:Number = (_local3.m_angularVelocity - _local2.m_angularVelocity); var _local12:Number = (-(m_angularMass) * _local11); m_angularImpulse = (m_angularImpulse + _local12); _local2.m_angularVelocity = (_local2.m_angularVelocity - (_local6 * _local12)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local7 * _local12)); if (((m_enableMotor) && (!((m_limitState == e_equalLimits))))){ _local13 = (m_motorJacobian.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity) - m_motorSpeed); _local14 = (-(m_motorMass) * _local13); _local15 = m_motorImpulse; m_motorImpulse = b2Math.b2Clamp((m_motorImpulse + _local14), (-(_arg1.dt) * m_maxMotorForce), (_arg1.dt * m_maxMotorForce)); _local14 = (m_motorImpulse - _local15); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local4 * _local14) * m_motorJacobian.linear1.x)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local4 * _local14) * m_motorJacobian.linear1.y)); _local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local6 * _local14) * m_motorJacobian.angular1)); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local5 * _local14) * m_motorJacobian.linear2.x)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local5 * _local14) * m_motorJacobian.linear2.y)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local7 * _local14) * m_motorJacobian.angular2)); }; if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){ _local16 = m_motorJacobian.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity); _local17 = (-(m_motorMass) * _local16); if (m_limitState == e_equalLimits){ m_limitImpulse = (m_limitImpulse + _local17); } else { if (m_limitState == e_atLowerLimit){ _local8 = m_limitImpulse; m_limitImpulse = b2Math.b2Max((m_limitImpulse + _local17), 0); _local17 = (m_limitImpulse - _local8); } else { if (m_limitState == e_atUpperLimit){ _local8 = m_limitImpulse; m_limitImpulse = b2Math.b2Min((m_limitImpulse + _local17), 0); _local17 = (m_limitImpulse - _local8); }; }; }; _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local4 * _local17) * m_motorJacobian.linear1.x)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local4 * _local17) * m_motorJacobian.linear1.y)); _local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local6 * _local17) * m_motorJacobian.angular1)); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local5 * _local17) * m_motorJacobian.linear2.x)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local5 * _local17) * m_motorJacobian.linear2.y)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local7 * _local17) * m_motorJacobian.angular2)); }; } } }//package Box2D.Dynamics.Joints
Section 54
//b2PrismaticJointDef (Box2D.Dynamics.Joints.b2PrismaticJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; public class b2PrismaticJointDef extends b2JointDef { public var axis:b2Vec2; public var upperTranslation:Number; public var lowerTranslation:Number; public var motorSpeed:Number; public var enableLimit:Boolean; public var enableMotor:Boolean; public var anchorPoint:b2Vec2; public var motorForce:Number; public function b2PrismaticJointDef(){ type = b2Joint.e_prismaticJoint; anchorPoint = new b2Vec2(0, 0); axis = new b2Vec2(0, 0); lowerTranslation = 0; upperTranslation = 0; motorForce = 0; motorSpeed = 0; enableLimit = false; enableMotor = false; } } }//package Box2D.Dynamics.Joints
Section 55
//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_pulleyImpulse:Number; public var m_constant:Number; 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_limitImpulse1:Number; public var m_pulleyMass:Number; public var m_u1:b2Vec2; public var m_u2:b2Vec2; public var m_limitImpulse2:Number; public static var b2_minPulleyLength:Number = 5; 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.groundPoint1.x - m_ground.m_position.x); m_groundAnchor1.y = (_arg1.groundPoint1.y - m_ground.m_position.y); m_groundAnchor2.x = (_arg1.groundPoint2.x - m_ground.m_position.x); m_groundAnchor2.y = (_arg1.groundPoint2.y - m_ground.m_position.y); _local2 = m_body1.m_R; _local3 = (_arg1.anchorPoint1.x - m_body1.m_position.x); _local4 = (_arg1.anchorPoint1.y - m_body1.m_position.y); m_localAnchor1.x = ((_local3 * _local2.col1.x) + (_local4 * _local2.col1.y)); m_localAnchor1.y = ((_local3 * _local2.col2.x) + (_local4 * _local2.col2.y)); _local2 = m_body2.m_R; _local3 = (_arg1.anchorPoint2.x - m_body2.m_position.x); _local4 = (_arg1.anchorPoint2.y - m_body2.m_position.y); m_localAnchor2.x = ((_local3 * _local2.col1.x) + (_local4 * _local2.col1.y)); m_localAnchor2.y = ((_local3 * _local2.col2.x) + (_local4 * _local2.col2.y)); m_ratio = _arg1.ratio; _local3 = (_arg1.groundPoint1.x - _arg1.anchorPoint1.x); _local4 = (_arg1.groundPoint1.y - _arg1.anchorPoint1.y); var _local5:Number = Math.sqrt(((_local3 * _local3) + (_local4 * _local4))); _local3 = (_arg1.groundPoint2.x - _arg1.anchorPoint2.x); _local4 = (_arg1.groundPoint2.y - _arg1.anchorPoint2.y); var _local6:Number = Math.sqrt(((_local3 * _local3) + (_local4 * _local4))); var _local7:Number = b2Math.b2Max((0.5 * b2_minPulleyLength), _local5); var _local8:Number = b2Math.b2Max((0.5 * b2_minPulleyLength), _local6); m_constant = (_local7 + (m_ratio * _local8)); m_maxLength1 = b2Math.b2Clamp(_arg1.maxLength1, _local7, (m_constant - (m_ratio * b2_minPulleyLength))); m_maxLength2 = b2Math.b2Clamp(_arg1.maxLength2, _local8, ((m_constant - b2_minPulleyLength) / m_ratio)); m_pulleyImpulse = 0; m_limitImpulse1 = 0; m_limitImpulse2 = 0; } public function GetLength1():Number{ var _local1:b2Mat22; _local1 = m_body1.m_R; var _local2:Number = (m_body1.m_position.x + ((_local1.col1.x * m_localAnchor1.x) + (_local1.col2.x * m_localAnchor1.y))); var _local3:Number = (m_body1.m_position.y + ((_local1.col1.y * m_localAnchor1.x) + (_local1.col2.y * m_localAnchor1.y))); var _local4:Number = (_local2 - (m_ground.m_position.x + m_groundAnchor1.x)); var _local5:Number = (_local3 - (m_ground.m_position.y + m_groundAnchor1.y)); return (Math.sqrt(((_local4 * _local4) + (_local5 * _local5)))); } override public function GetAnchor1():b2Vec2{ var _local1:b2Mat22 = m_body1.m_R; return (new b2Vec2((m_body1.m_position.x + ((_local1.col1.x * m_localAnchor1.x) + (_local1.col2.x * m_localAnchor1.y))), (m_body1.m_position.y + ((_local1.col1.y * m_localAnchor1.x) + (_local1.col2.y * m_localAnchor1.y))))); } override public function GetAnchor2():b2Vec2{ var _local1:b2Mat22 = m_body2.m_R; return (new b2Vec2((m_body2.m_position.x + ((_local1.col1.x * m_localAnchor2.x) + (_local1.col2.x * m_localAnchor2.y))), (m_body2.m_position.y + ((_local1.col1.y * m_localAnchor2.x) + (_local1.col2.y * m_localAnchor2.y))))); } override public function PrepareVelocitySolver():void{ var _local3:b2Mat22; var _local1:b2Body = m_body1; var _local2:b2Body = m_body2; _local3 = _local1.m_R; var _local4:Number = ((_local3.col1.x * m_localAnchor1.x) + (_local3.col2.x * m_localAnchor1.y)); var _local5:Number = ((_local3.col1.y * m_localAnchor1.x) + (_local3.col2.y * m_localAnchor1.y)); _local3 = _local2.m_R; var _local6:Number = ((_local3.col1.x * m_localAnchor2.x) + (_local3.col2.x * m_localAnchor2.y)); var _local7:Number = ((_local3.col1.y * m_localAnchor2.x) + (_local3.col2.y * m_localAnchor2.y)); var _local8:Number = (_local1.m_position.x + _local4); var _local9:Number = (_local1.m_position.y + _local5); var _local10:Number = (_local2.m_position.x + _local6); var _local11:Number = (_local2.m_position.y + _local7); var _local12:Number = (m_ground.m_position.x + m_groundAnchor1.x); var _local13:Number = (m_ground.m_position.y + m_groundAnchor1.y); var _local14:Number = (m_ground.m_position.x + m_groundAnchor2.x); var _local15:Number = (m_ground.m_position.y + m_groundAnchor2.y); m_u1.Set((_local8 - _local12), (_local9 - _local13)); m_u2.Set((_local10 - _local14), (_local11 - _local15)); var _local16:Number = m_u1.Length(); var _local17:Number = 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(); }; if (_local16 < m_maxLength1){ m_limitState1 = e_inactiveLimit; m_limitImpulse1 = 0; } else { m_limitState1 = e_atUpperLimit; m_limitPositionImpulse1 = 0; }; if (_local17 < m_maxLength2){ m_limitState2 = e_inactiveLimit; m_limitImpulse2 = 0; } else { m_limitState2 = e_atUpperLimit; m_limitPositionImpulse2 = 0; }; var _local18:Number = ((_local4 * m_u1.y) - (_local5 * m_u1.x)); var _local19:Number = ((_local6 * m_u2.y) - (_local7 * m_u2.x)); m_limitMass1 = (_local1.m_invMass + ((_local1.m_invI * _local18) * _local18)); m_limitMass2 = (_local2.m_invMass + ((_local2.m_invI * _local19) * _local19)); 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); var _local20:Number = ((-(m_pulleyImpulse) - m_limitImpulse1) * m_u1.x); var _local21:Number = ((-(m_pulleyImpulse) - m_limitImpulse1) * m_u1.y); var _local22:Number = (((-(m_ratio) * m_pulleyImpulse) - m_limitImpulse2) * m_u2.x); var _local23:Number = (((-(m_ratio) * m_pulleyImpulse) - m_limitImpulse2) * m_u2.y); _local1.m_linearVelocity.x = (_local1.m_linearVelocity.x + (_local1.m_invMass * _local20)); _local1.m_linearVelocity.y = (_local1.m_linearVelocity.y + (_local1.m_invMass * _local21)); _local1.m_angularVelocity = (_local1.m_angularVelocity + (_local1.m_invI * ((_local4 * _local21) - (_local5 * _local20)))); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local22)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local23)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local6 * _local23) - (_local7 * _local22)))); } override public function GetReactionForce(_arg1:Number):b2Vec2{ return (new b2Vec2()); } 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 _local1:b2Body = m_body1; var _local2:b2Body = m_body2; var _local4:Number = (m_ground.m_position.x + m_groundAnchor1.x); var _local5:Number = (m_ground.m_position.y + m_groundAnchor1.y); var _local6:Number = (m_ground.m_position.x + m_groundAnchor2.x); var _local7:Number = (m_ground.m_position.y + m_groundAnchor2.y); var _local21:Number = 0; _local3 = _local1.m_R; _local8 = ((_local3.col1.x * m_localAnchor1.x) + (_local3.col2.x * m_localAnchor1.y)); _local9 = ((_local3.col1.y * m_localAnchor1.x) + (_local3.col2.y * m_localAnchor1.y)); _local3 = _local2.m_R; _local10 = ((_local3.col1.x * m_localAnchor2.x) + (_local3.col2.x * m_localAnchor2.y)); _local11 = ((_local3.col1.y * m_localAnchor2.x) + (_local3.col2.y * m_localAnchor2.y)); _local12 = (_local1.m_position.x + _local8); _local13 = (_local1.m_position.y + _local9); _local14 = (_local2.m_position.x + _local10); _local15 = (_local2.m_position.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)); _local21 = b2Math.b2Max(_local21, Math.abs(_local18)); _local18 = b2Math.b2Clamp(_local18, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection); _local19 = (-(m_pulleyMass) * _local18); _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_position.x = (_local1.m_position.x + (_local1.m_invMass * _local12)); _local1.m_position.y = (_local1.m_position.y + (_local1.m_invMass * _local13)); _local1.m_rotation = (_local1.m_rotation + (_local1.m_invI * ((_local8 * _local13) - (_local9 * _local12)))); _local2.m_position.x = (_local2.m_position.x + (_local2.m_invMass * _local14)); _local2.m_position.y = (_local2.m_position.y + (_local2.m_invMass * _local15)); _local2.m_rotation = (_local2.m_rotation + (_local2.m_invI * ((_local10 * _local15) - (_local11 * _local14)))); _local1.m_R.Set(_local1.m_rotation); _local2.m_R.Set(_local2.m_rotation); if (m_limitState1 == e_atUpperLimit){ _local3 = _local1.m_R; _local8 = ((_local3.col1.x * m_localAnchor1.x) + (_local3.col2.x * m_localAnchor1.y)); _local9 = ((_local3.col1.y * m_localAnchor1.x) + (_local3.col2.y * m_localAnchor1.y)); _local12 = (_local1.m_position.x + _local8); _local13 = (_local1.m_position.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); _local21 = b2Math.b2Max(_local21, -(_local18)); _local18 = b2Math.b2Clamp((_local18 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0); _local19 = (-(m_limitMass1) * _local18); _local20 = m_limitPositionImpulse1; m_limitPositionImpulse1 = b2Math.b2Max(0, (m_limitPositionImpulse1 + _local19)); _local19 = (m_limitPositionImpulse1 - _local20); _local12 = (-(_local19) * m_u1.x); _local13 = (-(_local19) * m_u1.y); _local1.m_position.x = (_local1.m_position.x + (_local1.m_invMass * _local12)); _local1.m_position.y = (_local1.m_position.y + (_local1.m_invMass * _local13)); _local1.m_rotation = (_local1.m_rotation + (_local1.m_invI * ((_local8 * _local13) - (_local9 * _local12)))); _local1.m_R.Set(_local1.m_rotation); }; if (m_limitState2 == e_atUpperLimit){ _local3 = _local2.m_R; _local10 = ((_local3.col1.x * m_localAnchor2.x) + (_local3.col2.x * m_localAnchor2.y)); _local11 = ((_local3.col1.y * m_localAnchor2.x) + (_local3.col2.y * m_localAnchor2.y)); _local14 = (_local2.m_position.x + _local10); _local15 = (_local2.m_position.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); _local21 = b2Math.b2Max(_local21, -(_local18)); _local18 = b2Math.b2Clamp((_local18 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0); _local19 = (-(m_limitMass2) * _local18); _local20 = m_limitPositionImpulse2; m_limitPositionImpulse2 = b2Math.b2Max(0, (m_limitPositionImpulse2 + _local19)); _local19 = (m_limitPositionImpulse2 - _local20); _local14 = (-(_local19) * m_u2.x); _local15 = (-(_local19) * m_u2.y); _local2.m_position.x = (_local2.m_position.x + (_local2.m_invMass * _local14)); _local2.m_position.y = (_local2.m_position.y + (_local2.m_invMass * _local15)); _local2.m_rotation = (_local2.m_rotation + (_local2.m_invI * ((_local10 * _local15) - (_local11 * _local14)))); _local2.m_R.Set(_local2.m_rotation); }; return ((_local21 < b2Settings.b2_linearSlop)); } public function GetGroundPoint2():b2Vec2{ return (new b2Vec2((m_ground.m_position.x + m_groundAnchor2.x), (m_ground.m_position.y + m_groundAnchor2.y))); } override public function GetReactionTorque(_arg1:Number):Number{ return (0); } public function GetGroundPoint1():b2Vec2{ return (new b2Vec2((m_ground.m_position.x + m_groundAnchor1.x), (m_ground.m_position.y + m_groundAnchor1.y))); } override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local4:b2Mat22; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local2:b2Body = m_body1; var _local3:b2Body = m_body2; _local4 = _local2.m_R; var _local5:Number = ((_local4.col1.x * m_localAnchor1.x) + (_local4.col2.x * m_localAnchor1.y)); var _local6:Number = ((_local4.col1.y * m_localAnchor1.x) + (_local4.col2.y * m_localAnchor1.y)); _local4 = _local3.m_R; var _local7:Number = ((_local4.col1.x * m_localAnchor2.x) + (_local4.col2.x * m_localAnchor2.y)); var _local8:Number = ((_local4.col1.y * m_localAnchor2.x) + (_local4.col2.y * m_localAnchor2.y)); _local9 = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local6)); _local10 = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local5)); _local11 = (_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local8)); _local12 = (_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local7)); _local17 = (-(((m_u1.x * _local9) + (m_u1.y * _local10))) - (m_ratio * ((m_u2.x * _local11) + (m_u2.y * _local12)))); _local18 = (-(m_pulleyMass) * _local17); m_pulleyImpulse = (m_pulleyImpulse + _local18); _local13 = (-(_local18) * m_u1.x); _local14 = (-(_local18) * m_u1.y); _local15 = ((-(m_ratio) * _local18) * m_u2.x); _local16 = ((-(m_ratio) * _local18) * m_u2.y); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local13)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local14)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local5 * _local14) - (_local6 * _local13)))); _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 * ((_local7 * _local16) - (_local8 * _local15)))); if (m_limitState1 == e_atUpperLimit){ _local9 = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local6)); _local10 = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local5)); _local17 = -(((m_u1.x * _local9) + (m_u1.y * _local10))); _local18 = (-(m_limitMass1) * _local17); _local19 = m_limitImpulse1; m_limitImpulse1 = b2Math.b2Max(0, (m_limitImpulse1 + _local18)); _local18 = (m_limitImpulse1 - _local19); _local13 = (-(_local18) * m_u1.x); _local14 = (-(_local18) * m_u1.y); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local13)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local14)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local5 * _local14) - (_local6 * _local13)))); }; if (m_limitState2 == e_atUpperLimit){ _local11 = (_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local8)); _local12 = (_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local7)); _local17 = -(((m_u2.x * _local11) + (m_u2.y * _local12))); _local18 = (-(m_limitMass2) * _local17); _local19 = m_limitImpulse2; m_limitImpulse2 = b2Math.b2Max(0, (m_limitImpulse2 + _local18)); _local18 = (m_limitImpulse2 - _local19); _local15 = (-(_local18) * m_u2.x); _local16 = (-(_local18) * m_u2.y); _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 * ((_local7 * _local16) - (_local8 * _local15)))); }; } public function GetRatio():Number{ return (m_ratio); } public function GetLength2():Number{ var _local1:b2Mat22; _local1 = m_body2.m_R; var _local2:Number = (m_body2.m_position.x + ((_local1.col1.x * m_localAnchor2.x) + (_local1.col2.x * m_localAnchor2.y))); var _local3:Number = (m_body2.m_position.y + ((_local1.col1.y * m_localAnchor2.x) + (_local1.col2.y * m_localAnchor2.y))); var _local4:Number = (_local2 - (m_ground.m_position.x + m_groundAnchor2.x)); var _local5:Number = (_local3 - (m_ground.m_position.y + m_groundAnchor2.y)); return (Math.sqrt(((_local4 * _local4) + (_local5 * _local5)))); } } }//package Box2D.Dynamics.Joints
Section 56
//b2PulleyJointDef (Box2D.Dynamics.Joints.b2PulleyJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; public class b2PulleyJointDef extends b2JointDef { public var maxLength1:Number; public var groundPoint1:b2Vec2; public var groundPoint2:b2Vec2; public var ratio:Number; public var maxLength2:Number; public var anchorPoint1:b2Vec2; public var anchorPoint2:b2Vec2; public function b2PulleyJointDef(){ groundPoint1 = new b2Vec2(); groundPoint2 = new b2Vec2(); anchorPoint1 = new b2Vec2(); anchorPoint2 = new b2Vec2(); super(); type = b2Joint.e_pulleyJoint; groundPoint1.Set(-1, 1); groundPoint2.Set(1, 1); anchorPoint1.Set(-1, 0); anchorPoint2.Set(1, 0); maxLength1 = (0.5 * b2PulleyJoint.b2_minPulleyLength); maxLength2 = (0.5 * b2PulleyJoint.b2_minPulleyLength); ratio = 1; collideConnected = true; } } }//package Box2D.Dynamics.Joints
Section 57
//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_enableLimit:Boolean; public var m_limitState:int; public var m_ptpMass:b2Mat22; 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 K:b2Mat22; public var m_limitImpulse:Number; private var K3:b2Mat22; public var m_motorImpulse:Number; public var m_enableMotor:Boolean; 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 var m_ptpImpulse:b2Vec2; public var m_intialAngle:Number; public static var tImpulse:b2Vec2 = new b2Vec2(); public function b2RevoluteJoint(_arg1:b2RevoluteJointDef){ var _local2:b2Mat22; var _local3:Number; var _local4:Number; K = new b2Mat22(); K1 = new b2Mat22(); K2 = new b2Mat22(); K3 = new b2Mat22(); m_localAnchor1 = new b2Vec2(); m_localAnchor2 = new b2Vec2(); m_ptpImpulse = new b2Vec2(); m_ptpMass = new b2Mat22(); super(_arg1); _local2 = m_body1.m_R; _local3 = (_arg1.anchorPoint.x - m_body1.m_position.x); _local4 = (_arg1.anchorPoint.y - m_body1.m_position.y); m_localAnchor1.x = ((_local3 * _local2.col1.x) + (_local4 * _local2.col1.y)); m_localAnchor1.y = ((_local3 * _local2.col2.x) + (_local4 * _local2.col2.y)); _local2 = m_body2.m_R; _local3 = (_arg1.anchorPoint.x - m_body2.m_position.x); _local4 = (_arg1.anchorPoint.y - m_body2.m_position.y); m_localAnchor2.x = ((_local3 * _local2.col1.x) + (_local4 * _local2.col1.y)); m_localAnchor2.y = ((_local3 * _local2.col2.x) + (_local4 * _local2.col2.y)); m_intialAngle = (m_body2.m_rotation - m_body1.m_rotation); m_ptpImpulse.Set(0, 0); m_motorImpulse = 0; m_limitImpulse = 0; m_limitPositionImpulse = 0; m_lowerAngle = _arg1.lowerAngle; m_upperAngle = _arg1.upperAngle; m_maxMotorTorque = _arg1.motorTorque; m_motorSpeed = _arg1.motorSpeed; m_enableLimit = _arg1.enableLimit; m_enableMotor = _arg1.enableMotor; } override public function GetAnchor1():b2Vec2{ var _local1:b2Mat22 = m_body1.m_R; return (new b2Vec2((m_body1.m_position.x + ((_local1.col1.x * m_localAnchor1.x) + (_local1.col2.x * m_localAnchor1.y))), (m_body1.m_position.y + ((_local1.col1.y * m_localAnchor1.x) + (_local1.col2.y * m_localAnchor1.y))))); } override public function GetAnchor2():b2Vec2{ var _local1:b2Mat22 = m_body2.m_R; return (new b2Vec2((m_body2.m_position.x + ((_local1.col1.x * m_localAnchor2.x) + (_local1.col2.x * m_localAnchor2.y))), (m_body2.m_position.y + ((_local1.col1.y * m_localAnchor2.x) + (_local1.col2.y * m_localAnchor2.y))))); } override public function PrepareVelocitySolver():void{ var _local1:b2Body; var _local2:b2Body; var _local3:b2Mat22; var _local12:Number; _local1 = m_body1; _local2 = m_body2; _local3 = _local1.m_R; var _local4:Number = ((_local3.col1.x * m_localAnchor1.x) + (_local3.col2.x * m_localAnchor1.y)); var _local5:Number = ((_local3.col1.y * m_localAnchor1.x) + (_local3.col2.y * m_localAnchor1.y)); _local3 = _local2.m_R; var _local6:Number = ((_local3.col1.x * m_localAnchor2.x) + (_local3.col2.x * m_localAnchor2.y)); var _local7:Number = ((_local3.col1.y * m_localAnchor2.x) + (_local3.col2.y * m_localAnchor2.y)); var _local8:Number = _local1.m_invMass; var _local9:Number = _local2.m_invMass; var _local10:Number = _local1.m_invI; var _local11:Number = _local2.m_invI; K1.col1.x = (_local8 + _local9); K1.col2.x = 0; K1.col1.y = 0; K1.col2.y = (_local8 + _local9); K2.col1.x = ((_local10 * _local5) * _local5); K2.col2.x = ((-(_local10) * _local4) * _local5); K2.col1.y = ((-(_local10) * _local4) * _local5); K2.col2.y = ((_local10 * _local4) * _local4); K3.col1.x = ((_local11 * _local7) * _local7); K3.col2.x = ((-(_local11) * _local6) * _local7); K3.col1.y = ((-(_local11) * _local6) * _local7); K3.col2.y = ((_local11 * _local6) * _local6); K.SetM(K1); K.AddM(K2); K.AddM(K3); K.Invert(m_ptpMass); m_motorMass = (1 / (_local10 + _local11)); if (m_enableMotor == false){ m_motorImpulse = 0; }; if (m_enableLimit){ _local12 = ((_local2.m_rotation - _local1.m_rotation) - m_intialAngle); if (b2Math.b2Abs((m_upperAngle - m_lowerAngle)) < (2 * b2Settings.b2_angularSlop)){ m_limitState = e_equalLimits; } else { if (_local12 <= m_lowerAngle){ if (m_limitState != e_atLowerLimit){ m_limitImpulse = 0; }; m_limitState = e_atLowerLimit; } else { if (_local12 >= m_upperAngle){ if (m_limitState != e_atUpperLimit){ m_limitImpulse = 0; }; m_limitState = e_atUpperLimit; } else { m_limitState = e_inactiveLimit; m_limitImpulse = 0; }; }; }; } else { m_limitImpulse = 0; }; if (b2World.s_enableWarmStarting){ _local1.m_linearVelocity.x = (_local1.m_linearVelocity.x - (_local8 * m_ptpImpulse.x)); _local1.m_linearVelocity.y = (_local1.m_linearVelocity.y - (_local8 * m_ptpImpulse.y)); _local1.m_angularVelocity = (_local1.m_angularVelocity - (_local10 * ((((_local4 * m_ptpImpulse.y) - (_local5 * m_ptpImpulse.x)) + m_motorImpulse) + m_limitImpulse))); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local9 * m_ptpImpulse.x)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local9 * m_ptpImpulse.y)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local11 * ((((_local6 * m_ptpImpulse.y) - (_local7 * m_ptpImpulse.x)) + m_motorImpulse) + m_limitImpulse))); } else { m_ptpImpulse.SetZero(); m_motorImpulse = 0; m_limitImpulse = 0; }; m_limitPositionImpulse = 0; } override public function GetReactionForce(_arg1:Number):b2Vec2{ var _local2:b2Vec2 = m_ptpImpulse.Copy(); _local2.Multiply(_arg1); return (_local2); } override public function SolvePositionConstraints():Boolean{ var _local1:Number; var _local2:Number; var _local6:b2Mat22; var _local24:Number; var _local25:Number; var _local3:b2Body = m_body1; var _local4:b2Body = m_body2; var _local5:Number = 0; _local6 = _local3.m_R; var _local7:Number = ((_local6.col1.x * m_localAnchor1.x) + (_local6.col2.x * m_localAnchor1.y)); var _local8:Number = ((_local6.col1.y * m_localAnchor1.x) + (_local6.col2.y * m_localAnchor1.y)); _local6 = _local4.m_R; var _local9:Number = ((_local6.col1.x * m_localAnchor2.x) + (_local6.col2.x * m_localAnchor2.y)); var _local10:Number = ((_local6.col1.y * m_localAnchor2.x) + (_local6.col2.y * m_localAnchor2.y)); var _local11:Number = (_local3.m_position.x + _local7); var _local12:Number = (_local3.m_position.y + _local8); var _local13:Number = (_local4.m_position.x + _local9); var _local14:Number = (_local4.m_position.y + _local10); var _local15:Number = (_local13 - _local11); var _local16:Number = (_local14 - _local12); _local5 = Math.sqrt(((_local15 * _local15) + (_local16 * _local16))); var _local17:Number = _local3.m_invMass; var _local18:Number = _local4.m_invMass; var _local19:Number = _local3.m_invI; var _local20:Number = _local4.m_invI; K1.col1.x = (_local17 + _local18); K1.col2.x = 0; K1.col1.y = 0; K1.col2.y = (_local17 + _local18); K2.col1.x = ((_local19 * _local8) * _local8); K2.col2.x = ((-(_local19) * _local7) * _local8); K2.col1.y = ((-(_local19) * _local7) * _local8); K2.col2.y = ((_local19 * _local7) * _local7); K3.col1.x = ((_local20 * _local10) * _local10); K3.col2.x = ((-(_local20) * _local9) * _local10); K3.col1.y = ((-(_local20) * _local9) * _local10); K3.col2.y = ((_local20 * _local9) * _local9); K.SetM(K1); K.AddM(K2); K.AddM(K3); K.Solve(tImpulse, -(_local15), -(_local16)); var _local21:Number = tImpulse.x; var _local22:Number = tImpulse.y; _local3.m_position.x = (_local3.m_position.x - (_local3.m_invMass * _local21)); _local3.m_position.y = (_local3.m_position.y - (_local3.m_invMass * _local22)); _local3.m_rotation = (_local3.m_rotation - (_local3.m_invI * ((_local7 * _local22) - (_local8 * _local21)))); _local3.m_R.Set(_local3.m_rotation); _local4.m_position.x = (_local4.m_position.x + (_local4.m_invMass * _local21)); _local4.m_position.y = (_local4.m_position.y + (_local4.m_invMass * _local22)); _local4.m_rotation = (_local4.m_rotation + (_local4.m_invI * ((_local9 * _local22) - (_local10 * _local21)))); _local4.m_R.Set(_local4.m_rotation); var _local23:Number = 0; if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){ _local24 = ((_local4.m_rotation - _local3.m_rotation) - m_intialAngle); _local25 = 0; if (m_limitState == e_equalLimits){ _local2 = b2Math.b2Clamp(_local24, -(b2Settings.b2_maxAngularCorrection), b2Settings.b2_maxAngularCorrection); _local25 = (-(m_motorMass) * _local2); _local23 = b2Math.b2Abs(_local2); } else { if (m_limitState == e_atLowerLimit){ _local2 = (_local24 - m_lowerAngle); _local23 = b2Math.b2Max(0, -(_local2)); _local2 = b2Math.b2Clamp((_local2 + b2Settings.b2_angularSlop), -(b2Settings.b2_maxAngularCorrection), 0); _local25 = (-(m_motorMass) * _local2); _local1 = m_limitPositionImpulse; m_limitPositionImpulse = b2Math.b2Max((m_limitPositionImpulse + _local25), 0); _local25 = (m_limitPositionImpulse - _local1); } else { if (m_limitState == e_atUpperLimit){ _local2 = (_local24 - m_upperAngle); _local23 = b2Math.b2Max(0, _local2); _local2 = b2Math.b2Clamp((_local2 - b2Settings.b2_angularSlop), 0, b2Settings.b2_maxAngularCorrection); _local25 = (-(m_motorMass) * _local2); _local1 = m_limitPositionImpulse; m_limitPositionImpulse = b2Math.b2Min((m_limitPositionImpulse + _local25), 0); _local25 = (m_limitPositionImpulse - _local1); }; }; }; _local3.m_rotation = (_local3.m_rotation - (_local3.m_invI * _local25)); _local3.m_R.Set(_local3.m_rotation); _local4.m_rotation = (_local4.m_rotation + (_local4.m_invI * _local25)); _local4.m_R.Set(_local4.m_rotation); }; return ((((_local5 <= b2Settings.b2_linearSlop)) && ((_local23 <= 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 SetMotorTorque(_arg1:Number):void{ m_maxMotorTorque = _arg1; } public function GetJointAngle():Number{ return ((m_body2.m_rotation - m_body1.m_rotation)); } public function GetMotorTorque(_arg1:Number):Number{ return ((_arg1 * m_motorImpulse)); } override public function GetReactionTorque(_arg1:Number):Number{ return ((_arg1 * m_limitImpulse)); } override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local4:b2Mat22; var _local9:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local2:b2Body = m_body1; var _local3:b2Body = m_body2; _local4 = _local2.m_R; var _local5:Number = ((_local4.col1.x * m_localAnchor1.x) + (_local4.col2.x * m_localAnchor1.y)); var _local6:Number = ((_local4.col1.y * m_localAnchor1.x) + (_local4.col2.y * m_localAnchor1.y)); _local4 = _local3.m_R; var _local7:Number = ((_local4.col1.x * m_localAnchor2.x) + (_local4.col2.x * m_localAnchor2.y)); var _local8:Number = ((_local4.col1.y * m_localAnchor2.x) + (_local4.col2.y * m_localAnchor2.y)); var _local10:Number = (((_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local8)) - _local2.m_linearVelocity.x) - (-(_local2.m_angularVelocity) * _local6)); var _local11:Number = (((_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local7)) - _local2.m_linearVelocity.y) - (_local2.m_angularVelocity * _local5)); var _local12:Number = -(((m_ptpMass.col1.x * _local10) + (m_ptpMass.col2.x * _local11))); var _local13:Number = -(((m_ptpMass.col1.y * _local10) + (m_ptpMass.col2.y * _local11))); m_ptpImpulse.x = (m_ptpImpulse.x + _local12); m_ptpImpulse.y = (m_ptpImpulse.y + _local13); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x - (_local2.m_invMass * _local12)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y - (_local2.m_invMass * _local13)); _local2.m_angularVelocity = (_local2.m_angularVelocity - (_local2.m_invI * ((_local5 * _local13) - (_local6 * _local12)))); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local3.m_invMass * _local12)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local3.m_invMass * _local13)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * ((_local7 * _local13) - (_local8 * _local12)))); if (((m_enableMotor) && (!((m_limitState == e_equalLimits))))){ _local14 = ((_local3.m_angularVelocity - _local2.m_angularVelocity) - m_motorSpeed); _local15 = (-(m_motorMass) * _local14); _local16 = m_motorImpulse; m_motorImpulse = b2Math.b2Clamp((m_motorImpulse + _local15), (-(_arg1.dt) * m_maxMotorTorque), (_arg1.dt * m_maxMotorTorque)); _local15 = (m_motorImpulse - _local16); _local2.m_angularVelocity = (_local2.m_angularVelocity - (_local2.m_invI * _local15)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * _local15)); }; if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){ _local17 = (_local3.m_angularVelocity - _local2.m_angularVelocity); _local18 = (-(m_motorMass) * _local17); if (m_limitState == e_equalLimits){ m_limitImpulse = (m_limitImpulse + _local18); } else { if (m_limitState == e_atLowerLimit){ _local9 = m_limitImpulse; m_limitImpulse = b2Math.b2Max((m_limitImpulse + _local18), 0); _local18 = (m_limitImpulse - _local9); } else { if (m_limitState == e_atUpperLimit){ _local9 = m_limitImpulse; m_limitImpulse = b2Math.b2Min((m_limitImpulse + _local18), 0); _local18 = (m_limitImpulse - _local9); }; }; }; _local2.m_angularVelocity = (_local2.m_angularVelocity - (_local2.m_invI * _local18)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * _local18)); }; } } }//package Box2D.Dynamics.Joints
Section 58
//b2RevoluteJointDef (Box2D.Dynamics.Joints.b2RevoluteJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; public class b2RevoluteJointDef extends b2JointDef { public var enableMotor:Boolean; public var upperAngle:Number; public var lowerAngle:Number; public var enableLimit:Boolean; public var motorSpeed:Number; public var anchorPoint:b2Vec2; public var motorTorque:Number; public function b2RevoluteJointDef(){ type = b2Joint.e_revoluteJoint; anchorPoint = new b2Vec2(0, 0); lowerAngle = 0; upperAngle = 0; motorTorque = 0; motorSpeed = 0; enableLimit = false; enableMotor = false; } } }//package Box2D.Dynamics.Joints
Section 59
//b2Body (Box2D.Dynamics.b2Body) package Box2D.Dynamics { import Box2D.Common.Math.*; import Box2D.Dynamics.Joints.*; import Box2D.Dynamics.Contacts.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2Body { public var m_next:b2Body; public var m_R:b2Mat22; public var m_contactList:b2ContactNode; public var m_angularVelocity:Number; public var m_rotation:Number; public var m_shapeList:b2Shape; public var m_force:b2Vec2; public var m_torque:Number; public var m_mass:Number; public var m_rotation0:Number; public var m_invI:Number; public var m_shapeCount:int; public var m_userData; public var m_linearVelocity:b2Vec2; public var m_flags:uint; public var m_invMass:Number; public var m_position:b2Vec2; public var m_linearDamping:Number; public var m_prev:b2Body; public var m_world:b2World; public var m_angularDamping:Number; public var m_position0:b2Vec2; private var sMat0:b2Mat22; public var m_center:b2Vec2; public var m_sleepTime:Number; public var m_I:Number; public var m_jointList:b2JointNode; public static var e_frozenFlag:uint = 2; public static var e_sleepFlag:uint = 8; public static var e_islandFlag:uint = 4; public static var solid:uint = 64; public static var e_destroyFlag:uint = 32; public static var e_allowSleepFlag:uint = 16; public static var e_staticFlag:uint = 1; public function b2Body(_arg1:b2BodyDef, _arg2:b2World){ var _local3:int; var _local4:b2ShapeDef; var _local5:b2MassData; var _local7:b2Vec2; var _local8:b2Shape; sMat0 = new b2Mat22(); m_position = new b2Vec2(); m_R = new b2Mat22(0); m_position0 = new b2Vec2(); super(); m_flags = (_arg1.solid) ? solid : 0; m_position.SetV(_arg1.position); m_rotation = _arg1.rotation; m_R.Set(m_rotation); m_position0.SetV(m_position); m_rotation0 = m_rotation; m_world = _arg2; m_linearDamping = b2Math.b2Clamp((1 - _arg1.linearDamping), 0, 1); m_angularDamping = b2Math.b2Clamp((1 - _arg1.angularDamping), 0, 1); m_force = new b2Vec2(0, 0); m_torque = 0; m_mass = 0; var _local6:Array = new Array(b2Settings.b2_maxShapesPerBody); _local3 = 0; while (_local3 < b2Settings.b2_maxShapesPerBody) { _local6[_local3] = new b2MassData(); _local3++; }; m_shapeCount = 0; m_center = new b2Vec2(0, 0); _local3 = 0; while (_local3 < b2Settings.b2_maxShapesPerBody) { _local4 = _arg1.shapes[_local3]; if (_local4 == null){ break; }; _local5 = _local6[_local3]; _local4.ComputeMass(_local5); m_mass = (m_mass + _local5.mass); m_center.x = (m_center.x + (_local5.mass * (_local4.localPosition.x + _local5.center.x))); m_center.y = (m_center.y + (_local5.mass * (_local4.localPosition.y + _local5.center.y))); m_shapeCount++; _local3++; }; if (m_mass > 0){ m_center.Multiply((1 / m_mass)); m_position.Add(b2Math.b2MulMV(m_R, m_center)); } else { m_flags = (m_flags | e_staticFlag); }; m_I = 0; _local3 = 0; while (_local3 < m_shapeCount) { _local4 = _arg1.shapes[_local3]; _local5 = _local6[_local3]; m_I = (m_I + _local5.I); _local7 = b2Math.SubtractVV(b2Math.AddVV(_local4.localPosition, _local5.center), m_center); m_I = (m_I + (_local5.mass * b2Math.b2Dot(_local7, _local7))); _local3++; }; if (m_mass > 0){ m_invMass = (1 / m_mass); } else { m_invMass = 0; }; if ((((m_I > 0)) && ((_arg1.preventRotation == false)))){ m_invI = (1 / m_I); } else { m_I = 0; m_invI = 0; }; m_linearVelocity = b2Math.AddVV(_arg1.linearVelocity, b2Math.b2CrossFV(_arg1.angularVelocity, m_center)); m_angularVelocity = _arg1.angularVelocity; m_jointList = null; m_contactList = null; m_prev = null; m_next = null; m_shapeList = null; _local3 = 0; while (_local3 < m_shapeCount) { _local4 = _arg1.shapes[_local3]; _local8 = b2Shape.Create(_local4, this, m_center); _local8.m_next = m_shapeList; m_shapeList = _local8; _local3++; }; m_sleepTime = 0; if (_arg1.allowSleep){ m_flags = (m_flags | e_allowSleepFlag); }; if (_arg1.isSleeping){ m_flags = (m_flags | e_sleepFlag); }; if ((((m_flags & e_sleepFlag)) || ((m_invMass == 0)))){ m_linearVelocity.Set(0, 0); m_angularVelocity = 0; }; m_userData = _arg1.userData; } public function SetCenterPosition(_arg1:b2Vec2, _arg2:Number):void{ if (IsFrozen()){ return; }; m_rotation = _arg2; m_R.Set(m_rotation); m_position.SetV(_arg1); m_position0.SetV(m_position); m_rotation0 = m_rotation; var _local3:b2Shape = m_shapeList; while (_local3 != null) { _local3.Synchronize(m_position, m_R, m_position, m_R); _local3 = _local3.m_next; }; m_world.m_broadPhase.Commit(); } public function GetWorldPoint(_arg1:b2Vec2):b2Vec2{ return (b2Math.AddVV(m_position, b2Math.b2MulMV(m_R, _arg1))); } 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 IsFrozen():Boolean{ return (((m_flags & e_frozenFlag) == e_frozenFlag)); } public function IsSleeping():Boolean{ return (((m_flags & e_sleepFlag) == e_sleepFlag)); } public function GetLocalVector(_arg1:b2Vec2):b2Vec2{ return (b2Math.b2MulTMV(m_R, _arg1)); } public function QuickSyncShapes():void{ var _local1:b2Shape = m_shapeList; while (_local1 != null) { _local1.QuickSync(m_position, m_R); _local1 = _local1.m_next; }; } public function GetInertia():Number{ return (m_I); } public function GetJointList():b2JointNode{ return (m_jointList); } public function Freeze():void{ m_flags = (m_flags | e_frozenFlag); m_linearVelocity.SetZero(); m_angularVelocity = 0; var _local1:b2Shape = m_shapeList; while (_local1 != null) { _local1.DestroyProxy(); _local1 = _local1.m_next; }; } public function GetRotationMatrix():b2Mat22{ return (m_R); } public function SetAngularVelocity(_arg1:Number):void{ m_angularVelocity = _arg1; } public function SynchronizeShapes():void{ sMat0.Set(m_rotation0); var _local1:b2Shape = m_shapeList; while (_local1 != null) { _local1.Synchronize(m_position0, sMat0, m_position, m_R); _local1 = _local1.m_next; }; } public function ApplyForce(_arg1:b2Vec2, _arg2:b2Vec2):void{ if (IsSleeping() == false){ m_force.Add(_arg1); m_torque = (m_torque + b2Math.b2CrossVV(b2Math.SubtractVV(_arg2, m_position), _arg1)); }; } public function GetOriginPosition():b2Vec2{ return (b2Math.SubtractVV(m_position, b2Math.b2MulMV(m_R, m_center))); } public function ApplyImpulse(_arg1:b2Vec2, _arg2:b2Vec2):void{ if (IsSleeping() == false){ m_linearVelocity.Add(b2Math.MulFV(m_invMass, _arg1)); m_angularVelocity = (m_angularVelocity + (m_invI * b2Math.b2CrossVV(b2Math.SubtractVV(_arg2, m_position), _arg1))); }; } public function GetContactList():b2ContactNode{ return (m_contactList); } public function GetShapeList():b2Shape{ return (m_shapeList); } public function GetMass():Number{ return (m_mass); } public function GetAngularVelocity():Number{ return (m_angularVelocity); } public function SetOriginPosition(_arg1:b2Vec2, _arg2:Number):void{ if (IsFrozen()){ return; }; m_rotation = _arg2; m_R.Set(m_rotation); m_position = b2Math.AddVV(_arg1, b2Math.b2MulMV(m_R, m_center)); m_position0.SetV(m_position); m_rotation0 = m_rotation; var _local3:b2Shape = m_shapeList; while (_local3 != null) { _local3.Synchronize(m_position, m_R, m_position, m_R); _local3 = _local3.m_next; }; m_world.m_broadPhase.Commit(); } public function GetLocalPoint(_arg1:b2Vec2):b2Vec2{ return (b2Math.b2MulTMV(m_R, b2Math.SubtractVV(_arg1, m_position))); } public function GetRotation():Number{ return (m_rotation); } public function IsStatic():Boolean{ return (((m_flags & e_staticFlag) == e_staticFlag)); } public function Destroy():void{ var _local2:b2Shape; var _local1:b2Shape = m_shapeList; while (_local1) { _local2 = _local1; _local1 = _local1.m_next; b2Shape.Destroy(_local2); }; } public function GetWorldVector(_arg1:b2Vec2):b2Vec2{ return (b2Math.b2MulMV(m_R, _arg1)); } public function GetNext():b2Body{ return (m_next); } public function IsConnected(_arg1:b2Body):Boolean{ var _local2:b2JointNode = m_jointList; while (_local2 != null) { if (_local2.other == _arg1){ return ((_local2.joint.m_collideConnected == false)); }; _local2 = _local2.next; }; return (false); } public function GetUserData(){ return (m_userData); } public function AllowSleeping(_arg1:Boolean):void{ if (_arg1){ m_flags = (m_flags | e_allowSleepFlag); } else { m_flags = (m_flags & ~(e_allowSleepFlag)); WakeUp(); }; } public function ApplyTorque(_arg1:Number):void{ if (IsSleeping() == false){ m_torque = (m_torque + _arg1); }; } public function GetCenterPosition():b2Vec2{ return (m_position); } public function GetLinearVelocity():b2Vec2{ return (m_linearVelocity); } } }//package Box2D.Dynamics
Section 60
//b2BodyDef (Box2D.Dynamics.b2BodyDef) package Box2D.Dynamics { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2BodyDef { public var angularDamping:Number; public var rotation:Number; public var allowSleep:Boolean; public var userData; public var linearDamping:Number; public var angularVelocity:Number; public var linearVelocity:b2Vec2; public var position:b2Vec2; public var solid:Boolean; public var shapes:Array; public var isSleeping:Boolean; public var preventRotation:Boolean; public function b2BodyDef(){ shapes = new Array(); super(); userData = null; var _local1:int; while (_local1 < b2Settings.b2_maxShapesPerBody) { shapes[_local1] = null; _local1++; }; position = new b2Vec2(0, 0); rotation = 0; linearVelocity = new b2Vec2(0, 0); angularVelocity = 0; linearDamping = 0; angularDamping = 0; allowSleep = true; isSleeping = false; preventRotation = false; solid = true; } public function AddShape(_arg1:b2ShapeDef):void{ var _local2:int; while (_local2 < b2Settings.b2_maxShapesPerBody) { if (shapes[_local2] == null){ shapes[_local2] = _arg1; break; }; _local2++; }; } } }//package Box2D.Dynamics
Section 61
//b2CollisionFilter (Box2D.Dynamics.b2CollisionFilter) package Box2D.Dynamics { import Box2D.Collision.Shapes.*; public class b2CollisionFilter { public static var b2_defaultFilter:b2CollisionFilter = new (b2CollisionFilter); ; 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 62
//b2ContactManager (Box2D.Dynamics.b2ContactManager) package Box2D.Dynamics { import Box2D.Collision.*; import Box2D.Dynamics.Contacts.*; import Box2D.Collision.Shapes.*; public class b2ContactManager extends b2PairCallback { public var m_world:b2World; public var m_destroyImmediate:Boolean; public var m_nullContact:b2NullContact; public function b2ContactManager(){ m_nullContact = new b2NullContact(); super(); m_world = null; m_destroyImmediate = false; } public function Collide():void{ var _local1:b2Body; var _local2:b2Body; var _local3:b2ContactNode; var _local4:b2ContactNode; var _local6:int; var _local7:int; var _local5:b2Contact = m_world.m_contactList; while (_local5 != null) { if (((_local5.m_shape1.m_body.IsSleeping()) && (_local5.m_shape2.m_body.IsSleeping()))){ } else { _local6 = _local5.GetManifoldCount(); _local5.Evaluate(); _local7 = _local5.GetManifoldCount(); if ((((_local6 == 0)) && ((_local7 > 0)))){ _local1 = _local5.m_shape1.m_body; _local2 = _local5.m_shape2.m_body; _local3 = _local5.m_node1; _local4 = _local5.m_node2; _local3.contact = _local5; _local3.other = _local2; _local3.prev = null; _local3.next = _local1.m_contactList; if (_local3.next != null){ _local3.next.prev = _local5.m_node1; }; _local1.m_contactList = _local5.m_node1; _local4.contact = _local5; _local4.other = _local1; _local4.prev = null; _local4.next = _local2.m_contactList; if (_local4.next != null){ _local4.next.prev = _local4; }; _local2.m_contactList = _local4; } else { if ((((_local6 > 0)) && ((_local7 == 0)))){ _local1 = _local5.m_shape1.m_body; _local2 = _local5.m_shape2.m_body; _local3 = _local5.m_node1; _local4 = _local5.m_node2; if (_local3.prev){ _local3.prev.next = _local3.next; }; if (_local3.next){ _local3.next.prev = _local3.prev; }; if (_local3 == _local1.m_contactList){ _local1.m_contactList = _local3.next; }; _local3.prev = null; _local3.next = null; if (_local4.prev){ _local4.prev.next = _local4.next; }; if (_local4.next){ _local4.next.prev = _local4.prev; }; if (_local4 == _local2.m_contactList){ _local2.m_contactList = _local4.next; }; _local4.prev = null; _local4.next = null; }; }; }; _local5 = _local5.m_next; }; } public function CleanContactList():void{ var _local2:b2Contact; var _local1:b2Contact = m_world.m_contactList; while (_local1 != null) { _local2 = _local1; _local1 = _local1.m_next; if ((_local2.m_flags & b2Contact.e_destroyFlag)){ DestroyContact(_local2); _local2 = null; }; }; } public function DestroyContact(_arg1:b2Contact):void{ var _local2:b2Body; var _local3:b2Body; var _local4:b2ContactNode; var _local5:b2ContactNode; if (_arg1.m_prev){ _arg1.m_prev.m_next = _arg1.m_next; }; if (_arg1.m_next){ _arg1.m_next.m_prev = _arg1.m_prev; }; if (_arg1 == m_world.m_contactList){ m_world.m_contactList = _arg1.m_next; }; if (_arg1.GetManifoldCount() > 0){ _local2 = _arg1.m_shape1.m_body; _local3 = _arg1.m_shape2.m_body; _local4 = _arg1.m_node1; _local5 = _arg1.m_node2; _local2.WakeUp(); _local3.WakeUp(); if (_local4.prev){ _local4.prev.next = _local4.next; }; if (_local4.next){ _local4.next.prev = _local4.prev; }; if (_local4 == _local2.m_contactList){ _local2.m_contactList = _local4.next; }; _local4.prev = null; _local4.next = null; if (_local5.prev){ _local5.prev.next = _local5.next; }; if (_local5.next){ _local5.next.prev = _local5.prev; }; if (_local5 == _local3.m_contactList){ _local3.m_contactList = _local5.next; }; _local5.prev = null; _local5.next = null; }; b2Contact.Destroy(_arg1, m_world.m_blockAllocator); m_world.m_contactCount--; } override public function PairRemoved(_arg1, _arg2, _arg3):void{ if (_arg3 == null){ return; }; var _local4:b2Contact = (_arg3 as b2Contact); if (_local4 != m_nullContact){ if (m_destroyImmediate == true){ DestroyContact(_local4); _local4 = null; } else { _local4.m_flags = (_local4.m_flags | b2Contact.e_destroyFlag); }; }; } override public function PairAdded(_arg1, _arg2){ var _local8:b2Shape; var _local9:b2Body; var _local3:b2Shape = (_arg1 as b2Shape); var _local4:b2Shape = (_arg2 as b2Shape); var _local5:b2Body = _local3.m_body; var _local6:b2Body = _local4.m_body; if (((_local5.IsStatic()) && (_local6.IsStatic()))){ return (m_nullContact); }; if (_local3.m_body == _local4.m_body){ return (m_nullContact); }; if (_local6.IsConnected(_local5)){ return (m_nullContact); }; if (((!((m_world.m_filter == null))) && ((m_world.m_filter.ShouldCollide(_local3, _local4) == false)))){ return (m_nullContact); }; if (_local6.m_invMass == 0){ _local8 = _local3; _local3 = _local4; _local4 = _local8; _local9 = _local5; _local5 = _local6; _local6 = _local9; }; var _local7:b2Contact = b2Contact.Create(_local3, _local4, m_world.m_blockAllocator); if (_local7 == null){ return (m_nullContact); }; _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; m_world.m_contactCount++; return (_local7); } } }//package Box2D.Dynamics
Section 63
//b2Island (Box2D.Dynamics.b2Island) package Box2D.Dynamics { import Box2D.Common.Math.*; import Box2D.Dynamics.Joints.*; import Box2D.Dynamics.Contacts.*; import Box2D.Common.*; public class b2Island { public var m_positionError:Number; 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; public static var m_positionIterationCount:uint; public function b2Island(_arg1:int, _arg2:int, _arg3:int, _arg4):void{ var _local5:int; super(); m_bodyCapacity = _arg1; m_contactCapacity = _arg2; m_jointCapacity = _arg3; m_bodyCount = 0; m_contactCount = 0; m_jointCount = 0; m_bodies = new Array(_arg1); _local5 = 0; while (_local5 < _arg1) { m_bodies[_local5] = null; _local5++; }; m_contacts = new Array(_arg2); _local5 = 0; while (_local5 < _arg2) { m_contacts[_local5] = null; _local5++; }; m_joints = new Array(_arg3); _local5 = 0; while (_local5 < _arg3) { m_joints[_local5] = null; _local5++; }; m_allocator = _arg4; } 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 AddContact(_arg1:b2Contact):void{ var _local2 = m_contactCount++; m_contacts[_local2] = _arg1; } public function Solve(_arg1:b2TimeStep, _arg2:b2Vec2):void{ var _local3:int; var _local4:b2Body; var _local6:int; var _local7:Boolean; var _local8:Boolean; var _local9:Boolean; _local3 = 0; while (_local3 < m_bodyCount) { _local4 = m_bodies[_local3]; if (_local4.m_invMass == 0){ } else { _local4.m_linearVelocity.Add(b2Math.MulFV(_arg1.dt, b2Math.AddVV(_arg2, b2Math.MulFV(_local4.m_invMass, _local4.m_force)))); _local4.m_angularVelocity = (_local4.m_angularVelocity + ((_arg1.dt * _local4.m_invI) * _local4.m_torque)); _local4.m_linearVelocity.Multiply(_local4.m_linearDamping); _local4.m_angularVelocity = (_local4.m_angularVelocity * _local4.m_angularDamping); _local4.m_position0.SetV(_local4.m_position); _local4.m_rotation0 = _local4.m_rotation; }; _local3++; }; var _local5:b2ContactSolver = new b2ContactSolver(m_contacts, m_contactCount, m_allocator); _local5.PreSolve(); _local3 = 0; while (_local3 < m_jointCount) { m_joints[_local3].PrepareVelocitySolver(); _local3++; }; _local3 = 0; while (_local3 < _arg1.iterations) { _local5.SolveVelocityConstraints(); _local6 = 0; while (_local6 < m_jointCount) { m_joints[_local6].SolveVelocityConstraints(_arg1); _local6++; }; _local3++; }; _local3 = 0; while (_local3 < m_bodyCount) { _local4 = m_bodies[_local3]; if (_local4.m_invMass == 0){ } else { _local4.m_position.x = (_local4.m_position.x + (_arg1.dt * _local4.m_linearVelocity.x)); _local4.m_position.y = (_local4.m_position.y + (_arg1.dt * _local4.m_linearVelocity.y)); _local4.m_rotation = (_local4.m_rotation + (_arg1.dt * _local4.m_angularVelocity)); _local4.m_R.Set(_local4.m_rotation); }; _local3++; }; _local3 = 0; while (_local3 < m_jointCount) { m_joints[_local3].PreparePositionSolver(); _local3++; }; if (b2World.s_enablePositionCorrection){ m_positionIterationCount = 0; while (m_positionIterationCount < _arg1.iterations) { _local7 = _local5.SolvePositionConstraints(b2Settings.b2_contactBaumgarte); _local8 = true; _local3 = 0; while (_local3 < m_jointCount) { _local9 = m_joints[_local3].SolvePositionConstraints(); _local8 = ((_local8) && (_local9)); _local3++; }; if (((_local7) && (_local8))){ break; }; m_positionIterationCount++; }; }; _local5.PostSolve(); _local3 = 0; while (_local3 < m_bodyCount) { _local4 = m_bodies[_local3]; if (_local4.m_invMass == 0){ } else { _local4.m_R.Set(_local4.m_rotation); _local4.SynchronizeShapes(); _local4.m_force.Set(0, 0); _local4.m_torque = 0; }; _local3++; }; } public function Clear():void{ m_bodyCount = 0; m_contactCount = 0; m_jointCount = 0; } public function UpdateSleep(_arg1:Number):void{ var _local2:int; var _local3:b2Body; var _local4:Number = Number.MAX_VALUE; var _local5:Number = (b2Settings.b2_linearSleepTolerance * b2Settings.b2_linearSleepTolerance); var _local6:Number = (b2Settings.b2_angularSleepTolerance * b2Settings.b2_angularSleepTolerance); _local2 = 0; while (_local2 < m_bodyCount) { _local3 = m_bodies[_local2]; if (_local3.m_invMass == 0){ } else { if ((_local3.m_flags & b2Body.e_allowSleepFlag) == 0){ _local3.m_sleepTime = 0; _local4 = 0; }; if (((((((_local3.m_flags & b2Body.e_allowSleepFlag) == 0)) || (((_local3.m_angularVelocity * _local3.m_angularVelocity) > _local6)))) || ((b2Math.b2Dot(_local3.m_linearVelocity, _local3.m_linearVelocity) > _local5)))){ _local3.m_sleepTime = 0; _local4 = 0; } else { _local3.m_sleepTime = (_local3.m_sleepTime + _arg1); _local4 = b2Math.b2Min(_local4, _local3.m_sleepTime); }; }; _local2++; }; if (_local4 >= b2Settings.b2_timeToSleep){ _local2 = 0; while (_local2 < m_bodyCount) { _local3 = m_bodies[_local2]; _local3.m_flags = (_local3.m_flags | b2Body.e_sleepFlag); _local2++; }; }; } } }//package Box2D.Dynamics
Section 64
//b2TimeStep (Box2D.Dynamics.b2TimeStep) package Box2D.Dynamics { public class b2TimeStep { public var dt:Number; public var iterations:int; public var inv_dt:Number; } }//package Box2D.Dynamics
Section 65
//b2World (Box2D.Dynamics.b2World) package Box2D.Dynamics { import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Dynamics.Joints.*; import Box2D.Dynamics.Contacts.*; import Box2D.Collision.Shapes.*; public class b2World { public var m_bodyCount:int; public var m_gravity:b2Vec2; public var m_listener:b2WorldListener; public var m_filter:b2CollisionFilter; private var step:b2TimeStep; public var m_positionIterationCount:int; public var m_contactList:b2Contact; public var m_blockAllocator; public var m_groundBody:b2Body; public var m_contactCount:int; public var m_broadPhase:b2BroadPhase; public var m_allowSleep:Boolean; public var m_stackAllocator; public var m_jointCount:int; public var m_bodyList:b2Body; public var m_bodyDestroyList:b2Body; public var m_jointList:b2Joint; public var m_contactManager:b2ContactManager; public static var s_enableWarmStarting:int = 1; public static var s_enablePositionCorrection:int = 1; public function b2World(_arg1:b2AABB, _arg2:b2Vec2, _arg3:Boolean){ step = new b2TimeStep(); m_contactManager = new b2ContactManager(); super(); m_listener = null; m_filter = b2CollisionFilter.b2_defaultFilter; m_bodyList = null; m_contactList = null; m_jointList = null; m_bodyCount = 0; m_contactCount = 0; m_jointCount = 0; m_bodyDestroyList = null; m_allowSleep = _arg3; m_gravity = _arg2; m_contactManager.m_world = this; m_broadPhase = new b2BroadPhase(_arg1, m_contactManager); var _local4:b2BodyDef = new b2BodyDef(); m_groundBody = CreateBody(_local4); } public function GetContactList():b2Contact{ return (m_contactList); } 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); _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); _local6 = _local6.m_next; }; }; } public function SetFilter(_arg1:b2CollisionFilter):void{ m_filter = _arg1; } public function DestroyBody(_arg1:b2Body):void{ if ((_arg1.m_flags & b2Body.e_destroyFlag)){ return; }; 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; }; _arg1.m_flags = (_arg1.m_flags | b2Body.e_destroyFlag); m_bodyCount--; _arg1.m_prev = null; _arg1.m_next = m_bodyDestroyList; m_bodyDestroyList = _arg1; } public function SetListener(_arg1:b2WorldListener):void{ m_listener = _arg1; } public function CreateBody(_arg1:b2BodyDef):b2Body{ var _local2:b2Body = new b2Body(_arg1, this); _local2.m_prev = null; _local2.m_next = m_bodyList; if (m_bodyList){ m_bodyList.m_prev = _local2; }; m_bodyList = _local2; m_bodyCount++; return (_local2); } public function GetGroundBody():b2Body{ return (m_groundBody); } public function Query(_arg1:b2AABB, _arg2:Array, _arg3:int):int{ var _local4:Array = new Array(); 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 CleanBodyList():void{ var _local2:b2Body; var _local3:b2JointNode; var _local4:b2JointNode; m_contactManager.m_destroyImmediate = true; var _local1:b2Body = m_bodyDestroyList; while (_local1) { _local2 = _local1; _local1 = _local1.m_next; _local3 = _local2.m_jointList; while (_local3) { _local4 = _local3; _local3 = _local3.next; if (m_listener){ m_listener.NotifyJointDestroyed(_local4.joint); }; DestroyJoint(_local4.joint); }; _local2.Destroy(); }; m_bodyDestroyList = null; m_contactManager.m_destroyImmediate = false; } public function Step(_arg1:Number, _arg2:int):void{ var _local3:b2Body; var _local4:b2Body; var _local12:int; var _local13:int; var _local14:b2ContactNode; var _local15:b2JointNode; var _local16:uint; step.dt = _arg1; step.iterations = _arg2; if (_arg1 > 0){ step.inv_dt = (1 / _arg1); } else { step.inv_dt = 0; }; m_positionIterationCount = 0; var _local5:b2Island = new b2Island(m_bodyCount, m_contactCount, m_jointCount, m_stackAllocator); _local3 = m_bodyList; while (_local3 != null) { _local3.m_flags = (_local3.m_flags & ~(b2Body.e_islandFlag)); _local3 = _local3.m_next; }; var _local6:b2Contact = m_contactList; while (_local6 != null) { _local6.m_flags = (_local6.m_flags & ~(b2Contact.e_islandFlag)); _local6 = _local6.m_next; }; var _local7:b2Joint = m_jointList; while (_local7 != null) { _local7.m_islandFlag = false; _local7 = _local7.m_next; }; var _local8:int = m_bodyCount; var _local9:Array = new Array(m_bodyCount); var _local10:int; while (_local10 < m_bodyCount) { _local9[_local10] = null; _local10++; }; var _local11:b2Body = m_bodyList; while (_local11 != null) { if ((_local11.m_flags & (((b2Body.e_staticFlag | b2Body.e_islandFlag) | b2Body.e_sleepFlag) | b2Body.e_frozenFlag))){ } else { _local5.Clear(); _local12 = 0; var _temp1 = _local12; _local12 = (_local12 + 1); var _local17 = _temp1; _local9[_local17] = _local11; _local11.m_flags = (_local11.m_flags | b2Body.e_islandFlag); while (_local12 > 0) { --_local12; _local3 = _local9[_local12]; _local5.AddBody(_local3); _local3.m_flags = (_local3.m_flags & ~(b2Body.e_sleepFlag)); if ((((_local3.m_flags & b2Body.e_staticFlag)) || (!((_local3.m_flags & b2Body.solid))))){ } else { _local14 = _local3.m_contactList; while (_local14 != null) { if ((_local14.contact.m_flags & b2Contact.e_islandFlag)){ } else { if (!(_local14.other.m_flags & b2Body.solid)){ } else { _local5.AddContact(_local14.contact); _local14.contact.m_flags = (_local14.contact.m_flags | b2Contact.e_islandFlag); _local4 = _local14.other; if ((_local4.m_flags & b2Body.e_islandFlag)){ } else { var _temp2 = _local12; _local12 = (_local12 + 1); var _local18 = _temp2; _local9[_local18] = _local4; _local4.m_flags = (_local4.m_flags | b2Body.e_islandFlag); }; }; }; _local14 = _local14.next; }; _local15 = _local3.m_jointList; while (_local15 != null) { if (_local15.joint.m_islandFlag == true){ } else { _local5.AddJoint(_local15.joint); _local15.joint.m_islandFlag = true; _local4 = _local15.other; if ((_local4.m_flags & b2Body.e_islandFlag)){ } else { var _temp3 = _local12; _local12 = (_local12 + 1); _local18 = _temp3; _local9[_local18] = _local4; _local4.m_flags = (_local4.m_flags | b2Body.e_islandFlag); }; }; _local15 = _local15.next; }; }; }; _local5.Solve(step, m_gravity); m_positionIterationCount = b2Math.b2Max(m_positionIterationCount, b2Island.m_positionIterationCount); if (m_allowSleep){ _local5.UpdateSleep(_arg1); }; _local13 = 0; while (_local13 < _local5.m_bodyCount) { _local3 = _local5.m_bodies[_local13]; if ((_local3.m_flags & b2Body.e_staticFlag)){ _local3.m_flags = (_local3.m_flags & ~(b2Body.e_islandFlag)); }; if (((_local3.IsFrozen()) && (m_listener))){ _local16 = m_listener.NotifyBoundaryViolated(_local3); if (_local16 == b2WorldListener.b2_destroyBody){ DestroyBody(_local3); _local3 = null; _local5.m_bodies[_local13] = null; }; }; _local13++; }; }; _local11 = _local11.m_next; }; m_broadPhase.Commit(); m_contactManager.CleanContactList(); CleanBodyList(); m_contactManager.Collide(); } public function GetJointList():b2Joint{ return (m_jointList); } public function GetBodyList():b2Body{ return (m_bodyList); } } }//package Box2D.Dynamics
Section 66
//b2WorldListener (Box2D.Dynamics.b2WorldListener) package Box2D.Dynamics { import Box2D.Dynamics.Joints.*; public class b2WorldListener { public static var b2_freezeBody:uint = 0; public static var b2_destroyBody:uint = 1; public function NotifyJointDestroyed(_arg1:b2Joint):void{ } public function NotifyBoundaryViolated(_arg1:b2Body):uint{ return (b2_freezeBody); } } }//package Box2D.Dynamics
Section 67
//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 68
//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 69
//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 70
//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 71
//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 72
//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 73
//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 74
//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 75
//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 76
//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 77
//IAPIBootstrap (com.kongregate.as3.client.IAPIBootstrap) package com.kongregate.as3.client { import flash.display.*; import flash.events.*; 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 78
//KongregateAPI (com.kongregate.as3.client.KongregateAPI) package com.kongregate.as3.client { import flash.display.*; import flash.events.*; import flash.system.*; import com.kongregate.as3.client.services.*; import flash.utils.*; import flash.net.*; 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 79
//IAutomationObject (mx.automation.IAutomationObject) package mx.automation { import flash.events.*; public interface IAutomationObject { function createAutomationIDPart(_arg1:IAutomationObject):Object; function get automationName():String; function get showInAutomationHierarchy():Boolean; function set automationName(_arg1:String):void; function getAutomationChildAt(_arg1:int):IAutomationObject; function get automationDelegate():Object; function get automationTabularData():Object; function resolveAutomationIDPart(_arg1:Object):Array; function replayAutomatableEvent(_arg1:Event):Boolean; function set automationDelegate(_arg1:Object):void; function get automationValue():Array; function get numAutomationChildren():int; function set showInAutomationHierarchy(_arg1:Boolean):void; } }//package mx.automation
Section 80
//BindabilityInfo (mx.binding.BindabilityInfo) package mx.binding { import mx.events.*; public class BindabilityInfo { private var classChangeEvents:Object; private var typeDescription:XML; private var childChangeEvents:Object; public static const METHOD:String = "method"; public static const ACCESSOR:String = "accessor"; public static const CHANGE_EVENT:String = "ChangeEvent"; public static const NON_COMMITTING_CHANGE_EVENT:String = "NonCommittingChangeEvent"; public static const BINDABLE:String = "Bindable"; mx_internal static const VERSION:String = "3.0.0.0"; public static const MANAGED:String = "Managed"; public function BindabilityInfo(_arg1:XML){ childChangeEvents = {}; super(); this.typeDescription = _arg1; } private function addChangeEvents(_arg1:XMLList, _arg2:Object, _arg3:Boolean):void{ var _local4:XML; var _local5:XMLList; var _local6:String; for each (_local4 in _arg1) { _local5 = _local4.arg; if (_local5.length() > 0){ _local6 = _local5[0].@value; _arg2[_local6] = _arg3; } else { trace((("warning: unconverted Bindable metadata in class '" + typeDescription.@name) + "'")); }; }; } private function getClassChangeEvents():Object{ if (!classChangeEvents){ classChangeEvents = {}; addBindabilityEvents(typeDescription.metadata, classChangeEvents); if (typeDescription.metadata.(@name == MANAGED).length() > 0){ classChangeEvents[PropertyChangeEvent.PROPERTY_CHANGE] = true; }; }; return (classChangeEvents); } private function addBindabilityEvents(_arg1:XMLList, _arg2:Object):void{ var metadata = _arg1; var eventListObj = _arg2; addChangeEvents(metadata.(@name == BINDABLE), eventListObj, true); addChangeEvents(metadata.(@name == CHANGE_EVENT), eventListObj, true); addChangeEvents(metadata.(@name == NON_COMMITTING_CHANGE_EVENT), eventListObj, false); } private function copyProps(_arg1:Object, _arg2:Object):Object{ var _local3:String; for (_local3 in _arg1) { _arg2[_local3] = _arg1[_local3]; }; return (_arg2); } public function getChangeEvents(_arg1:String):Object{ var childDesc:XMLList; var numChildren:int; var childName = _arg1; var changeEvents:Object = childChangeEvents[childName]; if (!changeEvents){ changeEvents = copyProps(getClassChangeEvents(), {}); childDesc = (typeDescription.accessor.(@name == childName) + typeDescription.method.(@name == childName)); numChildren = childDesc.length(); if (numChildren == 0){ if (!typeDescription.@dynamic){ trace((((("warning: no describeType entry for '" + childName) + "' on non-dynamic type '") + typeDescription.@name) + "'")); }; } else { if (numChildren > 1){ trace(((((("warning: multiple describeType entries for '" + childName) + "' on type '") + typeDescription.@name) + "':\n") + childDesc)); }; addBindabilityEvents(childDesc.metadata, changeEvents); }; childChangeEvents[childName] = changeEvents; }; return (changeEvents); } } }//package mx.binding
Section 81
//Binding (mx.binding.Binding) package mx.binding { import mx.collections.errors.*; public class Binding { mx_internal var destFunc:Function; mx_internal var srcFunc:Function; mx_internal var destString:String; mx_internal var document:Object; private var hasHadValue:Boolean; mx_internal var isExecuting:Boolean; mx_internal var isHandlingEvent:Boolean; public var twoWayCounterpart:Binding; mx_internal var isEnabled:Boolean; public var uiComponentWatcher:int; private var lastValue:Object; private var wrappedFunctionSuccessful:Boolean; mx_internal static const VERSION:String = "3.0.0.0"; public function Binding(_arg1:Object, _arg2:Function, _arg3:Function, _arg4:String){ this.document = _arg1; this.srcFunc = _arg2; this.destFunc = _arg3; this.destString = _arg4; isEnabled = true; isExecuting = false; isHandlingEvent = false; hasHadValue = false; uiComponentWatcher = -1; BindingManager.addBinding(_arg1, _arg4, this); } protected function wrapFunctionCall(_arg1:Object, _arg2:Function, _arg3:Object=null, ... _args):Object{ var result:Object; var thisArg = _arg1; var wrappedFunction = _arg2; var object = _arg3; var args = _args; wrappedFunctionSuccessful = false; try { result = wrappedFunction.apply(thisArg, args); wrappedFunctionSuccessful = true; return (result); } catch(itemPendingError:ItemPendingError) { itemPendingError.addResponder(new EvalBindingResponder(this, object)); if (BindingManager.debugDestinationStrings[destString]){ trace(((("Binding: destString = " + destString) + ", error = ") + itemPendingError)); }; } catch(rangeError:RangeError) { if (BindingManager.debugDestinationStrings[destString]){ trace(((("Binding: destString = " + destString) + ", error = ") + rangeError)); }; } catch(error:Error) { if (((((((((!((error.errorID == 1006))) && (!((error.errorID == 1009))))) && (!((error.errorID == 1010))))) && (!((error.errorID == 1055))))) && (!((error.errorID == 1069))))){ throw (error); } else { if (BindingManager.debugDestinationStrings[destString]){ trace(((("Binding: destString = " + destString) + ", error = ") + error)); }; }; }; return (null); } private function nodeSeqEqual(_arg1:XMLList, _arg2:XMLList):Boolean{ var _local4:uint; var _local3:uint = _arg1.length(); if (_local3 == _arg2.length()){ _local4 = 0; while ((((_local4 < _local3)) && ((_arg1[_local4] === _arg2[_local4])))) { _local4++; }; return ((_local4 == _local3)); //unresolved jump }; return (false); } public function watcherFired(_arg1:Boolean, _arg2:int):void{ var commitEvent = _arg1; var cloneIndex = _arg2; if (isHandlingEvent){ return; }; try { isHandlingEvent = true; execute(cloneIndex); } finally { isHandlingEvent = false; }; } public function execute(_arg1:Object=null):void{ var o = _arg1; if (!isEnabled){ return; }; if (((isExecuting) || (((twoWayCounterpart) && (twoWayCounterpart.isExecuting))))){ hasHadValue = true; return; }; try { isExecuting = true; wrapFunctionCall(this, innerExecute, o); } finally { isExecuting = false; }; } private function innerExecute():void{ var _local1:Object = wrapFunctionCall(document, srcFunc); if (BindingManager.debugDestinationStrings[destString]){ trace(((("Binding: destString = " + destString) + ", srcFunc result = ") + _local1)); }; if (((hasHadValue) || (wrappedFunctionSuccessful))){ if (((!((((((lastValue is XML)) && (lastValue.hasComplexContent()))) && ((lastValue === _local1))))) && (!((((((((lastValue is XMLList)) && (lastValue.hasComplexContent()))) && ((_local1 is XMLList)))) && (nodeSeqEqual((lastValue as XMLList), (_local1 as XMLList)))))))){ destFunc.call(document, _local1); lastValue = _local1; hasHadValue = true; }; }; } } }//package mx.binding
Section 82
//BindingManager (mx.binding.BindingManager) package mx.binding { public class BindingManager { mx_internal static const VERSION:String = "3.0.0.0"; static var debugDestinationStrings:Object = {}; public static function executeBindings(_arg1:Object, _arg2:String, _arg3:Object):void{ var _local4:String; if (((!(_arg2)) || ((_arg2 == "")))){ return; }; if (((((((_arg1) && ((((_arg1 is IBindingClient)) || (_arg1.hasOwnProperty("_bindingsByDestination")))))) && (_arg1._bindingsByDestination))) && (_arg1._bindingsBeginWithWord[getFirstWord(_arg2)]))){ for (_local4 in _arg1._bindingsByDestination) { if (_local4.charAt(0) == _arg2.charAt(0)){ if ((((((_local4.indexOf((_arg2 + ".")) == 0)) || ((_local4.indexOf((_arg2 + "[")) == 0)))) || ((_local4 == _arg2)))){ _arg1._bindingsByDestination[_local4].execute(_arg3); }; }; }; }; } public static function addBinding(_arg1:Object, _arg2:String, _arg3:Binding):void{ if (!_arg1._bindingsByDestination){ _arg1._bindingsByDestination = {}; _arg1._bindingsBeginWithWord = {}; }; _arg1._bindingsByDestination[_arg2] = _arg3; _arg1._bindingsBeginWithWord[getFirstWord(_arg2)] = true; } public static function debugBinding(_arg1:String):void{ debugDestinationStrings[_arg1] = true; } private static function getFirstWord(_arg1:String):String{ var _local2:int = _arg1.indexOf("."); var _local3:int = _arg1.indexOf("["); if (_local2 == _local3){ return (_arg1); }; var _local4:int = Math.min(_local2, _local3); if (_local4 == -1){ _local4 = Math.max(_local2, _local3); }; return (_arg1.substr(0, _local4)); } public static function setEnabled(_arg1:Object, _arg2:Boolean):void{ var _local3:Array; var _local4:uint; var _local5:Binding; if ((((_arg1 is IBindingClient)) && (_arg1._bindings))){ _local3 = (_arg1._bindings as Array); _local4 = 0; while (_local4 < _local3.length) { _local5 = _local3[_local4]; _local5.isEnabled = _arg2; _local4++; }; }; } } }//package mx.binding
Section 83
//EvalBindingResponder (mx.binding.EvalBindingResponder) package mx.binding { import mx.rpc.*; public class EvalBindingResponder implements IResponder { private var binding:Binding; private var object:Object; mx_internal static const VERSION:String = "3.0.0.0"; public function EvalBindingResponder(_arg1:Binding, _arg2:Object){ this.binding = _arg1; this.object = _arg2; } public function fault(_arg1:Object):void{ } public function result(_arg1:Object):void{ binding.execute(object); } } }//package mx.binding
Section 84
//IBindingClient (mx.binding.IBindingClient) package mx.binding { public interface IBindingClient { } }//package mx.binding
Section 85
//IWatcherSetupUtil (mx.binding.IWatcherSetupUtil) package mx.binding { public interface IWatcherSetupUtil { function setup(_arg1:Object, _arg2:Function, _arg3:Array, _arg4:Array):void; } }//package mx.binding
Section 86
//PropertyWatcher (mx.binding.PropertyWatcher) package mx.binding { import mx.core.*; import flash.events.*; import mx.events.*; import flash.utils.*; import mx.utils.*; public class PropertyWatcher extends Watcher { protected var propertyGetter:Function; private var parentObj:Object; protected var events:Object; private var useRTTI:Boolean; private var _propertyName:String; mx_internal static const VERSION:String = "3.0.0.0"; public function PropertyWatcher(_arg1:String, _arg2:Object, _arg3:Array, _arg4:Function=null){ super(_arg3); _propertyName = _arg1; this.events = _arg2; this.propertyGetter = _arg4; useRTTI = !(_arg2); } private function eventNamesToString():String{ var _local2:String; var _local1 = " "; for (_local2 in events) { _local1 = (_local1 + (_local2 + " ")); }; return (_local1); } override public function updateParent(_arg1:Object):void{ var _local2:String; var _local3:BindabilityInfo; if (((parentObj) && ((parentObj is IEventDispatcher)))){ for (_local2 in events) { parentObj.removeEventListener(_local2, eventHandler); }; }; if ((_arg1 is Watcher)){ parentObj = _arg1.value; } else { parentObj = _arg1; }; if (parentObj){ if (useRTTI){ events = {}; if ((parentObj is IEventDispatcher)){ _local3 = DescribeTypeCache.describeType(parentObj).bindabilityInfo; events = _local3.getChangeEvents(_propertyName); if (objectIsEmpty(events)){ trace((((("warning: unable to bind to property '" + _propertyName) + "' on class '") + getQualifiedClassName(parentObj)) + "'")); } else { addParentEventListeners(); }; } else { trace((((("warning: unable to bind to property '" + _propertyName) + "' on class '") + getQualifiedClassName(parentObj)) + "' (class is not an IEventDispatcher)")); }; } else { if ((parentObj is IEventDispatcher)){ addParentEventListeners(); }; }; }; wrapUpdate(updateProperty); } private function objectIsEmpty(_arg1:Object):Boolean{ var _local2:String; for (_local2 in _arg1) { return (false); }; return (true); } override protected function shallowClone():Watcher{ var _local1:PropertyWatcher = new PropertyWatcher(_propertyName, events, listeners, propertyGetter); return (_local1); } private function traceInfo():String{ return ((((((("Watcher(" + getQualifiedClassName(parentObj)) + ".") + _propertyName) + "): events = [") + eventNamesToString()) + (useRTTI) ? "] (RTTI)" : "]")); } public function get propertyName():String{ return (_propertyName); } private function addParentEventListeners():void{ var _local1:String; for (_local1 in events) { if (_local1 != "__NoChangeEvent__"){ parentObj.addEventListener(_local1, eventHandler, false, EventPriority.BINDING, true); }; }; } private function updateProperty():void{ if (parentObj){ if (_propertyName == "this"){ value = parentObj; } else { if (propertyGetter != null){ value = propertyGetter.apply(parentObj, [_propertyName]); } else { value = parentObj[_propertyName]; }; }; } else { value = null; }; updateChildren(); } public function eventHandler(_arg1:Event):void{ var _local2:Object; if ((_arg1 is PropertyChangeEvent)){ _local2 = PropertyChangeEvent(_arg1).property; if (_local2 != _propertyName){ return; }; }; wrapUpdate(updateProperty); notifyListeners(events[_arg1.type]); } } }//package mx.binding
Section 87
//RepeatableBinding (mx.binding.RepeatableBinding) package mx.binding { import mx.core.*; import flash.events.*; public class RepeatableBinding extends Binding { mx_internal static const VERSION:String = "3.0.0.0"; public function RepeatableBinding(_arg1:Object, _arg2:Function, _arg3:Function, _arg4:String){ super(_arg1, _arg2, _arg3, _arg4); } public function eventHandler(_arg1:Event):void{ if (isHandlingEvent){ return; }; isHandlingEvent = true; execute(); isHandlingEvent = false; } override public function execute(_arg1:Object=null):void{ var _local2:String; var _local3:Array; if (isExecuting){ return; }; isExecuting = true; if (!_arg1){ _local2 = destString.substring(0, destString.indexOf(".")); _arg1 = document[_local2]; } else { if (typeof(_arg1) == "number"){ _local2 = destString.substring(0, destString.indexOf(".")); _local3 = (document[_local2] as Array); if (_local3){ _arg1 = _local3[_arg1]; } else { _arg1 = null; }; }; }; if (_arg1){ recursivelyProcessIDArray(_arg1); }; isExecuting = false; } private function recursivelyProcessIDArray(_arg1:Object):void{ var array:Array; var n:int; var i:int; var client:IRepeaterClient; var o = _arg1; if ((o is Array)){ array = (o as Array); n = array.length; i = 0; while (i < n) { recursivelyProcessIDArray(array[i]); i = (i + 1); }; } else { if ((o is IRepeaterClient)){ client = IRepeaterClient(o); wrapFunctionCall(this, function ():void{ var _local1:Object = wrapFunctionCall(this, srcFunc, null, client.instanceIndices, client.repeaterIndices); if (BindingManager.debugDestinationStrings[destString]){ trace(((("RepeatableBinding: destString = " + destString) + ", srcFunc result = ") + _local1)); }; destFunc(_local1, client.instanceIndices); }, o); }; }; } } }//package mx.binding
Section 88
//StaticPropertyWatcher (mx.binding.StaticPropertyWatcher) package mx.binding { import mx.core.*; import flash.events.*; import mx.events.*; public class StaticPropertyWatcher extends Watcher { private var propertyGetter:Function; private var parentObj:Class; protected var events:Object; private var _propertyName:String; mx_internal static const VERSION:String = "3.0.0.0"; public function StaticPropertyWatcher(_arg1:String, _arg2:Object, _arg3:Array, _arg4:Function=null){ super(_arg3); _propertyName = _arg1; this.events = _arg2; this.propertyGetter = _arg4; } private function eventNamesToString():String{ var _local2:String; var _local1 = " "; for (_local2 in events) { _local1 = (_local1 + (_local2 + " ")); }; return (_local1); } override public function updateParent(_arg1:Object):void{ var _local2:String; var _local3:IEventDispatcher; parentObj = Class(_arg1); if (parentObj["staticEventDispatcher"] != null){ for (_local2 in events) { if (_local2 != "__NoChangeEvent__"){ _local3 = parentObj["staticEventDispatcher"]; _local3.addEventListener(_local2, eventHandler, false, EventPriority.BINDING, true); }; }; }; wrapUpdate(updateProperty); } private function updateProperty():void{ if (parentObj){ if (propertyGetter != null){ value = propertyGetter.apply(parentObj, [_propertyName]); } else { value = parentObj[_propertyName]; }; } else { value = null; }; updateChildren(); } override protected function shallowClone():Watcher{ var _local1:StaticPropertyWatcher = new StaticPropertyWatcher(_propertyName, events, listeners, propertyGetter); return (_local1); } private function traceInfo():String{ return ((((((("StaticPropertyWatcher(" + parentObj) + ".") + _propertyName) + "): events = [") + eventNamesToString()) + "]")); } public function get propertyName():String{ return (_propertyName); } public function eventHandler(_arg1:Event):void{ var _local2:Object; if ((_arg1 is PropertyChangeEvent)){ _local2 = PropertyChangeEvent(_arg1).property; if (_local2 != _propertyName){ return; }; }; wrapUpdate(updateProperty); notifyListeners(events[_arg1.type]); } } }//package mx.binding
Section 89
//Watcher (mx.binding.Watcher) package mx.binding { import mx.collections.errors.*; public class Watcher { protected var children:Array; public var value:Object; protected var cloneIndex:int; protected var listeners:Array; mx_internal static const VERSION:String = "3.0.0.0"; public function Watcher(_arg1:Array=null){ this.listeners = _arg1; } public function removeChildren(_arg1:int):void{ children.splice(_arg1); } public function updateChildren():void{ var _local1:int; var _local2:int; if (children){ _local1 = children.length; _local2 = 0; while (_local2 < _local1) { children[_local2].updateParent(this); _local2++; }; }; } protected function shallowClone():Watcher{ return (new Watcher()); } protected function wrapUpdate(_arg1:Function):void{ var wrappedFunction = _arg1; try { wrappedFunction.apply(this); } catch(itemPendingError:ItemPendingError) { value = null; } catch(rangeError:RangeError) { value = null; } catch(error:Error) { if (((((((((!((error.errorID == 1006))) && (!((error.errorID == 1009))))) && (!((error.errorID == 1010))))) && (!((error.errorID == 1055))))) && (!((error.errorID == 1069))))){ throw (error); }; }; } private function valueChanged(_arg1:Object):Boolean{ if ((((_arg1 == null)) && ((value == null)))){ return (false); }; var _local2 = typeof(value); if (_local2 == "string"){ if ((((_arg1 == null)) && ((value == "")))){ return (false); }; return (!((_arg1 == value))); }; if (_local2 == "number"){ if ((((_arg1 == null)) && ((value == 0)))){ return (false); }; return (!((_arg1 == value))); }; if (_local2 == "boolean"){ if ((((_arg1 == null)) && ((value == false)))){ return (false); }; return (!((_arg1 == value))); }; return (true); } public function notifyListeners(_arg1:Boolean):void{ var _local2:int; var _local3:int; if (listeners){ _local2 = listeners.length; _local3 = 0; while (_local3 < _local2) { listeners[_local3].watcherFired(_arg1, cloneIndex); _local3++; }; }; } protected function deepClone(_arg1:int):Watcher{ var _local3:int; var _local4:int; var _local5:Watcher; var _local2:Watcher = shallowClone(); _local2.cloneIndex = _arg1; if (listeners){ _local2.listeners = listeners.concat(); }; if (children){ _local3 = children.length; _local4 = 0; while (_local4 < _local3) { _local5 = children[_local4].deepClone(_arg1); _local2.addChild(_local5); _local4++; }; }; return (_local2); } public function updateParent(_arg1:Object):void{ } public function addChild(_arg1:Watcher):void{ if (!children){ children = [_arg1]; } else { children.push(_arg1); }; _arg1.updateParent(this); } } }//package mx.binding
Section 90
//CollectionViewError (mx.collections.errors.CollectionViewError) package mx.collections.errors { public class CollectionViewError extends Error { mx_internal static const VERSION:String = "3.0.0.0"; public function CollectionViewError(_arg1:String){ super(_arg1); } } }//package mx.collections.errors
Section 91
//CursorError (mx.collections.errors.CursorError) package mx.collections.errors { public class CursorError extends Error { mx_internal static const VERSION:String = "3.0.0.0"; public function CursorError(_arg1:String){ super(_arg1); } } }//package mx.collections.errors
Section 92
//ItemPendingError (mx.collections.errors.ItemPendingError) package mx.collections.errors { import mx.rpc.*; public class ItemPendingError extends Error { private var _responders:Array; mx_internal static const VERSION:String = "3.0.0.0"; public function ItemPendingError(_arg1:String){ super(_arg1); } public function get responders():Array{ return (_responders); } public function addResponder(_arg1:IResponder):void{ if (!_responders){ _responders = []; }; _responders.push(_arg1); } } }//package mx.collections.errors
Section 93
//SortError (mx.collections.errors.SortError) package mx.collections.errors { public class SortError extends Error { mx_internal static const VERSION:String = "3.0.0.0"; public function SortError(_arg1:String){ super(_arg1); } } }//package mx.collections.errors
Section 94
//ArrayCollection (mx.collections.ArrayCollection) package mx.collections { import flash.utils.*; public class ArrayCollection extends ListCollectionView implements IExternalizable { mx_internal static const VERSION:String = "3.0.0.0"; public function ArrayCollection(_arg1:Array=null){ this.source = _arg1; } public function set source(_arg1:Array):void{ list = new ArrayList(_arg1); } public function readExternal(_arg1:IDataInput):void{ if ((list is IExternalizable)){ IExternalizable(list).readExternal(_arg1); } else { source = (_arg1.readObject() as Array); }; } public function writeExternal(_arg1:IDataOutput):void{ if ((list is IExternalizable)){ IExternalizable(list).writeExternal(_arg1); } else { _arg1.writeObject(source); }; } public function get source():Array{ if (((list) && ((list is ArrayList)))){ return (ArrayList(list).source); }; return (null); } } }//package mx.collections
Section 95
//ArrayList (mx.collections.ArrayList) package mx.collections { import mx.core.*; import flash.events.*; import mx.events.*; import mx.resources.*; import flash.utils.*; import mx.utils.*; public class ArrayList extends EventDispatcher implements IList, IExternalizable, IPropertyChangeNotifier { private var _source:Array; private var _dispatchEvents:int;// = 0 private var _uid:String; private var resourceManager:IResourceManager; mx_internal static const VERSION:String = "3.0.0.0"; public function ArrayList(_arg1:Array=null){ resourceManager = ResourceManager.getInstance(); super(); disableEvents(); this.source = _arg1; enableEvents(); _uid = UIDUtil.createUID(); } public function itemUpdated(_arg1:Object, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{ var _local5:PropertyChangeEvent = new PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE); _local5.kind = PropertyChangeEventKind.UPDATE; _local5.source = _arg1; _local5.property = _arg2; _local5.oldValue = _arg3; _local5.newValue = _arg4; itemUpdateHandler(_local5); } public function readExternal(_arg1:IDataInput):void{ source = _arg1.readObject(); } private function internalDispatchEvent(_arg1:String, _arg2:Object=null, _arg3:int=-1):void{ var _local4:CollectionEvent; var _local5:PropertyChangeEvent; if (_dispatchEvents == 0){ if (hasEventListener(CollectionEvent.COLLECTION_CHANGE)){ _local4 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); _local4.kind = _arg1; _local4.items.push(_arg2); _local4.location = _arg3; dispatchEvent(_local4); }; if (((hasEventListener(PropertyChangeEvent.PROPERTY_CHANGE)) && ((((_arg1 == CollectionEventKind.ADD)) || ((_arg1 == CollectionEventKind.REMOVE)))))){ _local5 = new PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE); _local5.property = _arg3; if (_arg1 == CollectionEventKind.ADD){ _local5.newValue = _arg2; } else { _local5.oldValue = _arg2; }; dispatchEvent(_local5); }; }; } public function removeAll():void{ var _local1:int; var _local2:int; if (length > 0){ _local1 = length; _local2 = 0; while (_local2 < _local1) { stopTrackUpdates(source[_local2]); _local2++; }; source.splice(0, length); internalDispatchEvent(CollectionEventKind.RESET); }; } public function removeItemAt(_arg1:int):Object{ var _local3:String; if ((((_arg1 < 0)) || ((_arg1 >= length)))){ _local3 = resourceManager.getString("collections", "outOfBounds", [_arg1]); throw (new RangeError(_local3)); }; var _local2:Object = source.splice(_arg1, 1)[0]; stopTrackUpdates(_local2); internalDispatchEvent(CollectionEventKind.REMOVE, _local2, _arg1); return (_local2); } public function get uid():String{ return (_uid); } public function getItemIndex(_arg1:Object):int{ return (ArrayUtil.getItemIndex(_arg1, source)); } public function writeExternal(_arg1:IDataOutput):void{ _arg1.writeObject(_source); } public function addItem(_arg1:Object):void{ addItemAt(_arg1, length); } public function toArray():Array{ return (source.concat()); } private function disableEvents():void{ _dispatchEvents--; } public function get source():Array{ return (_source); } public function getItemAt(_arg1:int, _arg2:int=0):Object{ var _local3:String; if ((((_arg1 < 0)) || ((_arg1 >= length)))){ _local3 = resourceManager.getString("collections", "outOfBounds", [_arg1]); throw (new RangeError(_local3)); }; return (source[_arg1]); } public function set uid(_arg1:String):void{ _uid = _arg1; } public function setItemAt(_arg1:Object, _arg2:int):Object{ var _local4:String; var _local5:Boolean; var _local6:Boolean; var _local7:PropertyChangeEvent; var _local8:CollectionEvent; if ((((_arg2 < 0)) || ((_arg2 >= length)))){ _local4 = resourceManager.getString("collections", "outOfBounds", [_arg2]); throw (new RangeError(_local4)); }; var _local3:Object = source[_arg2]; source[_arg2] = _arg1; stopTrackUpdates(_local3); startTrackUpdates(_arg1); if (_dispatchEvents == 0){ _local5 = hasEventListener(CollectionEvent.COLLECTION_CHANGE); _local6 = hasEventListener(PropertyChangeEvent.PROPERTY_CHANGE); if (((_local5) || (_local6))){ _local7 = new PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE); _local7.kind = PropertyChangeEventKind.UPDATE; _local7.oldValue = _local3; _local7.newValue = _arg1; _local7.property = _arg2; }; if (_local5){ _local8 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); _local8.kind = CollectionEventKind.REPLACE; _local8.location = _arg2; _local8.items.push(_local7); dispatchEvent(_local8); }; if (_local6){ dispatchEvent(_local7); }; }; return (_local3); } public function get length():int{ if (source){ return (source.length); }; return (0); } protected function stopTrackUpdates(_arg1:Object):void{ if (((_arg1) && ((_arg1 is IEventDispatcher)))){ IEventDispatcher(_arg1).removeEventListener(PropertyChangeEvent.PROPERTY_CHANGE, itemUpdateHandler); }; } protected function itemUpdateHandler(_arg1:PropertyChangeEvent):void{ var _local2:PropertyChangeEvent; var _local3:uint; internalDispatchEvent(CollectionEventKind.UPDATE, _arg1); if ((((_dispatchEvents == 0)) && (hasEventListener(PropertyChangeEvent.PROPERTY_CHANGE)))){ _local2 = PropertyChangeEvent(_arg1.clone()); _local3 = getItemIndex(_arg1.target); _local2.property = ((_local3.toString() + ".") + _arg1.property); dispatchEvent(_local2); }; } public function addItemAt(_arg1:Object, _arg2:int):void{ var _local3:String; if ((((_arg2 < 0)) || ((_arg2 > length)))){ _local3 = resourceManager.getString("collections", "outOfBounds", [_arg2]); throw (new RangeError(_local3)); }; source.splice(_arg2, 0, _arg1); startTrackUpdates(_arg1); internalDispatchEvent(CollectionEventKind.ADD, _arg1, _arg2); } public function removeItem(_arg1:Object):Boolean{ var _local2:int = getItemIndex(_arg1); var _local3 = (_local2 >= 0); if (_local3){ removeItemAt(_local2); }; return (_local3); } protected function startTrackUpdates(_arg1:Object):void{ if (((_arg1) && ((_arg1 is IEventDispatcher)))){ IEventDispatcher(_arg1).addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, itemUpdateHandler, false, 0, true); }; } override public function toString():String{ if (source){ return (source.toString()); }; return (getQualifiedClassName(this)); } private function enableEvents():void{ _dispatchEvents++; if (_dispatchEvents > 0){ _dispatchEvents = 0; }; } public function set source(_arg1:Array):void{ var _local2:int; var _local3:int; var _local4:CollectionEvent; if (((_source) && (_source.length))){ _local3 = _source.length; _local2 = 0; while (_local2 < _local3) { stopTrackUpdates(_source[_local2]); _local2++; }; }; _source = (_arg1) ? _arg1 : []; _local3 = _source.length; _local2 = 0; while (_local2 < _local3) { startTrackUpdates(_source[_local2]); _local2++; }; if (_dispatchEvents == 0){ _local4 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); _local4.kind = CollectionEventKind.RESET; dispatchEvent(_local4); }; } } }//package mx.collections
Section 96
//CursorBookmark (mx.collections.CursorBookmark) package mx.collections { public class CursorBookmark { private var _value:Object; mx_internal static const VERSION:String = "3.0.0.0"; private static var _first:CursorBookmark; private static var _last:CursorBookmark; private static var _current:CursorBookmark; public function CursorBookmark(_arg1:Object){ _value = _arg1; } public function get value():Object{ return (_value); } public function getViewIndex():int{ return (-1); } public static function get LAST():CursorBookmark{ if (!_last){ _last = new CursorBookmark("${L}"); }; return (_last); } public static function get FIRST():CursorBookmark{ if (!_first){ _first = new CursorBookmark("${F}"); }; return (_first); } public static function get CURRENT():CursorBookmark{ if (!_current){ _current = new CursorBookmark("${C}"); }; return (_current); } } }//package mx.collections
Section 97
//ICollectionView (mx.collections.ICollectionView) package mx.collections { import flash.events.*; public interface ICollectionView extends IEventDispatcher { function set filterFunction(_arg1:Function):void; function enableAutoUpdate():void; function get length():int; function disableAutoUpdate():void; function itemUpdated(_arg1:Object, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void; function get filterFunction():Function; function createCursor():IViewCursor; function refresh():Boolean; function set sort(_arg1:Sort):void; function get sort():Sort; function contains(_arg1:Object):Boolean; } }//package mx.collections
Section 98
//IList (mx.collections.IList) package mx.collections { import flash.events.*; public interface IList extends IEventDispatcher { function addItem(_arg1:Object):void; function get length():int; function addItemAt(_arg1:Object, _arg2:int):void; function itemUpdated(_arg1:Object, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void; function getItemIndex(_arg1:Object):int; function removeItemAt(_arg1:int):Object; function getItemAt(_arg1:int, _arg2:int=0):Object; function removeAll():void; function toArray():Array; function setItemAt(_arg1:Object, _arg2:int):Object; } }//package mx.collections
Section 99
//ItemResponder (mx.collections.ItemResponder) package mx.collections { import mx.rpc.*; public class ItemResponder implements IResponder { private var _faultHandler:Function; private var _token:Object; private var _resultHandler:Function; mx_internal static const VERSION:String = "3.0.0.0"; public function ItemResponder(_arg1:Function, _arg2:Function, _arg3:Object=null){ _resultHandler = _arg1; _faultHandler = _arg2; _token = _arg3; } public function result(_arg1:Object):void{ _resultHandler(_arg1, _token); } public function fault(_arg1:Object):void{ _faultHandler(_arg1, _token); } } }//package mx.collections
Section 100
//IViewCursor (mx.collections.IViewCursor) package mx.collections { import flash.events.*; public interface IViewCursor extends IEventDispatcher { function get current():Object; function moveNext():Boolean; function get view():ICollectionView; function movePrevious():Boolean; function remove():Object; function findLast(_arg1:Object):Boolean; function get beforeFirst():Boolean; function get afterLast():Boolean; function findAny(_arg1:Object):Boolean; function get bookmark():CursorBookmark; function findFirst(_arg1:Object):Boolean; function seek(_arg1:CursorBookmark, _arg2:int=0, _arg3:int=0):void; function insert(_arg1:Object):void; } }//package mx.collections
Section 101
//ListCollectionView (mx.collections.ListCollectionView) package mx.collections { import mx.core.*; import flash.events.*; import mx.events.*; import mx.resources.*; import flash.utils.*; import mx.utils.*; import mx.collections.errors.*; public class ListCollectionView extends Proxy implements ICollectionView, IList, IMXMLObject { private var autoUpdateCounter:int; private var _list:IList; private var _filterFunction:Function; protected var localIndex:Array; mx_internal var dispatchResetEvent:Boolean;// = true private var pendingUpdates:Array; private var resourceManager:IResourceManager; private var eventDispatcher:EventDispatcher; private var revision:int; private var _sort:Sort; mx_internal static const VERSION:String = "3.0.0.0"; public function ListCollectionView(_arg1:IList=null){ resourceManager = ResourceManager.getInstance(); super(); eventDispatcher = new EventDispatcher(this); this.list = _arg1; } private function handlePendingUpdates():void{ var _local1:Array; var _local2:CollectionEvent; var _local3:int; var _local4:CollectionEvent; var _local5:int; if (pendingUpdates){ _local1 = pendingUpdates; pendingUpdates = null; _local3 = 0; while (_local3 < _local1.length) { _local4 = _local1[_local3]; if (_local4.kind == CollectionEventKind.UPDATE){ if (!_local2){ _local2 = _local4; } else { _local5 = 0; while (_local5 < _local4.items.length) { _local2.items.push(_local4.items[_local5]); _local5++; }; }; } else { listChangeHandler(_local4); }; _local3++; }; if (_local2){ listChangeHandler(_local2); }; }; } public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ eventDispatcher.removeEventListener(_arg1, _arg2, _arg3); } private function replaceItemsInView(_arg1:Array, _arg2:int, _arg3:Boolean=true):void{ var _local4:int; var _local5:Array; var _local6:Array; var _local7:int; var _local8:PropertyChangeEvent; var _local9:CollectionEvent; if (localIndex){ _local4 = _arg1.length; _local5 = []; _local6 = []; _local7 = 0; while (_local7 < _local4) { _local8 = _arg1[_local7]; _local5.push(_local8.oldValue); _local6.push(_local8.newValue); _local7++; }; removeItemsFromView(_local5, _arg2, _arg3); addItemsToView(_local6, _arg2, _arg3); } else { _local9 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); _local9.kind = CollectionEventKind.REPLACE; _local9.location = _arg2; _local9.items = _arg1; dispatchEvent(_local9); }; } public function willTrigger(_arg1:String):Boolean{ return (eventDispatcher.willTrigger(_arg1)); } private function getFilteredItemIndex(_arg1:Object):int{ var _local4:Object; var _local5:int; var _local6:int; var _local2:int = list.getItemIndex(_arg1); if (_local2 == 0){ return (0); }; var _local3:int = (_local2 - 1); while (_local3 >= 0) { _local4 = list.getItemAt(_local3); if (filterFunction(_local4)){ _local5 = localIndex.length; _local6 = 0; while (_local6 < _local5) { if (localIndex[_local6] == _local4){ return ((_local6 + 1)); }; _local6++; }; }; _local3--; }; return (0); } mx_internal function findItem(_arg1:Object, _arg2:String, _arg3:Boolean=false):int{ var _local4:String; if (!sort){ _local4 = resourceManager.getString("collections", "itemNotFound"); throw (new CollectionViewError(_local4)); }; if (localIndex.length == 0){ return ((_arg3) ? 0 : -1); }; return (sort.findItem(localIndex, _arg1, _arg2, _arg3)); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextName(_arg1:int):String{ return ((_arg1 - 1).toString()); } public function removeAll():void{ var _local2:int; var _local1:int = length; if (_local1 > 0){ if (localIndex){ _local2 = (_local1 - 1); while (_local2 >= 0) { removeItemAt(_local2); _local2--; }; } else { list.removeAll(); }; }; } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function hasProperty(_arg1):Boolean{ var n:Number; var name = _arg1; if ((name is QName)){ name = name.localName; }; var index = -1; try { n = parseInt(String(name)); if (!isNaN(n)){ index = int(n); }; } catch(e:Error) { }; if (index == -1){ return (false); }; return ((((index >= 0)) && ((index < length)))); } public function getItemAt(_arg1:int, _arg2:int=0):Object{ var _local3:String; if ((((_arg1 < 0)) || ((_arg1 >= length)))){ _local3 = resourceManager.getString("collections", "outOfBounds", [_arg1]); throw (new RangeError(_local3)); }; if (localIndex){ return (localIndex[_arg1]); }; if (list){ return (list.getItemAt(_arg1, _arg2)); }; return (null); } private function moveItemInView(_arg1:Object, _arg2:Boolean=true, _arg3:Array=null):void{ var _local4:int; var _local5:int; var _local6:int; var _local7:CollectionEvent; if (localIndex){ _local4 = -1; _local5 = 0; while (_local5 < localIndex.length) { if (localIndex[_local5] == _arg1){ _local4 = _local5; break; }; _local5++; }; if (_local4 > -1){ localIndex.splice(_local4, 1); }; _local6 = addItemsToView([_arg1], _local4, false); if (_arg2){ _local7 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); _local7.items.push(_arg1); if (((((_arg3) && ((_local6 == _local4)))) && ((_local6 > -1)))){ _arg3.push(_arg1); return; }; if ((((_local6 > -1)) && ((_local4 > -1)))){ _local7.kind = CollectionEventKind.MOVE; _local7.location = _local6; _local7.oldLocation = _local4; } else { if (_local6 > -1){ _local7.kind = CollectionEventKind.ADD; _local7.location = _local6; } else { if (_local4 > -1){ _local7.kind = CollectionEventKind.REMOVE; _local7.location = _local4; } else { _arg2 = false; }; }; }; if (_arg2){ dispatchEvent(_local7); }; }; }; } public function contains(_arg1:Object):Boolean{ return (!((getItemIndex(_arg1) == -1))); } public function get sort():Sort{ return (_sort); } private function removeItemsFromView(_arg1:Array, _arg2:int, _arg3:Boolean=true):void{ var _local6:int; var _local7:Object; var _local8:int; var _local9:CollectionEvent; var _local4:Array = (localIndex) ? [] : _arg1; var _local5:int = _arg2; if (localIndex){ _local6 = 0; while (_local6 < _arg1.length) { _local7 = _arg1[_local6]; _local8 = getItemIndex(_local7); if (_local8 > -1){ localIndex.splice(_local8, 1); _local4.push(_local7); _local5 = _local8; }; _local6++; }; }; if (((_arg3) && ((_local4.length > 0)))){ _local9 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); _local9.kind = CollectionEventKind.REMOVE; _local9.location = (((!(localIndex)) || ((_local4.length == 1)))) ? _local5 : -1; _local9.items = _local4; dispatchEvent(_local9); }; } public function get list():IList{ return (_list); } public function addItemAt(_arg1:Object, _arg2:int):void{ var _local4:String; if ((((((_arg2 < 0)) || (!(list)))) || ((_arg2 > length)))){ _local4 = resourceManager.getString("collections", "outOfBounds", [_arg2]); throw (new RangeError(_local4)); }; var _local3:int = _arg2; if (((localIndex) && (sort))){ _local3 = list.length; } else { if (((localIndex) && (!((filterFunction == null))))){ if (_local3 == localIndex.length){ _local3 = list.length; } else { _local3 = list.getItemIndex(localIndex[_arg2]); }; }; }; list.addItemAt(_arg1, _local3); } public function itemUpdated(_arg1:Object, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{ list.itemUpdated(_arg1, _arg2, _arg3, _arg4); } private function populateLocalIndex():void{ if (list){ localIndex = list.toArray(); } else { localIndex = []; }; } private function handlePropertyChangeEvents(_arg1:Array):void{ var _local3:Array; var _local4:Object; var _local5:int; var _local6:Array; var _local7:int; var _local8:PropertyChangeEvent; var _local9:Object; var _local10:Boolean; var _local11:int; var _local12:int; var _local13:CollectionEvent; var _local2:Array = _arg1; if (((sort) || (!((filterFunction == null))))){ _local3 = []; _local5 = 0; while (_local5 < _arg1.length) { _local8 = _arg1[_local5]; if (_local8.target){ _local9 = _local8.target; _local10 = !((_local8.target == _local8.source)); } else { _local9 = _local8.source; _local10 = false; }; _local11 = 0; while (_local11 < _local3.length) { if (_local3[_local11].item == _local9){ break; }; _local11++; }; if (_local11 < _local3.length){ _local4 = _local3[_local11]; } else { _local4 = {item:_local9, move:_local10, event:_local8}; _local3.push(_local4); }; _local4.move = ((((((_local4.move) || (filterFunction))) || (!(_local8.property)))) || (((sort) && (sort.propertyAffectsSort(String(_local8.property)))))); _local5++; }; _local2 = []; _local5 = 0; while (_local5 < _local3.length) { _local4 = _local3[_local5]; if (_local4.move){ moveItemInView(_local4.item, _local4.item, _local2); } else { _local2.push(_local4.item); }; _local5++; }; _local6 = []; _local7 = 0; while (_local7 < _local2.length) { _local12 = 0; while (_local12 < _local3.length) { if (_local2[_local7] == _local3[_local12].item){ _local6.push(_local3[_local12].event); }; _local12++; }; _local7++; }; _local2 = _local6; }; if (_local2.length > 0){ _local13 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); _local13.kind = CollectionEventKind.UPDATE; _local13.items = _local2; dispatchEvent(_local13); }; } public function set sort(_arg1:Sort):void{ _sort = _arg1; dispatchEvent(new Event("sortChanged")); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextValue(_arg1:int){ return (getItemAt((_arg1 - 1))); } public function setItemAt(_arg1:Object, _arg2:int):Object{ var _local4:String; var _local5:Object; if ((((((_arg2 < 0)) || (!(list)))) || ((_arg2 >= length)))){ _local4 = resourceManager.getString("collections", "outOfBounds", [_arg2]); throw (new RangeError(_local4)); }; var _local3:int = _arg2; if (localIndex){ if (_arg2 > localIndex.length){ _local3 = list.length; } else { _local5 = localIndex[_arg2]; _local3 = list.getItemIndex(_local5); }; }; return (list.setItemAt(_arg1, _local3)); } mx_internal function getBookmark(_arg1:int):ListCollectionViewBookmark{ var value:Object; var message:String; var index = _arg1; if ((((index < 0)) || ((index > length)))){ message = resourceManager.getString("collections", "invalidIndex", [index]); throw (new CollectionViewError(message)); }; try { value = getItemAt(index); } catch(e:Error) { value = null; }; return (new ListCollectionViewBookmark(value, this, revision, index)); } private function addItemsToView(_arg1:Array, _arg2:int, _arg3:Boolean=true):int{ var _local7:int; var _local8:int; var _local9:Object; var _local10:String; var _local11:CollectionEvent; var _local4:Array = (localIndex) ? [] : _arg1; var _local5:int = _arg2; var _local6:Boolean; if (localIndex){ _local7 = _arg2; _local8 = 0; while (_local8 < _arg1.length) { _local9 = _arg1[_local8]; if ((((filterFunction == null)) || (filterFunction(_local9)))){ if (sort){ _local7 = findItem(_local9, Sort.ANY_INDEX_MODE, true); if (_local6){ _local5 = _local7; _local6 = false; }; } else { _local7 = getFilteredItemIndex(_local9); if (_local6){ _local5 = _local7; _local6 = false; }; }; if (((((sort) && (sort.unique))) && ((sort.compareFunction(_local9, localIndex[_local7]) == 0)))){ _local10 = resourceManager.getString("collections", "incorrectAddition"); throw (new CollectionViewError(_local10)); }; var _temp1 = _local7; _local7 = (_local7 + 1); localIndex.splice(_temp1, 0, _local9); _local4.push(_local9); } else { _local5 = -1; }; _local8++; }; }; if (((localIndex) && ((_local4.length > 1)))){ _local5 = -1; }; if (((_arg3) && ((_local4.length > 0)))){ _local11 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); _local11.kind = CollectionEventKind.ADD; _local11.location = _local5; _local11.items = _local4; dispatchEvent(_local11); }; return (_local5); } public function dispatchEvent(_arg1:Event):Boolean{ return (eventDispatcher.dispatchEvent(_arg1)); } public function set list(_arg1:IList):void{ var _local2:Boolean; var _local3:Boolean; if (_list != _arg1){ if (_list){ _list.removeEventListener(CollectionEvent.COLLECTION_CHANGE, listChangeHandler); _local2 = (_list.length > 0); }; _list = _arg1; if (_list){ _list.addEventListener(CollectionEvent.COLLECTION_CHANGE, listChangeHandler, false, 0, true); _local3 = (_list.length > 0); }; if (((_local2) || (_local3))){ reset(); }; dispatchEvent(new Event("listChanged")); }; } mx_internal function getBookmarkIndex(_arg1:CursorBookmark):int{ var _local3:String; if (((!((_arg1 is ListCollectionViewBookmark))) || (!((ListCollectionViewBookmark(_arg1).view == this))))){ _local3 = resourceManager.getString("collections", "bookmarkNotFound"); throw (new CollectionViewError(_local3)); }; var _local2:ListCollectionViewBookmark = ListCollectionViewBookmark(_arg1); if (_local2.viewRevision != revision){ if ((((((_local2.index < 0)) || ((_local2.index >= length)))) || (!((getItemAt(_local2.index) == _local2.value))))){ _local2.index = getItemIndex(_local2.value); }; _local2.viewRevision = revision; }; return (_local2.index); } public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ eventDispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); } public function getItemIndex(_arg1:Object):int{ var _local2:int; var _local3:int; var _local4:int; var _local5:int; if (sort){ _local3 = sort.findItem(localIndex, _arg1, Sort.FIRST_INDEX_MODE); if (_local3 == -1){ return (-1); }; _local4 = sort.findItem(localIndex, _arg1, Sort.LAST_INDEX_MODE); _local2 = _local3; while (_local2 <= _local4) { if (localIndex[_local2] == _arg1){ return (_local2); }; _local2++; }; return (-1); } else { if (filterFunction != null){ _local5 = localIndex.length; _local2 = 0; while (_local2 < _local5) { if (localIndex[_local2] == _arg1){ return (_local2); }; _local2++; }; return (-1); }; }; return (list.getItemIndex(_arg1)); } public function removeItemAt(_arg1:int):Object{ var _local3:String; var _local4:Object; if ((((_arg1 < 0)) || ((_arg1 >= length)))){ _local3 = resourceManager.getString("collections", "outOfBounds", [_arg1]); throw (new RangeError(_local3)); }; var _local2:int = _arg1; if (localIndex){ _local4 = localIndex[_arg1]; _local2 = list.getItemIndex(_local4); }; return (list.removeItemAt(_local2)); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){ var n:Number; var message:String; var name = _arg1; if ((name is QName)){ name = name.localName; }; var index = -1; try { n = parseInt(String(name)); if (!isNaN(n)){ index = int(n); }; } catch(e:Error) { }; if (index == -1){ message = resourceManager.getString("collections", "unknownProperty", [name]); throw (new Error(message)); }; return (getItemAt(index)); } public function enableAutoUpdate():void{ if (autoUpdateCounter > 0){ autoUpdateCounter--; if (autoUpdateCounter == 0){ handlePendingUpdates(); }; }; } mx_internal function reset():void{ var _local1:CollectionEvent; internalRefresh(false); if (dispatchResetEvent){ _local1 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); _local1.kind = CollectionEventKind.RESET; dispatchEvent(_local1); }; } public function toArray():Array{ var _local1:Array; if (localIndex){ _local1 = localIndex.concat(); } else { _local1 = list.toArray(); }; return (_local1); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function callProperty(_arg1, ... _args){ return (null); } public function initialized(_arg1:Object, _arg2:String):void{ refresh(); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{ var n:Number; var message:String; var name = _arg1; var value = _arg2; if ((name is QName)){ name = name.localName; }; var index = -1; try { n = parseInt(String(name)); if (!isNaN(n)){ index = int(n); }; } catch(e:Error) { }; if (index == -1){ message = resourceManager.getString("collections", "unknownProperty", [name]); throw (new Error(message)); }; setItemAt(value, index); } public function addItem(_arg1:Object):void{ addItemAt(_arg1, length); } private function internalRefresh(_arg1:Boolean):Boolean{ var tmp:Array; var len:int; var i:int; var item:Object; var refreshEvent:CollectionEvent; var dispatch = _arg1; if (((sort) || (!((filterFunction == null))))){ try { populateLocalIndex(); } catch(pending:ItemPendingError) { pending.addResponder(new ItemResponder(function (_arg1:Object, _arg2:Object=null):void{ internalRefresh(dispatch); }, function (_arg1:Object, _arg2:Object=null):void{ })); return (false); }; if (filterFunction != null){ tmp = []; len = localIndex.length; i = 0; while (i < len) { item = localIndex[i]; if (filterFunction(item)){ tmp.push(item); }; i = (i + 1); }; localIndex = tmp; }; if (sort){ sort.sort(localIndex); dispatch = true; }; } else { if (localIndex){ localIndex = null; }; }; revision++; pendingUpdates = null; if (dispatch){ refreshEvent = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); refreshEvent.kind = CollectionEventKind.REFRESH; dispatchEvent(refreshEvent); }; return (true); } public function set filterFunction(_arg1:Function):void{ _filterFunction = _arg1; dispatchEvent(new Event("filterFunctionChanged")); } public function refresh():Boolean{ return (internalRefresh(true)); } public function get filterFunction():Function{ return (_filterFunction); } public function createCursor():IViewCursor{ return (new ListCollectionViewCursor(this)); } public function hasEventListener(_arg1:String):Boolean{ return (eventDispatcher.hasEventListener(_arg1)); } public function get length():int{ if (localIndex){ return (localIndex.length); }; if (list){ return (list.length); }; return (0); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextNameIndex(_arg1:int):int{ return (((_arg1 < length)) ? (_arg1 + 1) : 0); } public function disableAutoUpdate():void{ autoUpdateCounter++; } public function toString():String{ if (localIndex){ return (ObjectUtil.toString(localIndex)); }; if (((list) && (Object(list).toString))){ return (Object(list).toString()); }; return (getQualifiedClassName(this)); } private function listChangeHandler(_arg1:CollectionEvent):void{ if (autoUpdateCounter > 0){ if (!pendingUpdates){ pendingUpdates = []; }; pendingUpdates.push(_arg1); } else { switch (_arg1.kind){ case CollectionEventKind.ADD: addItemsToView(_arg1.items, _arg1.location); break; case CollectionEventKind.RESET: reset(); break; case CollectionEventKind.REMOVE: removeItemsFromView(_arg1.items, _arg1.location); break; case CollectionEventKind.REPLACE: replaceItemsInView(_arg1.items, _arg1.location); break; case CollectionEventKind.UPDATE: handlePropertyChangeEvents(_arg1.items); break; default: dispatchEvent(_arg1); }; }; } } }//package mx.collections import flash.events.*; import mx.events.*; import mx.resources.*; import mx.collections.errors.*; class ListCollectionViewBookmark extends CursorBookmark { mx_internal var viewRevision:int; mx_internal var index:int; mx_internal var view:ListCollectionView; private function ListCollectionViewBookmark(_arg1:Object, _arg2:ListCollectionView, _arg3:int, _arg4:int){ super(_arg1); this.view = _arg2; this.viewRevision = _arg3; this.index = _arg4; } override public function getViewIndex():int{ return (view.getBookmarkIndex(this)); } } class ListCollectionViewCursor extends EventDispatcher implements IViewCursor { private var _view:ListCollectionView; private var invalid:Boolean; private var resourceManager:IResourceManager; private var currentIndex:int; private var currentValue:Object; private static const BEFORE_FIRST_INDEX:int = -1; private static const AFTER_LAST_INDEX:int = -2; private function ListCollectionViewCursor(_arg1:ListCollectionView){ var view = _arg1; resourceManager = ResourceManager.getInstance(); super(); _view = view; _view.addEventListener(CollectionEvent.COLLECTION_CHANGE, collectionEventHandler, false, 0, true); currentIndex = ((view.length > 0)) ? 0 : AFTER_LAST_INDEX; if (currentIndex == 0){ try { setCurrent(view.getItemAt(0), false); } catch(e:ItemPendingError) { currentIndex = BEFORE_FIRST_INDEX; setCurrent(null, false); }; }; } public function findAny(_arg1:Object):Boolean{ var index:int; var values = _arg1; checkValid(); var lcView:ListCollectionView = ListCollectionView(view); try { index = lcView.findItem(values, Sort.ANY_INDEX_MODE); } catch(e:SortError) { throw (new CursorError(e.message)); }; if (index > -1){ currentIndex = index; setCurrent(lcView.getItemAt(currentIndex)); }; return ((index > -1)); } public function remove():Object{ var oldIndex:int; var message:String; if (((beforeFirst) || (afterLast))){ message = resourceManager.getString("collections", "invalidRemove"); throw (new CursorError(message)); }; oldIndex = currentIndex; currentIndex++; if (currentIndex >= view.length){ currentIndex = AFTER_LAST_INDEX; setCurrent(null); } else { try { setCurrent(ListCollectionView(view).getItemAt(currentIndex)); } catch(e:ItemPendingError) { setCurrent(null, false); ListCollectionView(view).removeItemAt(oldIndex); throw (e); }; }; var removed:Object = ListCollectionView(view).removeItemAt(oldIndex); return (removed); } private function setCurrent(_arg1:Object, _arg2:Boolean=true):void{ currentValue = _arg1; if (_arg2){ dispatchEvent(new FlexEvent(FlexEvent.CURSOR_UPDATE)); }; } public function seek(_arg1:CursorBookmark, _arg2:int=0, _arg3:int=0):void{ var message:String; var bookmark = _arg1; var offset = _arg2; var prefetch = _arg3; checkValid(); if (view.length == 0){ currentIndex = AFTER_LAST_INDEX; setCurrent(null, false); return; }; var newIndex:int = currentIndex; if (bookmark == CursorBookmark.FIRST){ newIndex = 0; } else { if (bookmark == CursorBookmark.LAST){ newIndex = (view.length - 1); } else { if (bookmark != CursorBookmark.CURRENT){ try { newIndex = ListCollectionView(view).getBookmarkIndex(bookmark); if (newIndex < 0){ setCurrent(null); message = resourceManager.getString("collections", "bookmarkInvalid"); throw (new CursorError(message)); }; } catch(bmError:CollectionViewError) { message = resourceManager.getString("collections", "bookmarkInvalid"); throw (new CursorError(message)); }; }; }; }; newIndex = (newIndex + offset); var newCurrent:Object; if (newIndex >= view.length){ currentIndex = AFTER_LAST_INDEX; } else { if (newIndex < 0){ currentIndex = BEFORE_FIRST_INDEX; } else { newCurrent = ListCollectionView(view).getItemAt(newIndex, prefetch); currentIndex = newIndex; }; }; setCurrent(newCurrent); } public function insert(_arg1:Object):void{ var _local2:int; var _local3:String; if (afterLast){ _local2 = view.length; } else { if (beforeFirst){ if (view.length > 0){ _local3 = resourceManager.getString("collections", "invalidInsert"); throw (new CursorError(_local3)); }; _local2 = 0; } else { _local2 = currentIndex; }; }; ListCollectionView(view).addItemAt(_arg1, _local2); } public function get afterLast():Boolean{ checkValid(); return ((((currentIndex == AFTER_LAST_INDEX)) || ((view.length == 0)))); } private function checkValid():void{ var _local1:String; if (invalid){ _local1 = resourceManager.getString("collections", "invalidCursor"); throw (new CursorError(_local1)); }; } private function collectionEventHandler(_arg1:CollectionEvent):void{ var event = _arg1; switch (event.kind){ case CollectionEventKind.ADD: if (event.location <= currentIndex){ currentIndex = (currentIndex + event.items.length); }; break; case CollectionEventKind.REMOVE: if (event.location < currentIndex){ currentIndex = (currentIndex - event.items.length); } else { if (event.location == currentIndex){ if (currentIndex < view.length){ try { setCurrent(ListCollectionView(view).getItemAt(currentIndex)); } catch(error:ItemPendingError) { setCurrent(null, false); }; } else { currentIndex = AFTER_LAST_INDEX; setCurrent(null); }; }; }; break; case CollectionEventKind.MOVE: if (event.oldLocation == currentIndex){ currentIndex = event.location; } else { if (event.oldLocation < currentIndex){ currentIndex = (currentIndex - event.items.length); }; if (event.location <= currentIndex){ currentIndex = (currentIndex + event.items.length); }; }; break; case CollectionEventKind.REFRESH: if (!((beforeFirst) || (afterLast))){ currentIndex = ListCollectionView(view).getItemIndex(currentValue); if (currentIndex == -1){ setCurrent(null); }; }; break; case CollectionEventKind.REPLACE: if (event.location == currentIndex){ try { setCurrent(ListCollectionView(view).getItemAt(currentIndex)); } catch(error:ItemPendingError) { setCurrent(null, false); }; }; break; case CollectionEventKind.RESET: currentIndex = BEFORE_FIRST_INDEX; setCurrent(null); break; }; } public function moveNext():Boolean{ if (afterLast){ return (false); }; var _local1:int = (beforeFirst) ? 0 : (currentIndex + 1); if (_local1 >= view.length){ _local1 = AFTER_LAST_INDEX; setCurrent(null); } else { setCurrent(ListCollectionView(view).getItemAt(_local1)); }; currentIndex = _local1; return (!(afterLast)); } public function get view():ICollectionView{ checkValid(); return (_view); } public function movePrevious():Boolean{ if (beforeFirst){ return (false); }; var _local1:int = (afterLast) ? (view.length - 1) : (currentIndex - 1); if (_local1 == -1){ _local1 = BEFORE_FIRST_INDEX; setCurrent(null); } else { setCurrent(ListCollectionView(view).getItemAt(_local1)); }; currentIndex = _local1; return (!(beforeFirst)); } public function findLast(_arg1:Object):Boolean{ var index:int; var values = _arg1; checkValid(); var lcView:ListCollectionView = ListCollectionView(view); try { index = lcView.findItem(values, Sort.LAST_INDEX_MODE); } catch(sortError:SortError) { throw (new CursorError(sortError.message)); }; if (index > -1){ currentIndex = index; setCurrent(lcView.getItemAt(currentIndex)); }; return ((index > -1)); } public function get beforeFirst():Boolean{ checkValid(); return ((((currentIndex == BEFORE_FIRST_INDEX)) || ((view.length == 0)))); } public function get bookmark():CursorBookmark{ checkValid(); if ((((view.length == 0)) || (beforeFirst))){ return (CursorBookmark.FIRST); }; if (afterLast){ return (CursorBookmark.LAST); }; return (ListCollectionView(view).getBookmark(currentIndex)); } public function findFirst(_arg1:Object):Boolean{ var index:int; var values = _arg1; checkValid(); var lcView:ListCollectionView = ListCollectionView(view); try { index = lcView.findItem(values, Sort.FIRST_INDEX_MODE); } catch(sortError:SortError) { throw (new CursorError(sortError.message)); }; if (index > -1){ currentIndex = index; setCurrent(lcView.getItemAt(currentIndex)); }; return ((index > -1)); } public function get current():Object{ checkValid(); return (currentValue); } }
Section 102
//Sort (mx.collections.Sort) package mx.collections { import flash.events.*; import mx.resources.*; import mx.utils.*; import mx.collections.errors.*; public class Sort extends EventDispatcher { private var noFieldsDescending:Boolean;// = false private var usingCustomCompareFunction:Boolean; private var defaultEmptyField:SortField; private var _fields:Array; private var _compareFunction:Function; private var _unique:Boolean; private var fieldList:Array; private var resourceManager:IResourceManager; public static const ANY_INDEX_MODE:String = "any"; mx_internal static const VERSION:String = "3.0.0.0"; public static const LAST_INDEX_MODE:String = "last"; public static const FIRST_INDEX_MODE:String = "first"; public function Sort(){ resourceManager = ResourceManager.getInstance(); fieldList = []; super(); } public function get unique():Boolean{ return (_unique); } public function get compareFunction():Function{ return ((usingCustomCompareFunction) ? _compareFunction : internalCompare); } public function set unique(_arg1:Boolean):void{ _unique = _arg1; } public function sort(_arg1:Array):void{ var fixedCompareFunction:Function; var message:String; var uniqueRet1:Object; var fields:Array; var i:int; var sortArgs:Object; var uniqueRet2:Object; var items = _arg1; if (((!(items)) || ((items.length <= 1)))){ return; }; if (usingCustomCompareFunction){ fixedCompareFunction = function (_arg1:Object, _arg2:Object):int{ return (compareFunction(_arg1, _arg2, _fields)); }; if (unique){ uniqueRet1 = items.sort(fixedCompareFunction, Array.UNIQUESORT); if (uniqueRet1 == 0){ message = resourceManager.getString("collections", "nonUnique"); throw (new SortError(message)); }; } else { items.sort(fixedCompareFunction); }; } else { fields = this.fields; if (((fields) && ((fields.length > 0)))){ sortArgs = initSortFields(items[0], true); if (unique){ if (((sortArgs) && ((fields.length == 1)))){ uniqueRet2 = items.sortOn(sortArgs.fields[0], (sortArgs.options[0] | Array.UNIQUESORT)); } else { uniqueRet2 = items.sort(internalCompare, Array.UNIQUESORT); }; if (uniqueRet2 == 0){ message = resourceManager.getString("collections", "nonUnique"); throw (new SortError(message)); }; } else { if (sortArgs){ items.sortOn(sortArgs.fields, sortArgs.options); } else { items.sort(internalCompare); }; }; } else { items.sort(internalCompare); }; }; } public function propertyAffectsSort(_arg1:String):Boolean{ var _local3:SortField; if (((usingCustomCompareFunction) || (!(fields)))){ return (true); }; var _local2:int; while (_local2 < fields.length) { _local3 = fields[_local2]; if ((((_local3.name == _arg1)) || (_local3.usingCustomCompareFunction))){ return (true); }; _local2++; }; return (false); } private function internalCompare(_arg1:Object, _arg2:Object, _arg3:Array=null):int{ var _local5:int; var _local6:int; var _local7:SortField; var _local4:int; if (!_fields){ _local4 = noFieldsCompare(_arg1, _arg2); } else { _local5 = 0; _local6 = (_arg3) ? _arg3.length : _fields.length; while ((((_local4 == 0)) && ((_local5 < _local6)))) { _local7 = SortField(_fields[_local5]); _local4 = _local7.internalCompare(_arg1, _arg2); _local5++; }; }; return (_local4); } public function reverse():void{ var _local1:int; if (fields){ _local1 = 0; while (_local1 < fields.length) { SortField(fields[_local1]).reverse(); _local1++; }; }; noFieldsDescending = !(noFieldsDescending); } private function noFieldsCompare(_arg1:Object, _arg2:Object, _arg3:Array=null):int{ var message:String; var a = _arg1; var b = _arg2; var fields = _arg3; if (!defaultEmptyField){ defaultEmptyField = new SortField(); try { defaultEmptyField.initCompare(a); } catch(e:SortError) { message = resourceManager.getString("collections", "noComparator", [a]); throw (new SortError(message)); }; }; var result:int = defaultEmptyField.compareFunction(a, b); if (noFieldsDescending){ result = (result * -1); }; return (result); } public function findItem(_arg1:Array, _arg2:Object, _arg3:String, _arg4:Boolean=false, _arg5:Function=null):int{ var compareForFind:Function; var fieldsForCompare:Array; var message:String; var index:int; var fieldName:String; var hadPreviousFieldName:Boolean; var i:int; var hasFieldName:Boolean; var objIndex:int; var match:Boolean; var prevCompare:int; var nextCompare:int; var items = _arg1; var values = _arg2; var mode = _arg3; var returnInsertionIndex = _arg4; var compareFunction = _arg5; if (!items){ message = resourceManager.getString("collections", "noItems"); throw (new SortError(message)); }; if (items.length == 0){ return ((returnInsertionIndex) ? 1 : -1); }; if (compareFunction == null){ compareForFind = this.compareFunction; if (((values) && ((fieldList.length > 0)))){ fieldsForCompare = []; hadPreviousFieldName = true; i = 0; while (i < fieldList.length) { fieldName = fieldList[i]; if (fieldName){ try { hasFieldName = !((values[fieldName] === undefined)); } catch(e:Error) { hasFieldName = false; }; if (hasFieldName){ if (!hadPreviousFieldName){ message = resourceManager.getString("collections", "findCondition", [fieldName]); throw (new SortError(message)); }; fieldsForCompare.push(fieldName); } else { hadPreviousFieldName = false; }; } else { fieldsForCompare.push(null); }; i = (i + 1); }; if (fieldsForCompare.length == 0){ message = resourceManager.getString("collections", "findRestriction"); throw (new SortError(message)); }; try { initSortFields(items[0]); } catch(initSortError:SortError) { }; }; } else { compareForFind = compareFunction; }; var found:Boolean; var objFound:Boolean; index = 0; var lowerBound:int; var upperBound:int = (items.length - 1); var obj:Object; var direction = 1; while (((!(objFound)) && ((lowerBound <= upperBound)))) { index = Math.round(((lowerBound + upperBound) / 2)); obj = items[index]; direction = (fieldsForCompare) ? compareForFind(values, obj, fieldsForCompare) : compareForFind(values, obj); switch (direction){ case -1: upperBound = (index - 1); break; case 0: objFound = true; switch (mode){ case ANY_INDEX_MODE: found = true; break; case FIRST_INDEX_MODE: found = (index == lowerBound); objIndex = (index - 1); match = true; while (((((match) && (!(found)))) && ((objIndex >= lowerBound)))) { obj = items[objIndex]; prevCompare = (fieldsForCompare) ? compareForFind(values, obj, fieldsForCompare) : compareForFind(values, obj); match = (prevCompare == 0); if (((!(match)) || (((match) && ((objIndex == lowerBound)))))){ found = true; index = (objIndex + (match) ? 0 : 1); }; objIndex = (objIndex - 1); }; break; case LAST_INDEX_MODE: found = (index == upperBound); objIndex = (index + 1); match = true; while (((((match) && (!(found)))) && ((objIndex <= upperBound)))) { obj = items[objIndex]; nextCompare = (fieldsForCompare) ? compareForFind(values, obj, fieldsForCompare) : compareForFind(values, obj); match = (nextCompare == 0); if (((!(match)) || (((match) && ((objIndex == upperBound)))))){ found = true; index = (objIndex - (match) ? 0 : 1); }; objIndex = (objIndex + 1); }; break; default: message = resourceManager.getString("collections", "unknownMode"); throw (new SortError(message)); }; break; case 1: lowerBound = (index + 1); break; }; }; if (((!(found)) && (!(returnInsertionIndex)))){ return (-1); }; return (((direction)>0) ? (index + 1) : index); } private function initSortFields(_arg1:Object, _arg2:Boolean=false):Object{ var _local4:int; var _local5:SortField; var _local6:int; var _local3:Object; _local4 = 0; while (_local4 < fields.length) { SortField(fields[_local4]).initCompare(_arg1); _local4++; }; if (_arg2){ _local3 = {fields:[], options:[]}; _local4 = 0; while (_local4 < fields.length) { _local5 = fields[_local4]; _local6 = _local5.getArraySortOnOptions(); if (_local6 == -1){ return (null); }; _local3.fields.push(_local5.name); _local3.options.push(_local6); _local4++; }; }; return (_local3); } public function set fields(_arg1:Array):void{ var _local2:SortField; var _local3:int; _fields = _arg1; fieldList = []; if (_fields){ _local3 = 0; while (_local3 < _fields.length) { _local2 = SortField(_fields[_local3]); fieldList.push(_local2.name); _local3++; }; }; dispatchEvent(new Event("fieldsChanged")); } public function get fields():Array{ return (_fields); } public function set compareFunction(_arg1:Function):void{ _compareFunction = _arg1; usingCustomCompareFunction = !((_compareFunction == null)); } override public function toString():String{ return (ObjectUtil.toString(this)); } } }//package mx.collections
Section 103
//SortField (mx.collections.SortField) package mx.collections { import flash.events.*; import mx.resources.*; import mx.utils.*; import mx.collections.errors.*; public class SortField extends EventDispatcher { private var _caseInsensitive:Boolean; private var _numeric:Object; private var _descending:Boolean; private var _compareFunction:Function; private var _usingCustomCompareFunction:Boolean; private var _name:String; private var resourceManager:IResourceManager; mx_internal static const VERSION:String = "3.0.0.0"; public function SortField(_arg1:String=null, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Object=null){ resourceManager = ResourceManager.getInstance(); super(); _name = _arg1; _caseInsensitive = _arg2; _descending = _arg3; _numeric = _arg4; _compareFunction = stringCompare; } public function get caseInsensitive():Boolean{ return (_caseInsensitive); } mx_internal function get usingCustomCompareFunction():Boolean{ return (_usingCustomCompareFunction); } public function set caseInsensitive(_arg1:Boolean):void{ if (_arg1 != _caseInsensitive){ _caseInsensitive = _arg1; dispatchEvent(new Event("caseInsensitiveChanged")); }; } public function get name():String{ return (_name); } public function get numeric():Object{ return (_numeric); } public function set name(_arg1:String):void{ _name = _arg1; dispatchEvent(new Event("nameChanged")); } private function numericCompare(_arg1:Object, _arg2:Object):int{ var fa:Number; var fb:Number; var a = _arg1; var b = _arg2; try { fa = ((_name == null)) ? Number(a) : Number(a[_name]); } catch(error:Error) { }; try { fb = ((_name == null)) ? Number(b) : Number(b[_name]); } catch(error:Error) { }; return (ObjectUtil.numericCompare(fa, fb)); } public function set numeric(_arg1:Object):void{ if (_numeric != _arg1){ _numeric = _arg1; dispatchEvent(new Event("numericChanged")); }; } private function stringCompare(_arg1:Object, _arg2:Object):int{ var fa:String; var fb:String; var a = _arg1; var b = _arg2; try { fa = ((_name == null)) ? String(a) : String(a[_name]); } catch(error:Error) { }; try { fb = ((_name == null)) ? String(b) : String(b[_name]); } catch(error:Error) { }; return (ObjectUtil.stringCompare(fa, fb, _caseInsensitive)); } public function get compareFunction():Function{ return (_compareFunction); } public function reverse():void{ descending = !(descending); } mx_internal function getArraySortOnOptions():int{ if (((((((usingCustomCompareFunction) || ((name == null)))) || ((_compareFunction == xmlCompare)))) || ((_compareFunction == dateCompare)))){ return (-1); }; var _local1:int; if (caseInsensitive){ _local1 = (_local1 | Array.CASEINSENSITIVE); }; if (descending){ _local1 = (_local1 | Array.DESCENDING); }; if ((((numeric == true)) || ((_compareFunction == numericCompare)))){ _local1 = (_local1 | Array.NUMERIC); }; return (_local1); } private function dateCompare(_arg1:Object, _arg2:Object):int{ var fa:Date; var fb:Date; var a = _arg1; var b = _arg2; try { fa = ((_name == null)) ? (a as Date) : (a[_name] as Date); } catch(error:Error) { }; try { fb = ((_name == null)) ? (b as Date) : (b[_name] as Date); } catch(error:Error) { }; return (ObjectUtil.dateCompare(fa, fb)); } mx_internal function internalCompare(_arg1:Object, _arg2:Object):int{ var _local3:int = compareFunction(_arg1, _arg2); if (descending){ _local3 = (_local3 * -1); }; return (_local3); } override public function toString():String{ return (ObjectUtil.toString(this)); } private function nullCompare(_arg1:Object, _arg2:Object):int{ var value:Object; var left:Object; var right:Object; var message:String; var a = _arg1; var b = _arg2; var found:Boolean; if ((((a == null)) && ((b == null)))){ return (0); }; if (_name){ try { left = a[_name]; } catch(error:Error) { }; try { right = b[_name]; } catch(error:Error) { }; }; if ((((left == null)) && ((right == null)))){ return (0); }; if (left == null){ left = a; }; if (right == null){ right = b; }; var typeLeft = typeof(left); var typeRight = typeof(right); if ((((typeLeft == "string")) || ((typeRight == "string")))){ found = true; _compareFunction = stringCompare; } else { if ((((typeLeft == "object")) || ((typeRight == "object")))){ if ((((typeLeft is Date)) || ((typeRight is Date)))){ found = true; _compareFunction = dateCompare; }; } else { if ((((typeLeft == "xml")) || ((typeRight == "xml")))){ found = true; _compareFunction = xmlCompare; } else { if ((((((((typeLeft == "number")) || ((typeRight == "number")))) || ((typeLeft == "boolean")))) || ((typeRight == "boolean")))){ found = true; _compareFunction = numericCompare; }; }; }; }; if (found){ return (_compareFunction(left, right)); }; message = resourceManager.getString("collections", "noComparatorSortField", [name]); throw (new SortError(message)); } public function set descending(_arg1:Boolean):void{ if (_descending != _arg1){ _descending = _arg1; dispatchEvent(new Event("descendingChanged")); }; } mx_internal function initCompare(_arg1:Object):void{ var value:Object; var typ:String; var test:String; var obj = _arg1; if (!usingCustomCompareFunction){ if (numeric == true){ _compareFunction = numericCompare; } else { if (((caseInsensitive) || ((numeric == false)))){ _compareFunction = stringCompare; } else { if (_name){ try { value = obj[_name]; } catch(error:Error) { }; }; if (value == null){ value = obj; }; typ = typeof(value); switch (typ){ case "string": _compareFunction = stringCompare; break; case "object": if ((value is Date)){ _compareFunction = dateCompare; } else { _compareFunction = stringCompare; try { test = value.toString(); } catch(error2:Error) { }; if (((!(test)) || ((test == "[object Object]")))){ _compareFunction = nullCompare; }; }; break; case "xml": _compareFunction = xmlCompare; break; case "boolean": case "number": _compareFunction = numericCompare; break; }; }; }; }; } public function get descending():Boolean{ return (_descending); } public function set compareFunction(_arg1:Function):void{ _compareFunction = _arg1; _usingCustomCompareFunction = !((_arg1 == null)); } private function xmlCompare(_arg1:Object, _arg2:Object):int{ var sa:String; var sb:String; var a = _arg1; var b = _arg2; try { sa = ((_name == null)) ? a.toString() : a[_name].toString(); } catch(error:Error) { }; try { sb = ((_name == null)) ? b.toString() : b[_name].toString(); } catch(error:Error) { }; if (numeric == true){ return (ObjectUtil.numericCompare(parseFloat(sa), parseFloat(sb))); }; return (ObjectUtil.stringCompare(sa, sb, _caseInsensitive)); } } }//package mx.collections
Section 104
//XMLListAdapter (mx.collections.XMLListAdapter) package mx.collections { import flash.events.*; import mx.events.*; import mx.resources.*; import flash.utils.*; import mx.utils.*; public class XMLListAdapter extends EventDispatcher implements IList, IXMLNotifiable { private var uidCounter:int;// = 0 private var _dispatchEvents:int;// = 0 private var _busy:int;// = 0 private var seedUID:String; private var _source:XMLList; private var resourceManager:IResourceManager; mx_internal static const VERSION:String = "3.0.0.0"; public function XMLListAdapter(_arg1:XMLList=null){ resourceManager = ResourceManager.getInstance(); super(); disableEvents(); this.source = _arg1; enableEvents(); } public function setItemAt(_arg1:Object, _arg2:int):Object{ var _local4:String; var _local5:CollectionEvent; var _local6:PropertyChangeEvent; if ((((_arg2 < 0)) || ((_arg2 >= length)))){ _local4 = resourceManager.getString("collections", "outOfBounds", [_arg2]); throw (new RangeError(_local4)); }; var _local3:Object = source[_arg2]; source[_arg2] = _arg1; stopTrackUpdates(_local3); startTrackUpdates(_arg1, (seedUID + uidCounter.toString())); uidCounter++; if (_dispatchEvents == 0){ _local5 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); _local5.kind = CollectionEventKind.REPLACE; _local6 = new PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE); _local6.kind = PropertyChangeEventKind.UPDATE; _local6.oldValue = _local3; _local6.newValue = _arg1; _local5.location = _arg2; _local5.items.push(_local6); dispatchEvent(_local5); }; return (_local3); } protected function startTrackUpdates(_arg1:Object, _arg2:String):void{ XMLNotifier.getInstance().watchXML(_arg1, this, _arg2); } public function removeAll():void{ var _local1:int; var _local2:CollectionEvent; if (length > 0){ _local1 = (length - 1); while (_local1 >= 0) { stopTrackUpdates(source[_local1]); delete source[_local1]; _local1--; }; if (_dispatchEvents == 0){ _local2 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); _local2.kind = CollectionEventKind.RESET; dispatchEvent(_local2); }; }; } protected function itemUpdateHandler(_arg1:PropertyChangeEvent):void{ var _local2:CollectionEvent; if (_dispatchEvents == 0){ _local2 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); _local2.kind = CollectionEventKind.UPDATE; _local2.items.push(_arg1); dispatchEvent(_local2); }; } public function getItemIndex(_arg1:Object):int{ var _local2:int; var _local3:int; var _local4:Object; if ((((_arg1 is XML)) && (source.contains(XML(_arg1))))){ _local2 = length; _local3 = 0; while (_local3 < _local2) { _local4 = source[_local3]; if (_local4 === _arg1){ return (_local3); }; _local3++; }; }; return (-1); } public function removeItemAt(_arg1:int):Object{ var _local3:String; var _local4:CollectionEvent; if ((((_arg1 < 0)) || ((_arg1 >= length)))){ _local3 = resourceManager.getString("collections", "outOfBounds", [_arg1]); throw (new RangeError(_local3)); }; setBusy(); var _local2:Object = source[_arg1]; delete source[_arg1]; stopTrackUpdates(_local2); if (_dispatchEvents == 0){ _local4 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); _local4.kind = CollectionEventKind.REMOVE; _local4.location = _arg1; _local4.items.push(_local2); dispatchEvent(_local4); }; clearBusy(); return (_local2); } public function addItem(_arg1:Object):void{ addItemAt(_arg1, length); } public function get source():XMLList{ return (_source); } public function toArray():Array{ var _local1:XMLList = source; var _local2:int = _local1.length(); var _local3:Array = []; var _local4:int; while (_local4 < _local2) { _local3[_local4] = _local1[_local4]; _local4++; }; return (_local3); } protected function disableEvents():void{ _dispatchEvents--; } public function xmlNotification(_arg1:Object, _arg2:String, _arg3:Object, _arg4:Object, _arg5:Object):void{ var _local6:String; var _local7:Object; var _local8:Object; var _local9:*; var _local10:*; if (_arg1 === _arg3){ switch (_arg2){ case "attributeAdded": _local6 = ("@" + String(_arg4)); _local8 = _arg5; break; case "attributeChanged": _local6 = ("@" + String(_arg4)); _local7 = _arg5; _local8 = _arg3[_local6]; break; case "attributeRemoved": _local6 = ("@" + String(_arg4)); _local7 = _arg5; break; case "nodeAdded": _local6 = _arg4.localName(); _local8 = _arg4; break; case "nodeChanged": _local6 = _arg4.localName(); _local7 = _arg5; _local8 = _arg4; break; case "nodeRemoved": _local6 = _arg4.localName(); _local7 = _arg4; break; case "textSet": _local6 = String(_arg4); _local8 = String(_arg3[_local6]); _local7 = _arg5; break; default: break; }; } else { if (_arg2 == "textSet"){ _local9 = _arg3.parent(); if (_local9 != undefined){ _local10 = _local9.parent(); if (_local10 === _arg1){ _local6 = _local9.name().toString(); _local8 = _arg4; _local7 = _arg5; }; }; }; }; itemUpdated(_arg1, _local6, _local7, _local8); } public function addItemAt(_arg1:Object, _arg2:int):void{ var _local3:String; var _local4:CollectionEvent; if ((((_arg2 < 0)) || ((_arg2 > length)))){ _local3 = resourceManager.getString("collections", "outOfBounds", [_arg2]); throw (new RangeError(_local3)); }; if (((!((_arg1 is XML))) && (!((((_arg1 is XMLList)) && ((_arg1.length() == 1))))))){ _local3 = resourceManager.getString("collections", "invalidType"); throw (new Error(_local3)); }; setBusy(); if (_arg2 == 0){ source[0] = ((length > 0)) ? (_arg1 + source[0]) : _arg1; } else { source[(_arg2 - 1)] = (source[(_arg2 - 1)] + _arg1); }; startTrackUpdates(_arg1, (seedUID + uidCounter.toString())); uidCounter++; if (_dispatchEvents == 0){ _local4 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); _local4.kind = CollectionEventKind.ADD; _local4.items.push(_arg1); _local4.location = _arg2; dispatchEvent(_local4); }; clearBusy(); } public function getItemAt(_arg1:int, _arg2:int=0):Object{ var _local3:String; if ((((_arg1 < 0)) || ((_arg1 >= length)))){ _local3 = resourceManager.getString("collections", "outOfBounds", [_arg1]); throw (new RangeError(_local3)); }; return (source[_arg1]); } override public function toString():String{ if (source){ return (source.toString()); }; return (getQualifiedClassName(this)); } public function get length():int{ return (source.length()); } public function itemUpdated(_arg1:Object, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{ var _local5:PropertyChangeEvent = new PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE); _local5.kind = PropertyChangeEventKind.UPDATE; _local5.source = _arg1; _local5.property = _arg2; _local5.oldValue = _arg3; _local5.newValue = _arg4; itemUpdateHandler(_local5); } protected function stopTrackUpdates(_arg1:Object):void{ XMLNotifier.getInstance().unwatchXML(_arg1, this); } private function clearBusy():void{ _busy++; if (_busy > 0){ _busy = 0; }; } public function set source(_arg1:XMLList):void{ var _local2:int; var _local3:int; var _local4:CollectionEvent; if (((_source) && (_source.length()))){ _local3 = _source.length(); _local2 = 0; while (_local2 < _local3) { stopTrackUpdates(_source[_local2]); _local2++; }; }; _source = (_arg1) ? _arg1 : XMLList(new XMLList("")); seedUID = UIDUtil.createUID(); uidCounter = 0; _local3 = _source.length(); _local2 = 0; while (_local2 < _local3) { startTrackUpdates(_source[_local2], (seedUID + uidCounter.toString())); uidCounter++; _local2++; }; if (_dispatchEvents == 0){ _local4 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); _local4.kind = CollectionEventKind.RESET; dispatchEvent(_local4); }; } public function busy():Boolean{ return (!((_busy == 0))); } private function setBusy():void{ _busy--; } protected function enableEvents():void{ _dispatchEvents++; if (_dispatchEvents > 0){ _dispatchEvents = 0; }; } } }//package mx.collections
Section 105
//XMLListCollection (mx.collections.XMLListCollection) package mx.collections { public class XMLListCollection extends ListCollectionView { mx_internal static const VERSION:String = "3.0.0.0"; public function XMLListCollection(_arg1:XMLList=null){ this.source = _arg1; } public function child(_arg1:Object):XMLList{ var propertyName = _arg1; return (execXMLListFunction(function (_arg1:Object):XMLList{ return (_arg1.child(propertyName)); })); } private function execXMLListFunction(_arg1:Function):XMLList{ var _local2:int; var _local3:XMLList; var _local4:int; var _local5:Object; if (!localIndex){ return (_arg1(source)); }; _local2 = localIndex.length; _local3 = new XMLList(""); _local4 = 0; while (_local4 < _local2) { _local5 = localIndex[_local4]; _local3 = (_local3 + _arg1(_local5)); _local4++; }; return (_local3); } override public function toString():String{ var _local1:String; var _local2:int; if (!localIndex){ return (source.toString()); }; _local1 = ""; _local2 = 0; while (_local2 < localIndex.length) { if (_local2 > 0){ _local1 = (_local1 + "\n"); }; _local1 = (_local1 + localIndex[_local2].toString()); _local2++; }; return (_local1); } public function text():XMLList{ return (execXMLListFunction(function (_arg1:Object):XMLList{ return (_arg1.text()); })); } public function toXMLString():String{ var _local1:String; var _local2:int; if (!localIndex){ return (source.toXMLString()); }; _local1 = ""; _local2 = 0; while (_local2 < localIndex.length) { if (_local2 > 0){ _local1 = (_local1 + "\n"); }; _local1 = (_local1 + localIndex[_local2].toXMLString()); _local2++; }; return (_local1); } public function copy():XMLList{ return (execXMLListFunction(function (_arg1:Object):XMLList{ return (XMLList(_arg1.copy())); })); } public function set source(_arg1:XMLList):void{ if (list){ XMLListAdapter(list).source = null; }; list = new XMLListAdapter(_arg1); } public function attributes():XMLList{ return (execXMLListFunction(function (_arg1:Object):XMLList{ return (_arg1.attributes()); })); } public function get source():XMLList{ return ((list) ? XMLListAdapter(list).source : null); } public function attribute(_arg1:Object):XMLList{ var attributeName = _arg1; return (execXMLListFunction(function (_arg1:Object):XMLList{ return (_arg1.attribute(attributeName)); })); } public function descendants(_arg1:Object="*"):XMLList{ var name = _arg1; return (execXMLListFunction(function (_arg1:Object):XMLList{ return (_arg1.descendants(name)); })); } public function elements(_arg1:String="*"):XMLList{ var name = _arg1; return (execXMLListFunction(function (_arg1:Object):XMLList{ return (_arg1.elements(name)); })); } public function children():XMLList{ return (execXMLListFunction(function (_arg1:Object):XMLList{ return (_arg1.children()); })); } } }//package mx.collections
Section 106
//ConstraintError (mx.containers.errors.ConstraintError) package mx.containers.errors { public class ConstraintError extends Error { mx_internal static const VERSION:String = "3.0.0.0"; public function ConstraintError(_arg1:String){ super(_arg1); } } }//package mx.containers.errors
Section 107
//ApplicationLayout (mx.containers.utilityClasses.ApplicationLayout) package mx.containers.utilityClasses { import mx.core.*; public class ApplicationLayout extends BoxLayout { mx_internal static const VERSION:String = "3.0.0.0"; override public function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:int; var _local9:int; var _local10:IFlexDisplayObject; super.updateDisplayList(_arg1, _arg2); var _local3:Container = super.target; if (((((_local3.horizontalScrollBar) && ((getHorizontalAlignValue() > 0)))) || (((_local3.verticalScrollBar) && ((getVerticalAlignValue() > 0)))))){ _local4 = _local3.getStyle("paddingLeft"); _local5 = _local3.getStyle("paddingTop"); _local6 = 0; _local7 = 0; _local8 = _local3.numChildren; _local9 = 0; while (_local9 < _local8) { _local10 = IFlexDisplayObject(_local3.getChildAt(_local9)); if (_local10.x < _local4){ _local6 = Math.max(_local6, (_local4 - _local10.x)); }; if (_local10.y < _local5){ _local7 = Math.max(_local7, (_local5 - _local10.y)); }; _local9++; }; if (((!((_local6 == 0))) || (!((_local7 == 0))))){ _local9 = 0; while (_local9 < _local8) { _local10 = IFlexDisplayObject(_local3.getChildAt(_local9)); IFlexDisplayObject(_local3.getChildAt(_local9)).move((_local10.x + _local6), (_local10.y + _local7)); _local9++; }; }; }; } } }//package mx.containers.utilityClasses
Section 108
//BoxLayout (mx.containers.utilityClasses.BoxLayout) package mx.containers.utilityClasses { import mx.core.*; import mx.controls.scrollClasses.*; import mx.containers.*; public class BoxLayout extends Layout { public var direction:String;// = "vertical" mx_internal static const VERSION:String = "3.0.0.0"; private function isVertical():Boolean{ return (!((direction == BoxDirection.HORIZONTAL))); } mx_internal function getHorizontalAlignValue():Number{ var _local1:String = target.getStyle("horizontalAlign"); if (_local1 == "center"){ return (0.5); }; if (_local1 == "right"){ return (1); }; return (0); } override public function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local16:Number; var _local17:int; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:int; var _local22:IUIComponent; var _local23:IUIComponent; var _local24:Number; var _local25:Number; var _local26:Number; var _local27:Number; var _local3:Container = super.target; var _local4:int = _local3.numChildren; if (_local4 == 0){ return; }; var _local5:EdgeMetrics = _local3.viewMetricsAndPadding; var _local6:Number = _local3.getStyle("paddingLeft"); var _local7:Number = _local3.getStyle("paddingTop"); var _local8:Number = getHorizontalAlignValue(); var _local9:Number = getVerticalAlignValue(); var _local10:Number = ((((_local3.scaleX > 0)) && (!((_local3.scaleX == 1))))) ? (_local3.minWidth / Math.abs(_local3.scaleX)) : _local3.minWidth; var _local11:Number = ((((_local3.scaleY > 0)) && (!((_local3.scaleY == 1))))) ? (_local3.minHeight / Math.abs(_local3.scaleY)) : _local3.minHeight; var _local12:Number = ((Math.max(_arg1, _local10) - _local5.right) - _local5.left); var _local13:Number = ((Math.max(_arg2, _local11) - _local5.bottom) - _local5.top); var _local14:ScrollBar = _local3.horizontalScrollBar; var _local15:ScrollBar = _local3.verticalScrollBar; if (_local4 == 1){ _local23 = IUIComponent(_local3.getChildAt(0)); _local24 = _local23.percentWidth; _local25 = _local23.percentHeight; if (_local24){ _local26 = Math.max(_local23.minWidth, Math.min(_local23.maxWidth, ((_local24)>=100) ? _local12 : ((_local12 * _local24) / 100))); } else { _local26 = _local23.getExplicitOrMeasuredWidth(); }; if (_local25){ _local27 = Math.max(_local23.minHeight, Math.min(_local23.maxHeight, ((_local25)>=100) ? _local13 : ((_local13 * _local25) / 100))); } else { _local27 = _local23.getExplicitOrMeasuredHeight(); }; if ((((_local23.scaleX == 1)) && ((_local23.scaleY == 1)))){ _local23.setActualSize(Math.floor(_local26), Math.floor(_local27)); } else { _local23.setActualSize(_local26, _local27); }; if (((!((_local15 == null))) && ((_local3.verticalScrollPolicy == ScrollPolicy.AUTO)))){ _local12 = (_local12 + _local15.minWidth); }; if (((!((_local14 == null))) && ((_local3.horizontalScrollPolicy == ScrollPolicy.AUTO)))){ _local13 = (_local13 + _local14.minHeight); }; _local20 = (((_local12 - _local23.width) * _local8) + _local6); _local19 = (((_local13 - _local23.height) * _local9) + _local7); _local23.move(Math.floor(_local20), Math.floor(_local19)); } else { if (isVertical()){ _local16 = _local3.getStyle("verticalGap"); _local17 = _local4; _local21 = 0; while (_local21 < _local4) { if (!IUIComponent(_local3.getChildAt(_local21)).includeInLayout){ _local17--; }; _local21++; }; _local18 = Flex.flexChildHeightsProportionally(_local3, (_local13 - ((_local17 - 1) * _local16)), _local12); if (((!((_local14 == null))) && ((_local3.horizontalScrollPolicy == ScrollPolicy.AUTO)))){ _local18 = (_local18 + _local14.minHeight); }; if (((!((_local15 == null))) && ((_local3.verticalScrollPolicy == ScrollPolicy.AUTO)))){ _local12 = (_local12 + _local15.minWidth); }; _local19 = (_local7 + (_local18 * _local9)); _local21 = 0; while (_local21 < _local4) { _local22 = IUIComponent(_local3.getChildAt(_local21)); _local20 = (((_local12 - _local22.width) * _local8) + _local6); _local22.move(Math.floor(_local20), Math.floor(_local19)); if (_local22.includeInLayout){ _local19 = (_local19 + (_local22.height + _local16)); }; _local21++; }; } else { _local16 = _local3.getStyle("horizontalGap"); _local17 = _local4; _local21 = 0; while (_local21 < _local4) { if (!IUIComponent(_local3.getChildAt(_local21)).includeInLayout){ _local17--; }; _local21++; }; _local18 = Flex.flexChildWidthsProportionally(_local3, (_local12 - ((_local17 - 1) * _local16)), _local13); if (((!((_local14 == null))) && ((_local3.horizontalScrollPolicy == ScrollPolicy.AUTO)))){ _local13 = (_local13 + _local14.minHeight); }; if (((!((_local15 == null))) && ((_local3.verticalScrollPolicy == ScrollPolicy.AUTO)))){ _local18 = (_local18 + _local15.minWidth); }; _local20 = (_local6 + (_local18 * _local8)); _local21 = 0; while (_local21 < _local4) { _local22 = IUIComponent(_local3.getChildAt(_local21)); _local19 = (((_local13 - _local22.height) * _local9) + _local7); _local22.move(Math.floor(_local20), Math.floor(_local19)); if (_local22.includeInLayout){ _local20 = (_local20 + (_local22.width + _local16)); }; _local21++; }; }; }; } mx_internal function getVerticalAlignValue():Number{ var _local1:String = target.getStyle("verticalAlign"); if (_local1 == "middle"){ return (0.5); }; if (_local1 == "bottom"){ return (1); }; return (0); } mx_internal function heightPadding(_arg1:Number):Number{ var _local2:EdgeMetrics = target.viewMetricsAndPadding; var _local3:Number = (_local2.top + _local2.bottom); if ((((_arg1 > 1)) && (isVertical()))){ _local3 = (_local3 + (target.getStyle("verticalGap") * (_arg1 - 1))); }; return (_local3); } mx_internal function widthPadding(_arg1:Number):Number{ var _local2:EdgeMetrics = target.viewMetricsAndPadding; var _local3:Number = (_local2.left + _local2.right); if ((((_arg1 > 1)) && ((isVertical() == false)))){ _local3 = (_local3 + (target.getStyle("horizontalGap") * (_arg1 - 1))); }; return (_local3); } override public function measure():void{ var _local1:Container; var _local10:Number; var _local11:Number; var _local12:IUIComponent; var _local13:Number; var _local14:Number; _local1 = super.target; var _local2:Boolean = isVertical(); var _local3:Number = 0; var _local4:Number = 0; var _local5:Number = 0; var _local6:Number = 0; var _local7:int = _local1.numChildren; var _local8:int = _local7; var _local9:int; while (_local9 < _local7) { _local12 = IUIComponent(_local1.getChildAt(_local9)); if (!_local12.includeInLayout){ _local8--; } else { _local13 = _local12.getExplicitOrMeasuredWidth(); _local14 = _local12.getExplicitOrMeasuredHeight(); if (_local2){ _local3 = Math.max((isNaN(_local12.percentWidth)) ? _local13 : _local12.minWidth, _local3); _local5 = Math.max(_local13, _local5); _local4 = (_local4 + (isNaN(_local12.percentHeight)) ? _local14 : _local12.minHeight); _local6 = (_local6 + _local14); } else { _local3 = (_local3 + (isNaN(_local12.percentWidth)) ? _local13 : _local12.minWidth); _local5 = (_local5 + _local13); _local4 = Math.max((isNaN(_local12.percentHeight)) ? _local14 : _local12.minHeight, _local4); _local6 = Math.max(_local14, _local6); }; }; _local9++; }; _local10 = widthPadding(_local8); _local11 = heightPadding(_local8); _local1.measuredMinWidth = (_local3 + _local10); _local1.measuredMinHeight = (_local4 + _local11); _local1.measuredWidth = (_local5 + _local10); _local1.measuredHeight = (_local6 + _local11); } } }//package mx.containers.utilityClasses
Section 109
//CanvasLayout (mx.containers.utilityClasses.CanvasLayout) package mx.containers.utilityClasses { import flash.display.*; import flash.geom.*; import mx.core.*; import mx.events.*; import flash.utils.*; import mx.containers.errors.*; public class CanvasLayout extends Layout { private var colSpanChildren:Array; private var constraintRegionsInUse:Boolean;// = false private var rowSpanChildren:Array; private var constraintCache:Dictionary; private var _contentArea:Rectangle; mx_internal static const VERSION:String = "3.0.0.0"; private static var r:Rectangle = new Rectangle(); public function CanvasLayout(){ colSpanChildren = []; rowSpanChildren = []; constraintCache = new Dictionary(true); super(); } private function parseConstraints(_arg1:IUIComponent=null):ChildConstraintInfo{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:String; var _local11:String; var _local12:String; var _local13:String; var _local14:String; var _local15:String; var _local16:String; var _local17:Array; var _local18:int; var _local30:ConstraintColumn; var _local31:Boolean; var _local32:ConstraintRow; var _local2:LayoutConstraints = getLayoutConstraints(_arg1); if (!_local2){ return (null); }; while (true) { _local17 = parseConstraintExp(_local2.left); if (!_local17){ _local3 = NaN; } else { if (_local17.length == 1){ _local3 = Number(_local17[0]); } else { _local10 = _local17[0]; _local3 = _local17[1]; }; }; _local17 = parseConstraintExp(_local2.right); if (!_local17){ _local4 = NaN; } else { if (_local17.length == 1){ _local4 = Number(_local17[0]); } else { _local11 = _local17[0]; _local4 = _local17[1]; }; }; _local17 = parseConstraintExp(_local2.horizontalCenter); if (!_local17){ _local5 = NaN; } else { if (_local17.length == 1){ _local5 = Number(_local17[0]); } else { _local12 = _local17[0]; _local5 = _local17[1]; }; }; _local17 = parseConstraintExp(_local2.top); if (!_local17){ _local6 = NaN; } else { if (_local17.length == 1){ _local6 = Number(_local17[0]); } else { _local13 = _local17[0]; _local6 = _local17[1]; }; }; _local17 = parseConstraintExp(_local2.bottom); if (!_local17){ _local7 = NaN; } else { if (_local17.length == 1){ _local7 = Number(_local17[0]); } else { _local14 = _local17[0]; _local7 = _local17[1]; }; }; _local17 = parseConstraintExp(_local2.verticalCenter); if (!_local17){ _local8 = NaN; } else { if (_local17.length == 1){ _local8 = Number(_local17[0]); } else { _local15 = _local17[0]; _local8 = _local17[1]; }; }; _local17 = parseConstraintExp(_local2.baseline); if (!_local17){ _local9 = NaN; } else { if (_local17.length == 1){ _local9 = Number(_local17[0]); } else { _local16 = _local17[0]; _local9 = _local17[1]; }; }; break; }; var _local19:ContentColumnChild = new ContentColumnChild(); var _local20:Boolean; var _local21:Number = 0; var _local22:Number = 0; var _local23:Number = 0; _local18 = 0; while (_local18 < IConstraintLayout(target).constraintColumns.length) { _local30 = IConstraintLayout(target).constraintColumns[_local18]; if (_local30.mx_internal::contentSize){ if (_local30.id == _local10){ _local19.leftCol = _local30; _local19.leftOffset = _local3; _local21 = _local18; _local19.left = _local21; _local20 = true; }; if (_local30.id == _local11){ _local19.rightCol = _local30; _local19.rightOffset = _local4; _local22 = (_local18 + 1); _local19.right = _local22; _local20 = true; }; if (_local30.id == _local12){ _local19.hcCol = _local30; _local19.hcOffset = _local5; _local23 = (_local18 + 1); _local19.hc = _local23; _local20 = true; }; }; _local18++; }; if (_local20){ _local19.child = _arg1; if (((((((_local19.leftCol) && (!(_local19.rightCol)))) || (((_local19.rightCol) && (!(_local19.leftCol)))))) || (_local19.hcCol))){ _local19.span = 1; } else { _local19.span = (_local22 - _local21); }; _local31 = false; _local18 = 0; while (_local18 < colSpanChildren.length) { if (_local19.child == colSpanChildren[_local18].child){ _local31 = true; break; }; _local18++; }; if (!_local31){ colSpanChildren.push(_local19); }; }; _local20 = false; var _local24:ContentRowChild = new ContentRowChild(); var _local25:Number = 0; var _local26:Number = 0; var _local27:Number = 0; var _local28:Number = 0; _local18 = 0; while (_local18 < IConstraintLayout(target).constraintRows.length) { _local32 = IConstraintLayout(target).constraintRows[_local18]; if (_local32.mx_internal::contentSize){ if (_local32.id == _local13){ _local24.topRow = _local32; _local24.topOffset = _local6; _local25 = _local18; _local24.top = _local25; _local20 = true; }; if (_local32.id == _local14){ _local24.bottomRow = _local32; _local24.bottomOffset = _local7; _local26 = (_local18 + 1); _local24.bottom = _local26; _local20 = true; }; if (_local32.id == _local15){ _local24.vcRow = _local32; _local24.vcOffset = _local8; _local27 = (_local18 + 1); _local24.vc = _local27; _local20 = true; }; if (_local32.id == _local16){ _local24.baselineRow = _local32; _local24.baselineOffset = _local9; _local28 = (_local18 + 1); _local24.baseline = _local28; _local20 = true; }; }; _local18++; }; if (_local20){ _local24.child = _arg1; if (((((((((_local24.topRow) && (!(_local24.bottomRow)))) || (((_local24.bottomRow) && (!(_local24.topRow)))))) || (_local24.vcRow))) || (_local24.baselineRow))){ _local24.span = 1; } else { _local24.span = (_local26 - _local25); }; _local31 = false; _local18 = 0; while (_local18 < rowSpanChildren.length) { if (_local24.child == rowSpanChildren[_local18].child){ _local31 = true; break; }; _local18++; }; if (!_local31){ rowSpanChildren.push(_local24); }; }; var _local29:ChildConstraintInfo = new ChildConstraintInfo(_local3, _local4, _local5, _local6, _local7, _local8, _local9, _local10, _local11, _local12, _local13, _local14, _local15, _local16); constraintCache[_arg1] = _local29; return (_local29); } private function bound(_arg1:Number, _arg2:Number, _arg3:Number):Number{ if (_arg1 < _arg2){ _arg1 = _arg2; } else { if (_arg1 > _arg3){ _arg1 = _arg3; } else { _arg1 = Math.floor(_arg1); }; }; return (_arg1); } private function shareRowSpace(_arg1:ContentRowChild, _arg2:Number):Number{ var _local11:Number; var _local12:Number; var _local13:Number; var _local3:ConstraintRow = _arg1.topRow; var _local4:ConstraintRow = _arg1.bottomRow; var _local5:IUIComponent = _arg1.child; var _local6:Number = 0; var _local7:Number = 0; var _local8:Number = (_arg1.topOffset) ? _arg1.topOffset : 0; var _local9:Number = (_arg1.bottomOffset) ? _arg1.bottomOffset : 0; if (((_local3) && (_local3.height))){ _local6 = (_local6 + _local3.height); } else { if (((_local4) && (!(_local3)))){ _local3 = IConstraintLayout(target).constraintRows[(_arg1.bottom - 2)]; if (((_local3) && (_local3.height))){ _local6 = (_local6 + _local3.height); }; }; }; if (((_local4) && (_local4.height))){ _local7 = (_local7 + _local4.height); } else { if (((_local3) && (!(_local4)))){ _local4 = IConstraintLayout(target).constraintRows[(_arg1.top + 1)]; if (((_local4) && (_local4.height))){ _local7 = (_local7 + _local4.height); }; }; }; if (((_local3) && (isNaN(_local3.height)))){ _local3.setActualHeight(Math.max(0, _local3.maxHeight)); }; if (((_local4) && (isNaN(_local4.height)))){ _local4.setActualHeight(Math.max(0, _local4.height)); }; var _local10:Number = _local5.getExplicitOrMeasuredHeight(); if (_local10){ if (!_arg1.topRow){ if (_local10 > _local6){ _local12 = ((_local10 - _local6) + _local9); } else { _local12 = (_local10 + _local9); }; }; if (!_arg1.bottomRow){ if (_local10 > _local7){ _local11 = ((_local10 - _local7) + _local8); } else { _local11 = (_local10 + _local8); }; }; if (((_arg1.topRow) && (_arg1.bottomRow))){ _local13 = (_local10 / Number(_arg1.span)); if ((_local13 + _local8) < _local6){ _local11 = _local6; _local12 = ((_local10 - (_local6 - _local8)) + _local9); } else { _local11 = (_local13 + _local8); }; if ((_local13 + _local9) < _local7){ _local12 = _local7; _local11 = ((_local10 - (_local7 - _local9)) + _local8); } else { _local12 = (_local13 + _local9); }; }; _local12 = bound(_local12, _local4.minHeight, _local4.maxHeight); _local4.setActualHeight(_local12); _arg2 = (_arg2 - _local12); _local11 = bound(_local11, _local3.minHeight, _local3.maxHeight); _local3.setActualHeight(_local11); _arg2 = (_arg2 - _local11); }; return (_arg2); } private function parseConstraintExp(_arg1:String):Array{ if (!_arg1){ return (null); }; var _local2:String = _arg1.replace(/:/g, " "); var _local3:Array = _local2.split(/\s+/); return (_local3); } private function measureColumnsAndRows():void{ var _local3:int; var _local4:int; var _local13:ConstraintColumn; var _local14:ConstraintRow; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:ContentColumnChild; var _local20:ContentRowChild; var _local1:Array = IConstraintLayout(target).constraintColumns; var _local2:Array = IConstraintLayout(target).constraintRows; if ((((!(_local2.length) > 0)) && ((!(_local1.length) > 0)))){ constraintRegionsInUse = false; return; }; constraintRegionsInUse = true; var _local5:Number = 0; var _local6:Number = 0; var _local7:EdgeMetrics = Container(target).viewMetrics; var _local8:Number = ((Container(target).width - _local7.left) - _local7.right); var _local9:Number = ((Container(target).height - _local7.top) - _local7.bottom); var _local10:Array = []; var _local11:Array = []; var _local12:Array = []; if (_local1.length > 0){ _local3 = 0; while (_local3 < _local1.length) { _local13 = _local1[_local3]; if (!isNaN(_local13.percentWidth)){ _local11.push(_local13); } else { if (((!(isNaN(_local13.width))) && (!(_local13.mx_internal::contentSize)))){ _local10.push(_local13); } else { _local12.push(_local13); _local13.mx_internal::contentSize = true; }; }; _local3++; }; _local3 = 0; while (_local3 < _local10.length) { _local13 = ConstraintColumn(_local10[_local3]); _local8 = (_local8 - _local13.width); _local3++; }; if (_local12.length > 0){ if (colSpanChildren.length > 0){ colSpanChildren.sortOn("span"); _local4 = 0; while (_local4 < colSpanChildren.length) { _local19 = colSpanChildren[_local4]; if (_local19.span == 1){ if (_local19.hcCol){ _local13 = ConstraintColumn(_local1[_local1.indexOf(_local19.hcCol)]); } else { if (_local19.leftCol){ _local13 = ConstraintColumn(_local1[_local1.indexOf(_local19.leftCol)]); } else { if (_local19.rightCol){ _local13 = ConstraintColumn(_local1[_local1.indexOf(_local19.rightCol)]); }; }; }; _local16 = _local19.child.getExplicitOrMeasuredWidth(); if (_local19.hcOffset){ _local16 = (_local16 + _local19.hcOffset); } else { if (_local19.leftOffset){ _local16 = (_local16 + _local19.leftOffset); }; if (_local19.rightOffset){ _local16 = (_local16 + _local19.rightOffset); }; }; if (!isNaN(_local13.width)){ _local16 = Math.max(_local13.width, _local16); }; _local16 = bound(_local16, _local13.minWidth, _local13.maxWidth); _local13.setActualWidth(_local16); _local8 = (_local8 - _local13.width); } else { _local8 = shareColumnSpace(_local19, _local8); }; _local4++; }; colSpanChildren = []; }; _local3 = 0; while (_local3 < _local12.length) { _local13 = _local12[_local3]; if (!_local13.width){ _local16 = bound(0, _local13.minWidth, 0); _local13.setActualWidth(_local16); }; _local3++; }; }; _local18 = _local8; _local3 = 0; while (_local3 < _local11.length) { _local13 = ConstraintColumn(_local11[_local3]); if (_local18 <= 0){ _local16 = 0; } else { _local16 = Math.round(((_local18 * _local13.percentWidth) / 100)); }; _local16 = bound(_local16, _local13.minWidth, _local13.maxWidth); _local13.setActualWidth(_local16); _local8 = (_local8 - _local16); _local3++; }; _local3 = 0; while (_local3 < _local1.length) { _local13 = ConstraintColumn(_local1[_local3]); _local13.x = _local5; _local5 = (_local5 + _local13.width); _local3++; }; }; _local10 = []; _local11 = []; _local12 = []; if (_local2.length > 0){ _local3 = 0; while (_local3 < _local2.length) { _local14 = _local2[_local3]; if (!isNaN(_local14.percentHeight)){ _local11.push(_local14); } else { if (((!(isNaN(_local14.height))) && (!(_local14.mx_internal::contentSize)))){ _local10.push(_local14); } else { _local12.push(_local14); _local14.mx_internal::contentSize = true; }; }; _local3++; }; _local3 = 0; while (_local3 < _local10.length) { _local14 = ConstraintRow(_local10[_local3]); _local9 = (_local9 - _local14.height); _local3++; }; if (_local12.length > 0){ if (rowSpanChildren.length > 0){ rowSpanChildren.sortOn("span"); _local4 = 0; while (_local4 < rowSpanChildren.length) { _local20 = rowSpanChildren[_local4]; if (_local20.span == 1){ if (_local20.vcRow){ _local14 = ConstraintRow(_local2[_local2.indexOf(_local20.vcRow)]); } else { if (_local20.baselineRow){ _local14 = ConstraintRow(_local2[_local2.indexOf(_local20.baselineRow)]); } else { if (_local20.topRow){ _local14 = ConstraintRow(_local2[_local2.indexOf(_local20.topRow)]); } else { if (_local20.bottomRow){ _local14 = ConstraintRow(_local2[_local2.indexOf(_local20.bottomRow)]); }; }; }; }; _local17 = _local20.child.getExplicitOrMeasuredHeight(); if (_local20.baselineOffset){ _local17 = (_local17 + _local20.baselineOffset); } else { if (_local20.vcOffset){ _local17 = (_local17 + _local20.vcOffset); } else { if (_local20.topOffset){ _local17 = (_local17 + _local20.topOffset); }; if (_local20.bottomOffset){ _local17 = (_local17 + _local20.bottomOffset); }; }; }; if (!isNaN(_local14.height)){ _local17 = Math.max(_local14.height, _local17); }; _local17 = bound(_local17, _local14.minHeight, _local14.maxHeight); _local14.setActualHeight(_local17); _local9 = (_local9 - _local14.height); } else { _local9 = shareRowSpace(_local20, _local9); }; _local4++; }; rowSpanChildren = []; }; _local3 = 0; while (_local3 < _local12.length) { _local14 = ConstraintRow(_local12[_local3]); if (!_local14.height){ _local17 = bound(0, _local14.minHeight, 0); _local14.setActualHeight(_local17); }; _local3++; }; }; _local18 = _local9; _local3 = 0; while (_local3 < _local11.length) { _local14 = ConstraintRow(_local11[_local3]); if (_local18 <= 0){ _local17 = 0; } else { _local17 = Math.round(((_local18 * _local14.percentHeight) / 100)); }; _local17 = bound(_local17, _local14.minHeight, _local14.maxHeight); _local14.setActualHeight(_local17); _local9 = (_local9 - _local17); _local3++; }; _local3 = 0; while (_local3 < _local2.length) { _local14 = _local2[_local3]; _local14.y = _local6; _local6 = (_local6 + _local14.height); _local3++; }; }; } private function child_moveHandler(_arg1:MoveEvent):void{ if ((_arg1.target is IUIComponent)){ if (!IUIComponent(_arg1.target).includeInLayout){ return; }; }; var _local2:Container = super.target; if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); _contentArea = null; }; } private function applyAnchorStylesDuringMeasure(_arg1:IUIComponent, _arg2:Rectangle):void{ var _local13:int; var _local3:IConstraintClient = (_arg1 as IConstraintClient); if (!_local3){ return; }; var _local4:ChildConstraintInfo = constraintCache[_local3]; if (!_local4){ _local4 = parseConstraints(_arg1); }; var _local5:Number = _local4.left; var _local6:Number = _local4.right; var _local7:Number = _local4.hc; var _local8:Number = _local4.top; var _local9:Number = _local4.bottom; var _local10:Number = _local4.vc; var _local11:Array = IConstraintLayout(target).constraintColumns; var _local12:Array = IConstraintLayout(target).constraintRows; var _local14:Number = 0; if (!(_local11.length) > 0){ if (!isNaN(_local7)){ _arg2.x = Math.round((((target.width - _arg1.width) / 2) + _local7)); } else { if (((!(isNaN(_local5))) && (!(isNaN(_local6))))){ _arg2.x = _local5; _arg2.width = (_arg2.width + _local6); } else { if (!isNaN(_local5)){ _arg2.x = _local5; } else { if (!isNaN(_local6)){ _arg2.x = 0; _arg2.width = (_arg2.width + _local6); }; }; }; }; } else { _arg2.x = 0; _local13 = 0; while (_local13 < _local11.length) { _local14 = (_local14 + ConstraintColumn(_local11[_local13]).width); _local13++; }; _arg2.width = _local14; }; if (!(_local12.length) > 0){ if (!isNaN(_local10)){ _arg2.y = Math.round((((target.height - _arg1.height) / 2) + _local10)); } else { if (((!(isNaN(_local8))) && (!(isNaN(_local9))))){ _arg2.y = _local8; _arg2.height = (_arg2.height + _local9); } else { if (!isNaN(_local8)){ _arg2.y = _local8; } else { if (!isNaN(_local9)){ _arg2.y = 0; _arg2.height = (_arg2.height + _local9); }; }; }; }; } else { _local14 = 0; _arg2.y = 0; _local13 = 0; while (_local13 < _local12.length) { _local14 = (_local14 + ConstraintRow(_local12[_local13]).height); _local13++; }; _arg2.height = _local14; }; } override public function measure():void{ var _local1:Container; var _local5:EdgeMetrics; var _local6:Rectangle; var _local7:IUIComponent; var _local8:ConstraintColumn; var _local9:ConstraintRow; _local1 = super.target; var _local2:Number = 0; var _local3:Number = 0; var _local4:Number = 0; _local5 = _local1.viewMetrics; _local4 = 0; while (_local4 < _local1.numChildren) { _local7 = (_local1.getChildAt(_local4) as IUIComponent); parseConstraints(_local7); _local4++; }; _local4 = 0; while (_local4 < IConstraintLayout(_local1).constraintColumns.length) { _local8 = IConstraintLayout(_local1).constraintColumns[_local4]; if (_local8.mx_internal::contentSize){ _local8.mx_internal::_width = NaN; }; _local4++; }; _local4 = 0; while (_local4 < IConstraintLayout(_local1).constraintRows.length) { _local9 = IConstraintLayout(_local1).constraintRows[_local4]; if (_local9.mx_internal::contentSize){ _local9.mx_internal::_height = NaN; }; _local4++; }; measureColumnsAndRows(); _contentArea = null; _local6 = measureContentArea(); _local1.measuredWidth = ((_local6.width + _local5.left) + _local5.right); _local1.measuredHeight = ((_local6.height + _local5.top) + _local5.bottom); } private function target_childRemoveHandler(_arg1:ChildExistenceChangedEvent):void{ DisplayObject(_arg1.relatedObject).removeEventListener(MoveEvent.MOVE, child_moveHandler); delete constraintCache[_arg1.relatedObject]; } override public function set target(_arg1:Container):void{ var _local3:int; var _local4:int; var _local2:Container = super.target; if (_arg1 != _local2){ if (_local2){ _local2.removeEventListener(ChildExistenceChangedEvent.CHILD_ADD, target_childAddHandler); _local2.removeEventListener(ChildExistenceChangedEvent.CHILD_REMOVE, target_childRemoveHandler); _local4 = _local2.numChildren; _local3 = 0; while (_local3 < _local4) { DisplayObject(_local2.getChildAt(_local3)).removeEventListener(MoveEvent.MOVE, child_moveHandler); _local3++; }; }; if (_arg1){ _arg1.addEventListener(ChildExistenceChangedEvent.CHILD_ADD, target_childAddHandler); _arg1.addEventListener(ChildExistenceChangedEvent.CHILD_REMOVE, target_childRemoveHandler); _local4 = _arg1.numChildren; _local3 = 0; while (_local3 < _local4) { DisplayObject(_arg1.getChildAt(_local3)).addEventListener(MoveEvent.MOVE, child_moveHandler); _local3++; }; }; super.target = _arg1; }; } private function measureContentArea():Rectangle{ var _local1:int; var _local3:Array; var _local4:Array; var _local5:IUIComponent; var _local6:LayoutConstraints; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; if (_contentArea){ return (_contentArea); }; _contentArea = new Rectangle(); var _local2:int = target.numChildren; if ((((_local2 == 0)) && (constraintRegionsInUse))){ _local3 = IConstraintLayout(target).constraintColumns; _local4 = IConstraintLayout(target).constraintRows; if (_local3.length > 0){ _contentArea.right = (_local3[(_local3.length - 1)].x + _local3[(_local3.length - 1)].width); } else { _contentArea.right = 0; }; if (_local4.length > 0){ _contentArea.bottom = (_local4[(_local4.length - 1)].y + _local4[(_local4.length - 1)].height); } else { _contentArea.bottom = 0; }; }; _local1 = 0; while (_local1 < _local2) { _local5 = (target.getChildAt(_local1) as IUIComponent); _local6 = getLayoutConstraints(_local5); if (!_local5.includeInLayout){ } else { _local7 = _local5.x; _local8 = _local5.y; _local9 = _local5.getExplicitOrMeasuredWidth(); _local10 = _local5.getExplicitOrMeasuredHeight(); if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ if (((!(isNaN(_local5.percentWidth))) || (((((_local6) && (!(isNaN(_local6.left))))) && (!(isNaN(_local6.right))))))){ _local9 = _local5.minWidth; }; } else { if (((!(isNaN(_local5.percentWidth))) || (((((((_local6) && (!(isNaN(_local6.left))))) && (!(isNaN(_local6.right))))) && (isNaN(_local5.explicitWidth)))))){ _local9 = _local5.minWidth; }; }; if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ if (((!(isNaN(_local5.percentHeight))) || (((((_local6) && (!(isNaN(_local6.top))))) && (!(isNaN(_local6.bottom))))))){ _local10 = _local5.minHeight; }; } else { if (((!(isNaN(_local5.percentHeight))) || (((((((_local6) && (!(isNaN(_local6.top))))) && (!(isNaN(_local6.bottom))))) && (isNaN(_local5.explicitHeight)))))){ _local10 = _local5.minHeight; }; }; r.x = _local7; r.y = _local8; r.width = _local9; r.height = _local10; applyAnchorStylesDuringMeasure(_local5, r); _local7 = r.x; _local8 = r.y; _local9 = r.width; _local10 = r.height; if (isNaN(_local7)){ _local7 = _local5.x; }; if (isNaN(_local8)){ _local8 = _local5.y; }; _local11 = _local7; _local12 = _local8; if (isNaN(_local9)){ _local9 = _local5.width; }; if (isNaN(_local10)){ _local10 = _local5.height; }; _local11 = (_local11 + _local9); _local12 = (_local12 + _local10); _contentArea.right = Math.max(_contentArea.right, _local11); _contentArea.bottom = Math.max(_contentArea.bottom, _local12); }; _local1++; }; return (_contentArea); } private function shareColumnSpace(_arg1:ContentColumnChild, _arg2:Number):Number{ var _local11:Number; var _local12:Number; var _local13:Number; var _local3:ConstraintColumn = _arg1.leftCol; var _local4:ConstraintColumn = _arg1.rightCol; var _local5:IUIComponent = _arg1.child; var _local6:Number = 0; var _local7:Number = 0; var _local8:Number = (_arg1.rightOffset) ? _arg1.rightOffset : 0; var _local9:Number = (_arg1.leftOffset) ? _arg1.leftOffset : 0; if (((_local3) && (_local3.width))){ _local6 = (_local6 + _local3.width); } else { if (((_local4) && (!(_local3)))){ _local3 = IConstraintLayout(target).constraintColumns[(_arg1.right - 2)]; if (((_local3) && (_local3.width))){ _local6 = (_local6 + _local3.width); }; }; }; if (((_local4) && (_local4.width))){ _local7 = (_local7 + _local4.width); } else { if (((_local3) && (!(_local4)))){ _local4 = IConstraintLayout(target).constraintColumns[(_arg1.left + 1)]; if (((_local4) && (_local4.width))){ _local7 = (_local7 + _local4.width); }; }; }; if (((_local3) && (isNaN(_local3.width)))){ _local3.setActualWidth(Math.max(0, _local3.maxWidth)); }; if (((_local4) && (isNaN(_local4.width)))){ _local4.setActualWidth(Math.max(0, _local4.maxWidth)); }; var _local10:Number = _local5.getExplicitOrMeasuredWidth(); if (_local10){ if (!_arg1.leftCol){ if (_local10 > _local6){ _local12 = ((_local10 - _local6) + _local8); } else { _local12 = (_local10 + _local8); }; }; if (!_arg1.rightCol){ if (_local10 > _local7){ _local11 = ((_local10 - _local7) + _local9); } else { _local11 = (_local10 + _local9); }; }; if (((_arg1.leftCol) && (_arg1.rightCol))){ _local13 = (_local10 / Number(_arg1.span)); if ((_local13 + _local9) < _local6){ _local11 = _local6; _local12 = ((_local10 - (_local6 - _local9)) + _local8); } else { _local11 = (_local13 + _local9); }; if ((_local13 + _local8) < _local7){ _local12 = _local7; _local11 = ((_local10 - (_local7 - _local8)) + _local9); } else { _local12 = (_local13 + _local8); }; }; _local11 = bound(_local11, _local3.minWidth, _local3.maxWidth); _local3.setActualWidth(_local11); _arg2 = (_arg2 - _local11); _local12 = bound(_local12, _local4.minWidth, _local4.maxWidth); _local4.setActualWidth(_local12); _arg2 = (_arg2 - _local12); }; return (_arg2); } private function getLayoutConstraints(_arg1:IUIComponent):LayoutConstraints{ var _local2:IConstraintClient = (_arg1 as IConstraintClient); if (!_local2){ return (null); }; var _local3:LayoutConstraints = new LayoutConstraints(); _local3.baseline = _local2.getConstraintValue("baseline"); _local3.bottom = _local2.getConstraintValue("bottom"); _local3.horizontalCenter = _local2.getConstraintValue("horizontalCenter"); _local3.left = _local2.getConstraintValue("left"); _local3.right = _local2.getConstraintValue("right"); _local3.top = _local2.getConstraintValue("top"); _local3.verticalCenter = _local2.getConstraintValue("verticalCenter"); return (_local3); } override public function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:int; var _local4:IUIComponent; var _local10:ConstraintColumn; var _local11:ConstraintRow; var _local5:Container = super.target; var _local6:int = _local5.numChildren; _local5.mx_internal::doingLayout = false; var _local7:EdgeMetrics = _local5.viewMetrics; _local5.mx_internal::doingLayout = true; var _local8:Number = ((_arg1 - _local7.left) - _local7.right); var _local9:Number = ((_arg2 - _local7.top) - _local7.bottom); if ((((IConstraintLayout(_local5).constraintColumns.length > 0)) || ((IConstraintLayout(_local5).constraintRows.length > 0)))){ constraintRegionsInUse = true; }; if (constraintRegionsInUse){ _local3 = 0; while (_local3 < _local6) { _local4 = (_local5.getChildAt(_local3) as IUIComponent); parseConstraints(_local4); _local3++; }; _local3 = 0; while (_local3 < IConstraintLayout(_local5).constraintColumns.length) { _local10 = IConstraintLayout(_local5).constraintColumns[_local3]; if (_local10.mx_internal::contentSize){ _local10.mx_internal::_width = NaN; }; _local3++; }; _local3 = 0; while (_local3 < IConstraintLayout(_local5).constraintRows.length) { _local11 = IConstraintLayout(_local5).constraintRows[_local3]; if (_local11.mx_internal::contentSize){ _local11.mx_internal::_height = NaN; }; _local3++; }; measureColumnsAndRows(); }; _local3 = 0; while (_local3 < _local6) { _local4 = (_local5.getChildAt(_local3) as IUIComponent); applyAnchorStylesDuringUpdateDisplayList(_local8, _local9, _local4); _local3++; }; } private function applyAnchorStylesDuringUpdateDisplayList(_arg1:Number, _arg2:Number, _arg3:IUIComponent=null):void{ var _local20:int; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:String; var _local34:Number; var _local35:Number; var _local36:Number; var _local37:Number; var _local38:Number; var _local39:Boolean; var _local40:Boolean; var _local41:Boolean; var _local42:ConstraintColumn; var _local43:Boolean; var _local44:Boolean; var _local45:Boolean; var _local46:Boolean; var _local47:ConstraintRow; var _local4:IConstraintClient = (_arg3 as IConstraintClient); if (!_local4){ return; }; var _local5:ChildConstraintInfo = parseConstraints(_arg3); var _local6:Number = _local5.left; var _local7:Number = _local5.right; var _local8:Number = _local5.hc; var _local9:Number = _local5.top; var _local10:Number = _local5.bottom; var _local11:Number = _local5.vc; var _local12:Number = _local5.baseline; var _local13:String = _local5.leftBoundary; var _local14:String = _local5.rightBoundary; var _local15:String = _local5.hcBoundary; var _local16:String = _local5.topBoundary; var _local17:String = _local5.bottomBoundary; var _local18:String = _local5.vcBoundary; var _local19:String = _local5.baselineBoundary; var _local26:Boolean; var _local27:Boolean; var _local28:Boolean = ((((!(_local15)) && (!(_local13)))) && (!(_local14))); var _local29:Boolean = ((((((!(_local18)) && (!(_local16)))) && (!(_local17)))) && (!(_local19))); var _local30:Number = 0; var _local31:Number = _arg1; var _local32:Number = 0; var _local33:Number = _arg2; if (!_local28){ _local39 = (_local13) ? true : false; _local40 = (_local14) ? true : false; _local41 = (_local15) ? true : false; _local20 = 0; while (_local20 < IConstraintLayout(target).constraintColumns.length) { _local42 = ConstraintColumn(IConstraintLayout(target).constraintColumns[_local20]); if (_local39){ if (_local13 == _local42.id){ _local30 = _local42.x; _local39 = false; }; }; if (_local40){ if (_local14 == _local42.id){ _local31 = (_local42.x + _local42.width); _local40 = false; }; }; if (_local41){ if (_local15 == _local42.id){ _local35 = _local42.width; _local37 = _local42.x; _local41 = false; }; }; _local20++; }; if (_local39){ _local25 = resourceManager.getString("containers", "columnNotFound", [_local13]); throw (new ConstraintError(_local25)); }; if (_local40){ _local25 = resourceManager.getString("containers", "columnNotFound", [_local14]); throw (new ConstraintError(_local25)); }; if (_local41){ _local25 = resourceManager.getString("containers", "columnNotFound", [_local15]); throw (new ConstraintError(_local25)); }; } else { if (!_local28){ _local25 = resourceManager.getString("containers", "noColumnsFound"); throw (new ConstraintError(_local25)); }; }; _arg1 = Math.round((_local31 - _local30)); if (((!(isNaN(_local6))) && (!(isNaN(_local7))))){ _local21 = ((_arg1 - _local6) - _local7); if (_local21 < _arg3.minWidth){ _local21 = _arg3.minWidth; }; } else { if (!isNaN(_arg3.percentWidth)){ _local21 = ((_arg3.percentWidth / 100) * _arg1); _local21 = bound(_local21, _arg3.minWidth, _arg3.maxWidth); _local26 = true; } else { _local21 = _arg3.getExplicitOrMeasuredWidth(); }; }; if (((!(_local29)) && ((IConstraintLayout(target).constraintRows.length > 0)))){ _local43 = (_local16) ? true : false; _local44 = (_local17) ? true : false; _local45 = (_local18) ? true : false; _local46 = (_local19) ? true : false; _local20 = 0; while (_local20 < IConstraintLayout(target).constraintRows.length) { _local47 = ConstraintRow(IConstraintLayout(target).constraintRows[_local20]); if (_local43){ if (_local16 == _local47.id){ _local32 = _local47.y; _local43 = false; }; }; if (_local44){ if (_local17 == _local47.id){ _local33 = (_local47.y + _local47.height); _local44 = false; }; }; if (_local45){ if (_local18 == _local47.id){ _local34 = _local47.height; _local36 = _local47.y; _local45 = false; }; }; if (_local46){ if (_local19 == _local47.id){ _local38 = _local47.y; _local46 = false; }; }; _local20++; }; if (_local43){ _local25 = resourceManager.getString("containers", "rowNotFound", [_local16]); throw (new ConstraintError(_local25)); }; if (_local44){ _local25 = resourceManager.getString("containers", "rowNotFound", [_local17]); throw (new ConstraintError(_local25)); }; if (_local45){ _local25 = resourceManager.getString("containers", "rowNotFound", [_local18]); throw (new ConstraintError(_local25)); }; if (_local46){ _local25 = resourceManager.getString("containers", "rowNotFound", [_local19]); throw (new ConstraintError(_local25)); }; } else { if (((!(_local29)) && (!((IConstraintLayout(target).constraintRows.length > 0))))){ _local25 = resourceManager.getString("containers", "noRowsFound"); throw (new ConstraintError(_local25)); }; }; _arg2 = Math.round((_local33 - _local32)); if (((!(isNaN(_local9))) && (!(isNaN(_local10))))){ _local22 = ((_arg2 - _local9) - _local10); if (_local22 < _arg3.minHeight){ _local22 = _arg3.minHeight; }; } else { if (!isNaN(_arg3.percentHeight)){ _local22 = ((_arg3.percentHeight / 100) * _arg2); _local22 = bound(_local22, _arg3.minHeight, _arg3.maxHeight); _local27 = true; } else { _local22 = _arg3.getExplicitOrMeasuredHeight(); }; }; if (!isNaN(_local8)){ if (_local15){ _local23 = Math.round(((((_local35 - _local21) / 2) + _local8) + _local37)); } else { _local23 = Math.round((((_arg1 - _local21) / 2) + _local8)); }; } else { if (!isNaN(_local6)){ if (_local13){ _local23 = (_local30 + _local6); } else { _local23 = _local6; }; } else { if (!isNaN(_local7)){ if (_local14){ _local23 = ((_local31 - _local7) - _local21); } else { _local23 = ((_arg1 - _local7) - _local21); }; }; }; }; if (!isNaN(_local12)){ if (_local19){ _local24 = ((_local38 - _arg3.baselinePosition) + _local12); } else { _local24 = _local12; }; }; if (!isNaN(_local11)){ if (_local18){ _local24 = Math.round(((((_local34 - _local22) / 2) + _local11) + _local36)); } else { _local24 = Math.round((((_arg2 - _local22) / 2) + _local11)); }; } else { if (!isNaN(_local9)){ if (_local16){ _local24 = (_local32 + _local9); } else { _local24 = _local9; }; } else { if (!isNaN(_local10)){ if (_local17){ _local24 = ((_local33 - _local10) - _local22); } else { _local24 = ((_arg2 - _local10) - _local22); }; }; }; }; _local23 = (isNaN(_local23)) ? _arg3.x : _local23; _local24 = (isNaN(_local24)) ? _arg3.y : _local24; _arg3.move(_local23, _local24); if (_local26){ if ((_local23 + _local21) > _arg1){ _local21 = Math.max((_arg1 - _local23), _arg3.minWidth); }; }; if (_local27){ if ((_local24 + _local22) > _arg2){ _local22 = Math.max((_arg2 - _local24), _arg3.minHeight); }; }; if (((!(isNaN(_local21))) && (!(isNaN(_local22))))){ _arg3.setActualSize(_local21, _local22); }; } private function target_childAddHandler(_arg1:ChildExistenceChangedEvent):void{ DisplayObject(_arg1.relatedObject).addEventListener(MoveEvent.MOVE, child_moveHandler); } } }//package mx.containers.utilityClasses import mx.core.*; class LayoutConstraints { public var baseline; public var left; public var bottom; public var top; public var horizontalCenter; public var verticalCenter; public var right; private function LayoutConstraints():void{ } } class ChildConstraintInfo { public var baseline:Number; public var left:Number; public var baselineBoundary:String; public var leftBoundary:String; public var hcBoundary:String; public var top:Number; public var right:Number; public var topBoundary:String; public var rightBoundary:String; public var bottom:Number; public var vc:Number; public var bottomBoundary:String; public var vcBoundary:String; public var hc:Number; private function ChildConstraintInfo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:String=null, _arg9:String=null, _arg10:String=null, _arg11:String=null, _arg12:String=null, _arg13:String=null, _arg14:String=null):void{ this.left = _arg1; this.right = _arg2; this.hc = _arg3; this.top = _arg4; this.bottom = _arg5; this.vc = _arg6; this.baseline = _arg7; this.leftBoundary = _arg8; this.rightBoundary = _arg9; this.hcBoundary = _arg10; this.topBoundary = _arg11; this.bottomBoundary = _arg12; this.vcBoundary = _arg13; this.baselineBoundary = _arg14; } } class ContentColumnChild { public var rightCol:ConstraintColumn; public var hcCol:ConstraintColumn; public var left:Number; public var child:IUIComponent; public var rightOffset:Number; public var span:Number; public var hcOffset:Number; public var leftCol:ConstraintColumn; public var leftOffset:Number; public var hc:Number; public var right:Number; private function ContentColumnChild():void{ } } class ContentRowChild { public var topRow:ConstraintRow; public var topOffset:Number; public var baseline:Number; public var baselineRow:ConstraintRow; public var span:Number; public var top:Number; public var vcOffset:Number; public var child:IUIComponent; public var bottomOffset:Number; public var bottom:Number; public var vc:Number; public var bottomRow:ConstraintRow; public var vcRow:ConstraintRow; public var baselineOffset:Number; private function ContentRowChild():void{ } }
Section 110
//ConstraintColumn (mx.containers.utilityClasses.ConstraintColumn) package mx.containers.utilityClasses { import mx.core.*; import flash.events.*; public class ConstraintColumn extends EventDispatcher implements IMXMLObject { private var _container:IInvalidating; private var _explicitMinWidth:Number; mx_internal var _width:Number; mx_internal var contentSize:Boolean;// = false private var _percentWidth:Number; private var _explicitWidth:Number; private var _explicitMaxWidth:Number; private var _x:Number; private var _id:String; mx_internal static const VERSION:String = "3.0.0.0"; public function get container():IInvalidating{ return (_container); } public function get width():Number{ return (_width); } public function get percentWidth():Number{ return (_percentWidth); } public function set container(_arg1:IInvalidating):void{ _container = _arg1; } public function set maxWidth(_arg1:Number):void{ if (_explicitMaxWidth != _arg1){ _explicitMaxWidth = _arg1; if (container){ container.invalidateSize(); container.invalidateDisplayList(); }; dispatchEvent(new Event("maxWidthChanged")); }; } public function set width(_arg1:Number):void{ if (explicitWidth != _arg1){ explicitWidth = _arg1; if (_width != _arg1){ _width = _arg1; if (container){ container.invalidateSize(); container.invalidateDisplayList(); }; dispatchEvent(new Event("widthChanged")); }; }; } public function get maxWidth():Number{ return (_explicitMaxWidth); } public function get minWidth():Number{ return (_explicitMinWidth); } public function get id():String{ return (_id); } public function initialized(_arg1:Object, _arg2:String):void{ this.id = _arg2; if (((!(this.width)) && (!(this.percentWidth)))){ contentSize = true; }; } public function set explicitWidth(_arg1:Number):void{ if (_explicitWidth == _arg1){ return; }; if (!isNaN(_arg1)){ _percentWidth = NaN; }; _explicitWidth = _arg1; if (container){ container.invalidateSize(); container.invalidateDisplayList(); }; dispatchEvent(new Event("explicitWidthChanged")); } public function setActualWidth(_arg1:Number):void{ if (_width != _arg1){ _width = _arg1; dispatchEvent(new Event("widthChanged")); }; } public function set minWidth(_arg1:Number):void{ if (_explicitMinWidth != _arg1){ _explicitMinWidth = _arg1; if (container){ container.invalidateSize(); container.invalidateDisplayList(); }; dispatchEvent(new Event("minWidthChanged")); }; } public function set percentWidth(_arg1:Number):void{ if (_percentWidth == _arg1){ return; }; if (!isNaN(_arg1)){ _explicitWidth = NaN; }; _percentWidth = _arg1; if (container){ container.invalidateSize(); container.invalidateDisplayList(); }; dispatchEvent(new Event("percentWidthChanged")); } public function set x(_arg1:Number):void{ if (_arg1 != _x){ _x = _arg1; dispatchEvent(new Event("xChanged")); }; } public function get explicitWidth():Number{ return (_explicitWidth); } public function set id(_arg1:String):void{ _id = _arg1; } public function get x():Number{ return (_x); } } }//package mx.containers.utilityClasses
Section 111
//ConstraintRow (mx.containers.utilityClasses.ConstraintRow) package mx.containers.utilityClasses { import mx.core.*; import flash.events.*; public class ConstraintRow extends EventDispatcher implements IMXMLObject { private var _container:IInvalidating; mx_internal var _height:Number; private var _explicitMinHeight:Number; private var _y:Number; private var _percentHeight:Number; private var _explicitMaxHeight:Number; mx_internal var contentSize:Boolean;// = false private var _explicitHeight:Number; private var _id:String; mx_internal static const VERSION:String = "3.0.0.0"; public function get container():IInvalidating{ return (_container); } public function set container(_arg1:IInvalidating):void{ _container = _arg1; } public function set y(_arg1:Number):void{ if (_arg1 != _y){ _y = _arg1; dispatchEvent(new Event("yChanged")); }; } public function set height(_arg1:Number):void{ if (explicitHeight != _arg1){ explicitHeight = _arg1; if (_height != _arg1){ _height = _arg1; if (container){ container.invalidateSize(); container.invalidateDisplayList(); }; dispatchEvent(new Event("heightChanged")); }; }; } public function set maxHeight(_arg1:Number):void{ if (_explicitMaxHeight != _arg1){ _explicitMaxHeight = _arg1; if (container){ container.invalidateSize(); container.invalidateDisplayList(); }; dispatchEvent(new Event("maxHeightChanged")); }; } public function setActualHeight(_arg1:Number):void{ if (_height != _arg1){ _height = _arg1; dispatchEvent(new Event("heightChanged")); }; } public function get minHeight():Number{ return (_explicitMinHeight); } public function get id():String{ return (_id); } public function set percentHeight(_arg1:Number):void{ if (_percentHeight == _arg1){ return; }; if (!isNaN(_arg1)){ _explicitHeight = NaN; }; _percentHeight = _arg1; if (container){ container.invalidateSize(); container.invalidateDisplayList(); }; } public function initialized(_arg1:Object, _arg2:String):void{ this.id = _arg2; if (((!(this.height)) && (!(this.percentHeight)))){ contentSize = true; }; } public function get percentHeight():Number{ return (_percentHeight); } public function get height():Number{ return (_height); } public function get maxHeight():Number{ return (_explicitMaxHeight); } public function set minHeight(_arg1:Number):void{ if (_explicitMinHeight != _arg1){ _explicitMinHeight = _arg1; if (container){ container.invalidateSize(); container.invalidateDisplayList(); }; dispatchEvent(new Event("minHeightChanged")); }; } public function set id(_arg1:String):void{ _id = _arg1; } public function get y():Number{ return (_y); } public function get explicitHeight():Number{ return (_explicitHeight); } public function set explicitHeight(_arg1:Number):void{ if (_explicitHeight == _arg1){ return; }; if (!isNaN(_arg1)){ _percentHeight = NaN; }; _explicitHeight = _arg1; if (container){ container.invalidateSize(); container.invalidateDisplayList(); }; dispatchEvent(new Event("explicitHeightChanged")); } } }//package mx.containers.utilityClasses
Section 112
//Flex (mx.containers.utilityClasses.Flex) package mx.containers.utilityClasses { import mx.core.*; public class Flex { mx_internal static const VERSION:String = "3.0.0.0"; public static function flexChildWidthsProportionally(_arg1:Container, _arg2:Number, _arg3:Number):Number{ var _local6:Array; var _local7:FlexChildInfo; var _local8:IUIComponent; var _local9:int; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local4:Number = _arg2; var _local5:Number = 0; _local6 = []; var _local10:int = _arg1.numChildren; _local9 = 0; while (_local9 < _local10) { _local8 = IUIComponent(_arg1.getChildAt(_local9)); _local11 = _local8.percentWidth; _local12 = _local8.percentHeight; if (((!(isNaN(_local12))) && (_local8.includeInLayout))){ _local13 = Math.max(_local8.minHeight, Math.min(_local8.maxHeight, ((_local12)>=100) ? _arg3 : ((_arg3 * _local12) / 100))); } else { _local13 = _local8.getExplicitOrMeasuredHeight(); }; if (((!(isNaN(_local11))) && (_local8.includeInLayout))){ _local5 = (_local5 + _local11); _local7 = new FlexChildInfo(); _local7.percent = _local11; _local7.min = _local8.minWidth; _local7.max = _local8.maxWidth; _local7.height = _local13; _local7.child = _local8; _local6.push(_local7); } else { _local14 = _local8.getExplicitOrMeasuredWidth(); if ((((_local8.scaleX == 1)) && ((_local8.scaleY == 1)))){ _local8.setActualSize(Math.floor(_local14), Math.floor(_local13)); } else { _local8.setActualSize(_local14, _local13); }; if (_local8.includeInLayout){ _local4 = (_local4 - _local8.width); }; }; _local9++; }; if (_local5){ _local4 = flexChildrenProportionally(_arg2, _local4, _local5, _local6); _local10 = _local6.length; _local9 = 0; while (_local9 < _local10) { _local7 = _local6[_local9]; _local8 = _local7.child; if ((((_local8.scaleX == 1)) && ((_local8.scaleY == 1)))){ _local8.setActualSize(Math.floor(_local7.size), Math.floor(_local7.height)); } else { _local8.setActualSize(_local7.size, _local7.height); }; _local9++; }; if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0){ distributeExtraWidth(_arg1, _arg2); }; }; return (_local4); } public static function distributeExtraHeight(_arg1:Container, _arg2:Number):void{ var _local5:int; var _local6:Number; var _local9:IUIComponent; var _local10:Number; var _local11:Number; var _local3:int = _arg1.numChildren; var _local4:Boolean; var _local7:Number = _arg2; var _local8:Number = 0; _local5 = 0; while (_local5 < _local3) { _local9 = IUIComponent(_arg1.getChildAt(_local5)); if (!_local9.includeInLayout){ } else { _local10 = _local9.height; _local6 = _local9.percentHeight; _local8 = (_local8 + _local10); if (!isNaN(_local6)){ _local11 = Math.ceil(((_local6 / 100) * _arg2)); if (_local11 > _local10){ _local4 = true; }; }; }; _local5++; }; if (!_local4){ return; }; _local7 = (_local7 - _local8); var _local12:Boolean; while (((_local12) && ((_local7 > 0)))) { _local12 = false; _local5 = 0; while (_local5 < _local3) { _local9 = IUIComponent(_arg1.getChildAt(_local5)); _local10 = _local9.height; _local6 = _local9.percentHeight; if (((((!(isNaN(_local6))) && (_local9.includeInLayout))) && ((_local10 < _local9.maxHeight)))){ _local11 = Math.ceil(((_local6 / 100) * _arg2)); if (_local11 > _local10){ _local9.setActualSize(_local9.width, (_local10 + 1)); _local7--; _local12 = true; if (_local7 == 0){ return; }; }; }; _local5++; }; }; } public static function distributeExtraWidth(_arg1:Container, _arg2:Number):void{ var _local5:int; var _local6:Number; var _local9:IUIComponent; var _local10:Number; var _local11:Number; var _local3:int = _arg1.numChildren; var _local4:Boolean; var _local7:Number = _arg2; var _local8:Number = 0; _local5 = 0; while (_local5 < _local3) { _local9 = IUIComponent(_arg1.getChildAt(_local5)); if (!_local9.includeInLayout){ } else { _local10 = _local9.width; _local6 = _local9.percentWidth; _local8 = (_local8 + _local10); if (!isNaN(_local6)){ _local11 = Math.ceil(((_local6 / 100) * _arg2)); if (_local11 > _local10){ _local4 = true; }; }; }; _local5++; }; if (!_local4){ return; }; _local7 = (_local7 - _local8); var _local12:Boolean; while (((_local12) && ((_local7 > 0)))) { _local12 = false; _local5 = 0; while (_local5 < _local3) { _local9 = IUIComponent(_arg1.getChildAt(_local5)); _local10 = _local9.width; _local6 = _local9.percentWidth; if (((((!(isNaN(_local6))) && (_local9.includeInLayout))) && ((_local10 < _local9.maxWidth)))){ _local11 = Math.ceil(((_local6 / 100) * _arg2)); if (_local11 > _local10){ _local9.setActualSize((_local10 + 1), _local9.height); _local7--; _local12 = true; if (_local7 == 0){ return; }; }; }; _local5++; }; }; } public static function flexChildrenProportionally(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Array):Number{ var _local6:Number; var _local7:Boolean; var _local9:*; var _local10:*; var _local11:*; var _local12:*; var _local13:*; var _local14:*; var _local5:int = _arg4.length; var _local8:Number = (_arg2 - ((_arg1 * _arg3) / 100)); if (_local8 > 0){ _arg2 = (_arg2 - _local8); }; do { _local6 = 0; _local7 = true; _local9 = (_arg2 / _arg3); _local10 = 0; while (_local10 < _local5) { _local11 = _arg4[_local10]; _local12 = (_local11.percent * _local9); if (_local12 < _local11.min){ _local13 = _local11.min; _local11.size = _local13; --_local5; _arg4[_local10] = _arg4[_local5]; _arg4[_local5] = _local11; _arg3 = (_arg3 - _local11.percent); _arg2 = (_arg2 - _local13); _local7 = false; break; } else { if (_local12 > _local11.max){ _local14 = _local11.max; _local11.size = _local14; --_local5; _arg4[_local10] = _arg4[_local5]; _arg4[_local5] = _local11; _arg3 = (_arg3 - _local11.percent); _arg2 = (_arg2 - _local14); _local7 = false; break; } else { _local11.size = _local12; _local6 = (_local6 + _local12); }; }; _local10++; }; } while (!(_local7)); return (Math.max(0, Math.floor((_arg2 - _local6)))); } public static function flexChildHeightsProportionally(_arg1:Container, _arg2:Number, _arg3:Number):Number{ var _local7:FlexChildInfo; var _local8:IUIComponent; var _local9:int; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local4:Number = _arg2; var _local5:Number = 0; var _local6:Array = []; var _local10:int = _arg1.numChildren; _local9 = 0; while (_local9 < _local10) { _local8 = IUIComponent(_arg1.getChildAt(_local9)); _local11 = _local8.percentWidth; _local12 = _local8.percentHeight; if (((!(isNaN(_local11))) && (_local8.includeInLayout))){ _local13 = Math.max(_local8.minWidth, Math.min(_local8.maxWidth, ((_local11)>=100) ? _arg3 : ((_arg3 * _local11) / 100))); } else { _local13 = _local8.getExplicitOrMeasuredWidth(); }; if (((!(isNaN(_local12))) && (_local8.includeInLayout))){ _local5 = (_local5 + _local12); _local7 = new FlexChildInfo(); _local7.percent = _local12; _local7.min = _local8.minHeight; _local7.max = _local8.maxHeight; _local7.width = _local13; _local7.child = _local8; _local6.push(_local7); } else { _local14 = _local8.getExplicitOrMeasuredHeight(); if ((((_local8.scaleX == 1)) && ((_local8.scaleY == 1)))){ _local8.setActualSize(Math.floor(_local13), Math.floor(_local14)); } else { _local8.setActualSize(_local13, _local14); }; if (_local8.includeInLayout){ _local4 = (_local4 - _local8.height); }; }; _local9++; }; if (_local5){ _local4 = flexChildrenProportionally(_arg2, _local4, _local5, _local6); _local10 = _local6.length; _local9 = 0; while (_local9 < _local10) { _local7 = _local6[_local9]; _local8 = _local7.child; if ((((_local8.scaleX == 1)) && ((_local8.scaleY == 1)))){ _local8.setActualSize(Math.floor(_local7.width), Math.floor(_local7.size)); } else { _local8.setActualSize(_local7.width, _local7.size); }; _local9++; }; if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0){ distributeExtraHeight(_arg1, _arg2); }; }; return (_local4); } } }//package mx.containers.utilityClasses
Section 113
//FlexChildInfo (mx.containers.utilityClasses.FlexChildInfo) package mx.containers.utilityClasses { import mx.core.*; public class FlexChildInfo { public var flex:Number;// = 0 public var preferred:Number;// = 0 public var percent:Number; public var width:Number; public var height:Number; public var size:Number;// = 0 public var max:Number; public var min:Number; public var child:IUIComponent; mx_internal static const VERSION:String = "3.0.0.0"; } }//package mx.containers.utilityClasses
Section 114
//IConstraintLayout (mx.containers.utilityClasses.IConstraintLayout) package mx.containers.utilityClasses { public interface IConstraintLayout { function get constraintColumns():Array; function set constraintRows(_arg1:Array):void; function get constraintRows():Array; function set constraintColumns(_arg1:Array):void; } }//package mx.containers.utilityClasses
Section 115
//Layout (mx.containers.utilityClasses.Layout) package mx.containers.utilityClasses { import mx.core.*; import mx.resources.*; public class Layout { private var _target:Container; protected var resourceManager:IResourceManager; mx_internal static const VERSION:String = "3.0.0.0"; public function Layout(){ resourceManager = ResourceManager.getInstance(); super(); } public function get target():Container{ return (_target); } public function set target(_arg1:Container):void{ _target = _arg1; } public function measure():void{ } public function updateDisplayList(_arg1:Number, _arg2:Number):void{ } } }//package mx.containers.utilityClasses
Section 116
//ApplicationControlBar (mx.containers.ApplicationControlBar) package mx.containers { import mx.core.*; import flash.events.*; import mx.styles.*; public class ApplicationControlBar extends ControlBar { private var dockChanged:Boolean;// = false private var _dock:Boolean;// = false mx_internal static const VERSION:String = "3.0.0.0"; public function set dock(_arg1:Boolean):void{ if (_dock != _arg1){ _dock = _arg1; dockChanged = true; invalidateProperties(); dispatchEvent(new Event("dockChanged")); }; } public function resetDock(_arg1:Boolean):void{ _dock = !(_arg1); dock = _arg1; } public function get dock():Boolean{ return (_dock); } override protected function commitProperties():void{ super.commitProperties(); if (dockChanged){ dockChanged = false; if ((parent is Application)){ Application(parent).dockControlBar(this, _dock); }; }; } override public function set enabled(_arg1:Boolean):void{ var _local2:Object = blocker; super.enabled = _arg1; if (((blocker) && (!((blocker == _local2))))){ if ((blocker is IStyleClient)){ IStyleClient(blocker).setStyle("borderStyle", "applicationControlBar"); }; }; } } }//package mx.containers
Section 117
//Box (mx.containers.Box) package mx.containers { import mx.core.*; import flash.events.*; import mx.containers.utilityClasses.*; public class Box extends Container { mx_internal var layoutObject:BoxLayout; mx_internal static const VERSION:String = "3.0.0.0"; public function Box(){ layoutObject = new BoxLayout(); super(); layoutObject.target = this; } mx_internal function isVertical():Boolean{ return (!((direction == BoxDirection.HORIZONTAL))); } public function set direction(_arg1:String):void{ layoutObject.direction = _arg1; invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("directionChanged")); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ super.updateDisplayList(_arg1, _arg2); layoutObject.updateDisplayList(_arg1, _arg2); } public function pixelsToPercent(_arg1:Number):Number{ var _local8:IUIComponent; var _local9:Number; var _local10:Number; var _local2:Boolean = isVertical(); var _local3:Number = 0; var _local4:Number = 0; var _local5:int = numChildren; var _local6:int; while (_local6 < _local5) { _local8 = IUIComponent(getChildAt(_local6)); _local9 = (_local2) ? _local8.height : _local8.width; _local10 = (_local2) ? _local8.percentHeight : _local8.percentWidth; if (!isNaN(_local10)){ _local3 = (_local3 + _local10); _local4 = (_local4 + _local9); }; _local6++; }; var _local7:Number = 100; if (_local4 != _arg1){ _local7 = (((_local4 * _local3) / (_local4 - _arg1)) - _local3); }; return (_local7); } override protected function measure():void{ super.measure(); layoutObject.measure(); } public function get direction():String{ return (layoutObject.direction); } } }//package mx.containers
Section 118
//BoxDirection (mx.containers.BoxDirection) package mx.containers { public final class BoxDirection { public static const HORIZONTAL:String = "horizontal"; public static const VERTICAL:String = "vertical"; mx_internal static const VERSION:String = "3.0.0.0"; } }//package mx.containers
Section 119
//Canvas (mx.containers.Canvas) package mx.containers { import mx.core.*; import mx.containers.utilityClasses.*; public class Canvas extends Container implements IConstraintLayout { private var _constraintColumns:Array; private var layoutObject:CanvasLayout; private var _constraintRows:Array; mx_internal static const VERSION:String = "3.0.0.0"; public function Canvas(){ layoutObject = new CanvasLayout(); _constraintColumns = []; _constraintRows = []; super(); layoutObject.target = this; } public function get constraintColumns():Array{ return (_constraintColumns); } override mx_internal function get usePadding():Boolean{ return (false); } public function set constraintRows(_arg1:Array):void{ var _local2:int; var _local3:int; if (_arg1 != _constraintRows){ _local2 = _arg1.length; _local3 = 0; while (_local3 < _local2) { ConstraintRow(_arg1[_local3]).container = this; _local3++; }; _constraintRows = _arg1; invalidateSize(); invalidateDisplayList(); }; } public function get constraintRows():Array{ return (_constraintRows); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ super.updateDisplayList(_arg1, _arg2); layoutObject.updateDisplayList(_arg1, _arg2); } public function set constraintColumns(_arg1:Array):void{ var _local2:int; var _local3:int; if (_arg1 != _constraintColumns){ _local2 = _arg1.length; _local3 = 0; while (_local3 < _local2) { ConstraintColumn(_arg1[_local3]).container = this; _local3++; }; _constraintColumns = _arg1; invalidateSize(); invalidateDisplayList(); }; } override protected function measure():void{ super.measure(); layoutObject.measure(); } } }//package mx.containers
Section 120
//ControlBar (mx.containers.ControlBar) package mx.containers { import mx.core.*; public class ControlBar extends Box { mx_internal static const VERSION:String = "3.0.0.0"; public function ControlBar(){ direction = BoxDirection.HORIZONTAL; } override public function set verticalScrollPolicy(_arg1:String):void{ } override public function set horizontalScrollPolicy(_arg1:String):void{ } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ super.updateDisplayList(_arg1, _arg2); if (contentPane){ contentPane.opaqueBackground = null; }; } override public function set enabled(_arg1:Boolean):void{ if (_arg1 != super.enabled){ super.enabled = _arg1; alpha = (_arg1) ? 1 : 0.4; }; } override public function get horizontalScrollPolicy():String{ return (ScrollPolicy.OFF); } override public function invalidateSize():void{ super.invalidateSize(); if (parent){ Container(parent).invalidateViewMetricsAndPadding(); }; } override public function get verticalScrollPolicy():String{ return (ScrollPolicy.OFF); } override public function set includeInLayout(_arg1:Boolean):void{ var _local2:Container; if (includeInLayout != _arg1){ super.includeInLayout = _arg1; _local2 = (parent as Container); if (_local2){ _local2.invalidateViewMetricsAndPadding(); }; }; } } }//package mx.containers
Section 121
//HBox (mx.containers.HBox) package mx.containers { import mx.core.*; public class HBox extends Box { mx_internal static const VERSION:String = "3.0.0.0"; public function HBox(){ mx_internal::layoutObject.direction = BoxDirection.HORIZONTAL; } override public function set direction(_arg1:String):void{ } } }//package mx.containers
Section 122
//Panel (mx.containers.Panel) package mx.containers { import flash.display.*; import flash.geom.*; import flash.text.*; import mx.core.*; import mx.automation.*; import flash.events.*; import mx.events.*; import mx.styles.*; import mx.controls.*; import mx.effects.*; import flash.utils.*; import mx.containers.utilityClasses.*; public class Panel extends Container implements IConstraintLayout, IFontContextComponent { private var layoutObject:Layout; private var _status:String;// = "" private var _titleChanged:Boolean;// = false mx_internal var titleBarBackground:IFlexDisplayObject; private var regX:Number; private var regY:Number; private var _layout:String;// = "vertical" mx_internal var closeButton:Button; private var initializing:Boolean;// = true private var _title:String;// = "" protected var titleTextField:IUITextField; private var _statusChanged:Boolean;// = false private var autoSetRoundedCorners:Boolean; private var _titleIcon:Class; private var _constraintRows:Array; protected var controlBar:IUIComponent; mx_internal var titleIconObject:Object;// = null protected var titleBar:UIComponent; private var panelViewMetrics:EdgeMetrics; private var _constraintColumns:Array; mx_internal var _showCloseButton:Boolean;// = false private var checkedForAutoSetRoundedCorners:Boolean; private var _titleIconChanged:Boolean;// = false protected var statusTextField:IUITextField; mx_internal static const VERSION:String = "3.0.0.0"; private static const HEADER_PADDING:Number = 14; mx_internal static var createAccessibilityImplementation:Function; private static var _closeButtonStyleFilters:Object = {closeButtonUpSkin:"closeButtonUpSkin", closeButtonOverSkin:"closeButtonOverSkin", closeButtonDownSkin:"closeButtonDownSkin", closeButtonDisabledSkin:"closeButtonDisabledSkin", closeButtonSkin:"closeButtonSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"}; public function Panel(){ _constraintColumns = []; _constraintRows = []; super(); addEventListener("resizeStart", EffectManager.eventHandler, false, EventPriority.EFFECT); addEventListener("resizeEnd", EffectManager.eventHandler, false, EventPriority.EFFECT); layoutObject = new BoxLayout(); layoutObject.target = this; showInAutomationHierarchy = true; } private function systemManager_mouseUpHandler(_arg1:MouseEvent):void{ if (!isNaN(regX)){ stopDragging(); }; } mx_internal function getHeaderHeightProxy():Number{ return (getHeaderHeight()); } override public function getChildIndex(_arg1:DisplayObject):int{ if (((controlBar) && ((_arg1 == controlBar)))){ return (numChildren); }; return (super.getChildIndex(_arg1)); } mx_internal function get _controlBar():IUIComponent{ return (controlBar); } mx_internal function getTitleBar():UIComponent{ return (titleBar); } public function get layout():String{ return (_layout); } override protected function createChildren():void{ var _local1:Class; var _local2:IStyleClient; var _local3:ISimpleStyleClient; super.createChildren(); if (!titleBar){ titleBar = new UIComponent(); titleBar.visible = false; titleBar.addEventListener(MouseEvent.MOUSE_DOWN, titleBar_mouseDownHandler); rawChildren.addChild(titleBar); }; if (!titleBarBackground){ _local1 = getStyle("titleBackgroundSkin"); if (_local1){ titleBarBackground = new (_local1); _local2 = (titleBarBackground as IStyleClient); if (_local2){ _local2.setStyle("backgroundImage", undefined); }; _local3 = (titleBarBackground as ISimpleStyleClient); if (_local3){ _local3.styleName = this; }; titleBar.addChild(DisplayObject(titleBarBackground)); }; }; createTitleTextField(-1); createStatusTextField(-1); if (!closeButton){ closeButton = new Button(); closeButton.styleName = new StyleProxy(this, closeButtonStyleFilters); closeButton.upSkinName = "closeButtonUpSkin"; closeButton.overSkinName = "closeButtonOverSkin"; closeButton.downSkinName = "closeButtonDownSkin"; closeButton.disabledSkinName = "closeButtonDisabledSkin"; closeButton.skinName = "closeButtonSkin"; closeButton.explicitWidth = (closeButton.explicitHeight = 16); closeButton.focusEnabled = false; closeButton.visible = false; closeButton.enabled = enabled; closeButton.addEventListener(MouseEvent.CLICK, closeButton_clickHandler); titleBar.addChild(closeButton); closeButton.owner = this; }; } public function get constraintColumns():Array{ return (_constraintColumns); } override public function set cacheAsBitmap(_arg1:Boolean):void{ super.cacheAsBitmap = _arg1; if (((((((cacheAsBitmap) && (!(contentPane)))) && (!((cachePolicy == UIComponentCachePolicy.OFF))))) && (getStyle("backgroundColor")))){ createContentPane(); invalidateDisplayList(); }; } override public function createComponentsFromDescriptors(_arg1:Boolean=true):void{ var _local3:Object; super.createComponentsFromDescriptors(); if (numChildren == 0){ setControlBar(null); return; }; var _local2:IUIComponent = IUIComponent(getChildAt((numChildren - 1))); if ((_local2 is ControlBar)){ _local3 = _local2.document; if (contentPane){ contentPane.removeChild(DisplayObject(_local2)); } else { removeChild(DisplayObject(_local2)); }; _local2.document = _local3; rawChildren.addChild(DisplayObject(_local2)); setControlBar(_local2); } else { setControlBar(null); }; } override protected function layoutChrome(_arg1:Number, _arg2:Number):void{ var _local9:Number; var _local10:Graphics; 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; super.layoutChrome(_arg1, _arg2); var _local3:EdgeMetrics = EdgeMetrics.EMPTY; var _local4:Number = getStyle("borderThickness"); if ((((((getQualifiedClassName(border) == "mx.skins.halo::PanelSkin")) && (!((getStyle("borderStyle") == "default"))))) && (_local4))){ _local3 = new EdgeMetrics(_local4, _local4, _local4, _local4); }; var _local5:EdgeMetrics = ((FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)) ? borderMetrics : _local3; var _local6:Number = _local5.left; var _local7:Number = _local5.top; var _local8:Number = getHeaderHeight(); if ((((_local8 > 0)) && ((height >= _local8)))){ _local9 = ((_arg1 - _local5.left) - _local5.right); showTitleBar(true); titleBar.mouseChildren = true; titleBar.mouseEnabled = true; _local10 = titleBar.graphics; _local10.clear(); _local10.beginFill(0xFFFFFF, 0); _local10.drawRect(0, 0, _local9, _local8); _local10.endFill(); titleBar.move(_local6, _local7); titleBar.setActualSize(_local9, _local8); titleBarBackground.move(0, 0); IFlexDisplayObject(titleBarBackground).setActualSize(_local9, _local8); closeButton.visible = _showCloseButton; if (_showCloseButton){ closeButton.setActualSize(closeButton.getExplicitOrMeasuredWidth(), closeButton.getExplicitOrMeasuredHeight()); closeButton.move(((((_arg1 - _local6) - _local5.right) - 10) - closeButton.getExplicitOrMeasuredWidth()), ((_local8 - closeButton.getExplicitOrMeasuredHeight()) / 2)); }; _local11 = 10; _local12 = 10; if (titleIconObject){ _local13 = titleIconObject.height; _local14 = ((_local8 - _local13) / 2); titleIconObject.move(_local11, _local14); _local11 = (_local11 + (titleIconObject.width + 4)); }; if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ _local13 = titleTextField.nonZeroTextHeight; } else { _local13 = titleTextField.getUITextFormat().measureText(titleTextField.text).height; }; _local14 = ((_local8 - _local13) / 2); _local15 = (_local5.left + _local5.right); titleTextField.move(_local11, (_local14 - 1)); titleTextField.setActualSize(Math.max(0, (((_arg1 - _local11) - _local12) - _local15)), (_local13 + UITextField.TEXT_HEIGHT_PADDING)); if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ _local13 = statusTextField.textHeight; } else { _local13 = ((statusTextField.text)!="") ? statusTextField.getUITextFormat().measureText(statusTextField.text).height : 0; }; _local14 = ((_local8 - _local13) / 2); _local16 = ((((_arg1 - _local12) - 4) - _local15) - statusTextField.textWidth); if (_showCloseButton){ _local16 = (_local16 - (closeButton.getExplicitOrMeasuredWidth() + 4)); }; statusTextField.move(_local16, (_local14 - 1)); statusTextField.setActualSize((statusTextField.textWidth + 8), (statusTextField.textHeight + UITextField.TEXT_HEIGHT_PADDING)); _local17 = ((titleTextField.x + titleTextField.textWidth) + 8); if (statusTextField.x < _local17){ statusTextField.width = Math.max((statusTextField.width - (_local17 - statusTextField.x)), 0); statusTextField.x = _local17; }; } else { if (titleBar){ showTitleBar(false); titleBar.mouseChildren = false; titleBar.mouseEnabled = false; }; }; if (controlBar){ _local18 = controlBar.x; _local19 = controlBar.y; _local20 = controlBar.width; _local21 = controlBar.height; controlBar.setActualSize((_arg1 - (_local5.left + _local5.right)), controlBar.getExplicitOrMeasuredHeight()); controlBar.move(_local5.left, ((_arg2 - _local5.bottom) - controlBar.getExplicitOrMeasuredHeight())); if (controlBar.includeInLayout){ controlBar.visible = (controlBar.y >= _local5.top); }; if (((((((!((_local18 == controlBar.x))) || (!((_local19 == controlBar.y))))) || (!((_local20 == controlBar.width))))) || (!((_local21 == controlBar.height))))){ invalidateDisplayList(); }; }; } public function set layout(_arg1:String):void{ if (_layout != _arg1){ _layout = _arg1; if (layoutObject){ layoutObject.target = null; }; if (_layout == ContainerLayout.ABSOLUTE){ layoutObject = new CanvasLayout(); } else { layoutObject = new BoxLayout(); if (_layout == ContainerLayout.VERTICAL){ BoxLayout(layoutObject).direction = BoxDirection.VERTICAL; } else { BoxLayout(layoutObject).direction = BoxDirection.HORIZONTAL; }; }; if (layoutObject){ layoutObject.target = this; }; invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("layoutChanged")); }; } public function get constraintRows():Array{ return (_constraintRows); } public function get title():String{ return (_title); } mx_internal function getTitleTextField():IUITextField{ return (titleTextField); } mx_internal function createStatusTextField(_arg1:int):void{ var _local2:String; if (((titleBar) && (!(statusTextField)))){ statusTextField = IUITextField(createInFontContext(UITextField)); statusTextField.selectable = false; if (_arg1 == -1){ titleBar.addChild(DisplayObject(statusTextField)); } else { titleBar.addChildAt(DisplayObject(statusTextField), _arg1); }; _local2 = getStyle("statusStyleName"); statusTextField.styleName = _local2; statusTextField.text = status; statusTextField.enabled = enabled; }; } public function get fontContext():IFlexModuleFactory{ return (moduleFactory); } override protected function measure():void{ var _local6:Number; super.measure(); layoutObject.measure(); var _local1:Rectangle = measureHeaderText(); var _local2:Number = _local1.width; var _local3:Number = _local1.height; var _local4:EdgeMetrics = ((FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)) ? borderMetrics : EdgeMetrics.EMPTY; _local2 = (_local2 + (_local4.left + _local4.right)); var _local5:Number = 5; _local2 = (_local2 + (_local5 * 2)); if (titleIconObject){ _local2 = (_local2 + titleIconObject.width); }; if (closeButton){ _local2 = (_local2 + (closeButton.getExplicitOrMeasuredWidth() + 6)); }; measuredMinWidth = Math.max(_local2, measuredMinWidth); measuredWidth = Math.max(_local2, measuredWidth); if (((controlBar) && (controlBar.includeInLayout))){ _local6 = ((controlBar.getExplicitOrMeasuredWidth() + _local4.left) + _local4.right); measuredWidth = Math.max(measuredWidth, _local6); }; } mx_internal function getControlBar():IUIComponent{ return (controlBar); } override public function get viewMetrics():EdgeMetrics{ var _local2:EdgeMetrics; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local1:EdgeMetrics = super.viewMetrics; if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ if (!panelViewMetrics){ panelViewMetrics = new EdgeMetrics(0, 0, 0, 0); }; _local1 = panelViewMetrics; _local2 = super.viewMetrics; _local3 = getStyle("borderThickness"); _local4 = getStyle("borderThicknessLeft"); _local5 = getStyle("borderThicknessTop"); _local6 = getStyle("borderThicknessRight"); _local7 = getStyle("borderThicknessBottom"); _local1.left = (_local2.left + (isNaN(_local4)) ? _local3 : _local4); _local1.top = (_local2.top + (isNaN(_local5)) ? _local3 : _local5); _local1.right = (_local2.right + (isNaN(_local6)) ? _local3 : _local6); _local1.bottom = (_local2.bottom + (isNaN(_local7)) ? (((controlBar) && (!(isNaN(_local5))))) ? _local5 : (isNaN(_local4)) ? _local3 : _local4 : _local7); _local8 = getHeaderHeight(); if (!isNaN(_local8)){ _local1.top = (_local1.top + _local8); }; if (((controlBar) && (controlBar.includeInLayout))){ _local1.bottom = (_local1.bottom + controlBar.getExplicitOrMeasuredHeight()); }; }; return (_local1); } private function measureHeaderText():Rectangle{ var _local3:UITextFormat; var _local4:TextLineMetrics; var _local1:Number = 20; var _local2:Number = 14; if (((titleTextField) && (titleTextField.text))){ titleTextField.validateNow(); _local3 = titleTextField.getUITextFormat(); _local4 = _local3.measureText(titleTextField.text, false); _local1 = _local4.width; _local2 = _local4.height; }; if (((statusTextField) && (statusTextField.text))){ statusTextField.validateNow(); _local3 = statusTextField.getUITextFormat(); _local4 = _local3.measureText(statusTextField.text, false); _local1 = Math.max(_local1, _local4.width); _local2 = Math.max(_local2, _local4.height); }; return (new Rectangle(0, 0, Math.round(_local1), Math.round(_local2))); } mx_internal function createTitleTextField(_arg1:int):void{ var _local2:String; if (!titleTextField){ titleTextField = IUITextField(createInFontContext(UITextField)); titleTextField.selectable = false; if (_arg1 == -1){ titleBar.addChild(DisplayObject(titleTextField)); } else { titleBar.addChildAt(DisplayObject(titleTextField), _arg1); }; _local2 = getStyle("titleStyleName"); titleTextField.styleName = _local2; titleTextField.text = title; titleTextField.enabled = enabled; }; } private function closeButton_clickHandler(_arg1:MouseEvent):void{ dispatchEvent(new CloseEvent(CloseEvent.CLOSE)); } private function setControlBar(_arg1:IUIComponent):void{ if (_arg1 == controlBar){ return; }; controlBar = _arg1; if (!checkedForAutoSetRoundedCorners){ checkedForAutoSetRoundedCorners = true; autoSetRoundedCorners = (styleDeclaration) ? (styleDeclaration.getStyle("roundedBottomCorners") === undefined) : true; }; if (autoSetRoundedCorners){ setStyle("roundedBottomCorners", !((controlBar == null))); }; var _local2:String = getStyle("controlBarStyleName"); if (((_local2) && ((controlBar is ISimpleStyleClient)))){ ISimpleStyleClient(controlBar).styleName = _local2; }; if (controlBar){ controlBar.enabled = enabled; }; if ((controlBar is IAutomationObject)){ IAutomationObject(controlBar).showInAutomationHierarchy = false; }; invalidateViewMetricsAndPadding(); invalidateSize(); invalidateDisplayList(); } protected function get closeButtonStyleFilters():Object{ return (_closeButtonStyleFilters); } public function set constraintColumns(_arg1:Array):void{ var _local2:int; var _local3:int; if (_arg1 != _constraintColumns){ _local2 = _arg1.length; _local3 = 0; while (_local3 < _local2) { ConstraintColumn(_arg1[_local3]).container = this; _local3++; }; _constraintColumns = _arg1; invalidateSize(); invalidateDisplayList(); }; } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; if (titleTextField){ titleTextField.enabled = _arg1; }; if (statusTextField){ statusTextField.enabled = _arg1; }; if (controlBar){ controlBar.enabled = _arg1; }; if (closeButton){ closeButton.enabled = _arg1; }; } override public function get baselinePosition():Number{ if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ return (super.baselinePosition); }; if (!validateBaselinePosition()){ return (NaN); }; return (((titleBar.y + titleTextField.y) + titleTextField.baselinePosition)); } protected function stopDragging():void{ systemManager.removeEventListener(MouseEvent.MOUSE_MOVE, systemManager_mouseMoveHandler, true); systemManager.removeEventListener(MouseEvent.MOUSE_UP, systemManager_mouseUpHandler, true); systemManager.stage.removeEventListener(Event.MOUSE_LEAVE, stage_mouseLeaveHandler); regX = NaN; regY = NaN; } private function titleBar_mouseDownHandler(_arg1:MouseEvent):void{ if (_arg1.target == closeButton){ return; }; if (((((enabled) && (isPopUp))) && (isNaN(regX)))){ startDragging(_arg1); }; } override mx_internal function get usePadding():Boolean{ return (!((layout == ContainerLayout.ABSOLUTE))); } override protected function initializeAccessibility():void{ if (Panel.createAccessibilityImplementation != null){ Panel.createAccessibilityImplementation(this); }; } protected function getHeaderHeight():Number{ var _local1:Number = getStyle("headerHeight"); if (isNaN(_local1)){ _local1 = (measureHeaderText().height + HEADER_PADDING); }; return (_local1); } public function set constraintRows(_arg1:Array):void{ var _local2:int; var _local3:int; if (_arg1 != _constraintRows){ _local2 = _arg1.length; _local3 = 0; while (_local3 < _local2) { ConstraintRow(_arg1[_local3]).container = this; _local3++; }; _constraintRows = _arg1; invalidateSize(); invalidateDisplayList(); }; } public function set title(_arg1:String):void{ _title = _arg1; _titleChanged = true; invalidateProperties(); invalidateSize(); invalidateViewMetricsAndPadding(); dispatchEvent(new Event("titleChanged")); } private function showTitleBar(_arg1:Boolean):void{ var _local4:DisplayObject; titleBar.visible = _arg1; var _local2:int = titleBar.numChildren; var _local3:int; while (_local3 < _local2) { _local4 = titleBar.getChildAt(_local3); _local4.visible = _arg1; _local3++; }; } override public function styleChanged(_arg1:String):void{ var _local3:String; var _local4:String; var _local5:String; var _local6:Class; var _local7:IStyleClient; var _local8:ISimpleStyleClient; var _local2:Boolean = ((!(_arg1)) || ((_arg1 == "styleName"))); super.styleChanged(_arg1); if (((_local2) || ((_arg1 == "titleStyleName")))){ if (titleTextField){ _local3 = getStyle("titleStyleName"); titleTextField.styleName = _local3; }; }; if (((_local2) || ((_arg1 == "statusStyleName")))){ if (statusTextField){ _local4 = getStyle("statusStyleName"); statusTextField.styleName = _local4; }; }; if (((_local2) || ((_arg1 == "controlBarStyleName")))){ if (((controlBar) && ((controlBar is ISimpleStyleClient)))){ _local5 = getStyle("controlBarStyleName"); ISimpleStyleClient(controlBar).styleName = _local5; }; }; if (((_local2) || ((_arg1 == "titleBackgroundSkin")))){ if (titleBar){ _local6 = getStyle("titleBackgroundSkin"); if (_local6){ if (titleBarBackground){ titleBar.removeChild(DisplayObject(titleBarBackground)); titleBarBackground = null; }; titleBarBackground = new (_local6); _local7 = (titleBarBackground as IStyleClient); if (_local7){ _local7.setStyle("backgroundImage", undefined); }; _local8 = (titleBarBackground as ISimpleStyleClient); if (_local8){ _local8.styleName = this; }; titleBar.addChildAt(DisplayObject(titleBarBackground), 0); }; }; }; } mx_internal function getStatusTextField():IUITextField{ return (statusTextField); } public function set fontContext(_arg1:IFlexModuleFactory):void{ this.moduleFactory = _arg1; } override protected function commitProperties():void{ var _local1:int; super.commitProperties(); if (hasFontContextChanged()){ if (titleTextField){ _local1 = titleBar.getChildIndex(DisplayObject(titleTextField)); removeTitleTextField(); createTitleTextField(_local1); _titleChanged = true; }; if (statusTextField){ _local1 = titleBar.getChildIndex(DisplayObject(statusTextField)); removeStatusTextField(); createStatusTextField(_local1); _statusChanged = true; }; }; if (_titleChanged){ _titleChanged = false; titleTextField.text = _title; if (initialized){ layoutChrome(unscaledWidth, unscaledHeight); }; }; if (_titleIconChanged){ _titleIconChanged = false; if (titleIconObject){ titleBar.removeChild(DisplayObject(titleIconObject)); titleIconObject = null; }; if (_titleIcon){ titleIconObject = new _titleIcon(); titleBar.addChild(DisplayObject(titleIconObject)); }; if (initialized){ layoutChrome(unscaledWidth, unscaledHeight); }; }; if (_statusChanged){ _statusChanged = false; statusTextField.text = _status; if (initialized){ layoutChrome(unscaledWidth, unscaledHeight); }; }; } protected function startDragging(_arg1:MouseEvent):void{ regX = (_arg1.stageX - x); regY = (_arg1.stageY - y); systemManager.addEventListener(MouseEvent.MOUSE_MOVE, systemManager_mouseMoveHandler, true); systemManager.addEventListener(MouseEvent.MOUSE_UP, systemManager_mouseUpHandler, true); systemManager.stage.addEventListener(Event.MOUSE_LEAVE, stage_mouseLeaveHandler); } mx_internal function removeStatusTextField():void{ if (((titleBar) && (statusTextField))){ titleBar.removeChild(DisplayObject(statusTextField)); statusTextField = null; }; } private function stage_mouseLeaveHandler(_arg1:Event):void{ if (!isNaN(regX)){ stopDragging(); }; } public function set status(_arg1:String):void{ _status = _arg1; _statusChanged = true; invalidateProperties(); dispatchEvent(new Event("statusChanged")); } public function get titleIcon():Class{ return (_titleIcon); } public function get status():String{ return (_status); } private function systemManager_mouseMoveHandler(_arg1:MouseEvent):void{ _arg1.stopImmediatePropagation(); move((_arg1.stageX - regX), (_arg1.stageY - regY)); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ super.updateDisplayList(_arg1, _arg2); layoutObject.updateDisplayList(_arg1, _arg2); if (border){ border.visible = true; }; titleBar.visible = true; } mx_internal function removeTitleTextField():void{ if (((titleBar) && (titleTextField))){ titleBar.removeChild(DisplayObject(titleTextField)); titleTextField = null; }; } public function set titleIcon(_arg1:Class):void{ _titleIcon = _arg1; _titleIconChanged = true; invalidateProperties(); invalidateSize(); dispatchEvent(new Event("titleIconChanged")); } } }//package mx.containers
Section 123
//VBox (mx.containers.VBox) package mx.containers { import mx.core.*; public class VBox extends Box { mx_internal static const VERSION:String = "3.0.0.0"; public function VBox(){ mx_internal::layoutObject.direction = BoxDirection.VERTICAL; } override public function set direction(_arg1:String):void{ } } }//package mx.containers
Section 124
//DataGridListData (mx.controls.dataGridClasses.DataGridListData) package mx.controls.dataGridClasses { import mx.core.*; import mx.controls.listClasses.*; public class DataGridListData extends BaseListData { public var dataField:String; mx_internal static const VERSION:String = "3.0.0.0"; public function DataGridListData(_arg1:String, _arg2:String, _arg3:int, _arg4:String, _arg5:IUIComponent, _arg6:int=0){ super(_arg1, _arg4, _arg5, _arg6, _arg3); this.dataField = _arg2; } } }//package mx.controls.dataGridClasses
Section 125
//BaseListData (mx.controls.listClasses.BaseListData) package mx.controls.listClasses { import mx.core.*; public class BaseListData { private var _uid:String; public var owner:IUIComponent; public var label:String; public var rowIndex:int; public var columnIndex:int; mx_internal static const VERSION:String = "3.0.0.0"; public function BaseListData(_arg1:String, _arg2:String, _arg3:IUIComponent, _arg4:int=0, _arg5:int=0){ this.label = _arg1; this.uid = _arg2; this.owner = _arg3; this.rowIndex = _arg4; this.columnIndex = _arg5; } public function set uid(_arg1:String):void{ _uid = _arg1; } public function get uid():String{ return (_uid); } } }//package mx.controls.listClasses
Section 126
//IDropInListItemRenderer (mx.controls.listClasses.IDropInListItemRenderer) package mx.controls.listClasses { public interface IDropInListItemRenderer { function get listData():BaseListData; function set listData(_arg1:BaseListData):void; } }//package mx.controls.listClasses
Section 127
//IListItemRenderer (mx.controls.listClasses.IListItemRenderer) package mx.controls.listClasses { import mx.core.*; import mx.managers.*; import flash.events.*; import mx.styles.*; public interface IListItemRenderer extends IDataRenderer, IEventDispatcher, IFlexDisplayObject, ILayoutManagerClient, ISimpleStyleClient, IUIComponent { } }//package mx.controls.listClasses
Section 128
//ScrollBar (mx.controls.scrollClasses.ScrollBar) package mx.controls.scrollClasses { import flash.geom.*; import mx.core.*; import flash.events.*; import mx.events.*; import mx.styles.*; import mx.controls.*; import flash.utils.*; import flash.ui.*; public class ScrollBar extends UIComponent { private var _direction:String;// = "vertical" private var _pageScrollSize:Number;// = 0 mx_internal var scrollTrack:Button; mx_internal var downArrow:Button; mx_internal var scrollThumb:ScrollThumb; private var trackScrollRepeatDirection:int; private var _minScrollPosition:Number;// = 0 private var trackPosition:Number; private var _pageSize:Number;// = 0 mx_internal var _minHeight:Number;// = 32 private var _maxScrollPosition:Number;// = 0 private var trackScrollTimer:Timer; mx_internal var upArrow:Button; private var _lineScrollSize:Number;// = 1 private var _scrollPosition:Number;// = 0 private var trackScrolling:Boolean;// = false mx_internal var isScrolling:Boolean; mx_internal var oldPosition:Number; mx_internal var _minWidth:Number;// = 16 mx_internal static const VERSION:String = "3.0.0.0"; public static const THICKNESS:Number = 16; override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; invalidateDisplayList(); } public function set lineScrollSize(_arg1:Number):void{ _lineScrollSize = _arg1; } public function get minScrollPosition():Number{ return (_minScrollPosition); } mx_internal function dispatchScrollEvent(_arg1:Number, _arg2:String):void{ var _local3:ScrollEvent = new ScrollEvent(ScrollEvent.SCROLL); _local3.detail = _arg2; _local3.position = scrollPosition; _local3.delta = (scrollPosition - _arg1); _local3.direction = direction; dispatchEvent(_local3); } private function downArrow_buttonDownHandler(_arg1:FlexEvent):void{ if (isNaN(oldPosition)){ oldPosition = scrollPosition; }; lineScroll(1); } private function scrollTrack_mouseDownHandler(_arg1:MouseEvent):void{ if (!(((_arg1.target == this)) || ((_arg1.target == scrollTrack)))){ return; }; trackScrolling = true; systemManager.addEventListener(MouseEvent.MOUSE_UP, scrollTrack_mouseUpHandler, true); systemManager.addEventListener(MouseEvent.MOUSE_MOVE, scrollTrack_mouseMoveHandler, true); systemManager.stage.addEventListener(MouseEvent.MOUSE_MOVE, stage_scrollTrack_mouseMoveHandler); systemManager.stage.addEventListener(Event.MOUSE_LEAVE, scrollTrack_mouseLeaveHandler); var _local2:Point = new Point(_arg1.localX, _arg1.localY); _local2 = _arg1.target.localToGlobal(_local2); _local2 = globalToLocal(_local2); trackPosition = _local2.y; if (isNaN(oldPosition)){ oldPosition = scrollPosition; }; trackScrollRepeatDirection = (((scrollThumb.y + scrollThumb.height) < _local2.y)) ? 1 : ((scrollThumb.y > _local2.y)) ? -1 : 0; pageScroll(trackScrollRepeatDirection); if (!trackScrollTimer){ trackScrollTimer = new Timer(getStyle("repeatDelay"), 1); trackScrollTimer.addEventListener(TimerEvent.TIMER, trackScrollTimerHandler); }; trackScrollTimer.start(); } public function set minScrollPosition(_arg1:Number):void{ _minScrollPosition = _arg1; } public function get scrollPosition():Number{ return (_scrollPosition); } mx_internal function get linePlusDetail():String{ return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.LINE_DOWN : ScrollEventDetail.LINE_RIGHT); } public function get maxScrollPosition():Number{ return (_maxScrollPosition); } protected function get thumbStyleFilters():Object{ return (null); } override public function set doubleClickEnabled(_arg1:Boolean):void{ } public function get lineScrollSize():Number{ return (_lineScrollSize); } private function stage_scrollTrack_mouseMoveHandler(_arg1:MouseEvent):void{ if (_arg1.target != stage){ return; }; scrollTrack_mouseMoveHandler(_arg1); } mx_internal function get virtualHeight():Number{ return (unscaledHeight); } public function set scrollPosition(_arg1:Number):void{ var _local2:Number; var _local3:Number; var _local4:Number; _scrollPosition = _arg1; if (scrollThumb){ if (!cacheAsBitmap){ cacheHeuristic = (scrollThumb.cacheHeuristic = true); }; if (!isScrolling){ _arg1 = Math.min(_arg1, maxScrollPosition); _arg1 = Math.max(_arg1, minScrollPosition); _local2 = (maxScrollPosition - minScrollPosition); _local3 = ((((_local2 == 0)) || (isNaN(_local2)))) ? 0 : ((((_arg1 - minScrollPosition) * (trackHeight - scrollThumb.height)) / _local2) + trackY); _local4 = (((virtualWidth - scrollThumb.width) / 2) + getStyle("thumbOffset")); scrollThumb.move(Math.round(_local4), Math.round(_local3)); }; }; } protected function get downArrowStyleFilters():Object{ return (null); } public function get pageSize():Number{ return (_pageSize); } public function set pageScrollSize(_arg1:Number):void{ _pageScrollSize = _arg1; } public function set maxScrollPosition(_arg1:Number):void{ _maxScrollPosition = _arg1; } mx_internal function pageScroll(_arg1:int):void{ var _local4:Number; var _local5:String; var _local2:Number = ((_pageScrollSize)!=0) ? _pageScrollSize : pageSize; var _local3:Number = (_scrollPosition + (_arg1 * _local2)); if (_local3 > maxScrollPosition){ _local3 = maxScrollPosition; } else { if (_local3 < minScrollPosition){ _local3 = minScrollPosition; }; }; if (_local3 != scrollPosition){ _local4 = scrollPosition; scrollPosition = _local3; _local5 = ((_arg1 < 0)) ? pageMinusDetail : pagePlusDetail; dispatchScrollEvent(_local4, _local5); }; } override protected function createChildren():void{ super.createChildren(); if (!scrollTrack){ scrollTrack = new Button(); scrollTrack.focusEnabled = false; scrollTrack.skinName = "trackSkin"; scrollTrack.upSkinName = "trackUpSkin"; scrollTrack.overSkinName = "trackOverSkin"; scrollTrack.downSkinName = "trackDownSkin"; scrollTrack.disabledSkinName = "trackDisabledSkin"; if ((scrollTrack is ISimpleStyleClient)){ ISimpleStyleClient(scrollTrack).styleName = this; }; addChild(scrollTrack); scrollTrack.validateProperties(); }; if (!upArrow){ upArrow = new Button(); upArrow.enabled = false; upArrow.autoRepeat = true; upArrow.focusEnabled = false; upArrow.upSkinName = "upArrowUpSkin"; upArrow.overSkinName = "upArrowOverSkin"; upArrow.downSkinName = "upArrowDownSkin"; upArrow.disabledSkinName = "upArrowDisabledSkin"; upArrow.skinName = "upArrowSkin"; upArrow.upIconName = ""; upArrow.overIconName = ""; upArrow.downIconName = ""; upArrow.disabledIconName = ""; addChild(upArrow); upArrow.styleName = new StyleProxy(this, upArrowStyleFilters); upArrow.validateProperties(); upArrow.addEventListener(FlexEvent.BUTTON_DOWN, upArrow_buttonDownHandler); }; if (!downArrow){ downArrow = new Button(); downArrow.enabled = false; downArrow.autoRepeat = true; downArrow.focusEnabled = false; downArrow.upSkinName = "downArrowUpSkin"; downArrow.overSkinName = "downArrowOverSkin"; downArrow.downSkinName = "downArrowDownSkin"; downArrow.disabledSkinName = "downArrowDisabledSkin"; downArrow.skinName = "downArrowSkin"; downArrow.upIconName = ""; downArrow.overIconName = ""; downArrow.downIconName = ""; downArrow.disabledIconName = ""; addChild(downArrow); downArrow.styleName = new StyleProxy(this, downArrowStyleFilters); downArrow.validateProperties(); downArrow.addEventListener(FlexEvent.BUTTON_DOWN, downArrow_buttonDownHandler); }; } private function scrollTrack_mouseOverHandler(_arg1:MouseEvent):void{ if (!(((_arg1.target == this)) || ((_arg1.target == scrollTrack)))){ return; }; if (trackScrolling){ trackScrollTimer.start(); }; } private function get minDetail():String{ return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.AT_TOP : ScrollEventDetail.AT_LEFT); } mx_internal function isScrollBarKey(_arg1:uint):Boolean{ var _local2:Number; if (_arg1 == Keyboard.HOME){ if (scrollPosition != 0){ _local2 = scrollPosition; scrollPosition = 0; dispatchScrollEvent(_local2, minDetail); }; return (true); } else { if (_arg1 == Keyboard.END){ if (scrollPosition < maxScrollPosition){ _local2 = scrollPosition; scrollPosition = maxScrollPosition; dispatchScrollEvent(_local2, maxDetail); }; return (true); }; }; return (false); } mx_internal function get lineMinusDetail():String{ return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.LINE_UP : ScrollEventDetail.LINE_LEFT); } mx_internal function get pageMinusDetail():String{ return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.PAGE_UP : ScrollEventDetail.PAGE_LEFT); } private function get maxDetail():String{ return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.AT_BOTTOM : ScrollEventDetail.AT_RIGHT); } private function scrollTrack_mouseLeaveHandler(_arg1:Event):void{ trackScrolling = false; systemManager.removeEventListener(MouseEvent.MOUSE_UP, scrollTrack_mouseUpHandler, true); systemManager.removeEventListener(MouseEvent.MOUSE_MOVE, scrollTrack_mouseMoveHandler, true); systemManager.stage.removeEventListener(MouseEvent.MOUSE_MOVE, stage_scrollTrack_mouseMoveHandler); systemManager.stage.removeEventListener(Event.MOUSE_LEAVE, scrollTrack_mouseLeaveHandler); if (trackScrollTimer){ trackScrollTimer.reset(); }; if (_arg1.target != scrollTrack){ return; }; var _local2:String = ((oldPosition > scrollPosition)) ? pageMinusDetail : pagePlusDetail; dispatchScrollEvent(oldPosition, _local2); oldPosition = NaN; } protected function get upArrowStyleFilters():Object{ return (null); } private function get trackHeight():Number{ return ((virtualHeight - (upArrow.getExplicitOrMeasuredHeight() + downArrow.getExplicitOrMeasuredHeight()))); } public function get pageScrollSize():Number{ return (_pageScrollSize); } override protected function measure():void{ super.measure(); upArrow.validateSize(); downArrow.validateSize(); scrollTrack.validateSize(); if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0){ _minWidth = (scrollThumb) ? scrollThumb.getExplicitOrMeasuredWidth() : 0; _minWidth = Math.max(scrollTrack.getExplicitOrMeasuredWidth(), upArrow.getExplicitOrMeasuredWidth(), downArrow.getExplicitOrMeasuredWidth(), _minWidth); } else { _minWidth = upArrow.getExplicitOrMeasuredWidth(); }; _minHeight = (upArrow.getExplicitOrMeasuredHeight() + downArrow.getExplicitOrMeasuredHeight()); } mx_internal function lineScroll(_arg1:int):void{ var _local4:Number; var _local5:String; var _local2:Number = _lineScrollSize; var _local3:Number = (_scrollPosition + (_arg1 * _local2)); if (_local3 > maxScrollPosition){ _local3 = maxScrollPosition; } else { if (_local3 < minScrollPosition){ _local3 = minScrollPosition; }; }; if (_local3 != scrollPosition){ _local4 = scrollPosition; scrollPosition = _local3; _local5 = ((_arg1 < 0)) ? lineMinusDetail : linePlusDetail; dispatchScrollEvent(_local4, _local5); }; } public function setScrollProperties(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=0):void{ var _local5:Number; this.pageSize = _arg1; _pageScrollSize = ((_arg4)>0) ? _arg4 : _arg1; this.minScrollPosition = Math.max(_arg2, 0); this.maxScrollPosition = Math.max(_arg3, 0); _scrollPosition = Math.max(this.minScrollPosition, _scrollPosition); _scrollPosition = Math.min(this.maxScrollPosition, _scrollPosition); if (((((this.maxScrollPosition - this.minScrollPosition) > 0)) && (enabled))){ upArrow.enabled = true; downArrow.enabled = true; scrollTrack.enabled = true; addEventListener(MouseEvent.MOUSE_DOWN, scrollTrack_mouseDownHandler); addEventListener(MouseEvent.MOUSE_OVER, scrollTrack_mouseOverHandler); addEventListener(MouseEvent.MOUSE_OUT, scrollTrack_mouseOutHandler); if (!scrollThumb){ scrollThumb = new ScrollThumb(); scrollThumb.focusEnabled = false; addChildAt(scrollThumb, getChildIndex(downArrow)); scrollThumb.styleName = new StyleProxy(this, thumbStyleFilters); scrollThumb.upSkinName = "thumbUpSkin"; scrollThumb.overSkinName = "thumbOverSkin"; scrollThumb.downSkinName = "thumbDownSkin"; scrollThumb.iconName = "thumbIcon"; scrollThumb.skinName = "thumbSkin"; }; _local5 = ((trackHeight < 0)) ? 0 : Math.round(((_arg1 / ((this.maxScrollPosition - this.minScrollPosition) + _arg1)) * trackHeight)); if (_local5 < scrollThumb.minHeight){ if (trackHeight < scrollThumb.minHeight){ scrollThumb.visible = false; } else { _local5 = scrollThumb.minHeight; scrollThumb.visible = true; scrollThumb.setActualSize(scrollThumb.measuredWidth, scrollThumb.minHeight); }; } else { scrollThumb.visible = true; scrollThumb.setActualSize(scrollThumb.measuredWidth, _local5); }; scrollThumb.setRange((upArrow.getExplicitOrMeasuredHeight() + 0), ((virtualHeight - downArrow.getExplicitOrMeasuredHeight()) - scrollThumb.height), this.minScrollPosition, this.maxScrollPosition); scrollPosition = Math.max(Math.min(scrollPosition, this.maxScrollPosition), this.minScrollPosition); } else { upArrow.enabled = false; downArrow.enabled = false; scrollTrack.enabled = false; if (scrollThumb){ scrollThumb.visible = false; }; }; } private function trackScrollTimerHandler(_arg1:Event):void{ if (trackScrollRepeatDirection == 1){ if ((scrollThumb.y + scrollThumb.height) > trackPosition){ return; }; }; if (trackScrollRepeatDirection == -1){ if (scrollThumb.y < trackPosition){ return; }; }; pageScroll(trackScrollRepeatDirection); if (((trackScrollTimer) && ((trackScrollTimer.repeatCount == 1)))){ trackScrollTimer.delay = getStyle("repeatInterval"); trackScrollTimer.repeatCount = 0; }; } private function upArrow_buttonDownHandler(_arg1:FlexEvent):void{ if (isNaN(oldPosition)){ oldPosition = scrollPosition; }; lineScroll(-1); } public function set pageSize(_arg1:Number):void{ _pageSize = _arg1; } private function get trackY():Number{ return (upArrow.getExplicitOrMeasuredHeight()); } private function scrollTrack_mouseOutHandler(_arg1:MouseEvent):void{ if (trackScrolling){ trackScrollTimer.stop(); }; } private function scrollTrack_mouseUpHandler(_arg1:MouseEvent):void{ scrollTrack_mouseLeaveHandler(_arg1); } private function scrollTrack_mouseMoveHandler(_arg1:MouseEvent):void{ var _local2:Point; if (trackScrolling){ _local2 = new Point(_arg1.stageX, _arg1.stageY); _local2 = globalToLocal(_local2); trackPosition = _local2.y; }; } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ if ($height == 1){ return; }; if (!upArrow){ return; }; super.updateDisplayList(_arg1, _arg2); if (cacheAsBitmap){ cacheHeuristic = (scrollThumb.cacheHeuristic = false); }; upArrow.setActualSize(upArrow.getExplicitOrMeasuredWidth(), upArrow.getExplicitOrMeasuredHeight()); if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0){ upArrow.move(((virtualWidth - upArrow.width) / 2), 0); } else { upArrow.move(0, 0); }; scrollTrack.setActualSize(scrollTrack.getExplicitOrMeasuredWidth(), virtualHeight); if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0){ scrollTrack.x = ((virtualWidth - scrollTrack.width) / 2); }; scrollTrack.y = 0; downArrow.setActualSize(downArrow.getExplicitOrMeasuredWidth(), downArrow.getExplicitOrMeasuredHeight()); if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0){ downArrow.move(((virtualWidth - downArrow.width) / 2), (virtualHeight - downArrow.getExplicitOrMeasuredHeight())); } else { downArrow.move(0, (virtualHeight - downArrow.getExplicitOrMeasuredHeight())); }; setScrollProperties(pageSize, minScrollPosition, maxScrollPosition, _pageScrollSize); scrollPosition = _scrollPosition; } mx_internal function get pagePlusDetail():String{ return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.PAGE_DOWN : ScrollEventDetail.PAGE_RIGHT); } mx_internal function get virtualWidth():Number{ return (unscaledWidth); } public function set direction(_arg1:String):void{ _direction = _arg1; invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("directionChanged")); } public function get direction():String{ return (_direction); } } }//package mx.controls.scrollClasses
Section 129
//ScrollBarDirection (mx.controls.scrollClasses.ScrollBarDirection) package mx.controls.scrollClasses { public final class ScrollBarDirection { public static const HORIZONTAL:String = "horizontal"; public static const VERTICAL:String = "vertical"; mx_internal static const VERSION:String = "3.0.0.0"; } }//package mx.controls.scrollClasses
Section 130
//ScrollThumb (mx.controls.scrollClasses.ScrollThumb) package mx.controls.scrollClasses { import flash.geom.*; import flash.events.*; import mx.events.*; import mx.controls.*; public class ScrollThumb extends Button { private var lastY:Number; private var datamin:Number; private var ymax:Number; private var ymin:Number; private var datamax:Number; mx_internal static const VERSION:String = "3.0.0.0"; public function ScrollThumb(){ explicitMinHeight = 10; stickyHighlighting = true; } private function stopDragThumb():void{ var _local1:ScrollBar = ScrollBar(parent); _local1.isScrolling = false; _local1.dispatchScrollEvent(_local1.oldPosition, ScrollEventDetail.THUMB_POSITION); _local1.oldPosition = NaN; systemManager.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true); systemManager.stage.removeEventListener(MouseEvent.MOUSE_MOVE, stage_mouseMoveHandler); } override protected function mouseDownHandler(_arg1:MouseEvent):void{ super.mouseDownHandler(_arg1); var _local2:ScrollBar = ScrollBar(parent); _local2.oldPosition = _local2.scrollPosition; lastY = _arg1.localY; systemManager.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true); systemManager.stage.addEventListener(MouseEvent.MOUSE_MOVE, stage_mouseMoveHandler); } private function mouseMoveHandler(_arg1:MouseEvent):void{ if (ymin == ymax){ return; }; var _local2:Point = new Point(_arg1.stageX, _arg1.stageY); _local2 = globalToLocal(_local2); var _local3:Number = (_local2.y - lastY); _local3 = (_local3 + y); if (_local3 < ymin){ _local3 = ymin; } else { if (_local3 > ymax){ _local3 = ymax; }; }; var _local4:ScrollBar = ScrollBar(parent); _local4.isScrolling = true; $y = _local3; var _local5:Number = _local4.scrollPosition; var _local6:Number = (Math.round((((datamax - datamin) * (y - ymin)) / (ymax - ymin))) + datamin); _local4.scrollPosition = _local6; _local4.dispatchScrollEvent(_local5, ScrollEventDetail.THUMB_TRACK); _arg1.updateAfterEvent(); } override mx_internal function buttonReleased():void{ super.buttonReleased(); stopDragThumb(); } private function stage_mouseMoveHandler(_arg1:MouseEvent):void{ if (_arg1.target != stage){ return; }; mouseMoveHandler(_arg1); } mx_internal function setRange(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):void{ this.ymin = _arg1; this.ymax = _arg2; this.datamin = _arg3; this.datamax = _arg4; } } }//package mx.controls.scrollClasses
Section 131
//Slider (mx.controls.sliderClasses.Slider) package mx.controls.sliderClasses { import flash.display.*; import flash.geom.*; import mx.core.*; import flash.events.*; import mx.events.*; import mx.styles.*; import mx.effects.*; import mx.formatters.*; public class Slider extends UIComponent { private var _enabled:Boolean; private var snapIntervalChanged:Boolean;// = false private var _direction:String;// = "horizontal" private var _thumbClass:Class; private var _labels:Array; public var allowTrackClick:Boolean;// = true private var valuesChanged:Boolean;// = false mx_internal var keyInteraction:Boolean;// = false private var directionChanged:Boolean;// = false private var enabledChanged:Boolean;// = false private var dataFormatter:NumberFormatter; private var track:IFlexDisplayObject; private var _values:Array; private var initValues:Boolean;// = true public var liveDragging:Boolean;// = false private var thumbs:UIComponent; private var _tickInterval:Number;// = 0 private var ticksChanged:Boolean;// = false private var minimumSet:Boolean;// = false private var ticks:UIComponent; private var _thumbCount:int;// = 1 private var labelObjects:UIComponent; public var allowThumbOverlap:Boolean;// = false private var snapIntervalPrecision:int;// = -1 mx_internal var dataTip:SliderDataTip; private var _snapInterval:Number;// = 0 private var thumbsChanged:Boolean;// = true private var _tabIndex:Number; private var _sliderDataTipClass:Class; private var tabIndexChanged:Boolean; private var _tickValues:Array; private var labelsChanged:Boolean;// = false private var interactionClickTarget:String; private var trackHighlightChanged:Boolean;// = true private var _minimum:Number;// = 0 public var showDataTip:Boolean;// = true mx_internal var innerSlider:UIComponent; private var labelStyleChanged:Boolean;// = false private var _dataTipFormatFunction:Function; private var trackHitArea:UIComponent; private var highlightTrack:IFlexDisplayObject; private var _maximum:Number;// = 10 mx_internal static const VERSION:String = "3.0.0.0"; mx_internal static var createAccessibilityImplementation:Function; public function Slider(){ _labels = []; _thumbClass = SliderThumb; _sliderDataTipClass = SliderDataTip; _tickValues = []; _values = [0, 0]; super(); tabChildren = true; } public function get sliderThumbClass():Class{ return (_thumbClass); } public function set sliderThumbClass(_arg1:Class):void{ _thumbClass = _arg1; thumbsChanged = true; invalidateProperties(); invalidateDisplayList(); } public function set tickInterval(_arg1:Number):void{ _tickInterval = _arg1; ticksChanged = true; invalidateProperties(); invalidateDisplayList(); } public function set direction(_arg1:String):void{ _direction = _arg1; directionChanged = true; invalidateProperties(); invalidateSize(); invalidateDisplayList(); } public function get minimum():Number{ return (_minimum); } override protected function commitProperties():void{ var _local1:int; var _local2:int; var _local3:Boolean; var _local4:int; var _local5:SliderLabel; var _local6:String; var _local7:Number; super.commitProperties(); if (trackHighlightChanged){ trackHighlightChanged = false; if (getStyle("showTrackHighlight")){ createHighlightTrack(); } else { if (highlightTrack){ innerSlider.removeChild(DisplayObject(highlightTrack)); highlightTrack = null; }; }; }; if (directionChanged){ directionChanged = false; _local3 = (_direction == SliderDirection.HORIZONTAL); if (_local3){ DisplayObject(innerSlider).rotation = 0; } else { DisplayObject(innerSlider).rotation = -90; innerSlider.y = unscaledHeight; }; if (labelObjects){ _local4 = (labelObjects.numChildren - 1); while (_local4 >= 0) { _local5 = SliderLabel(labelObjects.getChildAt(_local4)); _local5.rotation = (_local3) ? 0 : 90; _local4--; }; }; }; if (((labelStyleChanged) && (!(labelsChanged)))){ labelStyleChanged = false; if (labelObjects){ _local6 = getStyle("labelStyleName"); _local1 = labelObjects.numChildren; _local2 = 0; while (_local2 < _local1) { ISimpleStyleClient(labelObjects.getChildAt(_local2)).styleName = _local6; _local2++; }; }; }; if (ticksChanged){ ticksChanged = false; createTicks(); }; if (labelsChanged){ labelsChanged = false; createLabels(); }; if (thumbsChanged){ thumbsChanged = false; createThumbs(); }; if (initValues){ initValues = false; if (!valuesChanged){ _local7 = minimum; _local1 = _thumbCount; _local2 = 0; while (_local2 < _local1) { _values[_local2] = _local7; setValueAt(_local7, _local2); if (((_snapInterval) && (!((_snapInterval == 0))))){ _local7 = (_local7 + snapInterval); } else { _local7++; }; _local2++; }; snapIntervalChanged = false; }; }; if (snapIntervalChanged){ snapIntervalChanged = false; if (!valuesChanged){ _local1 = thumbs.numChildren; _local2 = 0; while (_local2 < _local1) { setValueAt(getValueFromX(SliderThumb(thumbs.getChildAt(_local2)).xPosition), _local2); _local2++; }; }; }; if (valuesChanged){ valuesChanged = false; _local1 = _thumbCount; _local2 = 0; while (_local2 < _local1) { setValueAt(getValueFromX(getXFromValue(Math.min(Math.max(values[_local2], minimum), maximum))), _local2); _local2++; }; }; if (enabledChanged){ enabledChanged = false; _local1 = thumbs.numChildren; _local2 = 0; while (_local2 < _local1) { SliderThumb(thumbs.getChildAt(_local2)).enabled = _enabled; _local2++; }; _local1 = (labelObjects) ? labelObjects.numChildren : 0; _local2 = 0; while (_local2 < _local1) { SliderLabel(labelObjects.getChildAt(_local2)).enabled = _enabled; _local2++; }; }; if (tabIndexChanged){ tabIndexChanged = false; _local1 = thumbs.numChildren; _local2 = 0; while (_local2 < _local1) { SliderThumb(thumbs.getChildAt(_local2)).tabIndex = _tabIndex; _local2++; }; }; } mx_internal function getSnapValue(_arg1:Number, _arg2:SliderThumb=null):Number{ var _local3:Number; var _local4:Boolean; var _local5:Object; var _local6:SliderThumb; var _local7:SliderThumb; if (((!(isNaN(_snapInterval))) && (!((_snapInterval == 0))))){ _local3 = getValueFromX(_arg1); if (((((_arg2) && ((thumbs.numChildren > 1)))) && (!(allowThumbOverlap)))){ _local4 = true; _local5 = getXBounds(_arg2.thumbIndex); _local6 = ((_arg2.thumbIndex > 0)) ? SliderThumb(thumbs.getChildAt((_arg2.thumbIndex - 1))) : null; _local7 = (((_arg2.thumbIndex + 1) < thumbs.numChildren)) ? SliderThumb(thumbs.getChildAt((_arg2.thumbIndex + 1))) : null; if (_local6){ _local5.min = (_local5.min - (_local6.width / 2)); if (_local3 == minimum){ if (getValueFromX((_local6.xPosition - (_local6.width / 2))) != minimum){ _local4 = false; }; }; } else { if (_local3 == minimum){ _local4 = false; }; }; if (_local7){ _local5.max = (_local5.max + (_local7.width / 2)); if (_local3 == maximum){ if (getValueFromX((_local7.xPosition + (_local7.width / 2))) != maximum){ _local4 = false; }; }; } else { if (_local3 == maximum){ _local4 = false; }; }; if (_local4){ _local3 = Math.min(Math.max(_local3, (getValueFromX(Math.round(_local5.min)) + _snapInterval)), (getValueFromX(Math.round(_local5.max)) - _snapInterval)); }; }; return (getXFromValue(_local3)); }; return (_arg1); } private function createHighlightTrack():void{ var _local2:Class; var _local1:Boolean = getStyle("showTrackHighlight"); if (((!(highlightTrack)) && (_local1))){ _local2 = getStyle("trackHighlightSkin"); highlightTrack = new (_local2); if ((highlightTrack is ISimpleStyleClient)){ ISimpleStyleClient(highlightTrack).styleName = this; }; innerSlider.addChildAt(DisplayObject(highlightTrack), (innerSlider.getChildIndex(DisplayObject(track)) + 1)); }; } mx_internal function drawTrackHighlight():void{ var _local1:Number; var _local2:Number; var _local3:SliderThumb; var _local4:SliderThumb; if (highlightTrack){ _local3 = SliderThumb(thumbs.getChildAt(0)); if (_thumbCount > 1){ _local1 = _local3.xPosition; _local4 = SliderThumb(thumbs.getChildAt(1)); _local2 = (_local4.xPosition - _local3.xPosition); } else { _local1 = track.x; _local2 = (_local3.xPosition - _local1); }; highlightTrack.move(_local1, (track.y + 1)); highlightTrack.setActualSize(((_local2 > 0)) ? _local2 : 0, highlightTrack.height); }; } mx_internal function getXBounds(_arg1:int):Object{ var _local2:Number = (track.x + track.width); var _local3:Number = track.x; if (allowThumbOverlap){ return ({max:_local2, min:_local3}); }; var _local4:Number = NaN; var _local5:Number = NaN; var _local6:SliderThumb = ((_arg1 > 0)) ? SliderThumb(thumbs.getChildAt((_arg1 - 1))) : null; var _local7:SliderThumb = (((_arg1 + 1) < thumbs.numChildren)) ? SliderThumb(thumbs.getChildAt((_arg1 + 1))) : null; if (_local6){ _local4 = (_local6.xPosition + (_local6.width / 2)); }; if (_local7){ _local5 = (_local7.xPosition - (_local7.width / 2)); }; if (isNaN(_local4)){ _local4 = _local3; } else { _local4 = Math.min(Math.max(_local3, _local4), _local2); }; if (isNaN(_local5)){ _local5 = _local2; } else { _local5 = Math.max(Math.min(_local2, _local5), _local3); }; return ({max:_local5, min:_local4}); } protected function get thumbStyleFilters():Object{ return (null); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local11:Number; var _local23:SliderLabel; var _local24:SliderLabel; var _local25:SliderThumb; super.updateDisplayList(_arg1, _arg2); var _local3 = (_direction == SliderDirection.HORIZONTAL); var _local4:int = (labelObjects) ? labelObjects.numChildren : 0; var _local5:int = (thumbs) ? thumbs.numChildren : 0; var _local6:Number = getStyle("trackMargin"); var _local7:Number = 6; var _local8:SliderThumb = SliderThumb(thumbs.getChildAt(0)); if (((thumbs) && (_local8))){ _local7 = _local8.getExplicitOrMeasuredWidth(); }; var _local9:Number = (_local7 / 2); var _local10:Number = _local9; var _local12:Number = 0; if (_local4 > 0){ _local23 = SliderLabel(labelObjects.getChildAt(0)); _local12 = (_local3) ? _local23.getExplicitOrMeasuredWidth() : _local23.getExplicitOrMeasuredHeight(); }; var _local13:Number = 0; if (_local4 > 1){ _local24 = SliderLabel(labelObjects.getChildAt((_local4 - 1))); _local13 = (_local3) ? _local24.getExplicitOrMeasuredWidth() : _local24.getExplicitOrMeasuredHeight(); }; if (!isNaN(_local6)){ _local11 = _local6; } else { _local11 = ((_local12 + _local13) / 2); }; if (_local4 > 0){ if (!isNaN(_local6)){ _local9 = Math.max(_local9, (_local11 / ((_local4 > 1)) ? 2 : 1)); } else { _local9 = Math.max(_local9, (_local12 / 2)); }; } else { _local9 = Math.max(_local9, (_local11 / 2)); }; var _local14:Object = getComponentBounds(); var _local15:Number = ((((_local3) ? _arg2 : _arg1 - (Number(_local14.lower) - Number(_local14.upper))) / 2) - Number(_local14.upper)); track.move(Math.round(_local9), Math.round(_local15)); track.setActualSize(((_local3) ? _arg1 : _arg2 - (_local9 * 2)), track.height); var _local16:Number = ((track.y + ((track.height - _local8.getExplicitOrMeasuredHeight()) / 2)) + getStyle("thumbOffset")); var _local17:int = _thumbCount; var _local18:int; while (_local18 < _local17) { _local25 = SliderThumb(thumbs.getChildAt(_local18)); SliderThumb(thumbs.getChildAt(_local18)).move(_local25.x, _local16); _local25.visible = true; _local25.setActualSize(_local25.getExplicitOrMeasuredWidth(), _local25.getExplicitOrMeasuredHeight()); _local18++; }; var _local19:Graphics = trackHitArea.graphics; var _local20:Number = 0; if ((((_tickInterval > 0)) || (((_tickValues) && ((_tickValues.length > 0)))))){ _local20 = getStyle("tickLength"); }; _local19.clear(); _local19.beginFill(0, 0); var _local21:Number = _local8.getExplicitOrMeasuredHeight(); var _local22:Number = (_local21) ? (_local21 / 2) : 0; _local19.drawRect(track.x, ((track.y - _local22) - _local20), track.width, ((track.height + _local21) + _local20)); _local19.endFill(); if (_direction != SliderDirection.HORIZONTAL){ innerSlider.y = _arg2; }; layoutTicks(); layoutLabels(); setPosFromValue(); drawTrackHighlight(); } override protected function createChildren():void{ super.createChildren(); if (!innerSlider){ innerSlider = new UIComponent(); UIComponent(innerSlider).tabChildren = true; addChild(innerSlider); }; createBackgroundTrack(); if (!trackHitArea){ trackHitArea = new UIComponent(); innerSlider.addChild(trackHitArea); trackHitArea.addEventListener(MouseEvent.MOUSE_DOWN, track_mouseDownHandler); }; invalidateProperties(); } public function set minimum(_arg1:Number):void{ _minimum = _arg1; ticksChanged = true; if (!initValues){ valuesChanged = true; }; invalidateProperties(); invalidateDisplayList(); } public function get tickValues():Array{ return (_tickValues); } public function get maximum():Number{ return (_maximum); } private function createBackgroundTrack():void{ var _local1:Class; if (!track){ _local1 = getStyle("trackSkin"); track = new (_local1); if ((track is ISimpleStyleClient)){ ISimpleStyleClient(track).styleName = this; }; innerSlider.addChildAt(DisplayObject(track), 0); }; } private function positionDataTip(_arg1:Object):void{ var _local2:Number; var _local3:Number; var _local4:Number = _arg1.x; var _local5:Number = _arg1.y; var _local6:String = getStyle("dataTipPlacement"); var _local7:Number = getStyle("dataTipOffset"); if (_direction == SliderDirection.HORIZONTAL){ _local2 = _local4; _local3 = _local5; if (_local6 == "left"){ _local2 = (_local2 - (_local7 + dataTip.width)); _local3 = (_local3 + ((_arg1.height - dataTip.height) / 2)); } else { if (_local6 == "right"){ _local2 = (_local2 + (_local7 + _arg1.width)); _local3 = (_local3 + ((_arg1.height - dataTip.height) / 2)); } else { if (_local6 == "top"){ _local3 = (_local3 - (_local7 + dataTip.height)); _local2 = (_local2 - ((dataTip.width - _arg1.width) / 2)); } else { if (_local6 == "bottom"){ _local3 = (_local3 + (_local7 + _arg1.height)); _local2 = (_local2 - ((dataTip.width - _arg1.width) / 2)); }; }; }; }; } else { _local2 = _local5; _local3 = ((unscaledHeight - _local4) - ((dataTip.height + _arg1.width) / 2)); if (_local6 == "left"){ _local2 = (_local2 - (_local7 + dataTip.width)); } else { if (_local6 == "right"){ _local2 = (_local2 + (_local7 + _arg1.height)); } else { if (_local6 == "top"){ _local3 = (_local3 - (_local7 + ((dataTip.height + _arg1.width) / 2))); _local2 = (_local2 - ((dataTip.width - _arg1.height) / 2)); } else { if (_local6 == "bottom"){ _local3 = (_local3 + (_local7 + ((dataTip.height + _arg1.width) / 2))); _local2 = (_local2 - ((dataTip.width - _arg1.height) / 2)); }; }; }; }; }; var _local8:Point = new Point(_local2, _local3); var _local9:Point = localToGlobal(_local8); dataTip.x = ((_local9.x < 0)) ? 0 : _local9.x; dataTip.y = ((_local9.y < 0)) ? 0 : _local9.y; } public function get values():Array{ return (_values); } private function createLabels():void{ var _local1:SliderLabel; var _local2:int; var _local3:int; var _local4:int; var _local5:String; if (labelObjects){ _local2 = (labelObjects.numChildren - 1); while (_local2 >= 0) { labelObjects.removeChildAt(_local2); _local2--; }; } else { labelObjects = new UIComponent(); innerSlider.addChildAt(labelObjects, innerSlider.getChildIndex(trackHitArea)); }; if (_labels){ _local3 = _labels.length; _local4 = 0; while (_local4 < _local3) { _local1 = new SliderLabel(); _local1.text = ((_labels[_local4] is String)) ? _labels[_local4] : _labels[_local4].toString(); if (_direction != SliderDirection.HORIZONTAL){ _local1.rotation = 90; }; _local5 = getStyle("labelStyleName"); if (_local5){ _local1.styleName = _local5; }; labelObjects.addChild(_local1); _local4++; }; }; } private function destroyDataTip():void{ if (dataTip){ systemManager.toolTipChildren.removeChild(dataTip); dataTip = null; }; } private function setValueFromPos(_arg1:int):void{ var _local2:SliderThumb = SliderThumb(thumbs.getChildAt(_arg1)); setValueAt(getValueFromX(_local2.xPosition), _arg1); } public function set tickValues(_arg1:Array):void{ _tickValues = _arg1; ticksChanged = true; invalidateProperties(); invalidateDisplayList(); } override public function get enabled():Boolean{ return (_enabled); } public function set values(_arg1:Array):void{ _values = _arg1; valuesChanged = true; minimumSet = true; invalidateProperties(); invalidateDisplayList(); } mx_internal function getXFromValue(_arg1:Number):Number{ var _local2:Number; if (_arg1 == minimum){ _local2 = track.x; } else { if (_arg1 == maximum){ _local2 = (track.x + track.width); } else { _local2 = (track.x + (((_arg1 - minimum) * track.width) / (maximum - minimum))); }; }; return (_local2); } public function set maximum(_arg1:Number):void{ _maximum = _arg1; ticksChanged = true; if (!initValues){ valuesChanged = true; }; invalidateProperties(); invalidateDisplayList(); } mx_internal function onThumbPress(_arg1:Object):void{ var _local3:String; var _local4:String; if (showDataTip){ dataFormatter = new NumberFormatter(); dataFormatter.precision = getStyle("dataTipPrecision"); if (!dataTip){ dataTip = SliderDataTip(new sliderDataTipClass()); systemManager.toolTipChildren.addChild(dataTip); _local4 = getStyle("dataTipStyleName"); if (_local4){ dataTip.styleName = _local4; }; }; if (_dataTipFormatFunction != null){ _local3 = this._dataTipFormatFunction(getValueFromX(_arg1.xPosition)); } else { _local3 = dataFormatter.format(getValueFromX(_arg1.xPosition)); }; dataTip.text = _local3; dataTip.validateNow(); dataTip.setActualSize(dataTip.getExplicitOrMeasuredWidth(), dataTip.getExplicitOrMeasuredHeight()); positionDataTip(_arg1); }; keyInteraction = false; var _local2:SliderEvent = new SliderEvent(SliderEvent.THUMB_PRESS); _local2.value = getValueFromX(_arg1.xPosition); _local2.thumbIndex = _arg1.thumbIndex; dispatchEvent(_local2); } public function setThumbValueAt(_arg1:int, _arg2:Number):void{ setValueAt(_arg2, _arg1, true); valuesChanged = true; invalidateProperties(); invalidateDisplayList(); } public function set snapInterval(_arg1:Number):void{ _snapInterval = _arg1; var _local2:Array = new String((1 + _arg1)).split("."); if (_local2.length == 2){ snapIntervalPrecision = _local2[1].length; } else { snapIntervalPrecision = -1; }; if (((!(isNaN(_arg1))) && (!((_arg1 == 0))))){ snapIntervalChanged = true; invalidateProperties(); invalidateDisplayList(); }; } mx_internal function unRegisterMouseMove(_arg1:Function):void{ innerSlider.removeEventListener(MouseEvent.MOUSE_MOVE, _arg1); } mx_internal function getTrackHitArea():UIComponent{ return (trackHitArea); } private function layoutTicks():void{ var _local1:Graphics; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Boolean; var _local9:int; var _local10:Number; if (ticks){ _local1 = ticks.graphics; _local2 = getStyle("tickLength"); _local3 = getStyle("tickOffset"); _local4 = getStyle("tickThickness"); _local5 = (_local4 / 2); _local7 = getStyle("tickColor"); _local8 = (((_tickValues) && ((_tickValues.length > 0)))) ? true : false; _local9 = 0; _local10 = (_local8) ? var _temp1 = _local9; _local9 = (_local9 + 1); _tickValues[_temp1] : minimum; _local1.clear(); if ((((_tickInterval > 0)) || (_local8))){ _local1.lineStyle(_local4, _local7, 100); do { _local6 = Math.round((getXFromValue(_local10) - _local5)); _local1.moveTo(_local6, _local2); _local1.lineTo(_local6, 0); _local10 = (_local8) ? ((_local9 < _tickValues.length)) ? var _temp2 = _local9; _local9 = (_local9 + 1); _tickValues[_temp2] : NaN : (_tickInterval + _local10); } while ((((_local10 < maximum)) || (((_local8) && ((_local9 < _tickValues.length)))))); if (((!(_local8)) || ((_local10 == maximum)))){ _local6 = (((track.x + track.width) - 1) - _local5); _local1.moveTo(_local6, _local2); _local1.lineTo(_local6, 0); }; ticks.y = Math.round(((track.y + _local3) - _local2)); }; }; } public function getThumbAt(_arg1:int):SliderThumb{ return (((((_arg1 >= 0)) && ((_arg1 < thumbs.numChildren)))) ? SliderThumb(thumbs.getChildAt(_arg1)) : null); } private function setPosFromValue():void{ var _local3:SliderThumb; var _local1:int = _thumbCount; var _local2:int; while (_local2 < _local1) { _local3 = SliderThumb(thumbs.getChildAt(_local2)); _local3.xPosition = getXFromValue(values[_local2]); _local2++; }; } private function createThumbs():void{ var _local1:int; var _local2:int; var _local3:SliderThumb; if (thumbs){ _local1 = thumbs.numChildren; _local2 = (_local1 - 1); while (_local2 >= 0) { thumbs.removeChildAt(_local2); _local2--; }; } else { thumbs = new UIComponent(); thumbs.tabChildren = true; thumbs.tabEnabled = false; innerSlider.addChild(thumbs); }; _local1 = _thumbCount; _local2 = 0; while (_local2 < _local1) { _local3 = SliderThumb(new _thumbClass()); _local3.owner = this; _local3.styleName = new StyleProxy(this, thumbStyleFilters); _local3.thumbIndex = _local2; _local3.visible = true; _local3.enabled = enabled; _local3.upSkinName = "thumbUpSkin"; _local3.downSkinName = "thumbDownSkin"; _local3.disabledSkinName = "thumbDisabledSkin"; _local3.overSkinName = "thumbOverSkin"; _local3.skinName = "thumbSkin"; thumbs.addChild(_local3); _local3.addEventListener(FocusEvent.FOCUS_IN, thumb_focusInHandler); _local3.addEventListener(FocusEvent.FOCUS_OUT, thumb_focusOutHandler); _local2++; }; } override public function set tabIndex(_arg1:int):void{ super.tabIndex = _arg1; _tabIndex = _arg1; tabIndexChanged = true; invalidateProperties(); } public function get direction():String{ return (_direction); } override public function set enabled(_arg1:Boolean):void{ _enabled = _arg1; enabledChanged = true; invalidateProperties(); } override protected function measure():void{ var _local1:Boolean; var _local6:Number; super.measure(); _local1 = (direction == SliderDirection.HORIZONTAL); var _local2:int = (labelObjects) ? labelObjects.numChildren : 0; var _local3:Number = getStyle("trackMargin"); var _local4:Number = DEFAULT_MEASURED_WIDTH; if (!isNaN(_local3)){ if (_local2 > 0){ _local4 = (_local4 + (_local1) ? (SliderLabel(labelObjects.getChildAt(0)).getExplicitOrMeasuredWidth() / 2) : (SliderLabel(labelObjects.getChildAt(0)).getExplicitOrMeasuredHeight() / 2)); }; if (_local2 > 1){ _local4 = (_local4 + (_local1) ? (SliderLabel(labelObjects.getChildAt((_local2 - 1))).getExplicitOrMeasuredWidth() / 2) : (SliderLabel(labelObjects.getChildAt((_local2 - 1))).getExplicitOrMeasuredHeight() / 2)); }; }; var _local5:Object = getComponentBounds(); _local6 = (_local5.lower - _local5.upper); measuredMinWidth = (measuredWidth = (_local1) ? _local4 : _local6); measuredMinHeight = (measuredHeight = (_local1) ? _local6 : _local4); } public function get value():Number{ return (_values[0]); } public function get tickInterval():Number{ return (_tickInterval); } override public function get baselinePosition():Number{ if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ return (super.baselinePosition); }; if (!validateBaselinePosition()){ return (NaN); }; return (int((0.75 * height))); } mx_internal function getSnapIntervalWidth():Number{ return (((_snapInterval * track.width) / (maximum - minimum))); } private function thumb_focusOutHandler(_arg1:FocusEvent):void{ dispatchEvent(_arg1); } override protected function initializeAccessibility():void{ if (Slider.createAccessibilityImplementation != null){ Slider.createAccessibilityImplementation(this); }; } public function get snapInterval():Number{ return (_snapInterval); } public function set thumbCount(_arg1:int):void{ var _local2:int = ((_arg1)>2) ? 2 : _arg1; _local2 = ((_arg1 < 1)) ? 1 : _arg1; if (_local2 != _thumbCount){ _thumbCount = _local2; thumbsChanged = true; initValues = true; invalidateProperties(); invalidateDisplayList(); }; } mx_internal function registerMouseMove(_arg1:Function):void{ innerSlider.addEventListener(MouseEvent.MOUSE_MOVE, _arg1); } public function set dataTipFormatFunction(_arg1:Function):void{ _dataTipFormatFunction = _arg1; } override public function styleChanged(_arg1:String):void{ var _local2:Boolean = (((_arg1 == null)) || ((_arg1 == "styleName"))); super.styleChanged(_arg1); if ((((_arg1 == "showTrackHighlight")) || (_local2))){ trackHighlightChanged = true; invalidateProperties(); }; if ((((_arg1 == "trackHighlightSkin")) || (_local2))){ if (((innerSlider) && (highlightTrack))){ innerSlider.removeChild(DisplayObject(highlightTrack)); highlightTrack = null; }; trackHighlightChanged = true; invalidateProperties(); }; if ((((_arg1 == "labelStyleName")) || (_local2))){ labelStyleChanged = true; invalidateProperties(); }; if ((((_arg1 == "trackMargin")) || (_local2))){ invalidateSize(); }; if ((((_arg1 == "trackSkin")) || (_local2))){ if (track){ innerSlider.removeChild(DisplayObject(track)); track = null; createBackgroundTrack(); }; }; invalidateDisplayList(); } public function set sliderDataTipClass(_arg1:Class):void{ _sliderDataTipClass = _arg1; invalidateProperties(); } mx_internal function onThumbMove(_arg1:Object):void{ var _local2:Number = getValueFromX(_arg1.xPosition); if (showDataTip){ dataTip.text = ((_dataTipFormatFunction)!=null) ? _dataTipFormatFunction(_local2) : dataFormatter.format(_local2); dataTip.setActualSize(dataTip.getExplicitOrMeasuredWidth(), dataTip.getExplicitOrMeasuredHeight()); positionDataTip(_arg1); }; if (liveDragging){ interactionClickTarget = SliderEventClickTarget.THUMB; setValueAt(_local2, _arg1.thumbIndex); }; var _local3:SliderEvent = new SliderEvent(SliderEvent.THUMB_DRAG); _local3.value = _local2; _local3.thumbIndex = _arg1.thumbIndex; dispatchEvent(_local3); } private function layoutLabels():void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Object; var _local7:int; var _local8:Number; var _local9:Number; var _local1:Number = (labelObjects) ? labelObjects.numChildren : 0; if (_local1 > 0){ _local3 = (track.width / (_local1 - 1)); _local2 = Math.max((((_direction == SliderDirection.HORIZONTAL)) ? unscaledWidth : unscaledHeight - track.width), SliderThumb(thumbs.getChildAt(0)).getExplicitOrMeasuredWidth()); _local5 = track.x; _local7 = 0; while (_local7 < _local1) { _local6 = labelObjects.getChildAt(_local7); labelObjects.getChildAt(_local7).setActualSize(_local6.getExplicitOrMeasuredWidth(), _local6.getExplicitOrMeasuredHeight()); _local8 = ((track.y - _local6.height) + getStyle("labelOffset")); if (_direction == SliderDirection.HORIZONTAL){ _local4 = (_local6.getExplicitOrMeasuredWidth() / 2); if (_local7 == 0){ _local4 = Math.min(_local4, (_local2 / ((_local1 > Number(1))) ? Number(2) : Number(1))); } else { if (_local7 == (_local1 - 1)){ _local4 = Math.max(_local4, (_local6.getExplicitOrMeasuredWidth() - (_local2 / 2))); }; }; _local6.move((_local5 - _local4), _local8); } else { _local9 = getStyle("labelOffset"); _local4 = (_local6.getExplicitOrMeasuredHeight() / 2); if (_local7 == 0){ _local4 = Math.max(_local4, (_local6.getExplicitOrMeasuredHeight() - (_local2 / ((_local1 > Number(1))) ? Number(2) : Number(1)))); } else { if (_local7 == (_local1 - 1)){ _local4 = Math.min(_local4, (_local2 / 2)); }; }; _local6.move((_local5 + _local4), ((track.y + _local9) + ((_local9 > 0)) ? 0 : -(_local6.getExplicitOrMeasuredWidth()))); }; _local5 = (_local5 + _local3); _local7++; }; }; } public function get thumbCount():int{ return (_thumbCount); } private function getComponentBounds():Object{ var _local3:Number; var _local5:Number; var _local8:SliderLabel; var _local9:Number; var _local10:int; var _local11:Number; var _local12:Number; var _local1 = (direction == SliderDirection.HORIZONTAL); var _local2:int = (labelObjects) ? labelObjects.numChildren : 0; var _local4:Number = 0; var _local6:Number = 0; var _local7:Number = track.height; if (_local2 > 0){ _local8 = SliderLabel(labelObjects.getChildAt(0)); if (_local1){ _local4 = _local8.getExplicitOrMeasuredHeight(); } else { _local10 = 0; while (_local10 < _local2) { _local8 = SliderLabel(labelObjects.getChildAt(_local10)); _local4 = Math.max(_local4, _local8.getExplicitOrMeasuredWidth()); _local10++; }; }; _local9 = getStyle("labelOffset"); _local3 = (getStyle("labelOffset") - ((_local9 > 0)) ? 0 : _local4); _local6 = Math.min(_local6, _local3); _local7 = Math.max(_local7, (_local9 + ((_local9 > 0)) ? _local4 : 0)); }; if (ticks){ _local11 = getStyle("tickLength"); _local12 = getStyle("tickOffset"); _local6 = Math.min(_local6, (_local12 - _local11)); _local7 = Math.max(_local7, _local12); }; if (thumbs.numChildren > 0){ _local5 = (((track.height - SliderThumb(thumbs.getChildAt(0)).getExplicitOrMeasuredHeight()) / 2) + getStyle("thumbOffset")); _local6 = Math.min(_local6, _local5); _local7 = Math.max(_local7, (_local5 + SliderThumb(thumbs.getChildAt(0)).getExplicitOrMeasuredHeight())); }; return ({lower:_local7, upper:_local6}); } mx_internal function onThumbRelease(_arg1:Object):void{ interactionClickTarget = SliderEventClickTarget.THUMB; destroyDataTip(); setValueFromPos(_arg1.thumbIndex); dataFormatter = null; var _local2:SliderEvent = new SliderEvent(SliderEvent.THUMB_RELEASE); _local2.value = getValueFromX(_arg1.xPosition); _local2.thumbIndex = _arg1.thumbIndex; dispatchEvent(_local2); } public function get dataTipFormatFunction():Function{ return (_dataTipFormatFunction); } public function set value(_arg1:Number):void{ setValueAt(_arg1, 0, true); valuesChanged = true; minimumSet = true; invalidateProperties(); invalidateDisplayList(); dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT)); } mx_internal function updateThumbValue(_arg1:int):void{ setValueFromPos(_arg1); } private function track_mouseDownHandler(_arg1:MouseEvent):void{ var _local2:Point; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:int; var _local7:int; var _local8:SliderThumb; var _local9:Number; var _local10:Tween; var _local11:Function; var _local12:Number; if (((!((_arg1.target == trackHitArea))) && (!((_arg1.target == ticks))))){ return; }; if (((enabled) && (allowTrackClick))){ interactionClickTarget = SliderEventClickTarget.TRACK; keyInteraction = false; _local2 = new Point(_arg1.localX, _arg1.localY); _local3 = _local2.x; _local4 = 0; _local5 = 10000000; _local6 = _thumbCount; _local7 = 0; while (_local7 < _local6) { _local12 = Math.abs((SliderThumb(thumbs.getChildAt(_local7)).xPosition - _local3)); if (_local12 < _local5){ _local4 = _local7; _local5 = _local12; }; _local7++; }; _local8 = SliderThumb(thumbs.getChildAt(_local4)); if (((!(isNaN(_snapInterval))) && (!((_snapInterval == 0))))){ _local3 = getXFromValue(getValueFromX(_local3)); }; _local9 = getStyle("slideDuration"); _local10 = new Tween(_local8, _local8.xPosition, _local3, _local9); _local11 = (getStyle("slideEasingFunction") as Function); if (_local11 != null){ _local10.easingFunction = _local11; }; drawTrackHighlight(); }; } public function get sliderDataTipClass():Class{ return (_sliderDataTipClass); } private function createTicks():void{ if (!ticks){ ticks = new UIComponent(); innerSlider.addChild(ticks); }; } mx_internal function getValueFromX(_arg1:Number):Number{ var _local2:Number = ((((_arg1 - track.x) * (maximum - minimum)) / track.width) + minimum); if ((_local2 - minimum) <= 0.002){ _local2 = minimum; } else { if ((maximum - _local2) <= 0.002){ _local2 = maximum; } else { if (((!(isNaN(_snapInterval))) && (!((_snapInterval == 0))))){ _local2 = ((Math.round(((_local2 - minimum) / _snapInterval)) * _snapInterval) + minimum); }; }; }; return (_local2); } private function thumb_focusInHandler(_arg1:FocusEvent):void{ dispatchEvent(_arg1); } private function setValueAt(_arg1:Number, _arg2:int, _arg3:Boolean=false):void{ var _local5:Number; var _local6:SliderEvent; var _local4:Number = _values[_arg2]; if (snapIntervalPrecision != -1){ _local5 = Math.pow(10, snapIntervalPrecision); _arg1 = (Math.round((_arg1 * _local5)) / _local5); }; _values[_arg2] = _arg1; if (!_arg3){ _local6 = new SliderEvent(SliderEvent.CHANGE); _local6.value = _arg1; _local6.thumbIndex = _arg2; _local6.clickTarget = interactionClickTarget; if (keyInteraction){ _local6.triggerEvent = new KeyboardEvent(KeyboardEvent.KEY_DOWN); keyInteraction = false; } else { _local6.triggerEvent = new MouseEvent(MouseEvent.CLICK); }; if (((!(isNaN(_local4))) && ((Math.abs((_local4 - _arg1)) > 0.002)))){ dispatchEvent(_local6); }; }; invalidateDisplayList(); } public function set labels(_arg1:Array):void{ _labels = _arg1; labelsChanged = true; invalidateProperties(); invalidateSize(); invalidateDisplayList(); } public function get labels():Array{ return (_labels); } } }//package mx.controls.sliderClasses
Section 132
//SliderDataTip (mx.controls.sliderClasses.SliderDataTip) package mx.controls.sliderClasses { import mx.controls.*; public class SliderDataTip extends ToolTip { mx_internal static const VERSION:String = "3.0.0.0"; } }//package mx.controls.sliderClasses
Section 133
//SliderDirection (mx.controls.sliderClasses.SliderDirection) package mx.controls.sliderClasses { public final class SliderDirection { public static const HORIZONTAL:String = "horizontal"; public static const VERTICAL:String = "vertical"; mx_internal static const VERSION:String = "3.0.0.0"; } }//package mx.controls.sliderClasses
Section 134
//SliderLabel (mx.controls.sliderClasses.SliderLabel) package mx.controls.sliderClasses { import mx.controls.*; public class SliderLabel extends Label { mx_internal static const VERSION:String = "3.0.0.0"; override mx_internal function getMinimumText(_arg1:String):String{ if (((!(_arg1)) || ((_arg1.length < 1)))){ _arg1 = "W"; }; return (_arg1); } } }//package mx.controls.sliderClasses
Section 135
//SliderThumb (mx.controls.sliderClasses.SliderThumb) package mx.controls.sliderClasses { import flash.geom.*; import flash.events.*; import mx.controls.*; import flash.ui.*; public class SliderThumb extends Button { private var xOffset:Number; mx_internal var thumbIndex:int; mx_internal static const VERSION:String = "3.0.0.0"; public function SliderThumb(){ stickyHighlighting = true; } public function get xPosition():Number{ return (($x + (width / 2))); } public function set xPosition(_arg1:Number):void{ $x = (_arg1 - (width / 2)); Slider(owner).drawTrackHighlight(); } override protected function mouseDownHandler(_arg1:MouseEvent):void{ super.mouseDownHandler(_arg1); if (enabled){ xOffset = _arg1.localX; systemManager.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true); stage.addEventListener(MouseEvent.MOUSE_MOVE, stage_mouseMoveHandler); Slider(owner).onThumbPress(this); }; } private function stage_mouseMoveHandler(_arg1:MouseEvent):void{ if (_arg1.target != stage){ return; }; mouseMoveHandler(_arg1); } mx_internal function onTweenEnd(_arg1:Number):void{ moveXPos(_arg1); } private function updateValue():void{ Slider(owner).updateThumbValue(thumbIndex); } private function calculateXPos(_arg1:Number, _arg2:Boolean=false):Number{ var _local3:Object = Slider(owner).getXBounds(thumbIndex); var _local4:Number = Math.min(Math.max(_arg1, _local3.min), _local3.max); if (!_arg2){ _local4 = Slider(owner).getSnapValue(_local4, this); }; return (_local4); } private function mouseMoveHandler(_arg1:MouseEvent):void{ var _local2:Point; if (enabled){ _local2 = new Point(_arg1.stageX, _arg1.stageY); _local2 = Slider(owner).innerSlider.globalToLocal(_local2); moveXPos(((_local2.x - xOffset) + (width / 2)), false, true); Slider(owner).onThumbMove(this); }; } private function moveXPos(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):Number{ var _local4:Number = calculateXPos(_arg1, _arg2); xPosition = _local4; if (!_arg3){ updateValue(); }; return (_local4); } override mx_internal function buttonReleased():void{ super.buttonReleased(); if (enabled){ systemManager.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true); stage.removeEventListener(MouseEvent.MOUSE_MOVE, stage_mouseMoveHandler); Slider(owner).onThumbRelease(this); }; } override public function set x(_arg1:Number):void{ var _local2:Number = moveXPos(_arg1); updateValue(); super.x = _local2; } override public function drawFocus(_arg1:Boolean):void{ phase = (_arg1) ? ButtonPhase.DOWN : ButtonPhase.UP; } mx_internal function onTweenUpdate(_arg1:Number):void{ moveXPos(_arg1, true, true); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ var _local6:Number; var _local2 = (Slider(owner).thumbCount > 1); var _local3:Number = xPosition; var _local4:Number = ((Slider(owner).snapInterval > 0)) ? Slider(owner).getSnapIntervalWidth() : 1; var _local5 = (Slider(owner).direction == SliderDirection.HORIZONTAL); if ((((((_arg1.keyCode == Keyboard.DOWN)) && (!(_local5)))) || ((((_arg1.keyCode == Keyboard.LEFT)) && (_local5))))){ _local6 = (_local3 - _local4); } else { if ((((((_arg1.keyCode == Keyboard.UP)) && (!(_local5)))) || ((((_arg1.keyCode == Keyboard.RIGHT)) && (_local5))))){ _local6 = (_local3 + _local4); } else { if ((((((_arg1.keyCode == Keyboard.PAGE_DOWN)) && (!(_local5)))) || ((((_arg1.keyCode == Keyboard.HOME)) && (_local5))))){ _local6 = Slider(owner).getXFromValue(Slider(owner).minimum); } else { if ((((((_arg1.keyCode == Keyboard.PAGE_UP)) && (!(_local5)))) || ((((_arg1.keyCode == Keyboard.END)) && (_local5))))){ _local6 = Slider(owner).getXFromValue(Slider(owner).maximum); }; }; }; }; if (!isNaN(_local6)){ _arg1.stopPropagation(); Slider(owner).keyInteraction = true; moveXPos(_local6); }; } override protected function measure():void{ super.measure(); measuredWidth = 12; measuredHeight = 12; } } }//package mx.controls.sliderClasses
Section 136
//Button (mx.controls.Button) package mx.controls { import flash.display.*; import flash.text.*; import mx.core.*; import mx.managers.*; import flash.events.*; import mx.events.*; import mx.styles.*; import mx.controls.listClasses.*; import flash.utils.*; import flash.ui.*; import mx.controls.dataGridClasses.*; public class Button extends UIComponent implements IDataRenderer, IDropInListItemRenderer, IFocusManagerComponent, IListItemRenderer, IFontContextComponent, IButton { mx_internal var _emphasized:Boolean;// = false mx_internal var extraSpacing:Number; private var icons:Array; public var selectedField:String;// = null private var labelChanged:Boolean;// = false private var skinMeasuredWidth:Number; mx_internal var checkedDefaultSkin:Boolean;// = false private var autoRepeatTimer:Timer; mx_internal var disabledIconName:String;// = "disabledIcon" mx_internal var disabledSkinName:String;// = "disabledSkin" mx_internal var checkedDefaultIcon:Boolean;// = false public var stickyHighlighting:Boolean;// = false private var enabledChanged:Boolean;// = false mx_internal var selectedUpIconName:String;// = "selectedUpIcon" mx_internal var selectedUpSkinName:String;// = "selectedUpSkin" mx_internal var upIconName:String;// = "upIcon" mx_internal var upSkinName:String;// = "upSkin" mx_internal var centerContent:Boolean;// = true mx_internal var buttonOffset:Number;// = 0 private var skinMeasuredHeight:Number; private var oldUnscaledWidth:Number; mx_internal var downIconName:String;// = "downIcon" mx_internal var _labelPlacement:String;// = "right" mx_internal var downSkinName:String;// = "downSkin" mx_internal var _toggle:Boolean;// = false private var _phase:String;// = "up" private var toolTipSet:Boolean;// = false private var _data:Object; mx_internal var currentIcon:IFlexDisplayObject; mx_internal var currentSkin:IFlexDisplayObject; mx_internal var overIconName:String;// = "overIcon" mx_internal var selectedDownIconName:String;// = "selectedDownIcon" mx_internal var overSkinName:String;// = "overSkin" mx_internal var iconName:String;// = "icon" mx_internal var skinName:String;// = "skin" mx_internal var selectedDownSkinName:String;// = "selectedDownSkin" private var skins:Array; private var selectedSet:Boolean; private var _autoRepeat:Boolean;// = false private var styleChangedFlag:Boolean;// = true mx_internal var selectedOverIconName:String;// = "selectedOverIcon" private var _listData:BaseListData; mx_internal var selectedOverSkinName:String;// = "selectedOverSkin" protected var textField:IUITextField; private var labelSet:Boolean; mx_internal var defaultIconUsesStates:Boolean;// = false mx_internal var defaultSkinUsesStates:Boolean;// = false mx_internal var toggleChanged:Boolean;// = false private var emphasizedChanged:Boolean;// = false private var _label:String;// = "" mx_internal var _selected:Boolean;// = false mx_internal var selectedDisabledIconName:String;// = "selectedDisabledIcon" mx_internal var selectedDisabledSkinName:String;// = "selectedDisabledSkin" mx_internal static const VERSION:String = "3.0.0.0"; mx_internal static var createAccessibilityImplementation:Function; mx_internal static var TEXT_WIDTH_PADDING:Number = (UITextField.TEXT_WIDTH_PADDING + 1); public function Button(){ skins = []; icons = []; extraSpacing = (10 + 10); super(); mouseChildren = false; addEventListener(MouseEvent.ROLL_OVER, rollOverHandler); addEventListener(MouseEvent.ROLL_OUT, rollOutHandler); addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); addEventListener(MouseEvent.CLICK, clickHandler); } private function previousVersion_measure():void{ var bm:EdgeMetrics; var lineMetrics:TextLineMetrics; var paddingLeft:Number; var paddingRight:Number; var paddingTop:Number; var paddingBottom:Number; var horizontalGap:Number; super.measure(); var textWidth:Number = 0; var textHeight:Number = 0; if (label){ lineMetrics = measureText(label); textWidth = lineMetrics.width; textHeight = lineMetrics.height; paddingLeft = getStyle("paddingLeft"); paddingRight = getStyle("paddingRight"); paddingTop = getStyle("paddingTop"); paddingBottom = getStyle("paddingBottom"); textWidth = (textWidth + ((paddingLeft + paddingRight) + getStyle("textIndent"))); textHeight = (textHeight + (paddingTop + paddingBottom)); }; try { bm = currentSkin["borderMetrics"]; } catch(e:Error) { bm = new EdgeMetrics(3, 3, 3, 3); }; var tempCurrentIcon:IFlexDisplayObject = getCurrentIcon(); var iconWidth:Number = (tempCurrentIcon) ? tempCurrentIcon.width : 0; var iconHeight:Number = (tempCurrentIcon) ? tempCurrentIcon.height : 0; var w:Number = 0; var h:Number = 0; if ((((labelPlacement == ButtonLabelPlacement.LEFT)) || ((labelPlacement == ButtonLabelPlacement.RIGHT)))){ w = (textWidth + iconWidth); if (iconWidth != 0){ horizontalGap = getStyle("horizontalGap"); w = (w + (horizontalGap - 2)); }; h = Math.max(textHeight, (iconHeight + 6)); } else { w = Math.max(textWidth, iconWidth); h = (textHeight + iconHeight); if (iconHeight != 0){ h = (h + getStyle("verticalGap")); }; }; if (bm){ w = (w + (bm.left + bm.right)); h = (h + (bm.top + bm.bottom)); }; if (((label) && (!((label.length == 0))))){ w = (w + extraSpacing); } else { w = (w + 6); }; if (((currentSkin) && (((isNaN(skinMeasuredWidth)) || (isNaN(skinMeasuredHeight)))))){ skinMeasuredWidth = currentSkin.measuredWidth; skinMeasuredHeight = currentSkin.measuredHeight; }; if (!isNaN(skinMeasuredWidth)){ w = Math.max(skinMeasuredWidth, w); }; if (!isNaN(skinMeasuredHeight)){ h = Math.max(skinMeasuredHeight, h); }; measuredMinWidth = (measuredWidth = w); measuredMinHeight = (measuredHeight = h); } public function get label():String{ return (_label); } mx_internal function getCurrentIconName():String{ var _local1:String; if (!enabled){ _local1 = (selected) ? selectedDisabledIconName : disabledIconName; } else { if (phase == ButtonPhase.UP){ _local1 = (selected) ? selectedUpIconName : upIconName; } else { if (phase == ButtonPhase.OVER){ _local1 = (selected) ? selectedOverIconName : overIconName; } else { if (phase == ButtonPhase.DOWN){ _local1 = (selected) ? selectedDownIconName : downIconName; }; }; }; }; return (_local1); } protected function mouseUpHandler(_arg1:MouseEvent):void{ if (!enabled){ return; }; phase = ButtonPhase.OVER; buttonReleased(); if (!toggle){ _arg1.updateAfterEvent(); }; } override protected function adjustFocusRect(_arg1:DisplayObject=null):void{ super.adjustFocusRect((currentSkin) ? this : DisplayObject(currentIcon)); } mx_internal function set phase(_arg1:String):void{ _phase = _arg1; invalidateSize(); invalidateDisplayList(); } mx_internal function viewIconForPhase(_arg1:String):IFlexDisplayObject{ var _local3:IFlexDisplayObject; var _local4:Boolean; var _local5:String; var _local2:Class = Class(getStyle(_arg1)); if (!_local2){ _local2 = Class(getStyle(iconName)); if (defaultIconUsesStates){ _arg1 = iconName; }; if (((!(checkedDefaultIcon)) && (_local2))){ _local3 = IFlexDisplayObject(new (_local2)); if (((!((_local3 is IProgrammaticSkin))) && ((_local3 is IStateClient)))){ defaultIconUsesStates = true; _arg1 = iconName; }; if (_local3){ checkedDefaultIcon = true; }; }; }; _local3 = IFlexDisplayObject(getChildByName(_arg1)); if (_local3 == null){ if (_local2 != null){ _local3 = IFlexDisplayObject(new (_local2)); _local3.name = _arg1; if ((_local3 is ISimpleStyleClient)){ ISimpleStyleClient(_local3).styleName = this; }; addChild(DisplayObject(_local3)); _local4 = false; if ((_local3 is IInvalidating)){ IInvalidating(_local3).validateNow(); _local4 = true; } else { if ((_local3 is IProgrammaticSkin)){ IProgrammaticSkin(_local3).validateDisplayList(); _local4 = true; }; }; if (((_local3) && ((_local3 is IUIComponent)))){ IUIComponent(_local3).enabled = enabled; }; if (_local4){ _local3.setActualSize(_local3.measuredWidth, _local3.measuredHeight); }; icons.push(_local3); }; }; if (currentIcon != null){ currentIcon.visible = false; }; currentIcon = _local3; if (((defaultIconUsesStates) && ((currentIcon is IStateClient)))){ _local5 = ""; if (!enabled){ _local5 = (selected) ? "selectedDisabled" : "disabled"; } else { if (phase == ButtonPhase.UP){ _local5 = (selected) ? "selectedUp" : "up"; } else { if (phase == ButtonPhase.OVER){ _local5 = (selected) ? "selectedOver" : "over"; } else { if (phase == ButtonPhase.DOWN){ _local5 = (selected) ? "selectedDown" : "down"; }; }; }; }; IStateClient(currentIcon).currentState = _local5; }; if (currentIcon != null){ currentIcon.visible = true; }; return (_local3); } mx_internal function viewSkinForPhase(_arg1:String, _arg2:String):void{ var _local4:IFlexDisplayObject; var _local5:Number; var _local6:ISimpleStyleClient; var _local3:Class = Class(getStyle(_arg1)); if (!_local3){ _local3 = Class(getStyle(skinName)); if (defaultSkinUsesStates){ _arg1 = skinName; }; if (((!(checkedDefaultSkin)) && (_local3))){ _local4 = IFlexDisplayObject(new (_local3)); if (((!((_local4 is IProgrammaticSkin))) && ((_local4 is IStateClient)))){ defaultSkinUsesStates = true; _arg1 = skinName; }; if (_local4){ checkedDefaultSkin = true; }; }; }; _local4 = IFlexDisplayObject(getChildByName(_arg1)); if (!_local4){ if (_local3){ _local4 = IFlexDisplayObject(new (_local3)); _local4.name = _arg1; _local6 = (_local4 as ISimpleStyleClient); if (_local6){ _local6.styleName = this; }; addChild(DisplayObject(_local4)); _local4.setActualSize(unscaledWidth, unscaledHeight); if ((((_local4 is IInvalidating)) && (initialized))){ IInvalidating(_local4).validateNow(); } else { if ((((_local4 is IProgrammaticSkin)) && (initialized))){ IProgrammaticSkin(_local4).validateDisplayList(); }; }; skins.push(_local4); }; }; if (currentSkin){ currentSkin.visible = false; }; currentSkin = _local4; if (((defaultSkinUsesStates) && ((currentSkin is IStateClient)))){ IStateClient(currentSkin).currentState = _arg2; }; if (currentSkin){ currentSkin.visible = true; }; if (enabled){ if (phase == ButtonPhase.OVER){ _local5 = textField.getStyle("textRollOverColor"); } else { if (phase == ButtonPhase.DOWN){ _local5 = textField.getStyle("textSelectedColor"); } else { _local5 = textField.getStyle("color"); }; }; textField.setColor(_local5); }; } mx_internal function getTextField():IUITextField{ return (textField); } protected function rollOverHandler(_arg1:MouseEvent):void{ if (phase == ButtonPhase.UP){ if (_arg1.buttonDown){ return; }; phase = ButtonPhase.OVER; _arg1.updateAfterEvent(); } else { if (phase == ButtonPhase.OVER){ phase = ButtonPhase.DOWN; _arg1.updateAfterEvent(); if (autoRepeatTimer){ autoRepeatTimer.start(); }; }; }; } override protected function createChildren():void{ super.createChildren(); if (!textField){ textField = IUITextField(createInFontContext(UITextField)); textField.styleName = this; addChild(DisplayObject(textField)); }; } mx_internal function setSelected(_arg1:Boolean, _arg2:Boolean=false):void{ if (_selected != _arg1){ _selected = _arg1; invalidateDisplayList(); if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ if (toggle){ dispatchEvent(new Event(Event.CHANGE)); }; } else { if (((toggle) && (!(_arg2)))){ dispatchEvent(new Event(Event.CHANGE)); }; }; dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT)); }; } private function autoRepeatTimer_timerDelayHandler(_arg1:Event):void{ if (!enabled){ return; }; dispatchEvent(new FlexEvent(FlexEvent.BUTTON_DOWN)); if (autoRepeat){ autoRepeatTimer.reset(); autoRepeatTimer.removeEventListener(TimerEvent.TIMER, autoRepeatTimer_timerDelayHandler); autoRepeatTimer.delay = getStyle("repeatInterval"); autoRepeatTimer.addEventListener(TimerEvent.TIMER, autoRepeatTimer_timerHandler); autoRepeatTimer.start(); }; } public function get autoRepeat():Boolean{ return (_autoRepeat); } public function set selected(_arg1:Boolean):void{ selectedSet = true; setSelected(_arg1, true); } override protected function focusOutHandler(_arg1:FocusEvent):void{ super.focusOutHandler(_arg1); if (phase != ButtonPhase.UP){ phase = ButtonPhase.UP; }; } public function get labelPlacement():String{ return (_labelPlacement); } public function set autoRepeat(_arg1:Boolean):void{ _autoRepeat = _arg1; if (_arg1){ autoRepeatTimer = new Timer(1); } else { autoRepeatTimer = null; }; } mx_internal function changeIcons():void{ var _local1:int = icons.length; var _local2:int; while (_local2 < _local1) { removeChild(icons[_local2]); _local2++; }; icons = []; checkedDefaultIcon = false; defaultIconUsesStates = false; } public function set data(_arg1:Object):void{ var _local2:*; var _local3:*; _data = _arg1; if (((_listData) && ((_listData is DataGridListData)))){ _local2 = _data[DataGridListData(_listData).dataField]; _local3 = ""; } else { if (_listData){ if (selectedField){ _local2 = _data[selectedField]; }; _local3 = _listData.label; } else { _local2 = _data; }; }; if (((!((_local2 === undefined))) && (!(selectedSet)))){ selected = (_local2 as Boolean); selectedSet = false; }; if (((!((_local3 === undefined))) && (!(labelSet)))){ label = _local3; labelSet = false; }; dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE)); } mx_internal function getCurrentIcon():IFlexDisplayObject{ var _local1:String = getCurrentIconName(); if (!_local1){ return (null); }; return (viewIconForPhase(_local1)); } public function get fontContext():IFlexModuleFactory{ return (moduleFactory); } public function get emphasized():Boolean{ return (_emphasized); } public function get listData():BaseListData{ return (_listData); } mx_internal function layoutContents(_arg1:Number, _arg2:Number, _arg3:Boolean):void{ var _local20:TextLineMetrics; var _local28:MoveEvent; if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ previousVersion_layoutContents(_arg1, _arg2, _arg3); return; }; var _local4:Number = 0; var _local5:Number = 0; var _local6:Number = 0; var _local7:Number = 0; var _local8:Number = 0; var _local9:Number = 0; var _local10:Number = 0; var _local11:Number = 0; var _local12:Number = 0; var _local13:Number = 0; var _local14:Number = getStyle("paddingLeft"); var _local15:Number = getStyle("paddingRight"); var _local16:Number = getStyle("paddingTop"); var _local17:Number = getStyle("paddingBottom"); var _local18:Number = 0; var _local19:Number = 0; if (label){ _local20 = measureText(label); _local18 = (_local20.width + TEXT_WIDTH_PADDING); _local19 = (_local20.height + UITextField.TEXT_HEIGHT_PADDING); } else { _local20 = measureText("Wj"); _local19 = (_local20.height + UITextField.TEXT_HEIGHT_PADDING); }; var _local21:Number = (_arg3) ? buttonOffset : 0; var _local22:String = getStyle("textAlign"); var _local23:Number = _arg1; var _local24:Number = _arg2; var _local25:EdgeMetrics = (((((currentSkin) && ((currentSkin is IBorder)))) && (!((currentSkin is IFlexAsset))))) ? IBorder(currentSkin).borderMetrics : null; if (_local25){ _local23 = (_local23 - (_local25.left + _local25.right)); _local24 = (_local24 - (_local25.top + _local25.bottom)); }; if (currentIcon){ _local8 = currentIcon.width; _local9 = currentIcon.height; }; if ((((labelPlacement == ButtonLabelPlacement.LEFT)) || ((labelPlacement == ButtonLabelPlacement.RIGHT)))){ _local12 = getStyle("horizontalGap"); if ((((_local8 == 0)) || ((_local18 == 0)))){ _local12 = 0; }; if (_local18 > 0){ _local4 = Math.max(Math.min(((((_local23 - _local8) - _local12) - _local14) - _local15), _local18), 0); textField.width = _local4; } else { _local4 = 0; textField.width = _local4; }; _local5 = Math.min(_local24, _local19); textField.height = _local5; if (_local22 == "left"){ _local6 = (_local6 + _local14); } else { if (_local22 == "right"){ _local6 = (_local6 + ((((_local23 - _local4) - _local8) - _local12) - _local15)); } else { _local6 = (_local6 + (((((((_local23 - _local4) - _local8) - _local12) - _local14) - _local15) / 2) + _local14)); }; }; if (labelPlacement == ButtonLabelPlacement.RIGHT){ _local6 = (_local6 + (_local8 + _local12)); _local10 = (_local6 - (_local8 + _local12)); } else { _local10 = ((_local6 + _local4) + _local12); }; _local11 = (((((_local24 - _local9) - _local16) - _local17) / 2) + _local16); _local7 = (((((_local24 - _local5) - _local16) - _local17) / 2) + _local16); } else { _local13 = getStyle("verticalGap"); if ((((_local9 == 0)) || ((label == "")))){ _local13 = 0; }; if (_local18 > 0){ _local4 = Math.max(((_local23 - _local14) - _local15), 0); textField.width = _local4; _local5 = Math.min(((((_local24 - _local9) - _local16) - _local17) - _local13), _local19); textField.height = _local5; } else { _local4 = 0; textField.width = _local4; _local5 = 0; textField.height = _local5; }; _local6 = _local14; if (_local22 == "left"){ _local10 = (_local10 + _local14); } else { if (_local22 == "right"){ _local10 = (_local10 + Math.max(((_local23 - _local8) - _local15), _local14)); } else { _local10 = (_local10 + (((((_local23 - _local8) - _local14) - _local15) / 2) + _local14)); }; }; if (labelPlacement == ButtonLabelPlacement.TOP){ _local7 = (_local7 + (((((((_local24 - _local5) - _local9) - _local16) - _local17) - _local13) / 2) + _local16)); _local11 = (_local11 + ((_local7 + _local5) + _local13)); } else { _local11 = (_local11 + (((((((_local24 - _local5) - _local9) - _local16) - _local17) - _local13) / 2) + _local16)); _local7 = (_local7 + ((_local11 + _local9) + _local13)); }; }; var _local26:Number = _local21; var _local27:Number = _local21; if (_local25){ _local26 = (_local26 + _local25.left); _local27 = (_local27 + _local25.top); }; textField.x = Math.round((_local6 + _local26)); textField.y = Math.round((_local7 + _local27)); if (currentIcon){ _local10 = (_local10 + _local26); _local11 = (_local11 + _local27); _local28 = new MoveEvent(MoveEvent.MOVE); _local28.oldX = currentIcon.x; _local28.oldY = currentIcon.y; currentIcon.x = Math.round(_local10); currentIcon.y = Math.round(_local11); currentIcon.dispatchEvent(_local28); }; if (currentSkin){ setChildIndex(DisplayObject(currentSkin), (numChildren - 1)); }; if (currentIcon){ setChildIndex(DisplayObject(currentIcon), (numChildren - 1)); }; if (textField){ setChildIndex(DisplayObject(textField), (numChildren - 1)); }; } protected function mouseDownHandler(_arg1:MouseEvent):void{ if (!enabled){ return; }; systemManager.addEventListener(MouseEvent.MOUSE_UP, systemManager_mouseUpHandler, true); systemManager.stage.addEventListener(Event.MOUSE_LEAVE, stage_mouseLeaveHandler); buttonPressed(); _arg1.updateAfterEvent(); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ if (!enabled){ return; }; if (_arg1.keyCode == Keyboard.SPACE){ buttonPressed(); }; } protected function rollOutHandler(_arg1:MouseEvent):void{ if (phase == ButtonPhase.OVER){ phase = ButtonPhase.UP; _arg1.updateAfterEvent(); } else { if ((((phase == ButtonPhase.DOWN)) && (!(stickyHighlighting)))){ phase = ButtonPhase.OVER; _arg1.updateAfterEvent(); if (autoRepeatTimer){ autoRepeatTimer.stop(); }; }; }; } mx_internal function get phase():String{ return (_phase); } override public function set enabled(_arg1:Boolean):void{ if (super.enabled == _arg1){ return; }; super.enabled = _arg1; enabledChanged = true; invalidateProperties(); invalidateDisplayList(); } override protected function measure():void{ var _local9:TextLineMetrics; if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ previousVersion_measure(); return; }; super.measure(); var _local1:Number = 0; var _local2:Number = 0; if (label){ _local9 = measureText(label); _local1 = (_local9.width + TEXT_WIDTH_PADDING); _local2 = (_local9.height + UITextField.TEXT_HEIGHT_PADDING); }; var _local3:IFlexDisplayObject = getCurrentIcon(); var _local4:Number = (_local3) ? _local3.width : 0; var _local5:Number = (_local3) ? _local3.height : 0; var _local6:Number = 0; var _local7:Number = 0; if ((((labelPlacement == ButtonLabelPlacement.LEFT)) || ((labelPlacement == ButtonLabelPlacement.RIGHT)))){ _local6 = (_local1 + _local4); if (((_local1) && (_local4))){ _local6 = (_local6 + getStyle("horizontalGap")); }; _local7 = Math.max(_local2, _local5); } else { _local6 = Math.max(_local1, _local4); _local7 = (_local2 + _local5); if (((_local2) && (_local5))){ _local7 = (_local7 + getStyle("verticalGap")); }; }; if (((_local1) || (_local4))){ _local6 = (_local6 + (getStyle("paddingLeft") + getStyle("paddingRight"))); _local7 = (_local7 + (getStyle("paddingTop") + getStyle("paddingBottom"))); }; var _local8:EdgeMetrics = (((((currentSkin) && ((currentSkin is IBorder)))) && (!((currentSkin is IFlexAsset))))) ? IBorder(currentSkin).borderMetrics : null; if (_local8){ _local6 = (_local6 + (_local8.left + _local8.right)); _local7 = (_local7 + (_local8.top + _local8.bottom)); }; if (((currentSkin) && (((isNaN(skinMeasuredWidth)) || (isNaN(skinMeasuredHeight)))))){ skinMeasuredWidth = currentSkin.measuredWidth; skinMeasuredHeight = currentSkin.measuredHeight; }; if (!isNaN(skinMeasuredWidth)){ _local6 = Math.max(skinMeasuredWidth, _local6); }; if (!isNaN(skinMeasuredHeight)){ _local7 = Math.max(skinMeasuredHeight, _local7); }; measuredMinWidth = (measuredWidth = _local6); measuredMinHeight = (measuredHeight = _local7); } public function get toggle():Boolean{ return (_toggle); } mx_internal function buttonReleased():void{ systemManager.removeEventListener(MouseEvent.MOUSE_UP, systemManager_mouseUpHandler, true); systemManager.stage.removeEventListener(Event.MOUSE_LEAVE, stage_mouseLeaveHandler); if (autoRepeatTimer){ autoRepeatTimer.removeEventListener(TimerEvent.TIMER, autoRepeatTimer_timerDelayHandler); autoRepeatTimer.removeEventListener(TimerEvent.TIMER, autoRepeatTimer_timerHandler); autoRepeatTimer.reset(); }; } mx_internal function buttonPressed():void{ phase = ButtonPhase.DOWN; dispatchEvent(new FlexEvent(FlexEvent.BUTTON_DOWN)); if (autoRepeat){ autoRepeatTimer.delay = getStyle("repeatDelay"); autoRepeatTimer.addEventListener(TimerEvent.TIMER, autoRepeatTimer_timerDelayHandler); autoRepeatTimer.start(); }; } override protected function keyUpHandler(_arg1:KeyboardEvent):void{ if (!enabled){ return; }; if (_arg1.keyCode == Keyboard.SPACE){ buttonReleased(); if (phase == ButtonPhase.DOWN){ dispatchEvent(new MouseEvent(MouseEvent.CLICK)); }; phase = ButtonPhase.UP; }; } public function get selected():Boolean{ return (_selected); } public function set labelPlacement(_arg1:String):void{ _labelPlacement = _arg1; invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("labelPlacementChanged")); } protected function clickHandler(_arg1:MouseEvent):void{ if (!enabled){ _arg1.stopImmediatePropagation(); return; }; if (toggle){ setSelected(!(selected)); _arg1.updateAfterEvent(); }; } override protected function initializeAccessibility():void{ if (Button.createAccessibilityImplementation != null){ Button.createAccessibilityImplementation(this); }; } public function set toggle(_arg1:Boolean):void{ _toggle = _arg1; toggleChanged = true; invalidateProperties(); invalidateDisplayList(); dispatchEvent(new Event("toggleChanged")); } override public function get baselinePosition():Number{ var _local1:String; var _local2:TextLineMetrics; if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ _local1 = label; if (!_local1){ _local1 = "Wj"; }; validateNow(); if (((!(label)) && ((((labelPlacement == ButtonLabelPlacement.TOP)) || ((labelPlacement == ButtonLabelPlacement.BOTTOM)))))){ _local2 = measureText(_local1); return ((((measuredHeight - _local2.height) / 2) + _local2.ascent)); }; return ((textField.y + measureText(_local1).ascent)); }; if (!validateBaselinePosition()){ return (NaN); }; return ((textField.y + textField.baselinePosition)); } public function get data():Object{ return (_data); } public function set fontContext(_arg1:IFlexModuleFactory):void{ this.moduleFactory = _arg1; } mx_internal function viewSkin():void{ var _local1:String; var _local2:String; if (!enabled){ _local1 = (selected) ? selectedDisabledSkinName : disabledSkinName; _local2 = (selected) ? "selectedDisabled" : "disabled"; } else { if (phase == ButtonPhase.UP){ _local1 = (selected) ? selectedUpSkinName : upSkinName; _local2 = (selected) ? "selectedUp" : "up"; } else { if (phase == ButtonPhase.OVER){ _local1 = (selected) ? selectedOverSkinName : overSkinName; _local2 = (selected) ? "selectedOver" : "over"; } else { if (phase == ButtonPhase.DOWN){ _local1 = (selected) ? selectedDownSkinName : downSkinName; _local2 = (selected) ? "selectedDown" : "down"; }; }; }; }; viewSkinForPhase(_local1, _local2); } override public function styleChanged(_arg1:String):void{ styleChangedFlag = true; super.styleChanged(_arg1); if (((!(_arg1)) || ((_arg1 == "styleName")))){ changeSkins(); changeIcons(); if (initialized){ viewSkin(); viewIcon(); }; } else { if (_arg1.toLowerCase().indexOf("skin") != -1){ changeSkins(); } else { if (_arg1.toLowerCase().indexOf("icon") != -1){ changeIcons(); invalidateSize(); }; }; }; } public function set emphasized(_arg1:Boolean):void{ _emphasized = _arg1; emphasizedChanged = true; invalidateDisplayList(); } mx_internal function viewIcon():void{ var _local1:String = getCurrentIconName(); viewIconForPhase(_local1); } override public function set toolTip(_arg1:String):void{ super.toolTip = _arg1; if (_arg1){ toolTipSet = true; } else { toolTipSet = false; invalidateDisplayList(); }; } override protected function commitProperties():void{ super.commitProperties(); if (((hasFontContextChanged()) && (!((textField == null))))){ removeChild(DisplayObject(textField)); textField = null; }; if (!textField){ textField = IUITextField(createInFontContext(UITextField)); textField.styleName = this; addChild(DisplayObject(textField)); enabledChanged = true; toggleChanged = true; }; if (!initialized){ viewSkin(); viewIcon(); }; if (enabledChanged){ textField.enabled = enabled; if (((currentIcon) && ((currentIcon is IUIComponent)))){ IUIComponent(currentIcon).enabled = enabled; }; enabledChanged = false; }; if (toggleChanged){ if (!toggle){ selected = false; }; toggleChanged = false; }; } mx_internal function changeSkins():void{ var _local1:int = skins.length; var _local2:int; while (_local2 < _local1) { removeChild(skins[_local2]); _local2++; }; skins = []; skinMeasuredWidth = NaN; skinMeasuredHeight = NaN; checkedDefaultSkin = false; defaultSkinUsesStates = false; if (((initialized) && ((FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0)))){ viewSkin(); invalidateSize(); }; } private function autoRepeatTimer_timerHandler(_arg1:Event):void{ if (!enabled){ return; }; dispatchEvent(new FlexEvent(FlexEvent.BUTTON_DOWN)); } private function previousVersion_layoutContents(_arg1:Number, _arg2:Number, _arg3:Boolean):void{ var _local20:TextLineMetrics; var _local28:Number; var _local29:MoveEvent; var _local4:Number = 0; var _local5:Number = 0; var _local6:Number = 0; var _local7:Number = 0; var _local8:Number = 0; var _local9:Number = 0; var _local10:Number = 0; var _local11:Number = 0; var _local12:Number = 2; var _local13:Number = 2; var _local14:Number = getStyle("paddingLeft"); var _local15:Number = getStyle("paddingRight"); var _local16:Number = getStyle("paddingTop"); var _local17:Number = getStyle("paddingBottom"); var _local18:Number = 0; var _local19:Number = 0; if (label){ _local20 = measureText(label); if (_local20.width > 0){ _local18 = (((_local14 + _local15) + getStyle("textIndent")) + _local20.width); }; _local19 = _local20.height; } else { _local20 = measureText("Wj"); _local19 = _local20.height; }; var _local21:Number = (_arg3) ? buttonOffset : 0; var _local22:String = getStyle("textAlign"); var _local23:EdgeMetrics = (((currentSkin) && ((currentSkin is IRectangularBorder)))) ? IRectangularBorder(currentSkin).borderMetrics : null; var _local24:Number = _arg1; var _local25:Number = ((_arg2 - _local16) - _local17); if (_local23){ _local24 = (_local24 - (_local23.left + _local23.right)); _local25 = (_local25 - (_local23.top + _local23.bottom)); }; if (currentIcon){ _local8 = currentIcon.width; _local9 = currentIcon.height; }; if ((((labelPlacement == ButtonLabelPlacement.LEFT)) || ((labelPlacement == ButtonLabelPlacement.RIGHT)))){ _local12 = getStyle("horizontalGap"); if ((((_local8 == 0)) || ((_local18 == 0)))){ _local12 = 0; }; if (_local18 > 0){ _local4 = Math.max(((((_local24 - _local8) - _local12) - _local14) - _local15), 0); textField.width = _local4; } else { _local4 = 0; textField.width = _local4; }; _local5 = Math.min((_local25 + 2), (_local19 + UITextField.TEXT_HEIGHT_PADDING)); textField.height = _local5; if (labelPlacement == ButtonLabelPlacement.RIGHT){ _local6 = (_local8 + _local12); if (centerContent){ if (_local22 == "left"){ _local6 = (_local6 + _local14); } else { if (_local22 == "right"){ _local6 = (_local6 + ((((_local24 - _local4) - _local8) - _local12) - _local14)); } else { _local28 = ((((_local24 - _local4) - _local8) - _local12) / 2); _local6 = (_local6 + Math.max(_local28, _local14)); }; }; }; _local10 = (_local6 - (_local8 + _local12)); if (!centerContent){ _local6 = (_local6 + _local14); }; } else { _local6 = ((((_local24 - _local4) - _local8) - _local12) - _local15); if (centerContent){ if (_local22 == "left"){ _local6 = 2; } else { if (_local22 == "right"){ _local6--; } else { if (_local6 > 0){ _local6 = (_local6 / 2); }; }; }; }; _local10 = ((_local6 + _local4) + _local12); }; _local7 = 0; _local11 = _local7; if (centerContent){ _local11 = (Math.round(((_local25 - _local9) / 2)) + _local16); _local7 = (Math.round(((_local25 - _local5) / 2)) + _local16); } else { _local7 = (_local7 + (Math.max(0, ((_local25 - _local5) / 2)) + _local16)); _local11 = (_local11 + (Math.max(0, (((_local25 - _local9) / 2) - 1)) + _local16)); }; } else { _local13 = getStyle("verticalGap"); if ((((_local9 == 0)) || ((_local19 == 0)))){ _local13 = 0; }; if (_local18 > 0){ _local4 = Math.min(_local24, (_local18 + UITextField.TEXT_WIDTH_PADDING)); textField.width = _local4; _local5 = Math.min(((_local25 - _local9) + 1), (_local19 + 5)); textField.height = _local5; } else { _local4 = 0; textField.width = _local4; _local5 = 0; textField.height = _local5; }; _local6 = ((_local24 - _local4) / 2); _local10 = ((_local24 - _local8) / 2); if (labelPlacement == ButtonLabelPlacement.TOP){ _local7 = (((_local25 - _local5) - _local9) - _local13); if (((centerContent) && ((_local7 > 0)))){ _local7 = (_local7 / 2); }; _local7 = (_local7 + _local16); _local11 = (((_local7 + _local5) + _local13) - 3); } else { _local7 = ((_local9 + _local13) + _local16); if (centerContent){ _local7 = (_local7 + (((((_local25 - _local5) - _local9) - _local13) / 2) + 1)); }; _local11 = (((_local7 - _local9) - _local13) + 3); }; }; var _local26:Number = _local21; var _local27:Number = _local21; if (_local23){ _local26 = (_local26 + _local23.left); _local27 = (_local27 + _local23.top); }; textField.x = (_local6 + _local26); textField.y = (_local7 + _local27); if (currentIcon){ _local10 = (_local10 + _local26); _local11 = (_local11 + _local27); _local29 = new MoveEvent(MoveEvent.MOVE); _local29.oldX = currentIcon.x; _local29.oldY = currentIcon.y; currentIcon.x = Math.round(_local10); currentIcon.y = Math.round(_local11); currentIcon.dispatchEvent(_local29); }; if (currentSkin){ setChildIndex(DisplayObject(currentSkin), (numChildren - 1)); }; if (currentIcon){ setChildIndex(DisplayObject(currentIcon), (numChildren - 1)); }; if (textField){ setChildIndex(DisplayObject(textField), (numChildren - 1)); }; } private function systemManager_mouseUpHandler(_arg1:MouseEvent):void{ if (contains(DisplayObject(_arg1.target))){ return; }; phase = ButtonPhase.UP; buttonReleased(); _arg1.updateAfterEvent(); } public function set label(_arg1:String):void{ labelSet = true; if (_label != _arg1){ _label = _arg1; labelChanged = true; invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("labelChanged")); }; } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local5:IFlexDisplayObject; var _local6:Boolean; super.updateDisplayList(_arg1, _arg2); if (emphasizedChanged){ changeSkins(); emphasizedChanged = false; }; var _local3:int = skins.length; var _local4:int; while (_local4 < _local3) { _local5 = IFlexDisplayObject(skins[_local4]); _local5.setActualSize(_arg1, _arg2); _local4++; }; viewSkin(); viewIcon(); layoutContents(_arg1, _arg2, (phase == ButtonPhase.DOWN)); if ((((((((oldUnscaledWidth > _arg1)) || (!((textField.text == label))))) || (labelChanged))) || (styleChangedFlag))){ textField.text = label; _local6 = textField.truncateToFit(); if (!toolTipSet){ if (_local6){ super.toolTip = label; } else { super.toolTip = null; }; }; styleChangedFlag = false; labelChanged = false; }; oldUnscaledWidth = _arg1; } private function stage_mouseLeaveHandler(_arg1:Event):void{ phase = ButtonPhase.UP; buttonReleased(); } public function set listData(_arg1:BaseListData):void{ _listData = _arg1; } } }//package mx.controls
Section 137
//ButtonLabelPlacement (mx.controls.ButtonLabelPlacement) package mx.controls { public final class ButtonLabelPlacement { public static const TOP:String = "top"; public static const LEFT:String = "left"; mx_internal static const VERSION:String = "3.0.0.0"; public static const BOTTOM:String = "bottom"; public static const RIGHT:String = "right"; } }//package mx.controls
Section 138
//ButtonPhase (mx.controls.ButtonPhase) package mx.controls { public final class ButtonPhase { public static const DOWN:String = "down"; public static const OVER:String = "over"; mx_internal static const VERSION:String = "3.0.0.0"; public static const UP:String = "up"; } }//package mx.controls
Section 139
//HScrollBar (mx.controls.HScrollBar) package mx.controls { import mx.controls.scrollClasses.*; import flash.ui.*; public class HScrollBar extends ScrollBar { mx_internal static const VERSION:String = "3.0.0.0"; public function HScrollBar(){ super.direction = ScrollBarDirection.HORIZONTAL; scaleX = -1; rotation = -90; } override mx_internal function get virtualHeight():Number{ return (unscaledWidth); } override protected function measure():void{ super.measure(); measuredWidth = _minHeight; measuredHeight = _minWidth; } override public function get minHeight():Number{ return (_minWidth); } override mx_internal function get virtualWidth():Number{ return (unscaledHeight); } override public function get minWidth():Number{ return (_minHeight); } override mx_internal function isScrollBarKey(_arg1:uint):Boolean{ if (_arg1 == Keyboard.LEFT){ lineScroll(-1); return (true); }; if (_arg1 == Keyboard.RIGHT){ lineScroll(1); return (true); }; return (super.isScrollBarKey(_arg1)); } override public function set direction(_arg1:String):void{ } } }//package mx.controls
Section 140
//IFlexContextMenu (mx.controls.IFlexContextMenu) package mx.controls { import flash.display.*; public interface IFlexContextMenu { function setContextMenu(_arg1:InteractiveObject):void; function unsetContextMenu(_arg1:InteractiveObject):void; } }//package mx.controls
Section 141
//Image (mx.controls.Image) package mx.controls { import flash.display.*; import mx.core.*; import flash.events.*; import mx.events.*; import mx.controls.listClasses.*; public class Image extends SWFLoader implements IDataRenderer, IDropInListItemRenderer, IListItemRenderer { private var _listData:BaseListData; private var sourceSet:Boolean; private var _data:Object; private var settingBrokenImage:Boolean; private var makeContentVisible:Boolean;// = false mx_internal static const VERSION:String = "3.0.0.0"; public function Image(){ tabChildren = false; tabEnabled = true; showInAutomationHierarchy = true; } override mx_internal function contentLoaderInfo_completeEventHandler(_arg1:Event):void{ var _local2:DisplayObject = DisplayObject(_arg1.target.loader); super.contentLoaderInfo_completeEventHandler(_arg1); _local2.visible = false; makeContentVisible = true; invalidateDisplayList(); } public function get listData():BaseListData{ return (_listData); } public function set listData(_arg1:BaseListData):void{ _listData = _arg1; } public function get data():Object{ return (_data); } public function set data(_arg1:Object):void{ _data = _arg1; if (!sourceSet){ source = (listData) ? listData.label : data; sourceSet = false; }; dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE)); } override public function invalidateSize():void{ if (((data) && (settingBrokenImage))){ return; }; super.invalidateSize(); } override public function set source(_arg1:Object):void{ settingBrokenImage = (_arg1 == getStyle("brokenImageSkin")); sourceSet = !(settingBrokenImage); super.source = _arg1; } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ super.updateDisplayList(_arg1, _arg2); if (((makeContentVisible) && (contentHolder))){ contentHolder.visible = true; makeContentVisible = false; }; } } }//package mx.controls
Section 142
//Label (mx.controls.Label) package mx.controls { import flash.display.*; import flash.geom.*; import flash.text.*; import mx.core.*; import flash.events.*; import mx.events.*; import mx.controls.listClasses.*; public class Label extends UIComponent implements IDataRenderer, IDropInListItemRenderer, IListItemRenderer, IFontContextComponent { private var _selectable:Boolean;// = false private var _text:String;// = "" private var _data:Object; mx_internal var htmlTextChanged:Boolean;// = false private var _tabIndex:int;// = -1 private var _textWidth:Number; private var explicitHTMLText:String;// = null private var enabledChanged:Boolean;// = false private var condenseWhiteChanged:Boolean;// = false private var _listData:BaseListData; private var _textHeight:Number; protected var textField:IUITextField; private var _htmlText:String;// = "" private var _condenseWhite:Boolean;// = false mx_internal var textChanged:Boolean;// = false public var truncateToFit:Boolean;// = true private var textSet:Boolean; private var selectableChanged:Boolean; private var toolTipSet:Boolean;// = false mx_internal static const VERSION:String = "3.0.0.0"; override public function set enabled(_arg1:Boolean):void{ if (_arg1 == enabled){ return; }; super.enabled = _arg1; enabledChanged = true; invalidateProperties(); } private function textField_textFieldStyleChangeHandler(_arg1:Event):void{ textFieldChanged(true); } override public function get baselinePosition():Number{ var _local1:String; var _local2:TextLineMetrics; if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ if (!textField){ return (NaN); }; validateNow(); _local1 = (isHTML) ? explicitHTMLText : text; if (_local1 == ""){ _local1 = " "; }; _local2 = (isHTML) ? measureHTMLText(_local1) : measureText(_local1); return ((textField.y + _local2.ascent)); }; if (!validateBaselinePosition()){ return (NaN); }; return ((textField.y + textField.baselinePosition)); } public function set condenseWhite(_arg1:Boolean):void{ if (_arg1 == _condenseWhite){ return; }; _condenseWhite = _arg1; condenseWhiteChanged = true; if (isHTML){ htmlTextChanged = true; }; invalidateProperties(); invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("condenseWhiteChanged")); } public function get textWidth():Number{ return (_textWidth); } override protected function createChildren():void{ super.createChildren(); if (!textField){ createTextField(-1); }; } mx_internal function getTextField():IUITextField{ return (textField); } private function measureTextFieldBounds(_arg1:String):Rectangle{ var _local2:TextLineMetrics = (isHTML) ? measureHTMLText(_arg1) : measureText(_arg1); return (new Rectangle(0, 0, (_local2.width + UITextField.TEXT_WIDTH_PADDING), (_local2.height + UITextField.TEXT_HEIGHT_PADDING))); } mx_internal function getMinimumText(_arg1:String):String{ if (((!(_arg1)) || ((_arg1.length < 2)))){ _arg1 = "Wj"; }; return (_arg1); } private function textFieldChanged(_arg1:Boolean):void{ var _local2:Boolean; var _local3:Boolean; if (!_arg1){ _local2 = !((_text == textField.text)); _text = textField.text; }; _local3 = !((_htmlText == textField.htmlText)); _htmlText = textField.htmlText; if (_local2){ dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT)); }; if (_local3){ dispatchEvent(new Event("htmlTextChanged")); }; _textWidth = textField.textWidth; _textHeight = textField.textHeight; } public function get data():Object{ return (_data); } public function get text():String{ return (_text); } mx_internal function removeTextField():void{ if (textField){ textField.removeEventListener("textFieldStyleChange", textField_textFieldStyleChangeHandler); textField.removeEventListener("textInsert", textField_textModifiedHandler); textField.removeEventListener("textReplace", textField_textModifiedHandler); removeChild(DisplayObject(textField)); textField = null; }; } public function get textHeight():Number{ return (_textHeight); } mx_internal function get styleSheet():StyleSheet{ return (textField.styleSheet); } public function set selectable(_arg1:Boolean):void{ if (_arg1 == selectable){ return; }; _selectable = _arg1; selectableChanged = true; invalidateProperties(); } override public function get tabIndex():int{ return (_tabIndex); } public function set fontContext(_arg1:IFlexModuleFactory):void{ this.moduleFactory = _arg1; } override public function set toolTip(_arg1:String):void{ super.toolTip = _arg1; toolTipSet = !((_arg1 == null)); } mx_internal function createTextField(_arg1:int):void{ if (!textField){ textField = IUITextField(createInFontContext(UITextField)); textField.enabled = enabled; textField.ignorePadding = true; textField.selectable = selectable; textField.styleName = this; textField.addEventListener("textFieldStyleChange", textField_textFieldStyleChangeHandler); textField.addEventListener("textInsert", textField_textModifiedHandler); textField.addEventListener("textReplace", textField_textModifiedHandler); if (_arg1 == -1){ addChild(DisplayObject(textField)); } else { addChildAt(DisplayObject(textField), _arg1); }; }; } override protected function commitProperties():void{ super.commitProperties(); if (((hasFontContextChanged()) && (!((textField == null))))){ removeTextField(); condenseWhiteChanged = true; enabledChanged = true; selectableChanged = true; textChanged = true; }; if (!textField){ createTextField(-1); }; if (condenseWhiteChanged){ textField.condenseWhite = _condenseWhite; condenseWhiteChanged = false; }; textField.tabIndex = tabIndex; if (enabledChanged){ textField.enabled = enabled; enabledChanged = false; }; if (selectableChanged){ textField.selectable = _selectable; selectableChanged = false; }; if (((textChanged) || (htmlTextChanged))){ if (isHTML){ textField.htmlText = explicitHTMLText; } else { textField.text = _text; }; textFieldChanged(false); textChanged = false; htmlTextChanged = false; }; } public function get condenseWhite():Boolean{ return (_condenseWhite); } public function set listData(_arg1:BaseListData):void{ _listData = _arg1; } private function get isHTML():Boolean{ return (!((explicitHTMLText == null))); } public function get selectable():Boolean{ return (_selectable); } public function set text(_arg1:String):void{ textSet = true; if (!_arg1){ _arg1 = ""; }; if (((!(isHTML)) && ((_arg1 == _text)))){ return; }; _text = _arg1; textChanged = true; _htmlText = null; explicitHTMLText = null; invalidateProperties(); invalidateSize(); invalidateDisplayList(); dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT)); } public function set data(_arg1:Object):void{ var _local2:*; _data = _arg1; if (_listData){ _local2 = _listData.label; } else { if (_data != null){ if ((_data is String)){ _local2 = String(_data); } else { _local2 = _data.toString(); }; }; }; if (((!((_local2 === undefined))) && (!(textSet)))){ text = _local2; textSet = false; }; dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE)); } override protected function measure():void{ super.measure(); var _local1:String = (isHTML) ? explicitHTMLText : text; _local1 = getMinimumText(_local1); var _local2:Rectangle = measureTextFieldBounds(_local1); measuredMinWidth = (measuredWidth = ((_local2.width + getStyle("paddingLeft")) + getStyle("paddingRight"))); measuredMinHeight = (measuredHeight = ((_local2.height + getStyle("paddingTop")) + getStyle("paddingBottom"))); } public function get fontContext():IFlexModuleFactory{ return (moduleFactory); } private function textField_textModifiedHandler(_arg1:Event):void{ textFieldChanged(false); } public function get listData():BaseListData{ return (_listData); } mx_internal function set styleSheet(_arg1:StyleSheet):void{ textField.styleSheet = _arg1; } public function set htmlText(_arg1:String):void{ textSet = true; if (!_arg1){ _arg1 = ""; }; if (((isHTML) && ((_arg1 == explicitHTMLText)))){ return; }; _htmlText = _arg1; htmlTextChanged = true; _text = null; explicitHTMLText = _arg1; invalidateProperties(); invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("htmlTextChanged")); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local9:Boolean; super.updateDisplayList(_arg1, _arg2); var _local3:Number = getStyle("paddingLeft"); var _local4:Number = getStyle("paddingTop"); var _local5:Number = getStyle("paddingRight"); var _local6:Number = getStyle("paddingBottom"); textField.setActualSize(((_arg1 - _local3) - _local5), ((_arg2 - _local4) - _local6)); textField.x = _local3; textField.y = _local4; var _local7:String = (isHTML) ? explicitHTMLText : text; var _local8:Rectangle = measureTextFieldBounds(_local7); if (truncateToFit){ if (isHTML){ _local9 = (_local8.width > textField.width); } else { textField.text = _text; _local9 = textField.truncateToFit(); }; if (!toolTipSet){ super.toolTip = (_local9) ? text : null; }; }; } public function get htmlText():String{ return (_htmlText); } public function getLineMetrics(_arg1:int):TextLineMetrics{ return ((textField) ? textField.getLineMetrics(_arg1) : null); } override public function set tabIndex(_arg1:int):void{ _tabIndex = _arg1; invalidateProperties(); } } }//package mx.controls
Section 143
//Spacer (mx.controls.Spacer) package mx.controls { import mx.core.*; public class Spacer extends UIComponent { mx_internal static const VERSION:String = "3.0.0.0"; } }//package mx.controls
Section 144
//SWFLoader (mx.controls.SWFLoader) package mx.controls { import flash.display.*; import flash.geom.*; import mx.core.*; import mx.managers.*; import flash.events.*; import mx.events.*; import mx.styles.*; import flash.system.*; import flash.utils.*; import mx.utils.*; import flash.net.*; public class SWFLoader extends UIComponent { mx_internal var contentHolder:DisplayObject; private var brokenImage:Boolean;// = false private var _bytesLoaded:Number;// = NAN private var _autoLoad:Boolean;// = true private var _loaderContext:LoaderContext; private var requestedURL:URLRequest; private var _showBusyCursor:Boolean;// = false private var _scaleContent:Boolean;// = true private var _bytesTotal:Number;// = NAN private var flexContent:Boolean;// = false private var explicitLoaderContext:Boolean;// = false private var _maintainAspectRatio:Boolean;// = true private var resizableContent:Boolean;// = false private var brokenImageBorder:IFlexDisplayObject; private var isContentLoaded:Boolean;// = false private var attemptingChildAppDomain:Boolean;// = false private var _trustContent:Boolean;// = false private var scaleContentChanged:Boolean;// = false private var _source:Object; private var contentRequestID:String;// = null private var contentChanged:Boolean;// = false mx_internal static const VERSION:String = "3.0.0.0"; public function SWFLoader(){ tabChildren = true; tabEnabled = false; addEventListener(FlexEvent.INITIALIZE, initializeHandler); showInAutomationHierarchy = false; } public function get trustContent():Boolean{ return (_trustContent); } public function set trustContent(_arg1:Boolean):void{ if (_trustContent != _arg1){ _trustContent = _arg1; invalidateProperties(); invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("trustContentChanged")); }; } public function get contentHeight():Number{ return ((contentHolder) ? contentHolder.height : NaN); } public function get maintainAspectRatio():Boolean{ return (_maintainAspectRatio); } private function contentLoaderInfo_progressEventHandler(_arg1:ProgressEvent):void{ _bytesTotal = _arg1.bytesTotal; _bytesLoaded = _arg1.bytesLoaded; dispatchEvent(_arg1); } private function contentLoaded():void{ var loaderInfo:LoaderInfo; isContentLoaded = true; if ((contentHolder is Loader)){ loaderInfo = Loader(contentHolder).contentLoaderInfo; }; resizableContent = false; if (loaderInfo){ if (loaderInfo.contentType == "application/x-shockwave-flash"){ resizableContent = true; }; if (resizableContent){ try { flexContent = (Loader(contentHolder).content is IFlexDisplayObject); } catch(e:Error) { flexContent = false; }; }; }; try { if (((((tabChildren) && ((contentHolder is Loader)))) && ((Loader(contentHolder).content is DisplayObjectContainer)))){ Loader(contentHolder).tabChildren = true; DisplayObjectContainer(Loader(contentHolder).content).tabChildren = true; }; } catch(e:Error) { }; invalidateSize(); invalidateDisplayList(); } override public function get baselinePosition():Number{ if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ return (0); }; return (super.baselinePosition); } private function unScaleContent():void{ contentHolder.scaleX = 1; contentHolder.scaleY = 1; contentHolder.x = 0; contentHolder.y = 0; } private function get contentHolderHeight():Number{ var loaderInfo:LoaderInfo; var content:IFlexDisplayObject; var testContent:DisplayObject; if ((contentHolder is Loader)){ loaderInfo = Loader(contentHolder).contentLoaderInfo; }; if (loaderInfo){ if (loaderInfo.contentType == "application/x-shockwave-flash"){ try { content = (Loader(contentHolder).content as IFlexDisplayObject); if (content){ return (content.measuredHeight); }; } catch(error:Error) { return (contentHolder.height); }; } else { try { testContent = Loader(contentHolder).content; } catch(error:Error) { return (contentHolder.height); }; }; return (loaderInfo.height); }; if ((contentHolder is IUIComponent)){ return (IUIComponent(contentHolder).getExplicitOrMeasuredHeight()); }; if ((contentHolder is IFlexDisplayObject)){ return (IFlexDisplayObject(contentHolder).measuredHeight); }; return (contentHolder.height); } public function set maintainAspectRatio(_arg1:Boolean):void{ _maintainAspectRatio = _arg1; dispatchEvent(new Event("maintainAspectRatioChanged")); } public function set showBusyCursor(_arg1:Boolean):void{ if (_showBusyCursor != _arg1){ _showBusyCursor = _arg1; if (_showBusyCursor){ CursorManager.registerToUseBusyCursor(this); } else { CursorManager.unRegisterToUseBusyCursor(this); }; }; } public function get bytesTotal():Number{ return (_bytesTotal); } private function initializeHandler(_arg1:FlexEvent):void{ if (contentChanged){ contentChanged = false; if (_autoLoad){ load(_source); }; }; } public function get showBusyCursor():Boolean{ return (_showBusyCursor); } public function set scaleContent(_arg1:Boolean):void{ if (_scaleContent != _arg1){ _scaleContent = _arg1; scaleContentChanged = true; invalidateDisplayList(); }; dispatchEvent(new Event("scaleContentChanged")); } private function contentLoaderInfo_openEventHandler(_arg1:Event):void{ dispatchEvent(_arg1); } override public function regenerateStyleCache(_arg1:Boolean):void{ var sm:ISystemManager; var recursive = _arg1; super.regenerateStyleCache(recursive); try { sm = (content as ISystemManager); if (sm != null){ Object(sm).regenerateStyleCache(recursive); }; } catch(error:Error) { }; } public function get loaderContext():LoaderContext{ return (_loaderContext); } private function getHorizontalAlignValue():Number{ var _local1:String = getStyle("horizontalAlign"); if (_local1 == "left"){ return (0); }; if (_local1 == "right"){ return (1); }; return (0.5); } public function get percentLoaded():Number{ var _local1:Number = (((isNaN(_bytesTotal)) || ((_bytesTotal == 0)))) ? 0 : (100 * (_bytesLoaded / _bytesTotal)); if (isNaN(_local1)){ _local1 = 0; }; return (_local1); } private function contentLoaderInfo_unloadEventHandler(_arg1:Event):void{ dispatchEvent(_arg1); } mx_internal function contentLoaderInfo_completeEventHandler(_arg1:Event):void{ if (LoaderInfo(_arg1.target).loader != contentHolder){ return; }; dispatchEvent(_arg1); contentLoaded(); } override public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{ var sm:ISystemManager; var styleProp = _arg1; var recursive = _arg2; super.notifyStyleChangeInChildren(styleProp, recursive); try { sm = (content as ISystemManager); if (sm != null){ Object(sm).notifyStyleChangeInChildren(styleProp, recursive); }; } catch(error:Error) { }; } public function get autoLoad():Boolean{ return (_autoLoad); } public function set source(_arg1:Object):void{ if (_source != _arg1){ _source = _arg1; contentChanged = true; invalidateProperties(); invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("sourceChanged")); }; } public function get source():Object{ return (_source); } private function contentLoaderInfo_httpStatusEventHandler(_arg1:HTTPStatusEvent):void{ dispatchEvent(_arg1); } public function set loaderContext(_arg1:LoaderContext):void{ _loaderContext = _arg1; explicitLoaderContext = true; dispatchEvent(new Event("loaderContextChanged")); } private function get contentHolderWidth():Number{ var loaderInfo:LoaderInfo; var content:IFlexDisplayObject; var testContent:DisplayObject; if ((contentHolder is Loader)){ loaderInfo = Loader(contentHolder).contentLoaderInfo; }; if (loaderInfo){ if (loaderInfo.contentType == "application/x-shockwave-flash"){ try { content = (Loader(contentHolder).content as IFlexDisplayObject); if (content){ return (content.measuredWidth); }; } catch(error:Error) { return (contentHolder.width); }; } else { try { testContent = Loader(contentHolder).content; } catch(error:Error) { return (contentHolder.width); }; }; return (loaderInfo.width); }; if ((contentHolder is IUIComponent)){ return (IUIComponent(contentHolder).getExplicitOrMeasuredWidth()); }; if ((contentHolder is IFlexDisplayObject)){ return (IFlexDisplayObject(contentHolder).measuredWidth); }; return (contentHolder.width); } private function loadContent(_arg1:Object):DisplayObject{ var child:DisplayObject; var cls:Class; var url:String; var byteArray:ByteArray; var loader:Loader; var lc:LoaderContext; var rootURL:String; var lastIndex:int; var message:String; var classOrString = _arg1; if ((classOrString is Class)){ cls = Class(classOrString); } else { if ((classOrString is String)){ try { cls = Class(systemManager.getDefinitionByName(String(classOrString))); } catch(e:Error) { }; url = String(classOrString); } else { if ((classOrString is ByteArray)){ byteArray = ByteArray(classOrString); } else { url = classOrString.toString(); }; }; }; if (cls){ var _local3 = new (cls); child = _local3; contentHolder = _local3; addChild(child); contentLoaded(); } else { if ((classOrString is DisplayObject)){ _local3 = DisplayObject(classOrString); child = _local3; contentHolder = _local3; addChild(child); contentLoaded(); } else { if (byteArray){ loader = new FlexLoader(); child = loader; addChild(child); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, contentLoaderInfo_completeEventHandler); loader.contentLoaderInfo.addEventListener(Event.INIT, contentLoaderInfo_initEventHandler); loader.contentLoaderInfo.addEventListener(Event.UNLOAD, contentLoaderInfo_unloadEventHandler); loader.loadBytes(byteArray, loaderContext); } else { if (url){ loader = new FlexLoader(); child = loader; addChild(loader); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, contentLoaderInfo_completeEventHandler); loader.contentLoaderInfo.addEventListener(HTTPStatusEvent.HTTP_STATUS, contentLoaderInfo_httpStatusEventHandler); loader.contentLoaderInfo.addEventListener(Event.INIT, contentLoaderInfo_initEventHandler); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, contentLoaderInfo_ioErrorEventHandler); loader.contentLoaderInfo.addEventListener(Event.OPEN, contentLoaderInfo_openEventHandler); loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, contentLoaderInfo_progressEventHandler); loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, contentLoaderInfo_securityErrorEventHandler); loader.contentLoaderInfo.addEventListener(Event.UNLOAD, contentLoaderInfo_unloadEventHandler); if ((((((Capabilities.isDebugger == true)) && ((url.indexOf(".jpg") == -1)))) && ((LoaderUtil.normalizeURL(Application.application.systemManager.loaderInfo).indexOf("debug=true") > -1)))){ url = (url + ((url.indexOf("?"))>-1) ? "&debug=true" : "?debug=true"); }; if (!(((((url.indexOf(":") > -1)) || ((url.indexOf("/") == 0)))) || ((url.indexOf("\\") == 0)))){ if (((!((SystemManagerGlobals.bootstrapLoaderInfoURL == null))) && (!((SystemManagerGlobals.bootstrapLoaderInfoURL == ""))))){ rootURL = SystemManagerGlobals.bootstrapLoaderInfoURL; } else { if (root){ rootURL = LoaderUtil.normalizeURL(root.loaderInfo); } else { if (systemManager){ rootURL = LoaderUtil.normalizeURL(DisplayObject(systemManager).loaderInfo); }; }; }; if (rootURL){ lastIndex = Math.max(rootURL.lastIndexOf("\\"), rootURL.lastIndexOf("/")); if (lastIndex != -1){ url = (rootURL.substr(0, (lastIndex + 1)) + url); }; }; }; requestedURL = new URLRequest(url); lc = loaderContext; if (!lc){ lc = new LoaderContext(); _loaderContext = lc; if (trustContent){ lc.securityDomain = SecurityDomain.currentDomain; } else { attemptingChildAppDomain = true; lc.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain); }; }; loader.load(requestedURL, lc); } else { message = resourceManager.getString("controls", "notLoadable", [source]); throw (new Error(message)); }; }; }; }; invalidateDisplayList(); return (child); } public function get contentWidth():Number{ return ((contentHolder) ? contentHolder.width : NaN); } public function get scaleContent():Boolean{ return (_scaleContent); } public function get bytesLoaded():Number{ return (_bytesLoaded); } override protected function commitProperties():void{ super.commitProperties(); if (contentChanged){ contentChanged = false; if (_autoLoad){ load(_source); }; }; } private function contentLoaderInfo_securityErrorEventHandler(_arg1:SecurityErrorEvent):void{ var _local2:LoaderContext; if (attemptingChildAppDomain){ attemptingChildAppDomain = false; _local2 = new LoaderContext(); _loaderContext = _local2; callLater(load); return; }; dispatchEvent(_arg1); } public function load(_arg1:Object=null):void{ var imageData:Bitmap; var url = _arg1; if (url){ _source = url; }; if (contentHolder){ if (isContentLoaded){ if ((contentHolder is Loader)){ try { if ((Loader(contentHolder).content is Bitmap)){ imageData = Bitmap(Loader(contentHolder).content); if (imageData.bitmapData){ imageData.bitmapData = null; }; }; } catch(error:Error) { }; Loader(contentHolder).unload(); if (!explicitLoaderContext){ _loaderContext = null; }; } else { if ((contentHolder is Bitmap)){ imageData = Bitmap(contentHolder); if (imageData.bitmapData){ imageData.bitmapData = null; }; }; }; } else { if ((contentHolder is Loader)){ try { Loader(contentHolder).close(); } catch(error:Error) { }; }; }; try { if (contentHolder.parent == this){ removeChild(contentHolder); }; } catch(error:Error) { try { removeChild(contentHolder); } catch(error1:Error) { }; }; contentHolder = null; }; isContentLoaded = false; brokenImage = false; if (((!(_source)) || ((_source == "")))){ return; }; contentHolder = loadContent(_source); } public function set autoLoad(_arg1:Boolean):void{ if (_autoLoad != _arg1){ _autoLoad = _arg1; contentChanged = true; invalidateProperties(); invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("autoLoadChanged")); }; } private function contentLoaderInfo_initEventHandler(_arg1:Event):void{ dispatchEvent(_arg1); } override protected function measure():void{ var _local1:Number; var _local2:Number; super.measure(); if (isContentLoaded){ _local1 = contentHolder.scaleX; _local2 = contentHolder.scaleY; contentHolder.scaleX = 1; contentHolder.scaleY = 1; measuredWidth = contentHolderWidth; measuredHeight = contentHolderHeight; contentHolder.scaleX = _local1; contentHolder.scaleY = _local2; } else { if (((!(_source)) || ((_source == "")))){ measuredWidth = 0; measuredHeight = 0; }; }; } private function doScaleLoader():void{ if (!isContentLoaded){ return; }; unScaleContent(); var _local1:Number = unscaledWidth; var _local2:Number = unscaledHeight; if ((((contentHolderWidth > _local1)) || ((contentHolderHeight > _local2)))){ contentHolder.scrollRect = new Rectangle(0, 0, _local1, _local2); } else { contentHolder.scrollRect = null; }; contentHolder.x = ((_local1 - contentHolderWidth) * getHorizontalAlignValue()); contentHolder.y = ((_local2 - contentHolderHeight) * getVerticalAlignValue()); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:Class; super.updateDisplayList(_arg1, _arg2); if (contentChanged){ contentChanged = false; if (_autoLoad){ load(_source); }; }; if (isContentLoaded){ if (((_scaleContent) && (!(brokenImage)))){ doScaleContent(); } else { doScaleLoader(); }; scaleContentChanged = false; }; if (((brokenImage) && (!(brokenImageBorder)))){ _local3 = getStyle("brokenImageBorderSkin"); if (_local3){ brokenImageBorder = IFlexDisplayObject(new (_local3)); if ((brokenImageBorder is ISimpleStyleClient)){ ISimpleStyleClient(brokenImageBorder).styleName = this; }; addChild(DisplayObject(brokenImageBorder)); }; } else { if (((!(brokenImage)) && (brokenImageBorder))){ removeChild(DisplayObject(brokenImageBorder)); brokenImageBorder = null; }; }; if (brokenImageBorder){ brokenImageBorder.setActualSize(_arg1, _arg2); }; } private function getVerticalAlignValue():Number{ var _local1:String = getStyle("verticalAlign"); if (_local1 == "top"){ return (0); }; if (_local1 == "bottom"){ return (1); }; return (0.5); } public function get content():DisplayObject{ if ((contentHolder is Loader)){ return (Loader(contentHolder).content); }; return (contentHolder); } private function doScaleContent():void{ var interiorWidth:Number; var interiorHeight:Number; var contentWidth:Number; var contentHeight:Number; var x:Number; var y:Number; var newXScale:Number; var newYScale:Number; var scale:Number; var w:Number; var h:Number; var holder:Loader; var lInfo:LoaderInfo; if (!isContentLoaded){ return; }; if (((!(resizableContent)) || (((maintainAspectRatio) && (!(flexContent)))))){ unScaleContent(); interiorWidth = unscaledWidth; interiorHeight = unscaledHeight; contentWidth = contentHolderWidth; contentHeight = contentHolderHeight; x = 0; y = 0; newXScale = ((contentWidth == 0)) ? 1 : (interiorWidth / contentWidth); newYScale = ((contentHeight == 0)) ? 1 : (interiorHeight / contentHeight); if (_maintainAspectRatio){ if (newXScale > newYScale){ x = Math.floor(((interiorWidth - (contentWidth * newYScale)) * getHorizontalAlignValue())); scale = newYScale; } else { y = Math.floor(((interiorHeight - (contentHeight * newXScale)) * getVerticalAlignValue())); scale = newXScale; }; contentHolder.scaleX = scale; contentHolder.scaleY = scale; } else { contentHolder.scaleX = newXScale; contentHolder.scaleY = newYScale; }; contentHolder.x = x; contentHolder.y = y; } else { contentHolder.x = 0; contentHolder.y = 0; w = unscaledWidth; h = unscaledHeight; if ((contentHolder is Loader)){ holder = Loader(contentHolder); try { if (holder.content.width > 0){ if ((holder.content is IFlexDisplayObject)){ IFlexDisplayObject(holder.content).setActualSize(w, h); } else { lInfo = holder.contentLoaderInfo; if (lInfo){ contentHolder.scaleX = (w / lInfo.width); contentHolder.scaleY = (h / lInfo.height); } else { contentHolder.width = w; contentHolder.height = h; }; }; } else { if (!(holder.content is IFlexDisplayObject)){ contentHolder.width = w; contentHolder.height = h; }; }; } catch(error:Error) { contentHolder.width = w; contentHolder.height = h; }; } else { contentHolder.width = w; contentHolder.height = h; }; }; } private function contentLoaderInfo_ioErrorEventHandler(_arg1:IOErrorEvent):void{ source = getStyle("brokenImageSkin"); load(); contentChanged = false; brokenImage = true; if (hasEventListener(_arg1.type)){ dispatchEvent(_arg1); }; } } }//package mx.controls
Section 145
//ToolTip (mx.controls.ToolTip) package mx.controls { import flash.display.*; import flash.text.*; import mx.core.*; import mx.styles.*; public class ToolTip extends UIComponent implements IToolTip, IFontContextComponent { private var textChanged:Boolean; private var _text:String; protected var textField:IUITextField; mx_internal var border:IFlexDisplayObject; mx_internal static const VERSION:String = "3.0.0.0"; public static var maxWidth:Number = 300; public function ToolTip(){ mouseEnabled = false; } public function set fontContext(_arg1:IFlexModuleFactory):void{ this.moduleFactory = _arg1; } override public function styleChanged(_arg1:String):void{ super.styleChanged(_arg1); if ((((((_arg1 == "borderStyle")) || ((_arg1 == "styleName")))) || ((_arg1 == null)))){ invalidateDisplayList(); }; } override protected function commitProperties():void{ var _local1:int; var _local2:TextFormat; super.commitProperties(); if (((hasFontContextChanged()) && (!((textField == null))))){ _local1 = getChildIndex(DisplayObject(textField)); removeTextField(); createTextField(_local1); invalidateSize(); textChanged = true; }; if (textChanged){ _local2 = textField.getTextFormat(); _local2.leftMargin = 0; _local2.rightMargin = 0; textField.defaultTextFormat = _local2; textField.text = _text; textChanged = false; }; } mx_internal function getTextField():IUITextField{ return (textField); } override protected function createChildren():void{ var _local1:Class; super.createChildren(); if (!border){ _local1 = getStyle("borderSkin"); border = new (_local1); if ((border is ISimpleStyleClient)){ ISimpleStyleClient(border).styleName = this; }; addChild(DisplayObject(border)); }; createTextField(-1); } override protected function measure():void{ var _local7:Number; super.measure(); var _local1:EdgeMetrics = borderMetrics; var _local2:Number = (_local1.left + getStyle("paddingLeft")); var _local3:Number = (_local1.top + getStyle("paddingTop")); var _local4:Number = (_local1.right + getStyle("paddingRight")); var _local5:Number = (_local1.bottom + getStyle("paddingBottom")); var _local6:Number = (_local2 + _local4); _local7 = (_local3 + _local5); textField.wordWrap = false; if ((textField.textWidth + _local6) > ToolTip.maxWidth){ textField.width = (ToolTip.maxWidth - _local6); textField.wordWrap = true; }; measuredWidth = (textField.width + _local6); measuredHeight = (textField.height + _local7); } public function get fontContext():IFlexModuleFactory{ return (moduleFactory); } public function set text(_arg1:String):void{ _text = _arg1; textChanged = true; invalidateProperties(); invalidateSize(); invalidateDisplayList(); } public function get text():String{ return (_text); } mx_internal function removeTextField():void{ if (textField){ removeChild(DisplayObject(textField)); textField = null; }; } mx_internal function createTextField(_arg1:int):void{ if (!textField){ textField = IUITextField(createInFontContext(UITextField)); textField.autoSize = TextFieldAutoSize.LEFT; textField.mouseEnabled = false; textField.multiline = true; textField.selectable = false; textField.wordWrap = false; textField.styleName = this; if (_arg1 == -1){ addChild(DisplayObject(textField)); } else { addChildAt(DisplayObject(textField), _arg1); }; }; } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ super.updateDisplayList(_arg1, _arg2); var _local3:EdgeMetrics = borderMetrics; var _local4:Number = (_local3.left + getStyle("paddingLeft")); var _local5:Number = (_local3.top + getStyle("paddingTop")); var _local6:Number = (_local3.right + getStyle("paddingRight")); var _local7:Number = (_local3.bottom + getStyle("paddingBottom")); var _local8:Number = (_local4 + _local6); var _local9:Number = (_local5 + _local7); border.setActualSize(_arg1, _arg2); textField.move(_local4, _local5); textField.setActualSize((_arg1 - _local8), (_arg2 - _local9)); } private function get borderMetrics():EdgeMetrics{ if ((border is IRectangularBorder)){ return (IRectangularBorder(border).borderMetrics); }; return (EdgeMetrics.EMPTY); } } }//package mx.controls
Section 146
//VScrollBar (mx.controls.VScrollBar) package mx.controls { import mx.controls.scrollClasses.*; import flash.ui.*; public class VScrollBar extends ScrollBar { mx_internal static const VERSION:String = "3.0.0.0"; public function VScrollBar(){ super.direction = ScrollBarDirection.VERTICAL; } override protected function measure():void{ super.measure(); measuredWidth = _minWidth; measuredHeight = _minHeight; } override public function get minHeight():Number{ return (_minHeight); } override mx_internal function isScrollBarKey(_arg1:uint):Boolean{ if (_arg1 == Keyboard.UP){ lineScroll(-1); return (true); }; if (_arg1 == Keyboard.DOWN){ lineScroll(1); return (true); }; if (_arg1 == Keyboard.PAGE_UP){ pageScroll(-1); return (true); }; if (_arg1 == Keyboard.PAGE_DOWN){ pageScroll(1); return (true); }; return (super.isScrollBarKey(_arg1)); } override public function get minWidth():Number{ return (_minWidth); } override public function set direction(_arg1:String):void{ } } }//package mx.controls
Section 147
//VSlider (mx.controls.VSlider) package mx.controls { import mx.controls.sliderClasses.*; public class VSlider extends Slider { mx_internal static const VERSION:String = "3.0.0.0"; public function VSlider(){ direction = SliderDirection.VERTICAL; } } }//package mx.controls
Section 148
//Application (mx.core.Application) package mx.core { import flash.display.*; import mx.managers.*; import flash.events.*; import mx.events.*; import mx.styles.*; import mx.effects.*; import flash.system.*; import flash.utils.*; import mx.containers.utilityClasses.*; import flash.ui.*; import flash.net.*; import flash.external.*; public class Application extends LayoutContainer { public var preloader:Object; public var pageTitle:String; private var resizeWidth:Boolean;// = true private var _applicationViewMetrics:EdgeMetrics; mx_internal var _parameters:Object; private var processingCreationQueue:Boolean;// = false public var scriptRecursionLimit:int; private var resizeHandlerAdded:Boolean;// = false private var preloadObj:Object; public var usePreloader:Boolean; mx_internal var _url:String; private var _viewSourceURL:String; public var resetHistory:Boolean;// = true public var historyManagementEnabled:Boolean;// = true public var scriptTimeLimit:Number; public var frameRate:Number; private var creationQueue:Array; private var resizeHeight:Boolean;// = true public var controlBar:IUIComponent; private var viewSourceCMI:ContextMenuItem; mx_internal static const VERSION:String = "3.0.0.0"; mx_internal static var useProgressiveLayout:Boolean = false; public function Application(){ creationQueue = []; name = "application"; UIComponentGlobals.layoutManager = ILayoutManager(Singleton.getInstance("mx.managers::ILayoutManager")); UIComponentGlobals.layoutManager.usePhasedInstantiation = true; if (!ApplicationGlobals.application){ ApplicationGlobals.application = this; }; super(); layoutObject = new ApplicationLayout(); layoutObject.target = this; boxLayoutClass = ApplicationLayout; showInAutomationHierarchy = true; } public function set viewSourceURL(_arg1:String):void{ _viewSourceURL = _arg1; } override public function set percentWidth(_arg1:Number):void{ super.percentWidth = _arg1; invalidateDisplayList(); } override public function prepareToPrint(_arg1:IFlexDisplayObject):Object{ var _local2:Object = {}; if (_arg1 == this){ _local2.width = width; _local2.height = height; _local2.verticalScrollPosition = verticalScrollPosition; _local2.horizontalScrollPosition = horizontalScrollPosition; _local2.horizontalScrollBarVisible = !((horizontalScrollBar == null)); _local2.verticalScrollBarVisible = !((verticalScrollBar == null)); _local2.whiteBoxVisible = !((whiteBox == null)); setActualSize(measuredWidth, measuredHeight); horizontalScrollPosition = 0; verticalScrollPosition = 0; if (horizontalScrollBar){ horizontalScrollBar.visible = false; }; if (verticalScrollBar){ verticalScrollBar.visible = false; }; if (whiteBox){ whiteBox.visible = false; }; updateDisplayList(unscaledWidth, unscaledHeight); }; _local2.scrollRect = super.prepareToPrint(_arg1); return (_local2); } override protected function measure():void{ var _local2:Number; super.measure(); var _local1:EdgeMetrics = borderMetrics; if (((controlBar) && (controlBar.includeInLayout))){ _local2 = ((controlBar.getExplicitOrMeasuredWidth() + _local1.left) + _local1.right); measuredWidth = Math.max(measuredWidth, _local2); measuredMinWidth = Math.max(measuredMinWidth, _local2); }; } override public function getChildIndex(_arg1:DisplayObject):int{ if (((controlBar) && ((_arg1 == controlBar)))){ return (-1); }; return (super.getChildIndex(_arg1)); } private function resizeHandler(_arg1:Event):void{ var _local2:Number; var _local3:Number; if (resizeWidth){ if (isNaN(percentWidth)){ _local2 = DisplayObject(systemManager).width; } else { super.percentWidth = Math.max(percentWidth, 0); super.percentWidth = Math.min(percentWidth, 100); _local2 = ((percentWidth * screen.width) / 100); }; if (!isNaN(explicitMaxWidth)){ _local2 = Math.min(_local2, explicitMaxWidth); }; if (!isNaN(explicitMinWidth)){ _local2 = Math.max(_local2, explicitMinWidth); }; } else { _local2 = width; }; if (resizeHeight){ if (isNaN(percentHeight)){ _local3 = DisplayObject(systemManager).height; } else { super.percentHeight = Math.max(percentHeight, 0); super.percentHeight = Math.min(percentHeight, 100); _local3 = ((percentHeight * screen.height) / 100); }; if (!isNaN(explicitMaxHeight)){ _local3 = Math.min(_local3, explicitMaxHeight); }; if (!isNaN(explicitMinHeight)){ _local3 = Math.max(_local3, explicitMinHeight); }; } else { _local3 = height; }; if (((!((_local2 == width))) || (!((_local3 == height))))){ invalidateProperties(); invalidateSize(); }; setActualSize(_local2, _local3); invalidateDisplayList(); } private function initManagers(_arg1:ISystemManager):void{ if (_arg1.isTopLevel()){ focusManager = new FocusManager(this); _arg1.activate(this); }; } override public function initialize():void{ var _local2:Object; var _local1:ISystemManager = systemManager; _url = _local1.loaderInfo.url; _parameters = _local1.loaderInfo.parameters; initManagers(_local1); _descriptor = null; if (documentDescriptor){ creationPolicy = documentDescriptor.properties.creationPolicy; if ((((creationPolicy == null)) || ((creationPolicy.length == 0)))){ creationPolicy = ContainerCreationPolicy.AUTO; }; _local2 = documentDescriptor.properties; if (_local2.width != null){ width = _local2.width; delete _local2.width; }; if (_local2.height != null){ height = _local2.height; delete _local2.height; }; documentDescriptor.events = null; }; initContextMenu(); super.initialize(); addEventListener(Event.ADDED, addedHandler); if (((_local1.isTopLevel()) && ((Capabilities.isDebugger == true)))){ setInterval(debugTickler, 1500); }; } override public function set percentHeight(_arg1:Number):void{ super.percentHeight = _arg1; invalidateDisplayList(); } override public function get id():String{ if (((((!(super.id)) && ((this == Application.application)))) && (ExternalInterface.available))){ return (ExternalInterface.objectID); }; return (super.id); } override mx_internal function setUnscaledWidth(_arg1:Number):void{ invalidateProperties(); super.setUnscaledWidth(_arg1); } private function debugTickler():void{ var _local1:int; } private function doNextQueueItem(_arg1:FlexEvent=null):void{ processingCreationQueue = true; Application.useProgressiveLayout = true; callLater(processNextQueueItem); } private function initContextMenu():void{ var _local2:String; if (flexContextMenu != null){ if ((systemManager is InteractiveObject)){ InteractiveObject(systemManager).contextMenu = contextMenu; }; return; }; var _local1:ContextMenu = new ContextMenu(); _local1.hideBuiltInItems(); _local1.builtInItems.print = true; if (_viewSourceURL){ _local2 = resourceManager.getString("core", "viewSource"); viewSourceCMI = new ContextMenuItem(_local2, true); viewSourceCMI.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, menuItemSelectHandler); _local1.customItems.push(viewSourceCMI); }; contextMenu = _local1; if ((systemManager is InteractiveObject)){ InteractiveObject(systemManager).contextMenu = _local1; }; } private function addedHandler(_arg1:Event):void{ if ((((_arg1.target == this)) && ((creationQueue.length > 0)))){ doNextQueueItem(); }; } public function get viewSourceURL():String{ return (_viewSourceURL); } override mx_internal function get usePadding():Boolean{ return (!((layout == ContainerLayout.ABSOLUTE))); } override mx_internal function setUnscaledHeight(_arg1:Number):void{ invalidateProperties(); super.setUnscaledHeight(_arg1); } mx_internal function dockControlBar(_arg1:IUIComponent, _arg2:Boolean):void{ var controlBar = _arg1; var dock = _arg2; if (dock){ try { removeChild(DisplayObject(controlBar)); } catch(e:Error) { return; }; rawChildren.addChildAt(DisplayObject(controlBar), firstChildIndex); setControlBar(controlBar); } else { try { rawChildren.removeChild(DisplayObject(controlBar)); } catch(e:Error) { return; }; setControlBar(null); addChildAt(DisplayObject(controlBar), 0); }; } override public function styleChanged(_arg1:String):void{ super.styleChanged(_arg1); if ((((_arg1 == "backgroundColor")) && ((getStyle("backgroundImage") == getStyle("defaultBackgroundImage"))))){ clearStyle("backgroundImage"); }; } override protected function layoutChrome(_arg1:Number, _arg2:Number):void{ super.layoutChrome(_arg1, _arg2); if (!doingLayout){ createBorder(); }; var _local3:EdgeMetrics = borderMetrics; var _local4:Number = getStyle("borderThickness"); var _local5:EdgeMetrics = new EdgeMetrics(); _local5.left = (_local3.left - _local4); _local5.top = (_local3.top - _local4); _local5.right = (_local3.right - _local4); _local5.bottom = (_local3.bottom - _local4); if (((controlBar) && (controlBar.includeInLayout))){ if ((controlBar is IInvalidating)){ IInvalidating(controlBar).invalidateDisplayList(); }; controlBar.setActualSize((width - (_local5.left + _local5.right)), controlBar.getExplicitOrMeasuredHeight()); controlBar.move(_local5.left, _local5.top); }; } protected function menuItemSelectHandler(_arg1:Event):void{ navigateToURL(new URLRequest(_viewSourceURL), "_blank"); } private function printCreationQueue():void{ var _local4:Object; var _local1 = ""; var _local2:Number = creationQueue.length; var _local3:int; while (_local3 < _local2) { _local4 = creationQueue[_local3]; _local1 = (_local1 + (((((" [" + _local3) + "] ") + _local4.id) + " ") + _local4.index)); _local3++; }; } override protected function resourcesChanged():void{ super.resourcesChanged(); if (viewSourceCMI){ viewSourceCMI.caption = resourceManager.getString("core", "viewSource"); }; } override protected function commitProperties():void{ super.commitProperties(); resizeWidth = isNaN(explicitWidth); resizeHeight = isNaN(explicitHeight); if (((resizeWidth) || (resizeHeight))){ resizeHandler(new Event(Event.RESIZE)); if (!resizeHandlerAdded){ systemManager.addEventListener(Event.RESIZE, resizeHandler, false, 0, true); resizeHandlerAdded = true; }; } else { if (resizeHandlerAdded){ systemManager.removeEventListener(Event.RESIZE, resizeHandler); resizeHandlerAdded = false; }; }; } override public function set toolTip(_arg1:String):void{ } public function addToCreationQueue(_arg1:Object, _arg2:int=-1, _arg3:Function=null, _arg4:IFlexDisplayObject=null):void{ var _local8:int; var _local9:int; var _local10:int; var _local12:int; var _local5:int = creationQueue.length; var _local6:Object = {}; var _local7:Boolean; _local6.id = _arg1; _local6.parent = _arg4; _local6.callbackFunc = _arg3; _local6.index = _arg2; var _local11:int; while (_local11 < _local5) { _local9 = creationQueue[_local11].index; _local10 = (creationQueue[_local11].parent) ? creationQueue[_local11].parent.nestLevel : 0; if (_local6.index != -1){ if ((((_local9 == -1)) || ((_local6.index < _local9)))){ _local8 = _local11; _local7 = true; break; }; } else { _local12 = (_local6.parent) ? _local6.parent.nestLevel : 0; if ((((_local9 == -1)) && ((_local10 < _local12)))){ _local8 = _local11; _local7 = true; break; }; }; _local11++; }; if (!_local7){ creationQueue.push(_local6); _local7 = true; } else { creationQueue.splice(_local8, 0, _local6); }; if (((initialized) && (!(processingCreationQueue)))){ doNextQueueItem(); }; } override mx_internal function initThemeColor():Boolean{ var _local2:Object; var _local3:Number; var _local4:Number; var _local5:CSSStyleDeclaration; var _local1:Boolean = super.initThemeColor(); if (!_local1){ _local5 = StyleManager.getStyleDeclaration("global"); if (_local5){ _local2 = _local5.getStyle("themeColor"); _local3 = _local5.getStyle("rollOverColor"); _local4 = _local5.getStyle("selectionColor"); }; if (((((_local2) && (isNaN(_local3)))) && (isNaN(_local4)))){ setThemeColor(_local2); }; _local1 = true; }; return (_local1); } override public function finishPrint(_arg1:Object, _arg2:IFlexDisplayObject):void{ if (_arg2 == this){ setActualSize(_arg1.width, _arg1.height); if (horizontalScrollBar){ horizontalScrollBar.visible = _arg1.horizontalScrollBarVisible; }; if (verticalScrollBar){ verticalScrollBar.visible = _arg1.verticalScrollBarVisible; }; if (whiteBox){ whiteBox.visible = _arg1.whiteBoxVisible; }; horizontalScrollPosition = _arg1.horizontalScrollPosition; verticalScrollPosition = _arg1.verticalScrollPosition; updateDisplayList(unscaledWidth, unscaledHeight); }; super.finishPrint(_arg1.scrollRect, _arg2); } private function processNextQueueItem():void{ var queueItem:Object; var nextChild:IUIComponent; if (EffectManager.effectsPlaying.length > 0){ callLater(processNextQueueItem); } else { if (creationQueue.length > 0){ queueItem = creationQueue.shift(); try { nextChild = ((queueItem.id is String)) ? document[queueItem.id] : queueItem.id; if ((nextChild is Container)){ Container(nextChild).createComponentsFromDescriptors(true); }; if ((((nextChild is Container)) && ((Container(nextChild).creationPolicy == ContainerCreationPolicy.QUEUED)))){ doNextQueueItem(); } else { nextChild.addEventListener("childrenCreationComplete", doNextQueueItem); }; } catch(e:Error) { processNextQueueItem(); }; } else { processingCreationQueue = false; Application.useProgressiveLayout = false; }; }; } override public function set label(_arg1:String):void{ } public function get parameters():Object{ return (_parameters); } override public function get viewMetrics():EdgeMetrics{ if (!_applicationViewMetrics){ _applicationViewMetrics = new EdgeMetrics(); }; var _local1:EdgeMetrics = _applicationViewMetrics; var _local2:EdgeMetrics = super.viewMetrics; var _local3:Number = getStyle("borderThickness"); _local1.left = _local2.left; _local1.top = _local2.top; _local1.right = _local2.right; _local1.bottom = _local2.bottom; if (((controlBar) && (controlBar.includeInLayout))){ _local1.top = (_local1.top - _local3); _local1.top = (_local1.top + Math.max(controlBar.getExplicitOrMeasuredHeight(), _local3)); }; return (_local1); } public function get url():String{ return (_url); } override public function set icon(_arg1:Class):void{ } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ super.updateDisplayList(_arg1, _arg2); createBorder(); } private function setControlBar(_arg1:IUIComponent):void{ if (_arg1 == controlBar){ return; }; if (((controlBar) && ((controlBar is IStyleClient)))){ IStyleClient(controlBar).clearStyle("cornerRadius"); IStyleClient(controlBar).clearStyle("docked"); }; controlBar = _arg1; if (((controlBar) && ((controlBar is IStyleClient)))){ IStyleClient(controlBar).setStyle("cornerRadius", 0); IStyleClient(controlBar).setStyle("docked", true); }; invalidateSize(); invalidateDisplayList(); invalidateViewMetricsAndPadding(); } override public function set tabIndex(_arg1:int):void{ } public static function get application():Object{ return (ApplicationGlobals.application); } } }//package mx.core
Section 149
//ApplicationGlobals (mx.core.ApplicationGlobals) package mx.core { public class ApplicationGlobals { public static var application:Object; } }//package mx.core
Section 150
//BitmapAsset (mx.core.BitmapAsset) package mx.core { import flash.display.*; public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject { mx_internal static const VERSION:String = "3.0.0.0"; public function BitmapAsset(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } public function get measuredWidth():Number{ if (bitmapData){ return (bitmapData.width); }; return (0); } public function get measuredHeight():Number{ if (bitmapData){ return (bitmapData.height); }; return (0); } public function setActualSize(_arg1:Number, _arg2:Number):void{ width = _arg1; height = _arg2; } public function move(_arg1:Number, _arg2:Number):void{ this.x = _arg1; this.y = _arg2; } } }//package mx.core
Section 151
//ByteArrayAsset (mx.core.ByteArrayAsset) package mx.core { import flash.utils.*; public class ByteArrayAsset extends ByteArray implements IFlexAsset { mx_internal static const VERSION:String = "3.0.0.0"; } }//package mx.core
Section 152
//ComponentDescriptor (mx.core.ComponentDescriptor) package mx.core { public class ComponentDescriptor { public var events:Object; public var type:Class; public var document:Object; private var _properties:Object; public var propertiesFactory:Function; public var id:String; mx_internal static const VERSION:String = "3.0.0.0"; public function ComponentDescriptor(_arg1:Object){ var _local2:String; super(); for (_local2 in _arg1) { this[_local2] = _arg1[_local2]; }; } public function toString():String{ return (("ComponentDescriptor_" + id)); } public function invalidateProperties():void{ _properties = null; } public function get properties():Object{ var _local1:Array; var _local2:int; var _local3:int; if (_properties){ return (_properties); }; if (propertiesFactory != null){ _properties = propertiesFactory.call(document); }; if (_properties){ _local1 = _properties.childDescriptors; if (_local1){ _local2 = _local1.length; _local3 = 0; while (_local3 < _local2) { _local1[_local3].document = document; _local3++; }; }; } else { _properties = {}; }; return (_properties); } } }//package mx.core
Section 153
//Container (mx.core.Container) package mx.core { import flash.display.*; import flash.geom.*; import flash.text.*; import mx.managers.*; import flash.events.*; import mx.events.*; import mx.styles.*; import mx.controls.*; import mx.graphics.*; import mx.controls.scrollClasses.*; import mx.binding.*; import mx.controls.listClasses.*; import flash.utils.*; import flash.ui.*; public class Container extends UIComponent implements IContainer, IDataRenderer, IFocusManagerContainer, IListItemRenderer, IRawChildrenContainer { private var forceLayout:Boolean;// = false private var _numChildrenCreated:int;// = -1 private var _horizontalLineScrollSize:Number;// = 5 mx_internal var border:IFlexDisplayObject; protected var actualCreationPolicy:String; private var _viewMetricsAndPadding:EdgeMetrics; private var _creatingContentPane:Boolean;// = false private var _childRepeaters:Array; private var scrollableWidth:Number;// = 0 private var _childDescriptors:Array; private var _rawChildren:ContainerRawChildrenList; private var _data:Object; private var _verticalPageScrollSize:Number;// = 0 private var _viewMetrics:EdgeMetrics; private var _verticalScrollBar:ScrollBar; private var scrollPropertiesChanged:Boolean;// = false private var changedStyles:String;// = null private var scrollPositionChanged:Boolean;// = true private var _defaultButton:IFlexDisplayObject; private var mouseEventReferenceCount:int;// = 0 private var _focusPane:Sprite; protected var whiteBox:Shape; private var _forceClippingCount:int; private var _horizontalPageScrollSize:Number;// = 0 private var _creationPolicy:String; private var _creationIndex:int;// = -1 private var _clipContent:Boolean;// = true private var _verticalScrollPosition:Number;// = 0 private var _autoLayout:Boolean;// = true private var _icon:Class;// = null mx_internal var doingLayout:Boolean;// = false private var _horizontalScrollBar:ScrollBar; private var numChildrenBefore:int; private var viewableHeight:Number;// = 0 private var viewableWidth:Number;// = 0 mx_internal var contentPane:Sprite;// = null private var _createdComponents:Array; private var _firstChildIndex:int;// = 0 private var scrollableHeight:Number;// = 0 private var _verticalLineScrollSize:Number;// = 5 private var _horizontalScrollPosition:Number;// = 0 mx_internal var _horizontalScrollPolicy:String;// = "auto" private var verticalScrollPositionPending:Number; mx_internal var _verticalScrollPolicy:String;// = "auto" private var horizontalScrollPositionPending:Number; mx_internal var _numChildren:int;// = 0 private var recursionFlag:Boolean;// = true private var _label:String;// = "" mx_internal var blocker:Sprite; mx_internal static const VERSION:String = "3.0.0.0"; private static const MULTIPLE_PROPERTIES:String = "<MULTIPLE>"; public function Container(){ tabChildren = true; tabEnabled = false; showInAutomationHierarchy = false; } public function set verticalScrollPolicy(_arg1:String):void{ if (_verticalScrollPolicy != _arg1){ _verticalScrollPolicy = _arg1; invalidateDisplayList(); dispatchEvent(new Event("verticalScrollPolicyChanged")); }; } private function createContentPaneAndScrollbarsIfNeeded():Boolean{ var _local1:Rectangle; var _local2:Boolean; if (_clipContent){ _local1 = getScrollableRect(); _local2 = createScrollbarsIfNeeded(_local1); if (border){ updateBackgroundImageRect(); }; return (_local2); //unresolved jump }; _local2 = createOrDestroyScrollbars(false, false, false); _local1 = getScrollableRect(); scrollableWidth = _local1.right; scrollableHeight = _local1.bottom; if (((_local2) && (border))){ updateBackgroundImageRect(); }; return (_local2); } override protected function initializationComplete():void{ } mx_internal function rawChildren_getObjectsUnderPoint(_arg1:Point):Array{ return (super.getObjectsUnderPoint(_arg1)); } public function set creatingContentPane(_arg1:Boolean):void{ _creatingContentPane = _arg1; } public function set clipContent(_arg1:Boolean):void{ if (_clipContent != _arg1){ _clipContent = _arg1; invalidateDisplayList(); }; } protected function scrollChildren():void{ if (!contentPane){ return; }; var _local1:EdgeMetrics = viewMetrics; var _local2:Number = 0; var _local3:Number = 0; var _local4:Number = ((unscaledWidth - _local1.left) - _local1.right); var _local5:Number = ((unscaledHeight - _local1.top) - _local1.bottom); if (_clipContent){ _local2 = (_local2 + _horizontalScrollPosition); if (horizontalScrollBar){ _local4 = viewableWidth; }; _local3 = (_local3 + _verticalScrollPosition); if (verticalScrollBar){ _local5 = viewableHeight; }; } else { _local4 = scrollableWidth; _local5 = scrollableHeight; }; var _local6:Rectangle = getScrollableRect(); if ((((((((((((((_local2 == 0)) && ((_local3 == 0)))) && ((_local4 >= _local6.right)))) && ((_local5 >= _local6.bottom)))) && ((_local6.left >= 0)))) && ((_local6.top >= 0)))) && ((_forceClippingCount <= 0)))){ contentPane.scrollRect = null; contentPane.opaqueBackground = null; contentPane.cacheAsBitmap = false; } else { contentPane.scrollRect = new Rectangle(_local2, _local3, _local4, _local5); }; if (focusPane){ focusPane.scrollRect = contentPane.scrollRect; }; if (((((border) && ((border is IRectangularBorder)))) && (IRectangularBorder(border).hasBackgroundImage))){ IRectangularBorder(border).layoutBackgroundImage(); }; } override public function set doubleClickEnabled(_arg1:Boolean):void{ var _local2:int; var _local3:int; var _local4:InteractiveObject; super.doubleClickEnabled = _arg1; if (contentPane){ _local2 = contentPane.numChildren; _local3 = 0; while (_local3 < _local2) { _local4 = (contentPane.getChildAt(_local3) as InteractiveObject); if (_local4){ _local4.doubleClickEnabled = _arg1; }; _local3++; }; }; } override public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{ var _local5:ISimpleStyleClient; var _local3:int = super.numChildren; var _local4:int; while (_local4 < _local3) { if (((((contentPane) || ((_local4 < _firstChildIndex)))) || ((_local4 >= (_firstChildIndex + _numChildren))))){ _local5 = (super.getChildAt(_local4) as ISimpleStyleClient); if (_local5){ _local5.styleChanged(_arg1); if ((_local5 is IStyleClient)){ IStyleClient(_local5).notifyStyleChangeInChildren(_arg1, _arg2); }; }; }; _local4++; }; if (_arg2){ changedStyles = (((!((changedStyles == null))) || ((_arg1 == null)))) ? MULTIPLE_PROPERTIES : _arg1; invalidateProperties(); }; } mx_internal function get createdComponents():Array{ return (_createdComponents); } public function get childDescriptors():Array{ return (_childDescriptors); } override public function get contentMouseY():Number{ if (contentPane){ return (contentPane.mouseY); }; return (super.contentMouseY); } mx_internal function get childRepeaters():Array{ return (_childRepeaters); } override public function contains(_arg1:DisplayObject):Boolean{ if (contentPane){ return (contentPane.contains(_arg1)); }; return (super.contains(_arg1)); } override public function get contentMouseX():Number{ if (contentPane){ return (contentPane.mouseX); }; return (super.contentMouseX); } mx_internal function set createdComponents(_arg1:Array):void{ _createdComponents = _arg1; } public function get horizontalScrollBar():ScrollBar{ return (_horizontalScrollBar); } override public function validateSize(_arg1:Boolean=false):void{ var _local2:int; var _local3:int; var _local4:DisplayObject; if ((((autoLayout == false)) && ((forceLayout == false)))){ if (_arg1){ _local2 = super.numChildren; _local3 = 0; while (_local3 < _local2) { _local4 = super.getChildAt(_local3); if ((_local4 is ILayoutManagerClient)){ ILayoutManagerClient(_local4).validateSize(true); }; _local3++; }; }; adjustSizesForScaleChanges(); } else { super.validateSize(_arg1); }; } public function get rawChildren():IChildList{ if (!_rawChildren){ _rawChildren = new ContainerRawChildrenList(this); }; return (_rawChildren); } override public function getChildAt(_arg1:int):DisplayObject{ if (contentPane){ return (contentPane.getChildAt(_arg1)); }; return (super.getChildAt((_firstChildIndex + _arg1))); } override protected function attachOverlay():void{ rawChildren_addChild(overlay); } override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ super.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); if ((((((((((((((((_arg1 == MouseEvent.CLICK)) || ((_arg1 == MouseEvent.DOUBLE_CLICK)))) || ((_arg1 == MouseEvent.MOUSE_DOWN)))) || ((_arg1 == MouseEvent.MOUSE_MOVE)))) || ((_arg1 == MouseEvent.MOUSE_OVER)))) || ((_arg1 == MouseEvent.MOUSE_OUT)))) || ((_arg1 == MouseEvent.MOUSE_UP)))) || ((_arg1 == MouseEvent.MOUSE_WHEEL)))){ if ((((mouseEventReferenceCount < 2147483647)) && ((mouseEventReferenceCount++ == 0)))){ setStyle("mouseShield", true); setStyle("mouseShieldChildren", true); }; }; } override public function localToContent(_arg1:Point):Point{ if (!contentPane){ return (_arg1); }; _arg1 = localToGlobal(_arg1); return (globalToContent(_arg1)); } public function executeChildBindings(_arg1:Boolean):void{ var _local4:IUIComponent; var _local2:int = numChildren; var _local3:int; while (_local3 < _local2) { _local4 = IUIComponent(getChildAt(_local3)); if ((_local4 is IDeferredInstantiationUIComponent)){ IDeferredInstantiationUIComponent(_local4).executeBindings(_arg1); }; _local3++; }; } protected function createBorder():void{ var _local1:Class; if (((!(border)) && (isBorderNeeded()))){ _local1 = getStyle("borderSkin"); if (_local1 != null){ border = new (_local1); border.name = "border"; if ((border is IUIComponent)){ IUIComponent(border).enabled = enabled; }; if ((border is ISimpleStyleClient)){ ISimpleStyleClient(border).styleName = this; }; rawChildren.addChildAt(DisplayObject(border), 0); invalidateDisplayList(); }; }; } public function get verticalScrollPosition():Number{ if (!isNaN(verticalScrollPositionPending)){ return (verticalScrollPositionPending); }; return (_verticalScrollPosition); } public function get horizontalScrollPosition():Number{ if (!isNaN(horizontalScrollPositionPending)){ return (horizontalScrollPositionPending); }; return (_horizontalScrollPosition); } protected function layoutChrome(_arg1:Number, _arg2:Number):void{ if (border){ updateBackgroundImageRect(); border.move(0, 0); border.setActualSize(_arg1, _arg2); }; } mx_internal function set childRepeaters(_arg1:Array):void{ _childRepeaters = _arg1; } override public function get focusPane():Sprite{ return (_focusPane); } public function set creationIndex(_arg1:int):void{ _creationIndex = _arg1; } public function get viewMetrics():EdgeMetrics{ var _local1:EdgeMetrics = borderMetrics; var _local2:Boolean = ((!((verticalScrollBar == null))) && (((doingLayout) || ((verticalScrollPolicy == ScrollPolicy.ON))))); var _local3:Boolean = ((!((horizontalScrollBar == null))) && (((doingLayout) || ((horizontalScrollPolicy == ScrollPolicy.ON))))); if (((!(_local2)) && (!(_local3)))){ return (_local1); }; if (!_viewMetrics){ _viewMetrics = _local1.clone(); } else { _viewMetrics.left = _local1.left; _viewMetrics.right = _local1.right; _viewMetrics.top = _local1.top; _viewMetrics.bottom = _local1.bottom; }; if (_local2){ _viewMetrics.right = (_viewMetrics.right + verticalScrollBar.minWidth); }; if (_local3){ _viewMetrics.bottom = (_viewMetrics.bottom + horizontalScrollBar.minHeight); }; return (_viewMetrics); } public function set verticalScrollBar(_arg1:ScrollBar):void{ _verticalScrollBar = _arg1; } public function set verticalScrollPosition(_arg1:Number):void{ if (_verticalScrollPosition == _arg1){ return; }; _verticalScrollPosition = _arg1; scrollPositionChanged = true; if (!initialized){ verticalScrollPositionPending = _arg1; }; invalidateDisplayList(); dispatchEvent(new Event("viewChanged")); } private function createOrDestroyScrollbars(_arg1:Boolean, _arg2:Boolean, _arg3:Boolean):Boolean{ var _local5:IFocusManager; var _local6:String; var _local7:String; var _local8:Graphics; var _local4:Boolean; if (((((_arg1) || (_arg2))) || (_arg3))){ createContentPane(); }; if (_arg1){ if (!horizontalScrollBar){ horizontalScrollBar = new HScrollBar(); horizontalScrollBar.name = "horizontalScrollBar"; _local6 = getStyle("horizontalScrollBarStyleName"); if (((_local6) && ((horizontalScrollBar is ISimpleStyleClient)))){ ISimpleStyleClient(horizontalScrollBar).styleName = _local6; }; rawChildren.addChild(DisplayObject(horizontalScrollBar)); horizontalScrollBar.lineScrollSize = horizontalLineScrollSize; horizontalScrollBar.pageScrollSize = horizontalPageScrollSize; horizontalScrollBar.addEventListener(ScrollEvent.SCROLL, horizontalScrollBar_scrollHandler); horizontalScrollBar.enabled = enabled; if ((horizontalScrollBar is IInvalidating)){ IInvalidating(horizontalScrollBar).validateNow(); }; invalidateDisplayList(); invalidateViewMetricsAndPadding(); _local4 = true; if (!verticalScrollBar){ addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); }; }; } else { if (horizontalScrollBar){ horizontalScrollBar.removeEventListener(ScrollEvent.SCROLL, horizontalScrollBar_scrollHandler); rawChildren.removeChild(DisplayObject(horizontalScrollBar)); horizontalScrollBar = null; viewableWidth = (scrollableWidth = 0); if (_horizontalScrollPosition != 0){ _horizontalScrollPosition = 0; scrollPositionChanged = true; }; invalidateDisplayList(); invalidateViewMetricsAndPadding(); _local4 = true; _local5 = focusManager; if (((!(verticalScrollBar)) && (((!(_local5)) || (!((_local5.getFocus() == this))))))){ removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); }; }; }; if (_arg2){ if (!verticalScrollBar){ verticalScrollBar = new VScrollBar(); verticalScrollBar.name = "verticalScrollBar"; _local7 = getStyle("verticalScrollBarStyleName"); if (((_local7) && ((verticalScrollBar is ISimpleStyleClient)))){ ISimpleStyleClient(verticalScrollBar).styleName = _local7; }; rawChildren.addChild(DisplayObject(verticalScrollBar)); verticalScrollBar.lineScrollSize = verticalLineScrollSize; verticalScrollBar.pageScrollSize = verticalPageScrollSize; verticalScrollBar.addEventListener(ScrollEvent.SCROLL, verticalScrollBar_scrollHandler); verticalScrollBar.enabled = enabled; if ((verticalScrollBar is IInvalidating)){ IInvalidating(verticalScrollBar).validateNow(); }; invalidateDisplayList(); invalidateViewMetricsAndPadding(); _local4 = true; if (!horizontalScrollBar){ addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); }; addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler); }; } else { if (verticalScrollBar){ verticalScrollBar.removeEventListener(ScrollEvent.SCROLL, verticalScrollBar_scrollHandler); rawChildren.removeChild(DisplayObject(verticalScrollBar)); verticalScrollBar = null; viewableHeight = (scrollableHeight = 0); if (_verticalScrollPosition != 0){ _verticalScrollPosition = 0; scrollPositionChanged = true; }; invalidateDisplayList(); invalidateViewMetricsAndPadding(); _local4 = true; _local5 = focusManager; if (((!(horizontalScrollBar)) && (((!(_local5)) || (!((_local5.getFocus() == this))))))){ removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); }; removeEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler); }; }; if (((horizontalScrollBar) && (verticalScrollBar))){ if (!whiteBox){ whiteBox = new FlexShape(); whiteBox.name = "whiteBox"; _local8 = whiteBox.graphics; _local8.beginFill(0xFFFFFF); _local8.drawRect(0, 0, verticalScrollBar.minWidth, horizontalScrollBar.minHeight); _local8.endFill(); rawChildren.addChild(whiteBox); }; } else { if (whiteBox){ rawChildren.removeChild(whiteBox); whiteBox = null; }; }; return (_local4); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ var _local3:String; var _local4:Number; var _local2:Object = getFocus(); if ((_local2 is TextField)){ return; }; if (verticalScrollBar){ _local3 = ScrollEventDirection.VERTICAL; _local4 = verticalScrollPosition; switch (_arg1.keyCode){ case Keyboard.DOWN: verticalScrollPosition = (verticalScrollPosition + verticalLineScrollSize); dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.LINE_DOWN); _arg1.stopPropagation(); break; case Keyboard.UP: verticalScrollPosition = (verticalScrollPosition - verticalLineScrollSize); dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.LINE_UP); _arg1.stopPropagation(); break; case Keyboard.PAGE_UP: verticalScrollPosition = (verticalScrollPosition - verticalPageScrollSize); dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.PAGE_UP); _arg1.stopPropagation(); break; case Keyboard.PAGE_DOWN: verticalScrollPosition = (verticalScrollPosition + verticalPageScrollSize); dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.PAGE_DOWN); _arg1.stopPropagation(); break; case Keyboard.HOME: verticalScrollPosition = verticalScrollBar.minScrollPosition; dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.AT_TOP); _arg1.stopPropagation(); break; case Keyboard.END: verticalScrollPosition = verticalScrollBar.maxScrollPosition; dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.AT_BOTTOM); _arg1.stopPropagation(); break; }; }; if (horizontalScrollBar){ _local3 = ScrollEventDirection.HORIZONTAL; _local4 = horizontalScrollPosition; switch (_arg1.keyCode){ case Keyboard.LEFT: horizontalScrollPosition = (horizontalScrollPosition - horizontalLineScrollSize); dispatchScrollEvent(_local3, _local4, horizontalScrollPosition, ScrollEventDetail.LINE_LEFT); _arg1.stopPropagation(); break; case Keyboard.RIGHT: horizontalScrollPosition = (horizontalScrollPosition + horizontalLineScrollSize); dispatchScrollEvent(_local3, _local4, horizontalScrollPosition, ScrollEventDetail.LINE_RIGHT); _arg1.stopPropagation(); break; }; }; } public function get icon():Class{ return (_icon); } private function createOrDestroyBlocker():void{ var _local1:DisplayObject; var _local2:ISystemManager; if (enabled){ if (blocker){ rawChildren.removeChild(blocker); blocker = null; }; } else { if (!blocker){ blocker = new FlexSprite(); blocker.name = "blocker"; blocker.mouseEnabled = true; rawChildren.addChild(blocker); blocker.addEventListener(MouseEvent.CLICK, blocker_clickHandler); _local1 = (focusManager) ? DisplayObject(focusManager.getFocus()) : null; while (_local1) { if (_local1 == this){ _local2 = systemManager; if (((_local2) && (_local2.stage))){ _local2.stage.focus = null; }; break; }; _local1 = _local1.parent; }; }; }; } private function horizontalScrollBar_scrollHandler(_arg1:Event):void{ var _local2:Number; if ((_arg1 is ScrollEvent)){ _local2 = horizontalScrollPosition; horizontalScrollPosition = horizontalScrollBar.scrollPosition; dispatchScrollEvent(ScrollEventDirection.HORIZONTAL, _local2, horizontalScrollPosition, ScrollEvent(_arg1).detail); }; } public function createComponentFromDescriptor(_arg1:ComponentDescriptor, _arg2:Boolean):IFlexDisplayObject{ var _local7:String; var _local10:IRepeaterClient; var _local11:IStyleClient; var _local12:String; var _local13:String; var _local3:UIComponentDescriptor = UIComponentDescriptor(_arg1); var _local4:Object = _local3.properties; if (((((((!((numChildrenBefore == 0))) || (!((numChildrenCreated == -1))))) && ((_local3.instanceIndices == null)))) && (hasChildMatchingDescriptor(_local3)))){ return (null); }; UIComponentGlobals.layoutManager.usePhasedInstantiation = true; var _local5:Class = _local3.type; var _local6:IDeferredInstantiationUIComponent = new (_local5); _local6.id = _local3.id; if (((_local6.id) && (!((_local6.id == ""))))){ _local6.name = _local6.id; }; _local6.descriptor = _local3; if (((_local4.childDescriptors) && ((_local6 is Container)))){ Container(_local6)._childDescriptors = _local4.childDescriptors; delete _local4.childDescriptors; }; for (_local7 in _local4) { _local6[_local7] = _local4[_local7]; }; if ((_local6 is Container)){ Container(_local6).recursionFlag = _arg2; }; if (_local3.instanceIndices){ if ((_local6 is IRepeaterClient)){ _local10 = IRepeaterClient(_local6); _local10.instanceIndices = _local3.instanceIndices; _local10.repeaters = _local3.repeaters; _local10.repeaterIndices = _local3.repeaterIndices; }; }; if ((_local6 is IStyleClient)){ _local11 = IStyleClient(_local6); if (_local3.stylesFactory != null){ if (!_local11.styleDeclaration){ _local11.styleDeclaration = new CSSStyleDeclaration(); }; _local11.styleDeclaration.factory = _local3.stylesFactory; }; }; var _local8:Object = _local3.events; if (_local8){ for (_local12 in _local8) { _local13 = _local8[_local12]; _local6.addEventListener(_local12, _local3.document[_local13]); }; }; var _local9:Array = _local3.effects; if (_local9){ _local6.registerEffects(_local9); }; if ((_local6 is IRepeaterClient)){ IRepeaterClient(_local6).initializeRepeaterArrays(this); }; _local6.createReferenceOnParentDocument(IFlexDisplayObject(_local3.document)); if (!_local6.document){ _local6.document = _local3.document; }; if ((_local6 is IRepeater)){ if (!childRepeaters){ childRepeaters = []; }; childRepeaters.push(_local6); _local6.executeBindings(); IRepeater(_local6).initializeRepeater(this, _arg2); } else { addChild(DisplayObject(_local6)); if ((((creationPolicy == ContainerCreationPolicy.QUEUED)) || ((creationPolicy == ContainerCreationPolicy.NONE)))){ _local6.addEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler); }; }; return (_local6); } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; if (horizontalScrollBar){ horizontalScrollBar.enabled = _arg1; }; if (verticalScrollBar){ verticalScrollBar.enabled = _arg1; }; invalidateProperties(); } public function set horizontalScrollBar(_arg1:ScrollBar):void{ _horizontalScrollBar = _arg1; } mx_internal function get usePadding():Boolean{ return (true); } override public function get baselinePosition():Number{ var _local2:IUIComponent; if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ if ((((getStyle("verticalAlign") == "top")) && ((numChildren > 0)))){ _local2 = (getChildAt(0) as IUIComponent); if (_local2){ return ((_local2.y + _local2.baselinePosition)); }; }; return (super.baselinePosition); }; if (!validateBaselinePosition()){ return (NaN); }; var _local1:TextLineMetrics = measureText("Wj"); if (height < (((2 * viewMetrics.top) + 4) + _local1.ascent)){ return (int((height + ((_local1.ascent - height) / 2)))); }; return (((viewMetrics.top + 2) + _local1.ascent)); } override public function getChildByName(_arg1:String):DisplayObject{ var _local2:DisplayObject; var _local3:int; if (contentPane){ return (contentPane.getChildByName(_arg1)); }; _local2 = super.getChildByName(_arg1); if (!_local2){ return (null); }; _local3 = (super.getChildIndex(_local2) - _firstChildIndex); if ((((_local3 < 0)) || ((_local3 >= _numChildren)))){ return (null); }; return (_local2); } public function get verticalLineScrollSize():Number{ return (_verticalLineScrollSize); } public function get horizontalScrollPolicy():String{ return (_horizontalScrollPolicy); } override public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{ var _local3:DisplayObjectContainer = _arg1.parent; if (((_local3) && (!((_local3 is Loader))))){ _local3.removeChild(_arg1); }; addingChild(_arg1); if (contentPane){ contentPane.addChildAt(_arg1, _arg2); } else { $addChildAt(_arg1, (_firstChildIndex + _arg2)); }; childAdded(_arg1); if ((((_arg1 is UIComponent)) && (UIComponent(_arg1).isDocument))){ BindingManager.setEnabled(_arg1, true); }; if ((_arg1 is IDeferredInstantiationUIComponent)){ IDeferredInstantiationUIComponent(_arg1).executeBindings(true); }; return (_arg1); } public function get maxVerticalScrollPosition():Number{ return ((verticalScrollBar) ? verticalScrollBar.maxScrollPosition : Math.max((scrollableHeight - viewableHeight), 0)); } public function set horizontalScrollPosition(_arg1:Number):void{ if (_horizontalScrollPosition == _arg1){ return; }; _horizontalScrollPosition = _arg1; scrollPositionChanged = true; if (!initialized){ horizontalScrollPositionPending = _arg1; }; invalidateDisplayList(); dispatchEvent(new Event("viewChanged")); } mx_internal function invalidateViewMetricsAndPadding():void{ _viewMetricsAndPadding = null; } public function get horizontalLineScrollSize():Number{ return (_horizontalLineScrollSize); } override public function set focusPane(_arg1:Sprite):void{ var _local2:Boolean = invalidateSizeFlag; var _local3:Boolean = invalidateDisplayListFlag; invalidateSizeFlag = true; invalidateDisplayListFlag = true; if (_arg1){ rawChildren.addChild(_arg1); _arg1.x = 0; _arg1.y = 0; _arg1.scrollRect = null; _focusPane = _arg1; } else { rawChildren.removeChild(_focusPane); _focusPane = null; }; if (((_arg1) && (contentPane))){ _arg1.x = contentPane.x; _arg1.y = contentPane.y; _arg1.scrollRect = contentPane.scrollRect; }; invalidateSizeFlag = _local2; invalidateDisplayListFlag = _local3; } private function updateBackgroundImageRect():void{ var _local1:IRectangularBorder = (border as IRectangularBorder); if (!_local1){ return; }; if ((((viewableWidth == 0)) && ((viewableHeight == 0)))){ _local1.backgroundImageBounds = null; return; }; var _local2:EdgeMetrics = viewMetrics; var _local3:Number = (viewableWidth) ? viewableWidth : ((unscaledWidth - _local2.left) - _local2.right); var _local4:Number = (viewableHeight) ? viewableHeight : ((unscaledHeight - _local2.top) - _local2.bottom); if (getStyle("backgroundAttachment") == "fixed"){ _local1.backgroundImageBounds = new Rectangle(_local2.left, _local2.top, _local3, _local4); } else { _local1.backgroundImageBounds = new Rectangle(_local2.left, _local2.top, Math.max(scrollableWidth, _local3), Math.max(scrollableHeight, _local4)); }; } private function blocker_clickHandler(_arg1:Event):void{ _arg1.stopPropagation(); } private function mouseWheelHandler(_arg1:MouseEvent):void{ var _local2:int; var _local3:int; var _local4:Number; var _local5:Number; if (verticalScrollBar){ _arg1.stopPropagation(); _local2 = ((_arg1.delta <= 0)) ? 1 : -1; _local3 = (verticalScrollBar) ? verticalScrollBar.lineScrollSize : 1; _local4 = Math.max(Math.abs(_arg1.delta), _local3); _local5 = verticalScrollPosition; verticalScrollPosition = (verticalScrollPosition + ((3 * _local4) * _local2)); dispatchScrollEvent(ScrollEventDirection.VERTICAL, _local5, verticalScrollPosition, ((_arg1.delta <= 0)) ? ScrollEventDetail.LINE_UP : ScrollEventDetail.LINE_DOWN); }; } public function get defaultButton():IFlexDisplayObject{ return (_defaultButton); } mx_internal function createContentPane():void{ var _local3:int; var _local5:IUIComponent; if (contentPane){ return; }; creatingContentPane = true; var _local1:int = numChildren; var _local2:Sprite = new FlexSprite(); _local2.name = "contentPane"; _local2.tabChildren = true; if (border){ _local3 = (rawChildren.getChildIndex(DisplayObject(border)) + 1); if ((((border is IRectangularBorder)) && (IRectangularBorder(border).hasBackgroundImage))){ _local3++; }; } else { _local3 = 0; }; rawChildren.addChildAt(_local2, _local3); var _local4:int; while (_local4 < _local1) { _local5 = IUIComponent(super.getChildAt(_firstChildIndex)); _local2.addChild(DisplayObject(_local5)); _local5.parentChanged(_local2); _numChildren--; _local4++; }; contentPane = _local2; creatingContentPane = false; contentPane.visible = true; } public function set verticalPageScrollSize(_arg1:Number):void{ scrollPropertiesChanged = true; _verticalPageScrollSize = _arg1; invalidateDisplayList(); dispatchEvent(new Event("verticalPageScrollSizeChanged")); } mx_internal function setDocumentDescriptor(_arg1:UIComponentDescriptor):void{ var _local2:String; if (processedDescriptors){ return; }; if (((_documentDescriptor) && (_documentDescriptor.properties.childDescriptors))){ if (_arg1.properties.childDescriptors){ _local2 = resourceManager.getString("core", "multipleChildSets_ClassAndSubclass"); throw (new Error(_local2)); }; } else { _documentDescriptor = _arg1; _documentDescriptor.document = this; }; } private function verticalScrollBar_scrollHandler(_arg1:Event):void{ var _local2:Number; if ((_arg1 is ScrollEvent)){ _local2 = verticalScrollPosition; verticalScrollPosition = verticalScrollBar.scrollPosition; dispatchScrollEvent(ScrollEventDirection.VERTICAL, _local2, verticalScrollPosition, ScrollEvent(_arg1).detail); }; } public function get creationPolicy():String{ return (_creationPolicy); } public function set icon(_arg1:Class):void{ _icon = _arg1; dispatchEvent(new Event("iconChanged")); } private function dispatchScrollEvent(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String):void{ var _local5:ScrollEvent = new ScrollEvent(ScrollEvent.SCROLL); _local5.direction = _arg1; _local5.position = _arg3; _local5.delta = (_arg3 - _arg2); _local5.detail = _arg4; dispatchEvent(_local5); } public function get label():String{ return (_label); } public function get verticalScrollPolicy():String{ return (_verticalScrollPolicy); } public function get borderMetrics():EdgeMetrics{ return ((((border) && ((border is IRectangularBorder)))) ? IRectangularBorder(border).borderMetrics : EdgeMetrics.EMPTY); } private function creationCompleteHandler(_arg1:FlexEvent):void{ numChildrenCreated--; if (numChildrenCreated <= 0){ dispatchEvent(new FlexEvent("childrenCreationComplete")); }; } override public function contentToLocal(_arg1:Point):Point{ if (!contentPane){ return (_arg1); }; _arg1 = contentToGlobal(_arg1); return (globalToLocal(_arg1)); } override public function removeChild(_arg1:DisplayObject):DisplayObject{ var _local2:int; var _local3:int; if ((((_arg1 is IDeferredInstantiationUIComponent)) && (IDeferredInstantiationUIComponent(_arg1).descriptor))){ if (createdComponents){ _local2 = createdComponents.length; _local3 = 0; while (_local3 < _local2) { if (createdComponents[_local3] === _arg1){ createdComponents.splice(_local3, 1); }; _local3++; }; }; }; removingChild(_arg1); if ((((_arg1 is UIComponent)) && (UIComponent(_arg1).isDocument))){ BindingManager.setEnabled(_arg1, false); }; if (contentPane){ contentPane.removeChild(_arg1); } else { $removeChild(_arg1); }; childRemoved(_arg1); return (_arg1); } final mx_internal function get $numChildren():int{ return (super.numChildren); } mx_internal function get numRepeaters():int{ return ((childRepeaters) ? childRepeaters.length : 0); } mx_internal function set numChildrenCreated(_arg1:int):void{ _numChildrenCreated = _arg1; } public function get creatingContentPane():Boolean{ return (_creatingContentPane); } public function get clipContent():Boolean{ return (_clipContent); } mx_internal function rawChildren_getChildIndex(_arg1:DisplayObject):int{ return (super.getChildIndex(_arg1)); } override public function regenerateStyleCache(_arg1:Boolean):void{ var _local2:int; var _local3:int; var _local4:DisplayObject; super.regenerateStyleCache(_arg1); if (contentPane){ _local2 = contentPane.numChildren; _local3 = 0; while (_local3 < _local2) { _local4 = getChildAt(_local3); if (((_arg1) && ((_local4 is UIComponent)))){ if (UIComponent(_local4).inheritingStyles != UIComponent.STYLE_UNINITIALIZED){ UIComponent(_local4).regenerateStyleCache(_arg1); }; } else { if ((((_local4 is IUITextField)) && (IUITextField(_local4).inheritingStyles))){ StyleProtoChain.initTextField(IUITextField(_local4)); }; }; _local3++; }; }; } override public function getChildIndex(_arg1:DisplayObject):int{ var _local2:int; if (contentPane){ return (contentPane.getChildIndex(_arg1)); }; _local2 = (super.getChildIndex(_arg1) - _firstChildIndex); return (_local2); } mx_internal function rawChildren_contains(_arg1:DisplayObject):Boolean{ return (super.contains(_arg1)); } mx_internal function getScrollableRect():Rectangle{ var _local9:DisplayObject; var _local1:Number = 0; var _local2:Number = 0; var _local3:Number = 0; var _local4:Number = 0; var _local5:int = numChildren; var _local6:int; while (_local6 < _local5) { _local9 = getChildAt(_local6); if ((((_local9 is IUIComponent)) && (!(IUIComponent(_local9).includeInLayout)))){ } else { _local1 = Math.min(_local1, _local9.x); _local2 = Math.min(_local2, _local9.y); if (!isNaN(_local9.width)){ _local3 = Math.max(_local3, (_local9.x + _local9.width)); }; if (!isNaN(_local9.height)){ _local4 = Math.max(_local4, (_local9.y + _local9.height)); }; }; _local6++; }; var _local7:EdgeMetrics = viewMetrics; var _local8:Rectangle = new Rectangle(); _local8.left = _local1; _local8.top = _local2; _local8.right = _local3; _local8.bottom = _local4; if (usePadding){ _local8.right = (_local8.right + getStyle("paddingRight")); _local8.bottom = (_local8.bottom + getStyle("paddingBottom")); }; return (_local8); } override protected function createChildren():void{ var _local1:Application; super.createChildren(); createBorder(); createOrDestroyScrollbars((horizontalScrollPolicy == ScrollPolicy.ON), (verticalScrollPolicy == ScrollPolicy.ON), (((horizontalScrollPolicy == ScrollPolicy.ON)) || ((verticalScrollPolicy == ScrollPolicy.ON)))); if (creationPolicy != null){ actualCreationPolicy = creationPolicy; } else { if ((parent is Container)){ if (Container(parent).actualCreationPolicy == ContainerCreationPolicy.QUEUED){ actualCreationPolicy = ContainerCreationPolicy.AUTO; } else { actualCreationPolicy = Container(parent).actualCreationPolicy; }; }; }; if (actualCreationPolicy == ContainerCreationPolicy.NONE){ actualCreationPolicy = ContainerCreationPolicy.AUTO; } else { if (actualCreationPolicy == ContainerCreationPolicy.QUEUED){ _local1 = (parentApplication) ? Application(parentApplication) : Application(Application.application); _local1.addToCreationQueue(this, creationIndex, null, this); } else { if (recursionFlag){ createComponentsFromDescriptors(); }; }; }; if (autoLayout == false){ forceLayout = true; }; UIComponentGlobals.layoutManager.addEventListener(FlexEvent.UPDATE_COMPLETE, layoutCompleteHandler, false, 0, true); } override public function executeBindings(_arg1:Boolean=false):void{ var _local2:Object = (((descriptor) && (descriptor.document))) ? descriptor.document : parentDocument; BindingManager.executeBindings(_local2, id, this); if (_arg1){ executeChildBindings(_arg1); }; } override public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{ var _local3:int; var _local4:int = _local3; var _local5:int = _arg2; if (contentPane){ contentPane.setChildIndex(_arg1, _arg2); if (((_autoLayout) || (forceLayout))){ invalidateDisplayList(); }; } else { _local3 = super.getChildIndex(_arg1); _arg2 = (_arg2 + _firstChildIndex); if (_arg2 == _local3){ return; }; super.setChildIndex(_arg1, _arg2); invalidateDisplayList(); _local4 = (_local3 - _firstChildIndex); _local5 = (_arg2 - _firstChildIndex); }; var _local6:IndexChangedEvent = new IndexChangedEvent(IndexChangedEvent.CHILD_INDEX_CHANGE); _local6.relatedObject = _arg1; _local6.oldIndex = _local4; _local6.newIndex = _local5; dispatchEvent(_local6); dispatchEvent(new Event("childrenChanged")); } override public function globalToContent(_arg1:Point):Point{ if (contentPane){ return (contentPane.globalToLocal(_arg1)); }; return (globalToLocal(_arg1)); } mx_internal function rawChildren_removeChild(_arg1:DisplayObject):DisplayObject{ var _local2:int = rawChildren_getChildIndex(_arg1); return (rawChildren_removeChildAt(_local2)); } mx_internal function rawChildren_setChildIndex(_arg1:DisplayObject, _arg2:int):void{ var _local3:int = super.getChildIndex(_arg1); super.setChildIndex(_arg1, _arg2); if ((((_local3 < _firstChildIndex)) && ((_arg2 >= _firstChildIndex)))){ _firstChildIndex--; } else { if ((((_local3 >= _firstChildIndex)) && ((_arg2 <= _firstChildIndex)))){ _firstChildIndex++; }; }; dispatchEvent(new Event("childrenChanged")); } public function set verticalLineScrollSize(_arg1:Number):void{ scrollPropertiesChanged = true; _verticalLineScrollSize = _arg1; invalidateDisplayList(); dispatchEvent(new Event("verticalLineScrollSizeChanged")); } mx_internal function rawChildren_getChildAt(_arg1:int):DisplayObject{ return (super.getChildAt(_arg1)); } public function get creationIndex():int{ return (_creationIndex); } public function get verticalScrollBar():ScrollBar{ return (_verticalScrollBar); } public function get viewMetricsAndPadding():EdgeMetrics{ if (((((_viewMetricsAndPadding) && (((!(horizontalScrollBar)) || ((horizontalScrollPolicy == ScrollPolicy.ON)))))) && (((!(verticalScrollBar)) || ((verticalScrollPolicy == ScrollPolicy.ON)))))){ return (_viewMetricsAndPadding); }; if (!_viewMetricsAndPadding){ _viewMetricsAndPadding = new EdgeMetrics(); }; var _local1:EdgeMetrics = _viewMetricsAndPadding; var _local2:EdgeMetrics = viewMetrics; _local1.left = (_local2.left + getStyle("paddingLeft")); _local1.right = (_local2.right + getStyle("paddingRight")); _local1.top = (_local2.top + getStyle("paddingTop")); _local1.bottom = (_local2.bottom + getStyle("paddingBottom")); return (_local1); } override public function addChild(_arg1:DisplayObject):DisplayObject{ return (addChildAt(_arg1, numChildren)); } public function set horizontalPageScrollSize(_arg1:Number):void{ scrollPropertiesChanged = true; _horizontalPageScrollSize = _arg1; invalidateDisplayList(); dispatchEvent(new Event("horizontalPageScrollSizeChanged")); } override mx_internal function childAdded(_arg1:DisplayObject):void{ dispatchEvent(new Event("childrenChanged")); var _local2:ChildExistenceChangedEvent = new ChildExistenceChangedEvent(ChildExistenceChangedEvent.CHILD_ADD); _local2.relatedObject = _arg1; dispatchEvent(_local2); _arg1.dispatchEvent(new FlexEvent(FlexEvent.ADD)); super.childAdded(_arg1); } public function set horizontalScrollPolicy(_arg1:String):void{ if (_horizontalScrollPolicy != _arg1){ _horizontalScrollPolicy = _arg1; invalidateDisplayList(); dispatchEvent(new Event("horizontalScrollPolicyChanged")); }; } private function layoutCompleteHandler(_arg1:FlexEvent):void{ UIComponentGlobals.layoutManager.removeEventListener(FlexEvent.UPDATE_COMPLETE, layoutCompleteHandler); forceLayout = false; var _local2:Boolean; if (!isNaN(horizontalScrollPositionPending)){ if (horizontalScrollPositionPending < 0){ horizontalScrollPositionPending = 0; } else { if (horizontalScrollPositionPending > maxHorizontalScrollPosition){ horizontalScrollPositionPending = maxHorizontalScrollPosition; }; }; if (((horizontalScrollBar) && (!((horizontalScrollBar.scrollPosition == horizontalScrollPositionPending))))){ _horizontalScrollPosition = horizontalScrollPositionPending; horizontalScrollBar.scrollPosition = horizontalScrollPositionPending; _local2 = true; }; horizontalScrollPositionPending = NaN; }; if (!isNaN(verticalScrollPositionPending)){ if (verticalScrollPositionPending < 0){ verticalScrollPositionPending = 0; } else { if (verticalScrollPositionPending > maxVerticalScrollPosition){ verticalScrollPositionPending = maxVerticalScrollPosition; }; }; if (((verticalScrollBar) && (!((verticalScrollBar.scrollPosition == verticalScrollPositionPending))))){ _verticalScrollPosition = verticalScrollPositionPending; verticalScrollBar.scrollPosition = verticalScrollPositionPending; _local2 = true; }; verticalScrollPositionPending = NaN; }; if (_local2){ scrollChildren(); }; } public function createComponentsFromDescriptors(_arg1:Boolean=true):void{ var _local4:IFlexDisplayObject; numChildrenBefore = numChildren; createdComponents = []; var _local2:int = (childDescriptors) ? childDescriptors.length : 0; var _local3:int; while (_local3 < _local2) { _local4 = createComponentFromDescriptor(childDescriptors[_local3], _arg1); createdComponents.push(_local4); _local3++; }; if ((((creationPolicy == ContainerCreationPolicy.QUEUED)) || ((creationPolicy == ContainerCreationPolicy.NONE)))){ UIComponentGlobals.layoutManager.usePhasedInstantiation = false; }; numChildrenCreated = (numChildren - numChildrenBefore); processedDescriptors = true; } override mx_internal function fillOverlay(_arg1:UIComponent, _arg2:uint, _arg3:RoundedRectangle=null):void{ var _local4:EdgeMetrics = viewMetrics; var _local5:Number = 0; if (!_arg3){ _arg3 = new RoundedRectangle(_local4.left, _local4.top, ((unscaledWidth - _local4.right) - _local4.left), ((unscaledHeight - _local4.bottom) - _local4.top), _local5); }; if (((((((((isNaN(_arg3.x)) || (isNaN(_arg3.y)))) || (isNaN(_arg3.width)))) || (isNaN(_arg3.height)))) || (isNaN(_arg3.cornerRadius)))){ return; }; var _local6:Graphics = _arg1.graphics; _local6.clear(); _local6.beginFill(_arg2); _local6.drawRoundRect(_arg3.x, _arg3.y, _arg3.width, _arg3.height, (_arg3.cornerRadius * 2), (_arg3.cornerRadius * 2)); _local6.endFill(); } override public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ super.removeEventListener(_arg1, _arg2, _arg3); if ((((((((((((((((_arg1 == MouseEvent.CLICK)) || ((_arg1 == MouseEvent.DOUBLE_CLICK)))) || ((_arg1 == MouseEvent.MOUSE_DOWN)))) || ((_arg1 == MouseEvent.MOUSE_MOVE)))) || ((_arg1 == MouseEvent.MOUSE_OVER)))) || ((_arg1 == MouseEvent.MOUSE_OUT)))) || ((_arg1 == MouseEvent.MOUSE_UP)))) || ((_arg1 == MouseEvent.MOUSE_WHEEL)))){ if ((((mouseEventReferenceCount > 0)) && ((--mouseEventReferenceCount == 0)))){ setStyle("mouseShield", false); setStyle("mouseShieldChildren", false); }; }; } mx_internal function rawChildren_removeChildAt(_arg1:int):DisplayObject{ var _local2:DisplayObject = super.getChildAt(_arg1); super.removingChild(_local2); $removeChildAt(_arg1); super.childRemoved(_local2); if ((((_firstChildIndex < _arg1)) && ((_arg1 < (_firstChildIndex + _numChildren))))){ _numChildren--; } else { if ((((_numChildren == 0)) || ((_arg1 < _firstChildIndex)))){ _firstChildIndex--; }; }; invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("childrenChanged")); return (_local2); } public function set data(_arg1:Object):void{ _data = _arg1; dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE)); invalidateDisplayList(); } override public function removeChildAt(_arg1:int):DisplayObject{ return (removeChild(getChildAt(_arg1))); } private function isBorderNeeded():Boolean{ var c:Class = getStyle("borderSkin"); try { if (c != getDefinitionByName("mx.skins.halo::HaloBorder")){ return (true); }; } catch(e:Error) { return (true); }; var v:Object = getStyle("borderStyle"); if (v){ if (((!((v == "none"))) || ((((v == "none")) && (getStyle("mouseShield")))))){ return (true); }; }; v = getStyle("backgroundColor"); if (((!((v === null))) && (!((v === ""))))){ return (true); }; v = getStyle("backgroundImage"); return (((!((v == null))) && (!((v == ""))))); } public function set autoLayout(_arg1:Boolean):void{ var _local2:IInvalidating; _autoLayout = _arg1; if (_arg1){ invalidateSize(); invalidateDisplayList(); _local2 = (parent as IInvalidating); if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; }; } public function get verticalPageScrollSize():Number{ return (_verticalPageScrollSize); } public function getChildren():Array{ var _local1:Array = []; var _local2:int = numChildren; var _local3:int; while (_local3 < _local2) { _local1.push(getChildAt(_local3)); _local3++; }; return (_local1); } private function createScrollbarsIfNeeded(_arg1:Rectangle):Boolean{ var _local2:Number = _arg1.right; var _local3:Number = _arg1.bottom; var _local4:Number = unscaledWidth; var _local5:Number = unscaledHeight; var _local6:Boolean = (((_arg1.left < 0)) || ((_arg1.top < 0))); var _local7:EdgeMetrics = viewMetrics; if (scaleX != 1){ _local4 = (_local4 + (1 / Math.abs(scaleX))); }; if (scaleY != 1){ _local5 = (_local5 + (1 / Math.abs(scaleY))); }; _local4 = Math.floor(_local4); _local5 = Math.floor(_local5); _local2 = Math.floor(_local2); _local3 = Math.floor(_local3); if (((horizontalScrollBar) && (!((horizontalScrollPolicy == ScrollPolicy.ON))))){ _local5 = (_local5 - horizontalScrollBar.minHeight); }; if (((verticalScrollBar) && (!((verticalScrollPolicy == ScrollPolicy.ON))))){ _local4 = (_local4 - verticalScrollBar.minWidth); }; _local4 = (_local4 - (_local7.left + _local7.right)); _local5 = (_local5 - (_local7.top + _local7.bottom)); var _local8 = (horizontalScrollPolicy == ScrollPolicy.ON); var _local9 = (verticalScrollPolicy == ScrollPolicy.ON); var _local10:Boolean = ((((((((((_local8) || (_local9))) || (_local6))) || (!((overlay == null))))) || ((_local7.left > 0)))) || ((_local7.top > 0))); if (_local4 < _local2){ _local10 = true; if ((((((horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((((unscaledHeight - _local7.top) - _local7.bottom) >= 18)))) && ((((unscaledWidth - _local7.left) - _local7.right) >= 32)))){ _local8 = true; }; }; if (_local5 < _local3){ _local10 = true; if ((((((verticalScrollPolicy == ScrollPolicy.AUTO)) && ((((unscaledWidth - _local7.left) - _local7.right) >= 18)))) && ((((unscaledHeight - _local7.top) - _local7.bottom) >= 32)))){ _local9 = true; }; }; if (((((((((((((((_local8) && (_local9))) && ((horizontalScrollPolicy == ScrollPolicy.AUTO)))) && ((verticalScrollPolicy == ScrollPolicy.AUTO)))) && (horizontalScrollBar))) && (verticalScrollBar))) && (((_local4 + verticalScrollBar.minWidth) >= _local2)))) && (((_local5 + horizontalScrollBar.minHeight) >= _local3)))){ _local9 = false; _local8 = _local9; } else { if (((((((((_local8) && (!(_local9)))) && (verticalScrollBar))) && ((horizontalScrollPolicy == ScrollPolicy.AUTO)))) && (((_local4 + verticalScrollBar.minWidth) >= _local2)))){ _local8 = false; }; }; var _local11:Boolean = createOrDestroyScrollbars(_local8, _local9, _local10); if (((((!((scrollableWidth == _local2))) || (!((viewableWidth == _local4))))) || (_local11))){ if (horizontalScrollBar){ horizontalScrollBar.setScrollProperties(_local4, 0, (_local2 - _local4), horizontalPageScrollSize); scrollPositionChanged = true; }; viewableWidth = _local4; scrollableWidth = _local2; }; if (((((!((scrollableHeight == _local3))) || (!((viewableHeight == _local5))))) || (_local11))){ if (verticalScrollBar){ verticalScrollBar.setScrollProperties(_local5, 0, (_local3 - _local5), verticalPageScrollSize); scrollPositionChanged = true; }; viewableHeight = _local5; scrollableHeight = _local3; }; return (_local11); } override mx_internal function removingChild(_arg1:DisplayObject):void{ super.removingChild(_arg1); _arg1.dispatchEvent(new FlexEvent(FlexEvent.REMOVE)); var _local2:ChildExistenceChangedEvent = new ChildExistenceChangedEvent(ChildExistenceChangedEvent.CHILD_REMOVE); _local2.relatedObject = _arg1; dispatchEvent(_local2); } mx_internal function get numChildrenCreated():int{ return (_numChildrenCreated); } mx_internal function rawChildren_addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{ if ((((_firstChildIndex < _arg2)) && ((_arg2 < ((_firstChildIndex + _numChildren) + 1))))){ _numChildren++; } else { if (_arg2 <= _firstChildIndex){ _firstChildIndex++; }; }; super.addingChild(_arg1); $addChildAt(_arg1, _arg2); super.childAdded(_arg1); dispatchEvent(new Event("childrenChanged")); return (_arg1); } private function hasChildMatchingDescriptor(_arg1:UIComponentDescriptor):Boolean{ var _local4:int; var _local5:IUIComponent; var _local2:String = _arg1.id; if (((!((_local2 == null))) && ((document[_local2] == null)))){ return (false); }; var _local3:int = numChildren; _local4 = 0; while (_local4 < _local3) { _local5 = IUIComponent(getChildAt(_local4)); if ((((_local5 is IDeferredInstantiationUIComponent)) && ((IDeferredInstantiationUIComponent(_local5).descriptor == _arg1)))){ return (true); }; _local4++; }; if (childRepeaters){ _local3 = childRepeaters.length; _local4 = 0; while (_local4 < _local3) { if (IDeferredInstantiationUIComponent(childRepeaters[_local4]).descriptor == _arg1){ return (true); }; _local4++; }; }; return (false); } mx_internal function rawChildren_getChildByName(_arg1:String):DisplayObject{ return (super.getChildByName(_arg1)); } override public function validateDisplayList():void{ var _local1:EdgeMetrics; var _local2:Number; var _local3:Number; var _local4:Object; var _local5:Number; var _local6:Number; var _local7:Number; if (((_autoLayout) || (forceLayout))){ doingLayout = true; super.validateDisplayList(); doingLayout = false; } else { layoutChrome(unscaledWidth, unscaledHeight); }; invalidateDisplayListFlag = true; if (createContentPaneAndScrollbarsIfNeeded()){ if (((_autoLayout) || (forceLayout))){ doingLayout = true; super.validateDisplayList(); doingLayout = false; }; createContentPaneAndScrollbarsIfNeeded(); }; if (clampScrollPositions()){ scrollChildren(); }; if (contentPane){ _local1 = viewMetrics; if (overlay){ overlay.x = 0; overlay.y = 0; overlay.width = unscaledWidth; overlay.height = unscaledHeight; }; if (((horizontalScrollBar) || (verticalScrollBar))){ if (((verticalScrollBar) && ((verticalScrollPolicy == ScrollPolicy.ON)))){ _local1.right = (_local1.right - verticalScrollBar.minWidth); }; if (((horizontalScrollBar) && ((horizontalScrollPolicy == ScrollPolicy.ON)))){ _local1.bottom = (_local1.bottom - horizontalScrollBar.minHeight); }; if (horizontalScrollBar){ _local2 = ((unscaledWidth - _local1.left) - _local1.right); if (verticalScrollBar){ _local2 = (_local2 - verticalScrollBar.minWidth); }; horizontalScrollBar.setActualSize(_local2, horizontalScrollBar.minHeight); horizontalScrollBar.move(_local1.left, ((unscaledHeight - _local1.bottom) - horizontalScrollBar.minHeight)); }; if (verticalScrollBar){ _local3 = ((unscaledHeight - _local1.top) - _local1.bottom); if (horizontalScrollBar){ _local3 = (_local3 - horizontalScrollBar.minHeight); }; verticalScrollBar.setActualSize(verticalScrollBar.minWidth, _local3); verticalScrollBar.move(((unscaledWidth - _local1.right) - verticalScrollBar.minWidth), _local1.top); }; if (whiteBox){ whiteBox.x = verticalScrollBar.x; whiteBox.y = horizontalScrollBar.y; }; }; contentPane.x = _local1.left; contentPane.y = _local1.top; if (focusPane){ focusPane.x = _local1.left; focusPane.y = _local1.top; }; scrollChildren(); }; invalidateDisplayListFlag = false; if (blocker){ _local1 = viewMetrics; _local4 = (enabled) ? null : getStyle("backgroundDisabledColor"); if ((((_local4 === null)) || (isNaN(Number(_local4))))){ _local4 = getStyle("backgroundColor"); }; if ((((_local4 === null)) || (isNaN(Number(_local4))))){ _local4 = 0xFFFFFF; }; _local5 = getStyle("disabledOverlayAlpha"); if (isNaN(_local5)){ _local5 = 0.6; }; blocker.x = _local1.left; blocker.y = _local1.top; _local6 = (unscaledWidth - (_local1.left + _local1.right)); _local7 = (unscaledHeight - (_local1.top + _local1.bottom)); blocker.graphics.clear(); blocker.graphics.beginFill(uint(_local4), _local5); blocker.graphics.drawRect(0, 0, _local6, _local7); blocker.graphics.endFill(); rawChildren.setChildIndex(blocker, (rawChildren.numChildren - 1)); }; } public function set horizontalLineScrollSize(_arg1:Number):void{ scrollPropertiesChanged = true; _horizontalLineScrollSize = _arg1; invalidateDisplayList(); dispatchEvent(new Event("horizontalLineScrollSizeChanged")); } override public function initialize():void{ var _local1:*; var _local2:String; if (((((isDocument) && (documentDescriptor))) && (!(processedDescriptors)))){ _local1 = documentDescriptor.properties; if (((_local1) && (_local1.childDescriptors))){ if (_childDescriptors){ _local2 = resourceManager.getString("core", "multipleChildSets_ClassAndInstance"); throw (new Error(_local2)); }; _childDescriptors = _local1.childDescriptors; }; }; super.initialize(); } mx_internal function set forceClipping(_arg1:Boolean):void{ if (_clipContent){ if (_arg1){ _forceClippingCount++; } else { _forceClippingCount--; }; createContentPane(); scrollChildren(); }; } public function removeAllChildren():void{ while (numChildren > 0) { removeChildAt(0); }; } override public function contentToGlobal(_arg1:Point):Point{ if (contentPane){ return (contentPane.localToGlobal(_arg1)); }; return (localToGlobal(_arg1)); } public function get horizontalPageScrollSize():Number{ return (_horizontalPageScrollSize); } override mx_internal function childRemoved(_arg1:DisplayObject):void{ super.childRemoved(_arg1); invalidateSize(); invalidateDisplayList(); if (!contentPane){ _numChildren--; if (_numChildren == 0){ _firstChildIndex = super.numChildren; }; }; if (((contentPane) && (!(autoLayout)))){ forceLayout = true; UIComponentGlobals.layoutManager.addEventListener(FlexEvent.UPDATE_COMPLETE, layoutCompleteHandler, false, 0, true); }; dispatchEvent(new Event("childrenChanged")); } public function set defaultButton(_arg1:IFlexDisplayObject):void{ _defaultButton = _arg1; ContainerGlobals.focusedContainer = null; } public function get data():Object{ return (_data); } override public function get numChildren():int{ return ((contentPane) ? contentPane.numChildren : _numChildren); } public function get autoLayout():Boolean{ return (_autoLayout); } override public function styleChanged(_arg1:String):void{ var _local3:String; var _local4:String; var _local2:Boolean = (((_arg1 == null)) || ((_arg1 == "styleName"))); if (((_local2) || (StyleManager.isSizeInvalidatingStyle(_arg1)))){ invalidateDisplayList(); }; if (((_local2) || ((_arg1 == "borderSkin")))){ if (border){ rawChildren.removeChild(DisplayObject(border)); border = null; createBorder(); }; }; if (((((((((((_local2) || ((_arg1 == "borderStyle")))) || ((_arg1 == "backgroundColor")))) || ((_arg1 == "backgroundImage")))) || ((_arg1 == "mouseShield")))) || ((_arg1 == "mouseShieldChildren")))){ createBorder(); }; super.styleChanged(_arg1); if (((_local2) || (StyleManager.isSizeInvalidatingStyle(_arg1)))){ invalidateViewMetricsAndPadding(); }; if (((_local2) || ((_arg1 == "horizontalScrollBarStyleName")))){ if (((horizontalScrollBar) && ((horizontalScrollBar is ISimpleStyleClient)))){ _local3 = getStyle("horizontalScrollBarStyleName"); ISimpleStyleClient(horizontalScrollBar).styleName = _local3; }; }; if (((_local2) || ((_arg1 == "verticalScrollBarStyleName")))){ if (((verticalScrollBar) && ((verticalScrollBar is ISimpleStyleClient)))){ _local4 = getStyle("verticalScrollBarStyleName"); ISimpleStyleClient(verticalScrollBar).styleName = _local4; }; }; } override protected function commitProperties():void{ var _local1:String; super.commitProperties(); if (changedStyles){ _local1 = ((changedStyles == MULTIPLE_PROPERTIES)) ? null : changedStyles; super.notifyStyleChangeInChildren(_local1, true); changedStyles = null; }; createOrDestroyBlocker(); } override public function finishPrint(_arg1:Object, _arg2:IFlexDisplayObject):void{ if (_arg1){ contentPane.scrollRect = Rectangle(_arg1); }; super.finishPrint(_arg1, _arg2); } public function get maxHorizontalScrollPosition():Number{ return ((horizontalScrollBar) ? horizontalScrollBar.maxScrollPosition : Math.max((scrollableWidth - viewableWidth), 0)); } public function set creationPolicy(_arg1:String):void{ _creationPolicy = _arg1; setActualCreationPolicies(_arg1); } public function set label(_arg1:String):void{ _label = _arg1; dispatchEvent(new Event("labelChanged")); } private function clampScrollPositions():Boolean{ var _local1:Boolean; if (_horizontalScrollPosition < 0){ _horizontalScrollPosition = 0; _local1 = true; } else { if (_horizontalScrollPosition > maxHorizontalScrollPosition){ _horizontalScrollPosition = maxHorizontalScrollPosition; _local1 = true; }; }; if (((horizontalScrollBar) && (!((horizontalScrollBar.scrollPosition == _horizontalScrollPosition))))){ horizontalScrollBar.scrollPosition = _horizontalScrollPosition; }; if (_verticalScrollPosition < 0){ _verticalScrollPosition = 0; _local1 = true; } else { if (_verticalScrollPosition > maxVerticalScrollPosition){ _verticalScrollPosition = maxVerticalScrollPosition; _local1 = true; }; }; if (((verticalScrollBar) && (!((verticalScrollBar.scrollPosition == _verticalScrollPosition))))){ verticalScrollBar.scrollPosition = _verticalScrollPosition; }; return (_local1); } override public function prepareToPrint(_arg1:IFlexDisplayObject):Object{ var _local2:Rectangle = (((contentPane) && (contentPane.scrollRect))) ? contentPane.scrollRect : null; if (_local2){ contentPane.scrollRect = null; }; super.prepareToPrint(_arg1); return (_local2); } mx_internal function get firstChildIndex():int{ return (_firstChildIndex); } mx_internal function rawChildren_addChild(_arg1:DisplayObject):DisplayObject{ if (_numChildren == 0){ _firstChildIndex++; }; super.addingChild(_arg1); $addChild(_arg1); super.childAdded(_arg1); dispatchEvent(new Event("childrenChanged")); return (_arg1); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:Object; var _local4:Number; super.updateDisplayList(_arg1, _arg2); layoutChrome(_arg1, _arg2); if (scrollPositionChanged){ clampScrollPositions(); scrollChildren(); scrollPositionChanged = false; }; if (scrollPropertiesChanged){ if (horizontalScrollBar){ horizontalScrollBar.lineScrollSize = horizontalLineScrollSize; horizontalScrollBar.pageScrollSize = horizontalPageScrollSize; }; if (verticalScrollBar){ verticalScrollBar.lineScrollSize = verticalLineScrollSize; verticalScrollBar.pageScrollSize = verticalPageScrollSize; }; scrollPropertiesChanged = false; }; if (((contentPane) && (contentPane.scrollRect))){ _local3 = (enabled) ? null : getStyle("backgroundDisabledColor"); if ((((_local3 === null)) || (isNaN(Number(_local3))))){ _local3 = getStyle("backgroundColor"); }; _local4 = getStyle("backgroundAlpha"); if (((((((!(_clipContent)) || (isNaN(Number(_local3))))) || ((_local3 === "")))) || (((!(((horizontalScrollBar) || (verticalScrollBar)))) && (!(cacheAsBitmap)))))){ _local3 = null; } else { if (((getStyle("backgroundImage")) || (getStyle("background")))){ _local3 = null; } else { if (_local4 != 1){ _local3 = null; }; }; }; contentPane.opaqueBackground = _local3; contentPane.cacheAsBitmap = !((_local3 == null)); }; } override mx_internal function addingChild(_arg1:DisplayObject):void{ var _local2:IUIComponent = IUIComponent(_arg1); super.addingChild(_arg1); invalidateSize(); invalidateDisplayList(); if (!contentPane){ if (_numChildren == 0){ _firstChildIndex = super.numChildren; }; _numChildren++; }; if (((contentPane) && (!(autoLayout)))){ forceLayout = true; UIComponentGlobals.layoutManager.addEventListener(FlexEvent.UPDATE_COMPLETE, layoutCompleteHandler, false, 0, true); }; } mx_internal function setActualCreationPolicies(_arg1:String):void{ var _local5:IFlexDisplayObject; var _local6:Container; actualCreationPolicy = _arg1; var _local2:String = _arg1; if (_arg1 == ContainerCreationPolicy.QUEUED){ _local2 = ContainerCreationPolicy.AUTO; }; var _local3:int = numChildren; var _local4:int; while (_local4 < _local3) { _local5 = IFlexDisplayObject(getChildAt(_local4)); if ((_local5 is Container)){ _local6 = Container(_local5); if (_local6.creationPolicy == null){ _local6.setActualCreationPolicies(_local2); }; }; _local4++; }; } } }//package mx.core
Section 154
//ContainerCreationPolicy (mx.core.ContainerCreationPolicy) package mx.core { public final class ContainerCreationPolicy { public static const ALL:String = "all"; public static const QUEUED:String = "queued"; public static const NONE:String = "none"; mx_internal static const VERSION:String = "3.0.0.0"; public static const AUTO:String = "auto"; } }//package mx.core
Section 155
//ContainerGlobals (mx.core.ContainerGlobals) package mx.core { import flash.display.*; import mx.managers.*; public class ContainerGlobals { public static var focusedContainer:InteractiveObject; public static function checkFocus(_arg1:InteractiveObject, _arg2:InteractiveObject):void{ var _local6:IFocusManager; var _local7:IButton; var _local3:InteractiveObject = _arg2; var _local4:InteractiveObject = _arg2; var _local5:IUIComponent; if (((!((_arg2 == null))) && ((_arg1 == _arg2)))){ return; }; while (_local4) { if (_local4.parent){ _local3 = _local4.parent; } else { _local3 = null; }; if ((_local4 is IUIComponent)){ _local5 = IUIComponent(_local4); }; _local4 = _local3; if (((((_local4) && ((_local4 is IContainer)))) && (IContainer(_local4).defaultButton))){ break; }; }; if (((!((ContainerGlobals.focusedContainer == _local4))) || ((((ContainerGlobals.focusedContainer == null)) && ((_local4 == null)))))){ if (!_local4){ _local4 = InteractiveObject(_local5); }; if (((_local4) && ((_local4 is IContainer)))){ _local6 = IContainer(_local4).focusManager; if (!_local6){ return; }; _local7 = (IContainer(_local4).defaultButton as IButton); if (_local7){ ContainerGlobals.focusedContainer = InteractiveObject(_local4); _local6.defaultButton = (_local7 as IButton); } else { ContainerGlobals.focusedContainer = InteractiveObject(_local4); _local6.defaultButton = null; }; }; }; } } }//package mx.core
Section 156
//ContainerLayout (mx.core.ContainerLayout) package mx.core { public final class ContainerLayout { public static const HORIZONTAL:String = "horizontal"; public static const VERTICAL:String = "vertical"; public static const ABSOLUTE:String = "absolute"; mx_internal static const VERSION:String = "3.0.0.0"; } }//package mx.core
Section 157
//ContainerRawChildrenList (mx.core.ContainerRawChildrenList) package mx.core { import flash.display.*; import flash.geom.*; public class ContainerRawChildrenList implements IChildList { private var owner:Container; mx_internal static const VERSION:String = "3.0.0.0"; public function ContainerRawChildrenList(_arg1:Container){ this.owner = _arg1; } public function addChild(_arg1:DisplayObject):DisplayObject{ return (owner.mx_internal::rawChildren_addChild(_arg1)); } public function getChildIndex(_arg1:DisplayObject):int{ return (owner.mx_internal::rawChildren_getChildIndex(_arg1)); } public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{ var _local3 = owner; _local3.mx_internal::rawChildren_setChildIndex(_arg1, _arg2); } public function getChildByName(_arg1:String):DisplayObject{ return (owner.mx_internal::rawChildren_getChildByName(_arg1)); } public function removeChildAt(_arg1:int):DisplayObject{ return (owner.mx_internal::rawChildren_removeChildAt(_arg1)); } public function get numChildren():int{ return (owner.mx_internal::$numChildren); } public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{ return (owner.mx_internal::rawChildren_addChildAt(_arg1, _arg2)); } public function getObjectsUnderPoint(_arg1:Point):Array{ return (owner.mx_internal::rawChildren_getObjectsUnderPoint(_arg1)); } public function contains(_arg1:DisplayObject):Boolean{ return (owner.mx_internal::rawChildren_contains(_arg1)); } public function removeChild(_arg1:DisplayObject):DisplayObject{ return (owner.mx_internal::rawChildren_removeChild(_arg1)); } public function getChildAt(_arg1:int):DisplayObject{ return (owner.mx_internal::rawChildren_getChildAt(_arg1)); } } }//package mx.core
Section 158
//DeferredInstanceFromFunction (mx.core.DeferredInstanceFromFunction) package mx.core { public class DeferredInstanceFromFunction implements IDeferredInstance { private var generator:Function; private var instance:Object;// = null mx_internal static const VERSION:String = "3.0.0.0"; public function DeferredInstanceFromFunction(_arg1:Function){ this.generator = _arg1; } public function getInstance():Object{ if (!instance){ instance = generator(); }; return (instance); } } }//package mx.core
Section 159
//DragSource (mx.core.DragSource) package mx.core { public class DragSource { private var formatHandlers:Object; private var dataHolder:Object; private var _formats:Array; mx_internal static const VERSION:String = "3.0.0.0"; public function DragSource(){ dataHolder = {}; formatHandlers = {}; _formats = []; super(); } public function hasFormat(_arg1:String):Boolean{ var _local2:int = _formats.length; var _local3:int; while (_local3 < _local2) { if (_formats[_local3] == _arg1){ return (true); }; _local3++; }; return (false); } public function addData(_arg1:Object, _arg2:String):void{ _formats.push(_arg2); dataHolder[_arg2] = _arg1; } public function dataForFormat(_arg1:String):Object{ var _local2:Object = dataHolder[_arg1]; if (_local2){ return (_local2); }; if (formatHandlers[_arg1]){ return (formatHandlers[_arg1]()); }; return (null); } public function addHandler(_arg1:Function, _arg2:String):void{ _formats.push(_arg2); formatHandlers[_arg2] = _arg1; } public function get formats():Array{ return (_formats); } } }//package mx.core
Section 160
//EdgeMetrics (mx.core.EdgeMetrics) package mx.core { public class EdgeMetrics { public var top:Number; public var left:Number; public var bottom:Number; public var right:Number; mx_internal static const VERSION:String = "3.0.0.0"; public static const EMPTY:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0); ; public function EdgeMetrics(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){ this.left = _arg1; this.top = _arg2; this.right = _arg3; this.bottom = _arg4; } public function clone():EdgeMetrics{ return (new EdgeMetrics(left, top, right, bottom)); } } }//package mx.core
Section 161
//EmbeddedFont (mx.core.EmbeddedFont) package mx.core { public class EmbeddedFont { private var _fontName:String; private var _fontStyle:String; mx_internal static const VERSION:String = "3.0.0.0"; public function EmbeddedFont(_arg1:String, _arg2:Boolean, _arg3:Boolean){ _fontName = _arg1; _fontStyle = EmbeddedFontRegistry.getFontStyle(_arg2, _arg3); } public function get fontStyle():String{ return (_fontStyle); } public function get fontName():String{ return (_fontName); } } }//package mx.core
Section 162
//EmbeddedFontRegistry (mx.core.EmbeddedFontRegistry) package mx.core { import flash.text.*; import flash.utils.*; public class EmbeddedFontRegistry implements IEmbeddedFontRegistry { mx_internal static const VERSION:String = "3.0.0.0"; private static var fonts:Object = {}; private static var instance:IEmbeddedFontRegistry; public function getAssociatedModuleFactory(_arg1:EmbeddedFont, _arg2:IFlexModuleFactory):IFlexModuleFactory{ var _local4:int; var _local5:Object; var _local3:Dictionary = fonts[createFontKey(_arg1)]; if (_local3){ _local4 = _local3[_arg2]; if (_local4){ return (_arg2); }; for (_local5 in _local3) { return ((_local5 as IFlexModuleFactory)); }; }; return (null); } public function deregisterFont(_arg1:EmbeddedFont, _arg2:IFlexModuleFactory):void{ var _local5:int; var _local6:Object; var _local3:String = createFontKey(_arg1); var _local4:Dictionary = fonts[_local3]; if (_local4 != null){ delete _local4[_arg2]; _local5 = 0; for (_local6 in _local4) { _local5++; }; if (_local5 == 0){ delete fonts[_local3]; }; }; } public function getFonts():Array{ var _local2:String; var _local1:Array = []; for (_local2 in fonts) { _local1.push(createEmbeddedFont(_local2)); }; return (_local1); } public function registerFont(_arg1:EmbeddedFont, _arg2:IFlexModuleFactory):void{ var _local3:String = createFontKey(_arg1); var _local4:Dictionary = fonts[_local3]; if (!_local4){ _local4 = new Dictionary(true); fonts[_local3] = _local4; }; _local4[_arg2] = 1; } public static function registerFonts(_arg1:Object, _arg2:IFlexModuleFactory):void{ var _local4:Object; var _local5:Object; var _local6:String; var _local7:Boolean; var _local8:Boolean; var _local3:IEmbeddedFontRegistry = IEmbeddedFontRegistry(Singleton.getInstance("mx.core::IEmbeddedFontRegistry")); for (_local4 in _arg1) { _local5 = _arg1[_local4]; for (_local6 in _local5) { if (_local5[_local6] == false){ } else { if (_local6 == "regular"){ _local7 = false; _local8 = false; } else { if (_local6 == "boldItalic"){ _local7 = true; _local8 = true; } else { if (_local6 == "bold"){ _local7 = true; _local8 = false; } else { if (_local6 == "italic"){ _local7 = false; _local8 = true; }; }; }; }; _local3.registerFont(new EmbeddedFont(String(_local4), _local7, _local8), _arg2); }; }; }; } public static function getInstance():IEmbeddedFontRegistry{ if (!instance){ instance = new (EmbeddedFontRegistry); }; return (instance); } public static function getFontStyle(_arg1:Boolean, _arg2:Boolean):String{ var _local3:String = FontStyle.REGULAR; if (((_arg1) && (_arg2))){ _local3 = FontStyle.BOLD_ITALIC; } else { if (_arg1){ _local3 = FontStyle.BOLD; } else { if (_arg2){ _local3 = FontStyle.ITALIC; }; }; }; return (_local3); } private static function createFontKey(_arg1:EmbeddedFont):String{ return ((_arg1.fontName + _arg1.fontStyle)); } private static function createEmbeddedFont(_arg1:String):EmbeddedFont{ var _local2:String; var _local3:Boolean; var _local4:Boolean; var _local5:int = endsWith(_arg1, FontStyle.REGULAR); if (_local5 > 0){ _local2 = _arg1.substring(0, _local5); return (new EmbeddedFont(_local2, false, false)); }; _local5 = endsWith(_arg1, FontStyle.BOLD); if (_local5 > 0){ _local2 = _arg1.substring(0, _local5); return (new EmbeddedFont(_local2, true, false)); }; _local5 = endsWith(_arg1, FontStyle.BOLD_ITALIC); if (_local5 > 0){ _local2 = _arg1.substring(0, _local5); return (new EmbeddedFont(_local2, true, true)); }; _local5 = endsWith(_arg1, FontStyle.ITALIC); if (_local5 > 0){ _local2 = _arg1.substring(0, _local5); return (new EmbeddedFont(_local2, false, true)); }; return (new EmbeddedFont("", false, false)); } private static function endsWith(_arg1:String, _arg2:String):int{ var _local3:int = _arg1.lastIndexOf(_arg2); if ((((_local3 > 0)) && (((_local3 + _arg2.length) == _arg1.length)))){ return (_local3); }; return (-1); } } }//package mx.core
Section 163
//EventPriority (mx.core.EventPriority) package mx.core { public final class EventPriority { public static const DEFAULT:int = 0; public static const BINDING:int = 100; public static const DEFAULT_HANDLER:int = -50; public static const EFFECT:int = -100; public static const CURSOR_MANAGEMENT:int = 200; mx_internal static const VERSION:String = "3.0.0.0"; } }//package mx.core
Section 164
//FlexBitmap (mx.core.FlexBitmap) package mx.core { import flash.display.*; import mx.utils.*; public class FlexBitmap extends Bitmap { mx_internal static const VERSION:String = "3.0.0.0"; public function FlexBitmap(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){ var bitmapData = _arg1; var pixelSnapping = _arg2; var smoothing = _arg3; super(bitmapData, pixelSnapping, smoothing); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 165
//FlexLoader (mx.core.FlexLoader) package mx.core { import flash.display.*; import mx.utils.*; public class FlexLoader extends Loader { mx_internal static const VERSION:String = "3.0.0.0"; public function FlexLoader(){ super(); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 166
//FlexShape (mx.core.FlexShape) package mx.core { import flash.display.*; import mx.utils.*; public class FlexShape extends Shape { mx_internal static const VERSION:String = "3.0.0.0"; public function FlexShape(){ super(); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 167
//FlexSprite (mx.core.FlexSprite) package mx.core { import flash.display.*; import mx.utils.*; public class FlexSprite extends Sprite { mx_internal static const VERSION:String = "3.0.0.0"; public function FlexSprite(){ super(); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 168
//FlexTextField (mx.core.FlexTextField) package mx.core { import flash.text.*; import mx.utils.*; public class FlexTextField extends TextField { mx_internal static const VERSION:String = "3.0.0.0"; public function FlexTextField(){ super(); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 169
//FlexVersion (mx.core.FlexVersion) package mx.core { import mx.resources.*; public class FlexVersion { public static const VERSION_2_0_1:uint = 33554433; public static const CURRENT_VERSION:uint = 50331648; public static const VERSION_3_0:uint = 50331648; public static const VERSION_2_0:uint = 33554432; public static const VERSION_ALREADY_READ:String = "versionAlreadyRead"; public static const VERSION_ALREADY_SET:String = "versionAlreadySet"; mx_internal static const VERSION:String = "3.0.0.0"; private static var compatibilityVersionChanged:Boolean = false; private static var _compatibilityErrorFunction:Function; private static var _compatibilityVersion:uint = 50331648; private static var compatibilityVersionRead:Boolean = false; mx_internal static function changeCompatibilityVersionString(_arg1:String):void{ var _local2:Array = _arg1.split("."); var _local3:uint = parseInt(_local2[0]); var _local4:uint = parseInt(_local2[1]); var _local5:uint = parseInt(_local2[2]); _compatibilityVersion = (((_local3 << 24) + (_local4 << 16)) + _local5); } public static function set compatibilityVersion(_arg1:uint):void{ var _local2:String; if (_arg1 == _compatibilityVersion){ return; }; if (compatibilityVersionChanged){ if (compatibilityErrorFunction == null){ _local2 = ResourceManager.getInstance().getString("core", VERSION_ALREADY_SET); throw (new Error(_local2)); }; compatibilityErrorFunction(_arg1, VERSION_ALREADY_SET); }; if (compatibilityVersionRead){ if (compatibilityErrorFunction == null){ _local2 = ResourceManager.getInstance().getString("core", VERSION_ALREADY_READ); throw (new Error(_local2)); }; compatibilityErrorFunction(_arg1, VERSION_ALREADY_READ); }; _compatibilityVersion = _arg1; compatibilityVersionChanged = true; } public static function get compatibilityVersion():uint{ compatibilityVersionRead = true; return (_compatibilityVersion); } public static function set compatibilityErrorFunction(_arg1:Function):void{ _compatibilityErrorFunction = _arg1; } public static function set compatibilityVersionString(_arg1:String):void{ var _local2:Array = _arg1.split("."); var _local3:uint = parseInt(_local2[0]); var _local4:uint = parseInt(_local2[1]); var _local5:uint = parseInt(_local2[2]); compatibilityVersion = (((_local3 << 24) + (_local4 << 16)) + _local5); } public static function get compatibilityErrorFunction():Function{ return (_compatibilityErrorFunction); } public static function get compatibilityVersionString():String{ var _local1:uint = ((compatibilityVersion >> 24) & 0xFF); var _local2:uint = ((compatibilityVersion >> 16) & 0xFF); var _local3:uint = (compatibilityVersion & 0xFFFF); return (((((_local1.toString() + ".") + _local2.toString()) + ".") + _local3.toString())); } } }//package mx.core
Section 170
//IBorder (mx.core.IBorder) package mx.core { public interface IBorder { function get borderMetrics():EdgeMetrics; } }//package mx.core
Section 171
//IButton (mx.core.IButton) package mx.core { public interface IButton extends IUIComponent { function get emphasized():Boolean; function set emphasized(_arg1:Boolean):void; function callLater(_arg1:Function, _arg2:Array=null):void; } }//package mx.core
Section 172
//IChildList (mx.core.IChildList) package mx.core { import flash.display.*; import flash.geom.*; public interface IChildList { function get numChildren():int; function removeChild(_arg1:DisplayObject):DisplayObject; function getChildByName(_arg1:String):DisplayObject; function removeChildAt(_arg1:int):DisplayObject; function getChildIndex(_arg1:DisplayObject):int; function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject; function getObjectsUnderPoint(_arg1:Point):Array; function setChildIndex(_arg1:DisplayObject, _arg2:int):void; function getChildAt(_arg1:int):DisplayObject; function addChild(_arg1:DisplayObject):DisplayObject; function contains(_arg1:DisplayObject):Boolean; } }//package mx.core
Section 173
//IConstraintClient (mx.core.IConstraintClient) package mx.core { public interface IConstraintClient { function setConstraintValue(_arg1:String, _arg2):void; function getConstraintValue(_arg1:String); } }//package mx.core
Section 174
//IContainer (mx.core.IContainer) package mx.core { import flash.display.*; import flash.geom.*; import flash.media.*; import flash.text.*; import mx.managers.*; public interface IContainer extends IUIComponent { function set hitArea(_arg1:Sprite):void; function swapChildrenAt(_arg1:int, _arg2:int):void; function getChildByName(_arg1:String):DisplayObject; function get doubleClickEnabled():Boolean; function get graphics():Graphics; function get useHandCursor():Boolean; function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject; function set mouseChildren(_arg1:Boolean):void; function set creatingContentPane(_arg1:Boolean):void; function get textSnapshot():TextSnapshot; function getChildIndex(_arg1:DisplayObject):int; function set doubleClickEnabled(_arg1:Boolean):void; function getObjectsUnderPoint(_arg1:Point):Array; function get creatingContentPane():Boolean; function setChildIndex(_arg1:DisplayObject, _arg2:int):void; function get soundTransform():SoundTransform; function set useHandCursor(_arg1:Boolean):void; function get numChildren():int; function contains(_arg1:DisplayObject):Boolean; function get verticalScrollPosition():Number; function set defaultButton(_arg1:IFlexDisplayObject):void; function swapChildren(_arg1:DisplayObject, _arg2:DisplayObject):void; function set horizontalScrollPosition(_arg1:Number):void; function get focusManager():IFocusManager; function startDrag(_arg1:Boolean=false, _arg2:Rectangle=null):void; function set mouseEnabled(_arg1:Boolean):void; function getChildAt(_arg1:int):DisplayObject; function set soundTransform(_arg1:SoundTransform):void; function get tabChildren():Boolean; function get tabIndex():int; function set focusRect(_arg1:Object):void; function get hitArea():Sprite; function get mouseChildren():Boolean; function removeChildAt(_arg1:int):DisplayObject; function get defaultButton():IFlexDisplayObject; function stopDrag():void; function set tabEnabled(_arg1:Boolean):void; function get horizontalScrollPosition():Number; function get focusRect():Object; function get viewMetrics():EdgeMetrics; function set verticalScrollPosition(_arg1:Number):void; function get dropTarget():DisplayObject; function get mouseEnabled():Boolean; function set tabChildren(_arg1:Boolean):void; function set buttonMode(_arg1:Boolean):void; function get tabEnabled():Boolean; function get buttonMode():Boolean; function removeChild(_arg1:DisplayObject):DisplayObject; function set tabIndex(_arg1:int):void; function addChild(_arg1:DisplayObject):DisplayObject; function areInaccessibleObjectsUnderPoint(_arg1:Point):Boolean; } }//package mx.core
Section 175
//IDataRenderer (mx.core.IDataRenderer) package mx.core { public interface IDataRenderer { function get data():Object; function set data(_arg1:Object):void; } }//package mx.core
Section 176
//IDeferredInstance (mx.core.IDeferredInstance) package mx.core { public interface IDeferredInstance { function getInstance():Object; } }//package mx.core
Section 177
//IDeferredInstantiationUIComponent (mx.core.IDeferredInstantiationUIComponent) package mx.core { public interface IDeferredInstantiationUIComponent extends IUIComponent { function set cacheHeuristic(_arg1:Boolean):void; function createReferenceOnParentDocument(_arg1:IFlexDisplayObject):void; function get cachePolicy():String; function set id(_arg1:String):void; function registerEffects(_arg1:Array):void; function executeBindings(_arg1:Boolean=false):void; function get id():String; function deleteReferenceOnParentDocument(_arg1:IFlexDisplayObject):void; function set descriptor(_arg1:UIComponentDescriptor):void; function get descriptor():UIComponentDescriptor; } }//package mx.core
Section 178
//IEmbeddedFontRegistry (mx.core.IEmbeddedFontRegistry) package mx.core { public interface IEmbeddedFontRegistry { function getAssociatedModuleFactory(_arg1:EmbeddedFont, _arg2:IFlexModuleFactory):IFlexModuleFactory; function registerFont(_arg1:EmbeddedFont, _arg2:IFlexModuleFactory):void; function deregisterFont(_arg1:EmbeddedFont, _arg2:IFlexModuleFactory):void; function getFonts():Array; } }//package mx.core
Section 179
//IFlexAsset (mx.core.IFlexAsset) package mx.core { public interface IFlexAsset { } }//package mx.core
Section 180
//IFlexDisplayObject (mx.core.IFlexDisplayObject) package mx.core { import flash.display.*; import flash.geom.*; import flash.accessibility.*; import flash.events.*; public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher { function get visible():Boolean; function get rotation():Number; function localToGlobal(_arg1:Point):Point; function get name():String; function set width(_arg1:Number):void; function get measuredHeight():Number; function get blendMode():String; function get scale9Grid():Rectangle; function set name(_arg1:String):void; function set scaleX(_arg1:Number):void; function set scaleY(_arg1:Number):void; function get measuredWidth():Number; function get accessibilityProperties():AccessibilityProperties; function set scrollRect(_arg1:Rectangle):void; function get cacheAsBitmap():Boolean; function globalToLocal(_arg1:Point):Point; function get height():Number; function set blendMode(_arg1:String):void; function get parent():DisplayObjectContainer; function getBounds(_arg1:DisplayObject):Rectangle; function get opaqueBackground():Object; function set scale9Grid(_arg1:Rectangle):void; function setActualSize(_arg1:Number, _arg2:Number):void; function set alpha(_arg1:Number):void; function set accessibilityProperties(_arg1:AccessibilityProperties):void; function get width():Number; function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean; function set cacheAsBitmap(_arg1:Boolean):void; function get scaleX():Number; function get scaleY():Number; function get scrollRect():Rectangle; function get mouseX():Number; function get mouseY():Number; function set height(_arg1:Number):void; function set mask(_arg1:DisplayObject):void; function getRect(_arg1:DisplayObject):Rectangle; function get alpha():Number; function set transform(_arg1:Transform):void; function move(_arg1:Number, _arg2:Number):void; function get loaderInfo():LoaderInfo; function get root():DisplayObject; function hitTestObject(_arg1:DisplayObject):Boolean; function set opaqueBackground(_arg1:Object):void; function set visible(_arg1:Boolean):void; function get mask():DisplayObject; function set x(_arg1:Number):void; function set y(_arg1:Number):void; function get transform():Transform; function set filters(_arg1:Array):void; function get x():Number; function get y():Number; function get filters():Array; function set rotation(_arg1:Number):void; function get stage():Stage; } }//package mx.core
Section 181
//IFlexModule (mx.core.IFlexModule) package mx.core { public interface IFlexModule { function set moduleFactory(_arg1:IFlexModuleFactory):void; function get moduleFactory():IFlexModuleFactory; } }//package mx.core
Section 182
//IFlexModuleFactory (mx.core.IFlexModuleFactory) package mx.core { public interface IFlexModuleFactory { function create(... _args):Object; function info():Object; } }//package mx.core
Section 183
//IFontContextComponent (mx.core.IFontContextComponent) package mx.core { public interface IFontContextComponent { function get fontContext():IFlexModuleFactory; function set fontContext(_arg1:IFlexModuleFactory):void; } }//package mx.core
Section 184
//IIMESupport (mx.core.IIMESupport) package mx.core { public interface IIMESupport { function set imeMode(_arg1:String):void; function get imeMode():String; } }//package mx.core
Section 185
//IInvalidating (mx.core.IInvalidating) package mx.core { public interface IInvalidating { function validateNow():void; function invalidateSize():void; function invalidateDisplayList():void; function invalidateProperties():void; } }//package mx.core
Section 186
//IMXMLObject (mx.core.IMXMLObject) package mx.core { public interface IMXMLObject { function initialized(_arg1:Object, _arg2:String):void; } }//package mx.core
Section 187
//IProgrammaticSkin (mx.core.IProgrammaticSkin) package mx.core { public interface IProgrammaticSkin { function validateNow():void; function validateDisplayList():void; } }//package mx.core
Section 188
//IPropertyChangeNotifier (mx.core.IPropertyChangeNotifier) package mx.core { import flash.events.*; public interface IPropertyChangeNotifier extends IEventDispatcher, IUID { } }//package mx.core
Section 189
//IRawChildrenContainer (mx.core.IRawChildrenContainer) package mx.core { public interface IRawChildrenContainer { function get rawChildren():IChildList; } }//package mx.core
Section 190
//IRectangularBorder (mx.core.IRectangularBorder) package mx.core { import flash.geom.*; public interface IRectangularBorder extends IBorder { function get backgroundImageBounds():Rectangle; function get hasBackgroundImage():Boolean; function set backgroundImageBounds(_arg1:Rectangle):void; function layoutBackgroundImage():void; } }//package mx.core
Section 191
//IRepeater (mx.core.IRepeater) package mx.core { public interface IRepeater { function get container():IContainer; function set startingIndex(_arg1:int):void; function get startingIndex():int; function set recycleChildren(_arg1:Boolean):void; function get currentItem():Object; function get count():int; function get recycleChildren():Boolean; function executeChildBindings():void; function set dataProvider(_arg1:Object):void; function initializeRepeater(_arg1:IContainer, _arg2:Boolean):void; function get currentIndex():int; function get dataProvider():Object; function set count(_arg1:int):void; } }//package mx.core
Section 192
//IRepeaterClient (mx.core.IRepeaterClient) package mx.core { public interface IRepeaterClient { function get instanceIndices():Array; function set instanceIndices(_arg1:Array):void; function get isDocument():Boolean; function set repeaters(_arg1:Array):void; function initializeRepeaterArrays(_arg1:IRepeaterClient):void; function get repeaters():Array; function set repeaterIndices(_arg1:Array):void; function get repeaterIndices():Array; } }//package mx.core
Section 193
//IStateClient (mx.core.IStateClient) package mx.core { public interface IStateClient { function get currentState():String; function set currentState(_arg1:String):void; } }//package mx.core
Section 194
//ITextFieldFactory (mx.core.ITextFieldFactory) package mx.core { import flash.text.*; public interface ITextFieldFactory { function createTextField(_arg1:IFlexModuleFactory):TextField; } }//package mx.core
Section 195
//IToolTip (mx.core.IToolTip) package mx.core { import flash.geom.*; public interface IToolTip extends IUIComponent { function set text(_arg1:String):void; function get screen():Rectangle; function get text():String; } }//package mx.core
Section 196
//IUIComponent (mx.core.IUIComponent) package mx.core { import flash.display.*; import mx.managers.*; public interface IUIComponent extends IFlexDisplayObject { function set focusPane(_arg1:Sprite):void; function get enabled():Boolean; function set enabled(_arg1:Boolean):void; function set isPopUp(_arg1:Boolean):void; function get explicitMinHeight():Number; function get percentWidth():Number; function get isPopUp():Boolean; function get owner():DisplayObjectContainer; function get percentHeight():Number; function get baselinePosition():Number; function owns(_arg1:DisplayObject):Boolean; function initialize():void; function get maxWidth():Number; function get minWidth():Number; function getExplicitOrMeasuredWidth():Number; function get explicitMaxWidth():Number; function get explicitMaxHeight():Number; function set percentHeight(_arg1:Number):void; function get minHeight():Number; function set percentWidth(_arg1:Number):void; function get document():Object; function get focusPane():Sprite; function getExplicitOrMeasuredHeight():Number; function set tweeningProperties(_arg1:Array):void; function set explicitWidth(_arg1:Number):void; function set measuredMinHeight(_arg1:Number):void; function get explicitMinWidth():Number; function get tweeningProperties():Array; function get maxHeight():Number; function set owner(_arg1:DisplayObjectContainer):void; function set includeInLayout(_arg1:Boolean):void; function setVisible(_arg1:Boolean, _arg2:Boolean=false):void; function parentChanged(_arg1:DisplayObjectContainer):void; function get explicitWidth():Number; function get measuredMinHeight():Number; function set measuredMinWidth(_arg1:Number):void; function set explicitHeight(_arg1:Number):void; function get includeInLayout():Boolean; function get measuredMinWidth():Number; function get explicitHeight():Number; function set systemManager(_arg1:ISystemManager):void; function set document(_arg1:Object):void; function get systemManager():ISystemManager; } }//package mx.core
Section 197
//IUID (mx.core.IUID) package mx.core { public interface IUID { function get uid():String; function set uid(_arg1:String):void; } }//package mx.core
Section 198
//IUITextField (mx.core.IUITextField) package mx.core { import flash.display.*; import flash.geom.*; import flash.text.*; import mx.managers.*; import mx.styles.*; public interface IUITextField extends IIMESupport, IFlexModule, IInvalidating, ISimpleStyleClient, IToolTipManagerClient, IUIComponent { function replaceText(_arg1:int, _arg2:int, _arg3:String):void; function get doubleClickEnabled():Boolean; function get nestLevel():int; function get caretIndex():int; function set doubleClickEnabled(_arg1:Boolean):void; function get maxScrollH():int; function set nestLevel(_arg1:int):void; function get numLines():int; function get scrollH():int; function setColor(_arg1:uint):void; function get maxScrollV():int; function getImageReference(_arg1:String):DisplayObject; function get scrollV():int; function get border():Boolean; function get text():String; function get styleSheet():StyleSheet; function getCharBoundaries(_arg1:int):Rectangle; function get background():Boolean; function set scrollH(_arg1:int):void; function getFirstCharInParagraph(_arg1:int):int; function get type():String; function replaceSelectedText(_arg1:String):void; function set borderColor(_arg1:uint):void; function get alwaysShowSelection():Boolean; function get sharpness():Number; function get tabIndex():int; function get textColor():uint; function set defaultTextFormat(_arg1:TextFormat):void; function get condenseWhite():Boolean; function get displayAsPassword():Boolean; function get autoSize():String; function setSelection(_arg1:int, _arg2:int):void; function set scrollV(_arg1:int):void; function set useRichTextClipboard(_arg1:Boolean):void; function get selectionBeginIndex():int; function get selectable():Boolean; function set border(_arg1:Boolean):void; function set multiline(_arg1:Boolean):void; function set background(_arg1:Boolean):void; function set embedFonts(_arg1:Boolean):void; function set text(_arg1:String):void; function get selectionEndIndex():int; function set mouseWheelEnabled(_arg1:Boolean):void; function appendText(_arg1:String):void; function get antiAliasType():String; function set styleSheet(_arg1:StyleSheet):void; function set nonInheritingStyles(_arg1:Object):void; function set textColor(_arg1:uint):void; function get wordWrap():Boolean; function getLineIndexAtPoint(_arg1:Number, _arg2:Number):int; function get htmlText():String; function set tabIndex(_arg1:int):void; function get thickness():Number; function getLineIndexOfChar(_arg1:int):int; function get bottomScrollV():int; function set restrict(_arg1:String):void; function set alwaysShowSelection(_arg1:Boolean):void; function getTextFormat(_arg1:int=-1, _arg2:int=-1):TextFormat; function set sharpness(_arg1:Number):void; function set type(_arg1:String):void; function setTextFormat(_arg1:TextFormat, _arg2:int=-1, _arg3:int=-1):void; function set gridFitType(_arg1:String):void; function getUITextFormat():UITextFormat; function set inheritingStyles(_arg1:Object):void; function setFocus():void; function get borderColor():uint; function set condenseWhite(_arg1:Boolean):void; function get textWidth():Number; function getLineOffset(_arg1:int):int; function set displayAsPassword(_arg1:Boolean):void; function set autoSize(_arg1:String):void; function get defaultTextFormat():TextFormat; function get useRichTextClipboard():Boolean; function get nonZeroTextHeight():Number; function set backgroundColor(_arg1:uint):void; function get embedFonts():Boolean; function set selectable(_arg1:Boolean):void; function get multiline():Boolean; function set maxChars(_arg1:int):void; function get textHeight():Number; function get nonInheritingStyles():Object; function getLineText(_arg1:int):String; function set focusRect(_arg1:Object):void; function get mouseWheelEnabled():Boolean; function get restrict():String; function getParagraphLength(_arg1:int):int; function set mouseEnabled(_arg1:Boolean):void; function get gridFitType():String; function get inheritingStyles():Object; function set ignorePadding(_arg1:Boolean):void; function set antiAliasType(_arg1:String):void; function get backgroundColor():uint; function getCharIndexAtPoint(_arg1:Number, _arg2:Number):int; function set tabEnabled(_arg1:Boolean):void; function get maxChars():int; function get focusRect():Object; function get ignorePadding():Boolean; function get mouseEnabled():Boolean; function get length():int; function set wordWrap(_arg1:Boolean):void; function get tabEnabled():Boolean; function set thickness(_arg1:Number):void; function getLineLength(_arg1:int):int; function truncateToFit(_arg1:String=null):Boolean; function set htmlText(_arg1:String):void; function getLineMetrics(_arg1:int):TextLineMetrics; function getStyle(_arg1:String); } }//package mx.core
Section 199
//LayoutContainer (mx.core.LayoutContainer) package mx.core { import flash.events.*; import mx.containers.*; import mx.containers.utilityClasses.*; public class LayoutContainer extends Container implements IConstraintLayout { private var _constraintColumns:Array; protected var layoutObject:Layout; private var _layout:String;// = "vertical" private var processingCreationQueue:Boolean;// = false protected var boxLayoutClass:Class; private var resizeHandlerAdded:Boolean;// = false private var preloadObj:Object; private var creationQueue:Array; private var _constraintRows:Array; protected var canvasLayoutClass:Class; mx_internal static const VERSION:String = "3.0.0.0"; mx_internal static var useProgressiveLayout:Boolean = false; public function LayoutContainer(){ layoutObject = new BoxLayout(); canvasLayoutClass = CanvasLayout; boxLayoutClass = BoxLayout; creationQueue = []; _constraintColumns = []; _constraintRows = []; super(); layoutObject.target = this; } public function get constraintColumns():Array{ return (_constraintColumns); } override mx_internal function get usePadding():Boolean{ return (!((layout == ContainerLayout.ABSOLUTE))); } override protected function layoutChrome(_arg1:Number, _arg2:Number):void{ super.layoutChrome(_arg1, _arg2); if (!doingLayout){ createBorder(); }; } public function set constraintColumns(_arg1:Array):void{ var _local2:int; var _local3:int; if (_arg1 != _constraintColumns){ _local2 = _arg1.length; _local3 = 0; while (_local3 < _local2) { ConstraintColumn(_arg1[_local3]).container = this; _local3++; }; _constraintColumns = _arg1; invalidateSize(); invalidateDisplayList(); }; } public function set layout(_arg1:String):void{ if (_layout != _arg1){ _layout = _arg1; if (layoutObject){ layoutObject.target = null; }; if (_layout == ContainerLayout.ABSOLUTE){ layoutObject = new canvasLayoutClass(); } else { layoutObject = new boxLayoutClass(); if (_layout == ContainerLayout.VERTICAL){ BoxLayout(layoutObject).direction = BoxDirection.VERTICAL; } else { BoxLayout(layoutObject).direction = BoxDirection.HORIZONTAL; }; }; if (layoutObject){ layoutObject.target = this; }; invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("layoutChanged")); }; } public function get constraintRows():Array{ return (_constraintRows); } override protected function measure():void{ super.measure(); layoutObject.measure(); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ super.updateDisplayList(_arg1, _arg2); layoutObject.updateDisplayList(_arg1, _arg2); createBorder(); } public function get layout():String{ return (_layout); } public function set constraintRows(_arg1:Array):void{ var _local2:int; var _local3:int; if (_arg1 != _constraintRows){ _local2 = _arg1.length; _local3 = 0; while (_local3 < _local2) { ConstraintRow(_arg1[_local3]).container = this; _local3++; }; _constraintRows = _arg1; invalidateSize(); invalidateDisplayList(); }; } } }//package mx.core
Section 200
//mx_internal (mx.core.mx_internal) package mx.core { public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal"; }//package mx.core
Section 201
//Repeater (mx.core.Repeater) package mx.core { import flash.display.*; import mx.automation.*; import flash.events.*; import mx.events.*; import mx.collections.*; import mx.collections.errors.*; public class Repeater extends UIComponent implements IRepeater { private var _container:Container; private var _count:int;// = -1 private var descriptorIndex:int; public var childDescriptors:Array; mx_internal var createdComponents:Array; private var collection:ICollectionView; private var _currentIndex:int; private var created:Boolean;// = false private var iterator:IViewCursor; private var _startingIndex:int;// = 0 private var _recycleChildren:Boolean;// = false mx_internal static const VERSION:String = "3.0.0.0"; public function get container():IContainer{ return ((_container as IContainer)); } private function createComponentFromDescriptor(_arg1:int, _arg2:int, _arg3:Boolean):IFlexDisplayObject{ var _local4:UIComponentDescriptor = childDescriptors[_arg2]; if (!_local4.document){ _local4.document = document; }; _local4.instanceIndices = (instanceIndices) ? instanceIndices : []; _local4.instanceIndices.push(_arg1); _local4.repeaters = repeaters; _local4.repeaters.push(this); _local4.repeaterIndices = repeaterIndices; _local4.repeaterIndices.push((startingIndex + _arg1)); _local4.invalidateProperties(); var _local5:IFlexDisplayObject = Container(container).createComponentFromDescriptor(_local4, _arg3); _local4.instanceIndices = null; _local4.repeaters = null; _local4.repeaterIndices = null; dispatchEvent(new Event("nextRepeaterItem")); return (_local5); } private function responderResultHandler(_arg1:Object, _arg2:Object):void{ execute(); } private function removeAllChildRepeaters(_arg1:Container):void{ var _local2:int; var _local3:int; var _local4:Repeater; if (_arg1.childRepeaters){ _local2 = _arg1.childRepeaters.length; _local3 = (_local2 - 1); while (_local3 >= 0) { _local4 = _arg1.childRepeaters[_local3]; if (hasDescendant(_local4)){ removeRepeater(_local4); }; _local3--; }; }; } private function recycle():void{ var _local2:int; var _local3:int; var _local4:int; var _local6:int; var _local7:Repeater; var _local8:IRepeaterClient; var _local9:int; var _local10:int; var _local11:IRepeaterClient; var _local12:IRepeaterClient; dispatchEvent(new FlexEvent(FlexEvent.REPEAT_START)); var _local1:int; var _local5:int; if (((((collection) && ((collection.length > 0)))) && (((collection.length - startingIndex) > 0)))){ _local1 = positiveMin((collection.length - startingIndex), count); _local6 = 0; _local2 = 0; while (_local2 < _local1) { _currentIndex = (startingIndex + _local2); dispatchEvent(new FlexEvent(FlexEvent.REPEAT)); if (childDescriptors){ _local3 = childDescriptors.length; if (createdComponents.length >= ((_local2 + 1) * _local3)){ _local4 = 0; while (_local4 < _local3) { _local8 = createdComponents[((_local2 * _local3) + _local4)]; if ((_local8 is _slot1)){ _local7 = Repeater(_local8); resetRepeaterIndices(_local7, _currentIndex); _local7.owner = this; _local7.execute(); } else { resetRepeaterIndices(_local8, _currentIndex); if ((_local8 is IDeferredInstantiationUIComponent)){ IDeferredInstantiationUIComponent(_local8).executeBindings(true); }; }; _local5++; _local4++; }; } else { _local4 = 0; while (_local4 < _local3) { _local9 = container.numChildren; _local10 = (getIndexForFirstChild() + numCreatedChildren); _local11 = IRepeaterClient(createComponentFromDescriptor(_local2, _local4, true)); createdComponents.push(_local11); if ((_local11 is IUIComponent)){ IUIComponent(_local11).owner = this; }; if ((_local11 is IAutomationObject)){ IAutomationObject(_local11).showInAutomationHierarchy = true; }; if ((_local11 is _slot1)){ _local7 = Repeater(_local11); _local7.reindexDescendants(_local9, _local10); } else { container.setChildIndex(DisplayObject(_local11), _local10); }; _local5++; _local4++; }; }; }; _local2++; }; }; _currentIndex = -1; _local2 = (createdComponents.length - 1); while (_local2 >= _local5) { _local12 = createdComponents.pop(); if ((_local12 is _slot1)){ removeRepeater(Repeater(_local12)); } else { if (_local12){ if ((_local12 is Container)){ removeAllChildren(Container(_local12)); removeAllChildRepeaters(Container(_local12)); }; if (container.contains(DisplayObject(_local12))){ container.removeChild(DisplayObject(_local12)); }; if ((_local12 is IDeferredInstantiationUIComponent)){ IDeferredInstantiationUIComponent(_local12).deleteReferenceOnParentDocument(IFlexDisplayObject(parentDocument)); }; }; }; _local2--; }; dispatchEvent(new FlexEvent(FlexEvent.REPEAT_END)); } public function get count():int{ return (_count); } private function reindexDescendants(_arg1:int, _arg2:int):void{ var _local5:IRepeaterClient; var _local3:int = (container.numChildren - _arg1); var _local4:int; while (_local4 < _local3) { _local5 = IRepeaterClient(container.getChildAt((_arg1 + _local4))); container.setChildIndex(DisplayObject(_local5), (_arg2 + _local4)); _local4++; }; } private function adjustIndices(_arg1:IRepeaterClient, _arg2:int):void{ var _local3:Array = _arg1.repeaters; if (_local3 == null){ return; }; var _local4:int = _local3.length; var _local5:int; while (_local5 < _local4) { if (_local3[_local5] == this){ _arg1.repeaterIndices[_local5] = (_arg1.repeaterIndices[_local5] + _arg2); _arg1.instanceIndices[_local5] = (_arg1.instanceIndices[_local5] + _arg2); break; }; _local5++; }; } private function positiveMin(_arg1:int, _arg2:int):int{ var _local3:int; if (_arg1 >= 0){ if (_arg2 >= 0){ if (_arg1 < _arg2){ _local3 = _arg1; } else { _local3 = _arg2; }; } else { _local3 = _arg1; }; } else { _local3 = _arg2; }; return (_local3); } mx_internal function getItemAt(_arg1:int):Object{ var result:Object; var index = _arg1; if (iterator){ try { iterator.seek(CursorBookmark.FIRST, index); result = iterator.current; } catch(itemPendingError:ItemPendingError) { itemPendingError.addResponder(new ItemResponder(responderResultHandler, responderFaultHandler)); }; }; return (result); } public function set count(_arg1:int):void{ _count = _arg1; execute(); dispatchEvent(new Event("countChanged")); } private function addItems(_arg1:int, _arg2:int):void{ var _local3:int; var _local6:IRepeaterClient; var _local7:int; var _local8:int; var _local9:int; var _local10:int; var _local11:int; var _local12:int; var _local13:IFlexDisplayObject; var _local14:Repeater; if (startingIndex > _arg2){ return; }; var _local4 = -1; var _local5:int = container.numChildren; if (_arg2 == (collection.length - 1)){ _local3 = (_local5 - 1); while (_local3 >= 0) { _local6 = IRepeaterClient(container.getChildAt(_local3)); _local7 = getRepeaterIndex(_local6); if (_local7 != -1){ _local4 = (_local3 + 1); break; }; _local3--; }; } else { _local8 = ((_arg2 - _arg1) + 1); _local3 = 0; while (_local3 < _local5) { _local6 = IRepeaterClient(container.getChildAt(_local3)); _local7 = getRepeaterIndex(_local6); if (_local7 != -1){ if ((((((_arg1 <= _local7)) && ((_local7 <= _arg2)))) && ((_local4 == -1)))){ _local4 = _local3; }; if (_local7 >= _arg1){ adjustIndices(_local6, _local8); }; }; _local3++; }; }; if (count == -1){ _local5 = _arg2; } else { _local5 = positiveMin(((startingIndex + count) - 1), _arg2); }; _local3 = Math.max(startingIndex, _arg1); while (_local3 <= _local5) { _local9 = childDescriptors.length; _currentIndex = _local3; dispatchEvent(new FlexEvent(FlexEvent.REPEAT)); _local10 = 0; while (_local10 < _local9) { _local11 = container.numChildren; _local12 = (getIndexForFirstChild() + numCreatedChildren); _local13 = createComponentFromDescriptor((_local3 - startingIndex), _local10, true); createdComponents.push(_local13); if ((_local13 is IUIComponent)){ IUIComponent(_local13).owner = this; }; if ((_local13 is IAutomationObject)){ IAutomationObject(_local13).showInAutomationHierarchy = true; }; if ((_local13 is _slot1)){ _local14 = Repeater(_local13); _local14.owner = this; _local14.reindexDescendants(_local11, _local12); } else { container.setChildIndex(DisplayObject(_local13), _local12); }; _local10++; }; _local3++; }; _currentIndex = -1; } private function get numCreatedChildren():int{ var _local3:IFlexDisplayObject; var _local4:Repeater; var _local1:int; var _local2:int; while (_local2 < createdComponents.length) { _local3 = createdComponents[_local2]; if ((_local3 is _slot1)){ _local4 = Repeater(_local3); _local1 = (_local1 + _local4.numCreatedChildren); } else { _local1 = (_local1 + 1); }; _local2++; }; return (_local1); } private function removeChildRepeater(_arg1:Container, _arg2:Repeater):void{ var _local3:int; var _local4:int = _arg1.childRepeaters.length; while (_local3 < _local4) { if (_arg1.repeaters[_local3] == _arg2){ _arg1.repeaters.splice(_local3, 1); break; }; _local3++; }; } private function removeAllChildren(_arg1:IContainer):void{ var _local4:IRepeaterClient; var _local2:int = _arg1.numChildren; var _local3:int = (_local2 - 1); while (_local3 >= 0) { _local4 = IRepeaterClient(_arg1.getChildAt(_local3)); if (hasDescendant(_local4)){ if ((_local4 is Container)){ removeAllChildren(Container(_local4)); removeAllChildRepeaters(Container(_local4)); }; _arg1.removeChildAt(_local3); if ((_local4 is IDeferredInstantiationUIComponent)){ IDeferredInstantiationUIComponent(_local4).deleteReferenceOnParentDocument(IFlexDisplayObject(parentDocument)); }; }; _local3--; }; } public function get currentItem():Object{ var result:Object; var message:String; if (_currentIndex == -1){ message = resourceManager.getString("core", "notExecuting"); throw (new Error(message)); }; if (iterator){ try { iterator.seek(CursorBookmark.FIRST, _currentIndex); result = iterator.current; } catch(itemPendingError:ItemPendingError) { itemPendingError.addResponder(new ItemResponder(responderResultHandler, responderFaultHandler)); }; }; return (result); } private function resetRepeaterIndices(_arg1:IRepeaterClient, _arg2:int):void{ var _local4:Container; var _local5:int; var _local6:int; var _local7:IRepeaterClient; var _local3:Array = _arg1.repeaterIndices; _local3[(_local3.length - 1)] = _arg2; _arg1.repeaterIndices = _local3; if ((_arg1 is Container)){ _local4 = Container(_arg1); _local5 = _local4.numChildren; _local6 = 0; while (_local6 < _local5) { _local7 = IRepeaterClient(_local4.getChildAt(_local6)); resetRepeaterIndices(_local7, _arg2); _local6++; }; }; } public function get recycleChildren():Boolean{ return (_recycleChildren); } private function collectionChangedHandler(_arg1:CollectionEvent):void{ switch (_arg1.kind){ case CollectionEventKind.UPDATE: break; default: execute(); }; } private function getIndexForRepeater(_arg1:Repeater, _arg2:LocationInfo):void{ var _local5:IFlexDisplayObject; var _local6:Repeater; var _local3:int; var _local4:int = createdComponents.length; while (_local3 < _local4) { _local5 = createdComponents[_local3]; if (_local5 == _arg1){ _arg2.found = true; break; } else { if ((_local5 is _slot1)){ _local6 = Repeater(_local5); _local6.getIndexForRepeater(_arg1, _arg2); if (_arg2.found){ break; }; } else { _arg2.index = (_arg2.index + 1); }; }; _local3++; }; } private function hasDescendant(_arg1:Object):Boolean{ var _local2:Array = _arg1.repeaters; if (_local2 == null){ return (false); }; var _local3:int = _local2.length; var _local4:int; while (_local4 < _local3) { if (_local2[_local4] == this){ return (true); }; _local4++; }; return (false); } public function initializeRepeater(_arg1:IContainer, _arg2:Boolean):void{ _container = Container(_arg1); descriptorIndex = _arg1.numChildren; created = true; if (collection){ createComponentsFromDescriptors(_arg2); }; if (owner == null){ owner = Container(_arg1); }; } public function get dataProvider():Object{ return (collection); } private function removeItems(_arg1:int, _arg2:int):void{ var _local3:int; var _local4:IRepeaterClient; var _local5:int; var _local6:Repeater; if (((createdComponents) && ((createdComponents.length > 0)))){ _local3 = (createdComponents.length - 1); while (_local3 >= 0) { _local4 = createdComponents[_local3]; _local5 = getRepeaterIndex(_local4); if ((((((_arg1 <= _local5)) && ((((_local5 < _arg2)) || ((_arg2 == -1)))))) || ((_local5 >= dataProvider.length)))){ if ((_local4 is _slot1)){ _local6 = Repeater(_local4); removeRepeater(_local6); } else { if (container.contains(DisplayObject(_local4))){ container.removeChild(DisplayObject(_local4)); }; }; if ((_local4 is IDeferredInstantiationUIComponent)){ IDeferredInstantiationUIComponent(_local4).deleteReferenceOnParentDocument(IFlexDisplayObject(parentDocument)); }; createdComponents.splice(_local3, 1); } else { if ((((((_arg1 <= _local5)) && (!((_arg2 == -1))))) && ((_local5 >= _arg2)))){ adjustIndices(_local4, ((_arg2 - _arg1) + 1)); if ((_local4 is IDeferredInstantiationUIComponent)){ IDeferredInstantiationUIComponent(_local4).executeBindings(true); }; }; }; _local3--; }; }; } private function getIndexForFirstChild():int{ var _local5:IFlexDisplayObject; var _local6:Repeater; var _local1:LocationInfo = new LocationInfo(); var _local2:int; var _local3:Array = Container(container).createdComponents; var _local4:int = (_local3) ? _local3.length : 0; while (_local2 < _local4) { _local5 = Container(container).createdComponents[_local2]; if (_local5 == this){ _local1.found = true; break; } else { if ((_local5 is _slot1)){ _local6 = Repeater(_local5); _local6.getIndexForRepeater(this, _local1); if (_local1.found){ break; }; } else { _local1.index = (_local1.index + 1); }; }; _local2++; }; return ((_local1.found) ? _local1.index : container.numChildren); } private function createComponentsFromDescriptors(_arg1:Boolean):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:IFlexDisplayObject; dispatchEvent(new FlexEvent(FlexEvent.REPEAT_START)); createdComponents = []; if (((((collection) && ((collection.length > 0)))) && (((collection.length - startingIndex) > 0)))){ _local2 = positiveMin((collection.length - startingIndex), count); _local3 = 0; while (_local3 < _local2) { _currentIndex = (startingIndex + _local3); dispatchEvent(new FlexEvent(FlexEvent.REPEAT)); if (((childDescriptors) && ((childDescriptors.length > 0)))){ _local4 = childDescriptors.length; _local5 = 0; while (_local5 < _local4) { _local6 = createComponentFromDescriptor(_local3, _local5, _arg1); createdComponents.push(_local6); if ((_local6 is IUIComponent)){ IUIComponent(_local6).owner = this; }; if ((_local6 is IAutomationObject)){ IAutomationObject(_local6).showInAutomationHierarchy = true; }; _local5++; }; }; _local3++; }; _currentIndex = -1; }; dispatchEvent(new FlexEvent(FlexEvent.REPEAT_END)); } private function sort():void{ execute(); } private function removeRepeater(_arg1:Repeater):void{ _arg1.removeAllChildren(_arg1.container); _arg1.removeAllChildRepeaters(Container(_arg1.container)); removeChildRepeater(Container(container), _arg1); _arg1.deleteReferenceOnParentDocument(IFlexDisplayObject(parentDocument)); _arg1.dataProvider = null; } public function executeChildBindings():void{ var _local3:IRepeaterClient; var _local1:int = container.numChildren; var _local2:int; while (_local2 < _local1) { _local3 = IRepeaterClient(container.getChildAt(_local2)); if (((hasDescendant(_local3)) && ((_local3 is IDeferredInstantiationUIComponent)))){ IDeferredInstantiationUIComponent(_local3).executeBindings(); }; _local2++; }; } public function get currentIndex():int{ var _local1:String; if (_currentIndex == -1){ _local1 = resourceManager.getString("core", "notExecuting"); throw (new Error(_local1)); }; return (_currentIndex); } public function set startingIndex(_arg1:int):void{ _startingIndex = _arg1; execute(); dispatchEvent(new Event("startingIndexChanged")); } private function responderFaultHandler(_arg1:Object, _arg2:Object):void{ } override public function toString():String{ return (((Object(container).toString() + ".") + super.toString())); } private function recreate():void{ removeAllChildren(container); removeAllChildRepeaters(Container(container)); var _local1:int = container.numChildren; var _local2:int = getIndexForFirstChild(); createComponentsFromDescriptors(true); if (_local1 != _local2){ reindexDescendants(_local1, _local2); }; } public function get startingIndex():int{ return (_startingIndex); } private function getRepeaterIndex(_arg1:IRepeaterClient):int{ var _local2:Array = _arg1.repeaters; if (_local2 == null){ return (-1); }; var _local3:int = _local2.length; var _local4:int; while (_local4 < _local3) { if (_local2[_local4] == this){ return (_arg1.repeaterIndices[_local4]); }; _local4++; }; return (-1); } private function execute():void{ if (!created){ return; }; if (((((recycleChildren) && (createdComponents))) && ((createdComponents.length > 0)))){ recycle(); } else { recreate(); }; } override public function set showInAutomationHierarchy(_arg1:Boolean):void{ } public function set recycleChildren(_arg1:Boolean):void{ _recycleChildren = _arg1; } public function set dataProvider(_arg1:Object):void{ var _local3:XMLList; var _local4:Array; var _local2:Boolean; if (collection){ _local2 = true; collection.removeEventListener(CollectionEvent.COLLECTION_CHANGE, collectionChangedHandler); collection = null; iterator = null; }; if ((_arg1 is Array)){ collection = new ArrayCollection((_arg1 as Array)); } else { if ((_arg1 is ICollectionView)){ collection = ICollectionView(_arg1); } else { if ((_arg1 is IList)){ collection = new ListCollectionView(IList(_arg1)); } else { if ((_arg1 is XMLList)){ collection = new XMLListCollection((_arg1 as XMLList)); } else { if ((_arg1 is XML)){ _local3 = new XMLList(); _local3 = (_local3 + _arg1); collection = new XMLListCollection(_local3); } else { if (_arg1 != null){ _local4 = [_arg1]; collection = new ArrayCollection(_local4); }; }; }; }; }; }; if (collection){ collection.addEventListener(CollectionEvent.COLLECTION_CHANGE, collectionChangedHandler, false, 0, true); iterator = collection.createCursor(); }; dispatchEvent(new Event("collectionChange")); if (((collection) || (_local2))){ execute(); }; } private function updateItems(_arg1:int, _arg2:int):void{ var _local3:int; var _local4:int; var _local5:IRepeaterClient; var _local6:int; if (recycleChildren){ _local3 = container.numChildren; _local4 = 0; while (_local4 < _local3) { _local5 = IRepeaterClient(container.getChildAt(_local4)); _local6 = getRepeaterIndex(_local5); if (((((!((_local6 == -1))) && ((_arg1 <= _local6)))) && ((_local6 <= _arg2)))){ if ((_local5 is IDeferredInstantiationUIComponent)){ IDeferredInstantiationUIComponent(_local5).executeBindings(true); }; }; _local4++; }; } else { removeItems(_arg1, _arg2); addItems(_arg1, _arg2); }; } } }//package mx.core class LocationInfo { public var index:int;// = 0 public var found:Boolean;// = false private function LocationInfo(){ } }
Section 202
//ResourceModuleRSLItem (mx.core.ResourceModuleRSLItem) package mx.core { import flash.events.*; import mx.events.*; import mx.resources.*; public class ResourceModuleRSLItem extends RSLItem { mx_internal static const VERSION:String = "3.0.0.0"; public function ResourceModuleRSLItem(_arg1:String){ super(_arg1); } private function resourceErrorHandler(_arg1:ResourceEvent):void{ var _local2:IOErrorEvent = new IOErrorEvent(IOErrorEvent.IO_ERROR); _local2.text = _arg1.errorText; super.itemErrorHandler(_local2); } override public function load(_arg1:Function, _arg2:Function, _arg3:Function, _arg4:Function, _arg5:Function):void{ chainedProgressHandler = _arg1; chainedCompleteHandler = _arg2; chainedIOErrorHandler = _arg3; chainedSecurityErrorHandler = _arg4; chainedRSLErrorHandler = _arg5; var _local6:IResourceManager = ResourceManager.getInstance(); var _local7:IEventDispatcher = _local6.loadResourceModule(url); _local7.addEventListener(ResourceEvent.PROGRESS, itemProgressHandler); _local7.addEventListener(ResourceEvent.COMPLETE, itemCompleteHandler); _local7.addEventListener(ResourceEvent.ERROR, resourceErrorHandler); } } }//package mx.core
Section 203
//RSLItem (mx.core.RSLItem) package mx.core { import flash.display.*; import flash.events.*; import mx.events.*; import flash.system.*; import flash.net.*; public class RSLItem { protected var chainedSecurityErrorHandler:Function; public var total:uint;// = 0 public var loaded:uint;// = 0 private var completed:Boolean;// = false protected var chainedRSLErrorHandler:Function; protected var chainedIOErrorHandler:Function; protected var chainedCompleteHandler:Function; private var errorText:String; protected var chainedProgressHandler:Function; public var urlRequest:URLRequest; protected var url:String; mx_internal static const VERSION:String = "3.0.0.0"; public function RSLItem(_arg1:String){ this.url = _arg1; } public function itemProgressHandler(_arg1:ProgressEvent):void{ loaded = _arg1.bytesLoaded; total = _arg1.bytesTotal; if (chainedProgressHandler != null){ chainedProgressHandler(_arg1); }; } public function itemErrorHandler(_arg1:ErrorEvent):void{ errorText = decodeURI(_arg1.text); completed = true; loaded = 0; total = 0; trace(errorText); if ((((_arg1.type == IOErrorEvent.IO_ERROR)) && (!((chainedIOErrorHandler == null))))){ chainedIOErrorHandler(_arg1); } else { if ((((_arg1.type == SecurityErrorEvent.SECURITY_ERROR)) && (!((chainedSecurityErrorHandler == null))))){ chainedSecurityErrorHandler(_arg1); } else { if ((((_arg1.type == RSLEvent.RSL_ERROR)) && (!((chainedRSLErrorHandler == null))))){ chainedRSLErrorHandler(_arg1); }; }; }; } public function load(_arg1:Function, _arg2:Function, _arg3:Function, _arg4:Function, _arg5:Function):void{ chainedProgressHandler = _arg1; chainedCompleteHandler = _arg2; chainedIOErrorHandler = _arg3; chainedSecurityErrorHandler = _arg4; chainedRSLErrorHandler = _arg5; var _local6:Loader = new Loader(); var _local7:LoaderContext = new LoaderContext(); urlRequest = new URLRequest(url); _local6.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, itemProgressHandler); _local6.contentLoaderInfo.addEventListener(Event.COMPLETE, itemCompleteHandler); _local6.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, itemErrorHandler); _local6.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, itemErrorHandler); _local7.applicationDomain = ApplicationDomain.currentDomain; _local6.load(urlRequest, _local7); } public function itemCompleteHandler(_arg1:Event):void{ completed = true; if (chainedCompleteHandler != null){ chainedCompleteHandler(_arg1); }; } } }//package mx.core
Section 204
//RSLListLoader (mx.core.RSLListLoader) package mx.core { import flash.events.*; public class RSLListLoader { private var chainedSecurityErrorHandler:Function; private var chainedIOErrorHandler:Function; private var rslList:Array; private var chainedRSLErrorHandler:Function; private var chainedCompleteHandler:Function; private var currentIndex:int;// = 0 private var chainedProgressHandler:Function; mx_internal static const VERSION:String = "3.0.0.0"; public function RSLListLoader(_arg1:Array){ rslList = []; super(); this.rslList = _arg1; } private function loadNext():void{ if (!isDone()){ currentIndex++; if (currentIndex < rslList.length){ rslList[currentIndex].load(chainedProgressHandler, listCompleteHandler, listIOErrorHandler, listSecurityErrorHandler, chainedRSLErrorHandler); }; }; } public function getIndex():int{ return (currentIndex); } public function load(_arg1:Function, _arg2:Function, _arg3:Function, _arg4:Function, _arg5:Function):void{ chainedProgressHandler = _arg1; chainedCompleteHandler = _arg2; chainedIOErrorHandler = _arg3; chainedSecurityErrorHandler = _arg4; chainedRSLErrorHandler = _arg5; currentIndex = -1; loadNext(); } private function listCompleteHandler(_arg1:Event):void{ if (chainedCompleteHandler != null){ chainedCompleteHandler(_arg1); }; loadNext(); } public function isDone():Boolean{ return ((currentIndex >= rslList.length)); } private function listSecurityErrorHandler(_arg1:Event):void{ if (chainedSecurityErrorHandler != null){ chainedSecurityErrorHandler(_arg1); }; } public function getItemCount():int{ return (rslList.length); } public function getItem(_arg1:int):RSLItem{ if ((((_arg1 < 0)) || ((_arg1 >= rslList.length)))){ return (null); }; return (rslList[_arg1]); } private function listIOErrorHandler(_arg1:Event):void{ if (chainedIOErrorHandler != null){ chainedIOErrorHandler(_arg1); }; } } }//package mx.core
Section 205
//ScrollPolicy (mx.core.ScrollPolicy) package mx.core { public final class ScrollPolicy { public static const AUTO:String = "auto"; public static const ON:String = "on"; mx_internal static const VERSION:String = "3.0.0.0"; public static const OFF:String = "off"; } }//package mx.core
Section 206
//Singleton (mx.core.Singleton) package mx.core { public class Singleton { mx_internal static const VERSION:String = "3.0.0.0"; private static var classMap:Object = {}; public static function registerClass(_arg1:String, _arg2:Class):void{ var _local3:Class = classMap[_arg1]; if (!_local3){ classMap[_arg1] = _arg2; }; } public static function getClass(_arg1:String):Class{ return (classMap[_arg1]); } public static function getInstance(_arg1:String):Object{ var _local2:Class = classMap[_arg1]; if (!_local2){ throw (new Error((("No class registered for interface '" + _arg1) + "'."))); }; return (_local2["getInstance"]()); } } }//package mx.core
Section 207
//SoundAsset (mx.core.SoundAsset) package mx.core { import flash.media.*; public class SoundAsset extends Sound implements IFlexAsset { mx_internal static const VERSION:String = "3.0.0.0"; } }//package mx.core
Section 208
//SpriteAsset (mx.core.SpriteAsset) package mx.core { public class SpriteAsset extends FlexSprite implements IFlexAsset, IFlexDisplayObject, IBorder { private var _measuredHeight:Number; private var _measuredWidth:Number; mx_internal static const VERSION:String = "3.0.0.0"; public function SpriteAsset(){ _measuredWidth = width; _measuredHeight = height; } public function get measuredWidth():Number{ return (_measuredWidth); } public function get measuredHeight():Number{ return (_measuredHeight); } public function setActualSize(_arg1:Number, _arg2:Number):void{ width = _arg1; height = _arg2; } public function move(_arg1:Number, _arg2:Number):void{ this.x = _arg1; this.y = _arg2; } public function get borderMetrics():EdgeMetrics{ if (scale9Grid == null){ return (EdgeMetrics.EMPTY); }; return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom)))); } } }//package mx.core
Section 209
//TextFieldFactory (mx.core.TextFieldFactory) package mx.core { import flash.text.*; import flash.utils.*; public class TextFieldFactory implements ITextFieldFactory { private var textFields:Dictionary; mx_internal static const VERSION:String = "3.0.0.0"; private static var instance:ITextFieldFactory; public function TextFieldFactory(){ textFields = new Dictionary(true); super(); } public function createTextField(_arg1:IFlexModuleFactory):TextField{ var _local4:Object; var _local2:TextField; var _local3:Dictionary = textFields[_arg1]; if (_local3){ for (_local4 in _local3) { _local2 = TextField(_local4); break; }; }; if (!_local2){ if (_arg1){ _local2 = TextField(_arg1.create("flash.text.TextField")); } else { _local2 = new TextField(); }; if (!_local3){ _local3 = new Dictionary(true); }; _local3[_local2] = 1; textFields[_arg1] = _local3; }; return (_local2); } public static function getInstance():ITextFieldFactory{ if (!instance){ instance = new (TextFieldFactory); }; return (instance); } } }//package mx.core
Section 210
//UIComponent (mx.core.UIComponent) package mx.core { import flash.display.*; import flash.geom.*; import flash.text.*; import mx.managers.*; import mx.automation.*; import flash.events.*; import mx.events.*; import mx.resources.*; import mx.styles.*; import mx.controls.*; import mx.states.*; import mx.effects.*; import mx.graphics.*; import mx.binding.*; import flash.system.*; import flash.utils.*; import mx.utils.*; import mx.validators.*; import mx.modules.*; public class UIComponent extends FlexSprite implements IAutomationObject, IChildList, IDeferredInstantiationUIComponent, IFlexDisplayObject, IFlexModule, IInvalidating, ILayoutManagerClient, IPropertyChangeNotifier, IRepeaterClient, ISimpleStyleClient, IStyleClient, IToolTipManagerClient, IUIComponent, IValidatorListener, IStateClient, IConstraintClient { private var cachedEmbeddedFont:EmbeddedFont;// = null private var errorStringChanged:Boolean;// = false mx_internal var overlay:UIComponent; mx_internal var automaticRadioButtonGroups:Object; private var _currentState:String; private var _isPopUp:Boolean; private var _repeaters:Array; private var _systemManager:ISystemManager; private var _measuredWidth:Number;// = 0 private var methodQueue:Array; mx_internal var _width:Number; private var _tweeningProperties:Array; private var _validationSubField:String; private var _endingEffectInstances:Array; mx_internal var saveBorderColor:Boolean;// = true mx_internal var overlayColor:uint; mx_internal var overlayReferenceCount:int;// = 0 private var hasFontContextBeenSaved:Boolean;// = false private var _repeaterIndices:Array; private var oldExplicitWidth:Number; mx_internal var _descriptor:UIComponentDescriptor; private var _initialized:Boolean;// = false private var _focusEnabled:Boolean;// = true private var cacheAsBitmapCount:int;// = 0 private var requestedCurrentState:String; private var listeningForRender:Boolean;// = false mx_internal var invalidateDisplayListFlag:Boolean;// = false private var oldScaleX:Number;// = 1 private var oldScaleY:Number;// = 1 mx_internal var _explicitMaxHeight:Number; mx_internal var invalidatePropertiesFlag:Boolean;// = false private var hasFocusRect:Boolean;// = false mx_internal var invalidateSizeFlag:Boolean;// = false private var _scaleX:Number;// = 1 private var _scaleY:Number;// = 1 private var _styleDeclaration:CSSStyleDeclaration; private var _resourceManager:IResourceManager; mx_internal var _affectedProperties:Object; mx_internal var _documentDescriptor:UIComponentDescriptor; private var _processedDescriptors:Boolean;// = false mx_internal var origBorderColor:Number; private var _focusManager:IFocusManager; private var _cachePolicy:String;// = "auto" private var _measuredHeight:Number;// = 0 private var _id:String; private var _owner:DisplayObjectContainer; public var transitions:Array; mx_internal var _parent:DisplayObjectContainer; private var _measuredMinWidth:Number;// = 0 private var oldMinWidth:Number; private var _explicitWidth:Number; private var _enabled:Boolean;// = false public var states:Array; private var _mouseFocusEnabled:Boolean;// = true private var oldHeight:Number;// = 0 private var _currentStateChanged:Boolean; private var cachedTextFormat:UITextFormat; mx_internal var _height:Number; private var _automationDelegate:IAutomationObject; private var _percentWidth:Number; private var _automationName:String;// = null private var _isEffectStarted:Boolean;// = false private var _styleName:Object; private var lastUnscaledWidth:Number; mx_internal var _document:Object; mx_internal var _errorString:String;// = "" private var oldExplicitHeight:Number; private var _nestLevel:int;// = 0 private var _systemManagerDirty:Boolean;// = false private var _explicitHeight:Number; mx_internal var _toolTip:String; private var _filters:Array; private var _focusPane:Sprite; private var playStateTransition:Boolean;// = true private var _nonInheritingStyles:Object; private var _showInAutomationHierarchy:Boolean;// = true private var _moduleFactory:IFlexModuleFactory; private var preventDrawFocus:Boolean;// = false private var oldX:Number;// = 0 private var oldY:Number;// = 0 private var _instanceIndices:Array; private var _visible:Boolean;// = true private var _inheritingStyles:Object; private var _includeInLayout:Boolean;// = true mx_internal var _effectsStarted:Array; mx_internal var _explicitMinWidth:Number; private var lastUnscaledHeight:Number; mx_internal var _explicitMaxWidth:Number; private var _measuredMinHeight:Number;// = 0 private var _uid:String; private var _currentTransitionEffect:IEffect; private var _updateCompletePendingFlag:Boolean;// = false private var oldMinHeight:Number; private var _flexContextMenu:IFlexContextMenu; mx_internal var _explicitMinHeight:Number; private var _percentHeight:Number; private var oldEmbeddedFontContext:IFlexModuleFactory;// = null private var oldWidth:Number;// = 0 public static const DEFAULT_MEASURED_WIDTH:Number = 160; public static const DEFAULT_MAX_WIDTH:Number = 10000; public static const DEFAULT_MEASURED_MIN_HEIGHT:Number = 22; public static const DEFAULT_MAX_HEIGHT:Number = 10000; public static const DEFAULT_MEASURED_HEIGHT:Number = 22; mx_internal static const VERSION:String = "3.0.0.0"; public static const DEFAULT_MEASURED_MIN_WIDTH:Number = 40; mx_internal static var dispatchEventHook:Function; private static var fakeMouseY:QName = new QName(mx_internal, "_mouseY"); mx_internal static var createAccessibilityImplementation:Function; mx_internal static var STYLE_UNINITIALIZED:Object = {}; private static var fakeMouseX:QName = new QName(mx_internal, "_mouseX"); private static var _embeddedFontRegistry:IEmbeddedFontRegistry; public function UIComponent(){ methodQueue = []; _resourceManager = ResourceManager.getInstance(); _inheritingStyles = UIComponent.STYLE_UNINITIALIZED; _nonInheritingStyles = UIComponent.STYLE_UNINITIALIZED; states = []; transitions = []; _effectsStarted = []; _affectedProperties = {}; _endingEffectInstances = []; super(); focusRect = false; tabEnabled = (this is IFocusManagerComponent); tabChildren = false; enabled = true; $visible = false; addEventListener(Event.ADDED, addedHandler); addEventListener(Event.REMOVED, removedHandler); if ((this is IFocusManagerComponent)){ addEventListener(FocusEvent.FOCUS_IN, focusInHandler); addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler); addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); addEventListener(KeyboardEvent.KEY_UP, keyUpHandler); }; resourcesChanged(); resourceManager.addEventListener(Event.CHANGE, resourceManager_changeHandler, false, 0, true); _width = super.width; _height = super.height; } override public function get filters():Array{ return ((_filters) ? _filters : super.filters); } public function get toolTip():String{ return (_toolTip); } private function transition_effectEndHandler(_arg1:EffectEvent):void{ _currentTransitionEffect = null; } public function get nestLevel():int{ return (_nestLevel); } protected function adjustFocusRect(_arg1:DisplayObject=null):void{ var _local4:Number; var _local5:Number; var _local6:Point; var _local7:Number; if (!_arg1){ _arg1 = this; }; if (((isNaN(_arg1.width)) || (isNaN(_arg1.height)))){ return; }; var _local2:IFocusManager = focusManager; if (!_local2){ return; }; var _local3:IFlexDisplayObject = IFlexDisplayObject(getFocusObject()); if (_local3){ if (((errorString) && (!((errorString == ""))))){ _local4 = getStyle("errorColor"); } else { _local4 = getStyle("themeColor"); }; _local5 = getStyle("focusThickness"); if ((_local3 is IStyleClient)){ IStyleClient(_local3).setStyle("focusColor", _local4); }; _local3.setActualSize((_arg1.width + (2 * _local5)), (_arg1.height + (2 * _local5))); if (rotation){ _local7 = ((rotation * Math.PI) / 180); _local6 = new Point((_arg1.x - (_local5 * (Math.cos(_local7) - Math.sin(_local7)))), (_arg1.y - (_local5 * (Math.cos(_local7) + Math.sin(_local7))))); DisplayObject(_local3).rotation = rotation; } else { _local6 = new Point((_arg1.x - _local5), (_arg1.y - _local5)); }; if (_arg1.parent == this){ _local6.x = (_local6.x + x); _local6.y = (_local6.y + y); }; _local6 = parent.localToGlobal(_local6); _local6 = parent.globalToLocal(_local6); _local3.move(_local6.x, _local6.y); if ((_local3 is IInvalidating)){ IInvalidating(_local3).validateNow(); } else { if ((_local3 is IProgrammaticSkin)){ IProgrammaticSkin(_local3).validateNow(); }; }; }; } mx_internal function setUnscaledWidth(_arg1:Number):void{ var _local2:Number = (_arg1 * Math.abs(oldScaleX)); if (_explicitWidth == _local2){ return; }; if (!isNaN(_local2)){ _percentWidth = NaN; }; _explicitWidth = _local2; invalidateSize(); var _local3:IInvalidating = (parent as IInvalidating); if (((_local3) && (includeInLayout))){ _local3.invalidateSize(); _local3.invalidateDisplayList(); }; } public function set nestLevel(_arg1:int):void{ var _local2:IChildList; var _local3:int; var _local4:int; var _local5:ILayoutManagerClient; var _local6:IUITextField; if ((((_arg1 > 1)) && (!((_nestLevel == _arg1))))){ _nestLevel = _arg1; updateCallbacks(); _local2 = ((this is IRawChildrenContainer)) ? IRawChildrenContainer(this).rawChildren : IChildList(this); _local3 = _local2.numChildren; _local4 = 0; while (_local4 < _local3) { _local5 = (_local2.getChildAt(_local4) as ILayoutManagerClient); if (_local5){ _local5.nestLevel = (_arg1 + 1); } else { _local6 = (_local2.getChildAt(_local4) as IUITextField); if (_local6){ _local6.nestLevel = (_arg1 + 1); }; }; _local4++; }; }; } public function getExplicitOrMeasuredHeight():Number{ return ((isNaN(explicitHeight)) ? measuredHeight : explicitHeight); } private function callLaterDispatcher(_arg1:Event):void{ var callLaterErrorEvent:DynamicEvent; var event = _arg1; UIComponentGlobals.callLaterDispatcherCount++; if (!UIComponentGlobals.catchCallLaterExceptions){ callLaterDispatcher2(event); } else { try { callLaterDispatcher2(event); } catch(e:Error) { callLaterErrorEvent = new DynamicEvent("callLaterError"); callLaterErrorEvent.error = e; systemManager.dispatchEvent(callLaterErrorEvent); }; }; UIComponentGlobals.callLaterDispatcherCount--; } public function getStyle(_arg1:String){ return ((StyleManager.inheritingStyles[_arg1]) ? _inheritingStyles[_arg1] : _nonInheritingStyles[_arg1]); } final mx_internal function get $width():Number{ return (super.width); } public function get className():String{ var _local1:String = getQualifiedClassName(this); var _local2:int = _local1.indexOf("::"); if (_local2 != -1){ _local1 = _local1.substr((_local2 + 2)); }; return (_local1); } public function verticalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{ UIComponentGlobals.tempMatrix.createGradientBox(_arg3, _arg4, (Math.PI / 2), _arg1, _arg2); return (UIComponentGlobals.tempMatrix); } public function setCurrentState(_arg1:String, _arg2:Boolean=true):void{ if (((!((_arg1 == currentState))) && (!(((isBaseState(_arg1)) && (isBaseState(currentState))))))){ requestedCurrentState = _arg1; playStateTransition = _arg2; if (initialized){ commitCurrentState(); } else { _currentStateChanged = true; addEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler); }; }; } private function getBaseStates(_arg1:State):Array{ var _local2:Array = []; while (((_arg1) && (_arg1.basedOn))) { _local2.push(_arg1.basedOn); _arg1 = getState(_arg1.basedOn); }; return (_local2); } public function set minHeight(_arg1:Number):void{ if (explicitMinHeight == _arg1){ return; }; explicitMinHeight = _arg1; } protected function isOurFocus(_arg1:DisplayObject):Boolean{ return ((_arg1 == this)); } public function get errorString():String{ return (_errorString); } mx_internal function setUnscaledHeight(_arg1:Number):void{ var _local2:Number = (_arg1 * Math.abs(oldScaleY)); if (_explicitHeight == _local2){ return; }; if (!isNaN(_local2)){ _percentHeight = NaN; }; _explicitHeight = _local2; invalidateSize(); var _local3:IInvalidating = (parent as IInvalidating); if (((_local3) && (includeInLayout))){ _local3.invalidateSize(); _local3.invalidateDisplayList(); }; } public function get automationName():String{ if (_automationName){ return (_automationName); }; if (automationDelegate){ return (automationDelegate.automationName); }; return (""); } final mx_internal function set $width(_arg1:Number):void{ super.width = _arg1; } public function invalidateDisplayList():void{ if (!invalidateDisplayListFlag){ invalidateDisplayListFlag = true; if (((parent) && (UIComponentGlobals.layoutManager))){ UIComponentGlobals.layoutManager.invalidateDisplayList(this); }; }; } mx_internal function initThemeColor():Boolean{ var _local2:Object; var _local3:Number; var _local4:Number; var _local5:Object; var _local6:Array; var _local7:int; var _local8:CSSStyleDeclaration; var _local1:Object = _styleName; if (_styleDeclaration){ _local2 = _styleDeclaration.getStyle("themeColor"); _local3 = _styleDeclaration.getStyle("rollOverColor"); _local4 = _styleDeclaration.getStyle("selectionColor"); }; if ((((((_local2 === null)) || (!(StyleManager.isValidStyleValue(_local2))))) && (((_local1) && (!((_local1 is ISimpleStyleClient))))))){ _local5 = ((_local1 is String)) ? StyleManager.getStyleDeclaration(("." + _local1)) : _local1; if (_local5){ _local2 = _local5.getStyle("themeColor"); _local3 = _local5.getStyle("rollOverColor"); _local4 = _local5.getStyle("selectionColor"); }; }; if ((((_local2 === null)) || (!(StyleManager.isValidStyleValue(_local2))))){ _local6 = getClassStyleDeclarations(); _local7 = 0; while (_local7 < _local6.length) { _local8 = _local6[_local7]; if (_local8){ _local2 = _local8.getStyle("themeColor"); _local3 = _local8.getStyle("rollOverColor"); _local4 = _local8.getStyle("selectionColor"); }; if (((!((_local2 === null))) && (StyleManager.isValidStyleValue(_local2)))){ break; }; _local7++; }; }; if (((((((!((_local2 === null))) && (StyleManager.isValidStyleValue(_local2)))) && (isNaN(_local3)))) && (isNaN(_local4)))){ setThemeColor(_local2); return (true); }; return (((((((!((_local2 === null))) && (StyleManager.isValidStyleValue(_local2)))) && (!(isNaN(_local3))))) && (!(isNaN(_local4))))); } override public function get scaleX():Number{ return (_scaleX); } public function get uid():String{ if (!_uid){ _uid = toString(); }; return (_uid); } override public function get mouseX():Number{ if (((((!(root)) || ((root is Stage)))) || ((root[fakeMouseX] === undefined)))){ return (super.mouseX); }; return (globalToLocal(new Point(root[fakeMouseX], 0)).x); } override public function stopDrag():void{ super.stopDrag(); invalidateProperties(); dispatchEvent(new Event("xChanged")); dispatchEvent(new Event("yChanged")); } public function get focusPane():Sprite{ return (_focusPane); } public function set tweeningProperties(_arg1:Array):void{ _tweeningProperties = _arg1; } public function horizontalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{ UIComponentGlobals.tempMatrix.createGradientBox(_arg3, _arg4, 0, _arg1, _arg2); return (UIComponentGlobals.tempMatrix); } public function get isDocument():Boolean{ return ((document == this)); } public function set validationSubField(_arg1:String):void{ _validationSubField = _arg1; } override public function get scaleY():Number{ return (_scaleY); } protected function keyDownHandler(_arg1:KeyboardEvent):void{ } protected function createInFontContext(_arg1:Class):Object{ hasFontContextBeenSaved = true; var _local2:String = StringUtil.trimArrayElements(getStyle("fontFamily"), ","); var _local3:String = getStyle("fontWeight"); var _local4:String = getStyle("fontStyle"); var _local5 = (_local3 == "bold"); var _local6 = (_local4 == "italic"); oldEmbeddedFontContext = getFontContext(_local2, _local5, _local6); var _local7:Object = createInModuleContext((oldEmbeddedFontContext) ? oldEmbeddedFontContext : moduleFactory, getQualifiedClassName(_arg1)); if (_local7 == null){ _local7 = new (_arg1); }; return (_local7); } public function get screen():Rectangle{ var _local1:ISystemManager = systemManager; return ((_local1) ? _local1.screen : null); } protected function focusInHandler(_arg1:FocusEvent):void{ var _local2:IFocusManager; if (isOurFocus(DisplayObject(_arg1.target))){ _local2 = focusManager; if (((_local2) && (_local2.showFocusIndicator))){ drawFocus(true); }; ContainerGlobals.checkFocus(_arg1.relatedObject, this); }; } public function hasFontContextChanged():Boolean{ if (!hasFontContextBeenSaved){ return (false); }; var _local1:String = StringUtil.trimArrayElements(getStyle("fontFamily"), ","); var _local2:String = getStyle("fontWeight"); var _local3:String = getStyle("fontStyle"); var _local4 = (_local2 == "bold"); var _local5 = (_local3 == "italic"); var _local6:EmbeddedFont = getEmbeddedFont(_local1, _local4, _local5); var _local7:IFlexModuleFactory = embeddedFontRegistry.getAssociatedModuleFactory(_local6, moduleFactory); return (!((_local7 == oldEmbeddedFontContext))); } public function get explicitHeight():Number{ return (_explicitHeight); } override public function get x():Number{ return (super.x); } override public function get y():Number{ return (super.y); } override public function get visible():Boolean{ return (_visible); } mx_internal function addOverlay(_arg1:uint, _arg2:RoundedRectangle=null):void{ if (!overlay){ overlayColor = _arg1; overlay = new UIComponent(); overlay.name = "overlay"; overlay.$visible = true; fillOverlay(overlay, _arg1, _arg2); attachOverlay(); if (!_arg2){ addEventListener(ResizeEvent.RESIZE, overlay_resizeHandler); }; overlay.x = 0; overlay.y = 0; invalidateDisplayList(); overlayReferenceCount = 1; } else { overlayReferenceCount++; }; dispatchEvent(new ChildExistenceChangedEvent(ChildExistenceChangedEvent.OVERLAY_CREATED, true, false, overlay)); } public function get percentWidth():Number{ return (_percentWidth); } public function set explicitMinHeight(_arg1:Number):void{ if (_explicitMinHeight == _arg1){ return; }; _explicitMinHeight = _arg1; invalidateSize(); var _local2:IInvalidating = (parent as IInvalidating); if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; dispatchEvent(new Event("explicitMinHeightChanged")); } public function set automationName(_arg1:String):void{ _automationName = _arg1; } public function get mouseFocusEnabled():Boolean{ return (_mouseFocusEnabled); } mx_internal function getEmbeddedFont(_arg1:String, _arg2:Boolean, _arg3:Boolean):EmbeddedFont{ if (cachedEmbeddedFont){ if ((((cachedEmbeddedFont.fontName == _arg1)) && ((cachedEmbeddedFont.fontStyle == EmbeddedFontRegistry.getFontStyle(_arg2, _arg3))))){ return (cachedEmbeddedFont); }; }; cachedEmbeddedFont = new EmbeddedFont(_arg1, _arg2, _arg3); return (cachedEmbeddedFont); } public function stylesInitialized():void{ } public function set errorString(_arg1:String):void{ var _local2:String = _errorString; _errorString = _arg1; ToolTipManager.registerErrorString(this, _local2, _arg1); errorStringChanged = true; invalidateProperties(); dispatchEvent(new Event("errorStringChanged")); } public function getExplicitOrMeasuredWidth():Number{ return ((isNaN(explicitWidth)) ? measuredWidth : explicitWidth); } final mx_internal function set $height(_arg1:Number):void{ super.height = _arg1; } protected function keyUpHandler(_arg1:KeyboardEvent):void{ } final mx_internal function $removeChild(_arg1:DisplayObject):DisplayObject{ return (super.removeChild(_arg1)); } override public function set scaleX(_arg1:Number):void{ if (_scaleX == _arg1){ return; }; _scaleX = _arg1; invalidateProperties(); invalidateSize(); dispatchEvent(new Event("scaleXChanged")); } override public function set scaleY(_arg1:Number):void{ if (_scaleY == _arg1){ return; }; _scaleY = _arg1; invalidateProperties(); invalidateSize(); dispatchEvent(new Event("scaleYChanged")); } public function set uid(_arg1:String):void{ this._uid = _arg1; } public function createAutomationIDPart(_arg1:IAutomationObject):Object{ if (automationDelegate){ return (automationDelegate.createAutomationIDPart(_arg1)); }; return (null); } public function getAutomationChildAt(_arg1:int):IAutomationObject{ if (automationDelegate){ return (automationDelegate.getAutomationChildAt(_arg1)); }; return (null); } mx_internal function get isEffectStarted():Boolean{ return (_isEffectStarted); } override public function get parent():DisplayObjectContainer{ return ((_parent) ? _parent : super.parent); } override public function get mouseY():Number{ if (((((!(root)) || ((root is Stage)))) || ((root[fakeMouseY] === undefined)))){ return (super.mouseY); }; return (globalToLocal(new Point(0, root[fakeMouseY])).y); } public function setActualSize(_arg1:Number, _arg2:Number):void{ var _local3:Boolean; if (_width != _arg1){ _width = _arg1; dispatchEvent(new Event("widthChanged")); _local3 = true; }; if (_height != _arg2){ _height = _arg2; dispatchEvent(new Event("heightChanged")); _local3 = true; }; if (_local3){ invalidateDisplayList(); dispatchResizeEvent(); }; } private function focusObj_resizeHandler(_arg1:ResizeEvent):void{ adjustFocusRect(); } mx_internal function adjustSizesForScaleChanges():void{ var _local3:Number; var _local1:Number = scaleX; var _local2:Number = scaleY; if (_local1 != oldScaleX){ _local3 = Math.abs((_local1 / oldScaleX)); if (explicitMinWidth){ explicitMinWidth = (explicitMinWidth * _local3); }; if (!isNaN(explicitWidth)){ explicitWidth = (explicitWidth * _local3); }; if (explicitMaxWidth){ explicitMaxWidth = (explicitMaxWidth * _local3); }; oldScaleX = _local1; }; if (_local2 != oldScaleY){ _local3 = Math.abs((_local2 / oldScaleY)); if (explicitMinHeight){ explicitMinHeight = (explicitMinHeight * _local3); }; if (explicitHeight){ explicitHeight = (explicitHeight * _local3); }; if (explicitMaxHeight){ explicitMaxHeight = (explicitMaxHeight * _local3); }; oldScaleY = _local2; }; } public function set focusPane(_arg1:Sprite):void{ if (_arg1){ addChild(_arg1); _arg1.x = 0; _arg1.y = 0; _arg1.scrollRect = null; _focusPane = _arg1; } else { removeChild(_focusPane); _focusPane = null; }; } public function determineTextFormatFromStyles():UITextFormat{ var _local2:String; var _local1:UITextFormat = cachedTextFormat; if (!_local1){ _local2 = StringUtil.trimArrayElements(_inheritingStyles.fontFamily, ","); _local1 = new UITextFormat(getNonNullSystemManager(), _local2); _local1.moduleFactory = moduleFactory; _local1.align = _inheritingStyles.textAlign; _local1.bold = (_inheritingStyles.fontWeight == "bold"); _local1.color = (enabled) ? _inheritingStyles.color : _inheritingStyles.disabledColor; _local1.font = _local2; _local1.indent = _inheritingStyles.textIndent; _local1.italic = (_inheritingStyles.fontStyle == "italic"); _local1.kerning = _inheritingStyles.kerning; _local1.leading = _nonInheritingStyles.leading; _local1.leftMargin = _nonInheritingStyles.paddingLeft; _local1.letterSpacing = _inheritingStyles.letterSpacing; _local1.rightMargin = _nonInheritingStyles.paddingRight; _local1.size = _inheritingStyles.fontSize; _local1.underline = (_nonInheritingStyles.textDecoration == "underline"); _local1.antiAliasType = _inheritingStyles.fontAntiAliasType; _local1.gridFitType = _inheritingStyles.fontGridFitType; _local1.sharpness = _inheritingStyles.fontSharpness; _local1.thickness = _inheritingStyles.fontThickness; cachedTextFormat = _local1; }; return (_local1); } public function validationResultHandler(_arg1:ValidationResultEvent):void{ var _local2:String; var _local3:ValidationResult; var _local4:int; if (_arg1.type == ValidationResultEvent.VALID){ if (errorString != ""){ errorString = ""; dispatchEvent(new FlexEvent(FlexEvent.VALID)); }; } else { if (((((!((validationSubField == null))) && (!((validationSubField == ""))))) && (_arg1.results))){ _local4 = 0; while (_local4 < _arg1.results.length) { _local3 = _arg1.results[_local4]; if (_local3.subField == validationSubField){ if (_local3.isError){ _local2 = _local3.errorMessage; } else { if (errorString != ""){ errorString = ""; dispatchEvent(new FlexEvent(FlexEvent.VALID)); }; }; break; }; _local4++; }; } else { if (((_arg1.results) && ((_arg1.results.length > 0)))){ _local2 = _arg1.results[0].errorMessage; }; }; if (((_local2) && (!((errorString == _local2))))){ errorString = _local2; dispatchEvent(new FlexEvent(FlexEvent.INVALID)); }; }; } public function invalidateProperties():void{ if (!invalidatePropertiesFlag){ invalidatePropertiesFlag = true; if (((parent) && (UIComponentGlobals.layoutManager))){ UIComponentGlobals.layoutManager.invalidateProperties(this); }; }; } public function get inheritingStyles():Object{ return (_inheritingStyles); } private function focusObj_scrollHandler(_arg1:Event):void{ adjustFocusRect(); } final mx_internal function get $x():Number{ return (super.x); } final mx_internal function get $y():Number{ return (super.y); } public function setConstraintValue(_arg1:String, _arg2):void{ setStyle(_arg1, _arg2); } protected function resourcesChanged():void{ } public function registerEffects(_arg1:Array):void{ var _local4:String; var _local2:int = _arg1.length; var _local3:int; while (_local3 < _local2) { _local4 = EffectManager.getEventForEffectTrigger(_arg1[_local3]); if (((!((_local4 == null))) && (!((_local4 == ""))))){ addEventListener(_local4, EffectManager.eventHandler, false, EventPriority.EFFECT); }; _local3++; }; } public function get explicitMinWidth():Number{ return (_explicitMinWidth); } private function filterChangeHandler(_arg1:Event):void{ super.filters = _filters; } override public function set visible(_arg1:Boolean):void{ setVisible(_arg1); } public function set explicitHeight(_arg1:Number):void{ if (_explicitHeight == _arg1){ return; }; if (!isNaN(_arg1)){ _percentHeight = NaN; }; _explicitHeight = _arg1; invalidateSize(); var _local2:IInvalidating = (parent as IInvalidating); if (((_local2) && (includeInLayout))){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; dispatchEvent(new Event("explicitHeightChanged")); } override public function set x(_arg1:Number):void{ if (super.x == _arg1){ return; }; super.x = _arg1; invalidateProperties(); dispatchEvent(new Event("xChanged")); } public function set showInAutomationHierarchy(_arg1:Boolean):void{ _showInAutomationHierarchy = _arg1; } override public function set y(_arg1:Number):void{ if (super.y == _arg1){ return; }; super.y = _arg1; invalidateProperties(); dispatchEvent(new Event("yChanged")); } private function resourceManager_changeHandler(_arg1:Event):void{ resourcesChanged(); } public function set systemManager(_arg1:ISystemManager):void{ _systemManager = _arg1; _systemManagerDirty = false; } mx_internal function getFocusObject():DisplayObject{ var _local1:IFocusManager = focusManager; if (((!(_local1)) || (!(_local1.focusPane)))){ return (null); }; return (((_local1.focusPane.numChildren == 0)) ? null : _local1.focusPane.getChildAt(0)); } public function set percentWidth(_arg1:Number):void{ if (_percentWidth == _arg1){ return; }; if (!isNaN(_arg1)){ _explicitWidth = NaN; }; _percentWidth = _arg1; var _local2:IInvalidating = (parent as IInvalidating); if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; } public function get moduleFactory():IFlexModuleFactory{ return (_moduleFactory); } override public function addChild(_arg1:DisplayObject):DisplayObject{ var _local2:DisplayObjectContainer = _arg1.parent; if (((_local2) && (!((_local2 is Loader))))){ _local2.removeChild(_arg1); }; var _local3:int = (((overlayReferenceCount) && (!((_arg1 == overlay))))) ? Math.max(0, (super.numChildren - 1)) : super.numChildren; addingChild(_arg1); $addChildAt(_arg1, _local3); childAdded(_arg1); return (_arg1); } public function get document():Object{ return (_document); } public function set mouseFocusEnabled(_arg1:Boolean):void{ _mouseFocusEnabled = _arg1; } final mx_internal function $addChild(_arg1:DisplayObject):DisplayObject{ return (super.addChild(_arg1)); } mx_internal function setThemeColor(_arg1:Object):void{ var _local2:Number; if ((_local2 is String)){ _local2 = parseInt(String(_arg1)); } else { _local2 = Number(_arg1); }; if (isNaN(_local2)){ _local2 = StyleManager.getColorName(_arg1); }; var _local3:Number = ColorUtil.adjustBrightness2(_local2, 50); var _local4:Number = ColorUtil.adjustBrightness2(_local2, 70); setStyle("selectionColor", _local3); setStyle("rollOverColor", _local4); } public function get explicitMaxWidth():Number{ return (_explicitMaxWidth); } public function get id():String{ return (_id); } override public function get height():Number{ return (_height); } public function set minWidth(_arg1:Number):void{ if (explicitMinWidth == _arg1){ return; }; explicitMinWidth = _arg1; } public function set currentState(_arg1:String):void{ setCurrentState(_arg1, true); } public function getRepeaterItem(_arg1:int=-1):Object{ var _local2:Array = repeaters; if (_arg1 == -1){ _arg1 = (_local2.length - 1); }; return (_local2[_arg1].getItemAt(repeaterIndices[_arg1])); } public function executeBindings(_arg1:Boolean=false):void{ var _local2:Object = (((descriptor) && (descriptor.document))) ? descriptor.document : parentDocument; BindingManager.executeBindings(_local2, id, this); } public function replayAutomatableEvent(_arg1:Event):Boolean{ if (automationDelegate){ return (automationDelegate.replayAutomatableEvent(_arg1)); }; return (false); } mx_internal function getFontContext(_arg1:String, _arg2:Boolean, _arg3:Boolean):IFlexModuleFactory{ return (embeddedFontRegistry.getAssociatedModuleFactory(getEmbeddedFont(_arg1, _arg2, _arg3), moduleFactory)); } public function get instanceIndex():int{ return ((_instanceIndices) ? _instanceIndices[(_instanceIndices.length - 1)] : -1); } public function set measuredWidth(_arg1:Number):void{ _measuredWidth = _arg1; } public function effectFinished(_arg1:IEffectInstance):void{ _endingEffectInstances.push(_arg1); invalidateProperties(); UIComponentGlobals.layoutManager.addEventListener(FlexEvent.UPDATE_COMPLETE, updateCompleteHandler, false, 0, true); } mx_internal function set isEffectStarted(_arg1:Boolean):void{ _isEffectStarted = _arg1; } mx_internal function fillOverlay(_arg1:UIComponent, _arg2:uint, _arg3:RoundedRectangle=null):void{ if (!_arg3){ _arg3 = new RoundedRectangle(0, 0, unscaledWidth, unscaledHeight, 0); }; var _local4:Graphics = _arg1.graphics; _local4.clear(); _local4.beginFill(_arg2); _local4.drawRoundRect(_arg3.x, _arg3.y, _arg3.width, _arg3.height, (_arg3.cornerRadius * 2), (_arg3.cornerRadius * 2)); _local4.endFill(); } public function get instanceIndices():Array{ return ((_instanceIndices) ? _instanceIndices.slice(0) : null); } mx_internal function childAdded(_arg1:DisplayObject):void{ if ((_arg1 is UIComponent)){ if (!UIComponent(_arg1).initialized){ UIComponent(_arg1).initialize(); }; } else { if ((_arg1 is IUIComponent)){ IUIComponent(_arg1).initialize(); }; }; } public function globalToContent(_arg1:Point):Point{ return (globalToLocal(_arg1)); } mx_internal function removingChild(_arg1:DisplayObject):void{ } mx_internal function getEffectsForProperty(_arg1:String):Array{ return (((_affectedProperties[_arg1])!=undefined) ? _affectedProperties[_arg1] : []); } override public function removeChildAt(_arg1:int):DisplayObject{ var _local2:DisplayObject = getChildAt(_arg1); removingChild(_local2); $removeChild(_local2); childRemoved(_local2); return (_local2); } protected function measure():void{ measuredMinWidth = 0; measuredMinHeight = 0; measuredWidth = 0; measuredHeight = 0; } public function set owner(_arg1:DisplayObjectContainer):void{ _owner = _arg1; } mx_internal function getNonNullSystemManager():ISystemManager{ var _local1:ISystemManager = systemManager; if (!_local1){ _local1 = ISystemManager(SystemManager.getSWFRoot(this)); }; if (!_local1){ return (SystemManagerGlobals.topLevelSystemManagers[0]); }; return (_local1); } protected function get unscaledWidth():Number{ return ((width / Math.abs(scaleX))); } public function set processedDescriptors(_arg1:Boolean):void{ _processedDescriptors = _arg1; if (_arg1){ dispatchEvent(new FlexEvent(FlexEvent.INITIALIZE)); }; } private function processEffectFinished(_arg1:Array):void{ var _local3:int; var _local4:IEffectInstance; var _local5:IEffectInstance; var _local6:Array; var _local7:int; var _local8:String; var _local9:int; var _local2:int = (_effectsStarted.length - 1); while (_local2 >= 0) { _local3 = 0; while (_local3 < _arg1.length) { _local4 = _arg1[_local3]; if (_local4 == _effectsStarted[_local2]){ _local5 = _effectsStarted[_local2]; _effectsStarted.splice(_local2, 1); _local6 = _local5.effect.getAffectedProperties(); _local7 = 0; while (_local7 < _local6.length) { _local8 = _local6[_local7]; if (_affectedProperties[_local8] != undefined){ _local9 = 0; while (_local9 < _affectedProperties[_local8].length) { if (_affectedProperties[_local8][_local9] == _local4){ _affectedProperties[_local8].splice(_local9, 1); break; }; _local9++; }; if (_affectedProperties[_local8].length == 0){ delete _affectedProperties[_local8]; }; }; _local7++; }; break; }; _local3++; }; _local2--; }; isEffectStarted = ((_effectsStarted.length > 0)) ? true : false; if (((_local4) && (_local4.hideFocusRing))){ preventDrawFocus = false; }; } private function commitCurrentState():void{ var _local3:StateChangeEvent; var _local1:IEffect = (playStateTransition) ? getTransition(_currentState, requestedCurrentState) : null; var _local2:String = findCommonBaseState(_currentState, requestedCurrentState); var _local4:String = (_currentState) ? _currentState : ""; var _local5:State = getState(requestedCurrentState); if (_currentTransitionEffect){ _currentTransitionEffect.end(); }; initializeState(requestedCurrentState); if (_local1){ _local1.captureStartValues(); }; _local3 = new StateChangeEvent(StateChangeEvent.CURRENT_STATE_CHANGING); _local3.oldState = _local4; _local3.newState = (requestedCurrentState) ? requestedCurrentState : ""; dispatchEvent(_local3); if (isBaseState(_currentState)){ dispatchEvent(new FlexEvent(FlexEvent.EXIT_STATE)); }; removeState(_currentState, _local2); _currentState = requestedCurrentState; if (isBaseState(currentState)){ dispatchEvent(new FlexEvent(FlexEvent.ENTER_STATE)); } else { applyState(_currentState, _local2); }; _local3 = new StateChangeEvent(StateChangeEvent.CURRENT_STATE_CHANGE); _local3.oldState = _local4; _local3.newState = (_currentState) ? _currentState : ""; dispatchEvent(_local3); if (_local1){ UIComponentGlobals.layoutManager.validateNow(); _currentTransitionEffect = _local1; _local1.addEventListener(EffectEvent.EFFECT_END, transition_effectEndHandler); _local1.play(); }; } public function get includeInLayout():Boolean{ return (_includeInLayout); } private function dispatchResizeEvent():void{ var _local1:ResizeEvent = new ResizeEvent(ResizeEvent.RESIZE); _local1.oldWidth = oldWidth; _local1.oldHeight = oldHeight; dispatchEvent(_local1); oldWidth = width; oldHeight = height; } public function set maxWidth(_arg1:Number):void{ if (explicitMaxWidth == _arg1){ return; }; explicitMaxWidth = _arg1; } public function validateDisplayList():void{ var _local1:ISystemManager; var _local2:Number; var _local3:Number; if (invalidateDisplayListFlag){ _local1 = (parent as ISystemManager); if (_local1){ if ((((_local1 == systemManager.topLevelSystemManager)) && (!((_local1.document == this))))){ setActualSize(getExplicitOrMeasuredWidth(), getExplicitOrMeasuredHeight()); }; }; _local2 = ((scaleX == 0)) ? 0 : (width / scaleX); _local3 = ((scaleY == 0)) ? 0 : (height / scaleY); if (Math.abs((_local2 - lastUnscaledWidth)) < 1E-5){ _local2 = lastUnscaledWidth; }; if (Math.abs((_local3 - lastUnscaledHeight)) < 1E-5){ _local3 = lastUnscaledHeight; }; updateDisplayList(_local2, _local3); lastUnscaledWidth = _local2; lastUnscaledHeight = _local3; invalidateDisplayListFlag = false; }; } public function contentToGlobal(_arg1:Point):Point{ return (localToGlobal(_arg1)); } public function resolveAutomationIDPart(_arg1:Object):Array{ if (automationDelegate){ return (automationDelegate.resolveAutomationIDPart(_arg1)); }; return ([]); } public function set inheritingStyles(_arg1:Object):void{ _inheritingStyles = _arg1; } public function setFocus():void{ var _local1:ISystemManager = systemManager; if (((_local1) && (_local1.stage))){ if (UIComponentGlobals.callLaterDispatcherCount == 0){ _local1.stage.focus = this; UIComponentGlobals.nextFocusObject = null; } else { UIComponentGlobals.nextFocusObject = this; _local1.stage.addEventListener(Event.ENTER_FRAME, setFocusLater); }; } else { UIComponentGlobals.nextFocusObject = this; callLater(setFocusLater); }; } private function getTransition(_arg1:String, _arg2:String):IEffect{ var _local6:Transition; var _local3:IEffect; var _local4:int; if (!transitions){ return (null); }; if (!_arg1){ _arg1 = ""; }; if (!_arg2){ _arg2 = ""; }; var _local5:int; while (_local5 < transitions.length) { _local6 = transitions[_local5]; if ((((((_local6.fromState == "*")) && ((_local6.toState == "*")))) && ((_local4 < 1)))){ _local3 = _local6.effect; _local4 = 1; } else { if ((((((_local6.fromState == _arg1)) && ((_local6.toState == "*")))) && ((_local4 < 2)))){ _local3 = _local6.effect; _local4 = 2; } else { if ((((((_local6.fromState == "*")) && ((_local6.toState == _arg2)))) && ((_local4 < 3)))){ _local3 = _local6.effect; _local4 = 3; } else { if ((((((_local6.fromState == _arg1)) && ((_local6.toState == _arg2)))) && ((_local4 < 4)))){ _local3 = _local6.effect; _local4 = 4; break; }; }; }; }; _local5++; }; return (_local3); } public function set initialized(_arg1:Boolean):void{ _initialized = _arg1; if (_arg1){ setVisible(_visible, true); dispatchEvent(new FlexEvent(FlexEvent.CREATION_COMPLETE)); }; } final mx_internal function set $y(_arg1:Number):void{ super.y = _arg1; } public function owns(_arg1:DisplayObject):Boolean{ var _local2:IChildList = ((this is IRawChildrenContainer)) ? IRawChildrenContainer(this).rawChildren : IChildList(this); if (_local2.contains(_arg1)){ return (true); }; while (((_arg1) && (!((_arg1 == this))))) { if ((_arg1 is IUIComponent)){ _arg1 = IUIComponent(_arg1).owner; } else { _arg1 = _arg1.parent; }; }; return ((_arg1 == this)); } public function setVisible(_arg1:Boolean, _arg2:Boolean=false):void{ _visible = _arg1; if (!initialized){ return; }; if ($visible == _arg1){ return; }; $visible = _arg1; if (!_arg2){ dispatchEvent(new FlexEvent((_arg1) ? FlexEvent.SHOW : FlexEvent.HIDE)); }; } final mx_internal function $addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{ return (super.addChildAt(_arg1, _arg2)); } public function deleteReferenceOnParentDocument(_arg1:IFlexDisplayObject):void{ var _local2:Array; var _local3:Object; var _local4:Array; var _local5:int; var _local6:int; var _local7:int; var _local8:Object; var _local9:PropertyChangeEvent; if (((id) && (!((id == ""))))){ _local2 = _instanceIndices; if (!_local2){ _arg1[id] = null; } else { _local3 = _arg1[id]; if (!_local3){ return; }; _local4 = []; _local4.push(_local3); _local5 = _local2.length; _local6 = 0; while (_local6 < (_local5 - 1)) { _local8 = _local3[_local2[_local6]]; if (!_local8){ return; }; _local3 = _local8; _local4.push(_local3); _local6++; }; _local3.splice(_local2[(_local5 - 1)], 1); _local7 = (_local4.length - 1); while (_local7 > 0) { if (_local4[_local7].length == 0){ _local4[(_local7 - 1)].splice(_local2[_local7], 1); }; _local7--; }; if ((((_local4.length > 0)) && ((_local4[0].length == 0)))){ _arg1[id] = null; } else { _local9 = PropertyChangeEvent.createUpdateEvent(_arg1, id, _arg1[id], _arg1[id]); _arg1.dispatchEvent(_local9); }; }; }; } public function get nonInheritingStyles():Object{ return (_nonInheritingStyles); } public function effectStarted(_arg1:IEffectInstance):void{ var _local4:String; _effectsStarted.push(_arg1); var _local2:Array = _arg1.effect.getAffectedProperties(); var _local3:int; while (_local3 < _local2.length) { _local4 = _local2[_local3]; if (_affectedProperties[_local4] == undefined){ _affectedProperties[_local4] = []; }; _affectedProperties[_local4].push(_arg1); _local3++; }; isEffectStarted = true; if (_arg1.hideFocusRing){ preventDrawFocus = true; drawFocus(false); }; } final mx_internal function set $x(_arg1:Number):void{ super.x = _arg1; } private function applyState(_arg1:String, _arg2:String):void{ var _local4:Array; var _local5:int; var _local3:State = getState(_arg1); if (_arg1 == _arg2){ return; }; if (_local3){ if (_local3.basedOn != _arg2){ applyState(_local3.basedOn, _arg2); }; _local4 = _local3.overrides; _local5 = 0; while (_local5 < _local4.length) { _local4[_local5].apply(this); _local5++; }; _local3.dispatchEnterState(); }; } protected function commitProperties():void{ var _local1:Number; var _local2:Number; if (_scaleX != oldScaleX){ _local1 = Math.abs((_scaleX / oldScaleX)); if (!isNaN(explicitMinWidth)){ explicitMinWidth = (explicitMinWidth * _local1); }; if (!isNaN(explicitWidth)){ explicitWidth = (explicitWidth * _local1); }; if (!isNaN(explicitMaxWidth)){ explicitMaxWidth = (explicitMaxWidth * _local1); }; _width = (_width * _local1); super.scaleX = (oldScaleX = _scaleX); }; if (_scaleY != oldScaleY){ _local2 = Math.abs((_scaleY / oldScaleY)); if (!isNaN(explicitMinHeight)){ explicitMinHeight = (explicitMinHeight * _local2); }; if (!isNaN(explicitHeight)){ explicitHeight = (explicitHeight * _local2); }; if (!isNaN(explicitMaxHeight)){ explicitMaxHeight = (explicitMaxHeight * _local2); }; _height = (_height * _local2); super.scaleY = (oldScaleY = _scaleY); }; if (((!((x == oldX))) || (!((y == oldY))))){ dispatchMoveEvent(); }; if (((!((width == oldWidth))) || (!((height == oldHeight))))){ dispatchResizeEvent(); }; if (errorStringChanged){ errorStringChanged = false; setBorderColorForErrorString(); }; } public function get percentHeight():Number{ return (_percentHeight); } override public function get width():Number{ return (_width); } final mx_internal function get $parent():DisplayObjectContainer{ return (super.parent); } public function set explicitMinWidth(_arg1:Number):void{ if (_explicitMinWidth == _arg1){ return; }; _explicitMinWidth = _arg1; invalidateSize(); var _local2:IInvalidating = (parent as IInvalidating); if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; dispatchEvent(new Event("explicitMinWidthChanged")); } public function get isPopUp():Boolean{ return (_isPopUp); } private function measureSizes():Boolean{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local1:Boolean; if (!invalidateSizeFlag){ return (_local1); }; if (((isNaN(explicitWidth)) || (isNaN(explicitHeight)))){ _local4 = Math.abs(scaleX); _local5 = Math.abs(scaleY); if (_local4 != 1){ _measuredMinWidth = (_measuredMinWidth / _local4); _measuredWidth = (_measuredWidth / _local4); }; if (_local5 != 1){ _measuredMinHeight = (_measuredMinHeight / _local5); _measuredHeight = (_measuredHeight / _local5); }; measure(); invalidateSizeFlag = false; if (((!(isNaN(explicitMinWidth))) && ((measuredWidth < explicitMinWidth)))){ measuredWidth = explicitMinWidth; }; if (((!(isNaN(explicitMaxWidth))) && ((measuredWidth > explicitMaxWidth)))){ measuredWidth = explicitMaxWidth; }; if (((!(isNaN(explicitMinHeight))) && ((measuredHeight < explicitMinHeight)))){ measuredHeight = explicitMinHeight; }; if (((!(isNaN(explicitMaxHeight))) && ((measuredHeight > explicitMaxHeight)))){ measuredHeight = explicitMaxHeight; }; if (_local4 != 1){ _measuredMinWidth = (_measuredMinWidth * _local4); _measuredWidth = (_measuredWidth * _local4); }; if (_local5 != 1){ _measuredMinHeight = (_measuredMinHeight * _local5); _measuredHeight = (_measuredHeight * _local5); }; } else { invalidateSizeFlag = false; _measuredMinWidth = 0; _measuredMinHeight = 0; }; adjustSizesForScaleChanges(); if (isNaN(oldMinWidth)){ oldMinWidth = (isNaN(explicitMinWidth)) ? measuredMinWidth : explicitMinWidth; oldMinHeight = (isNaN(explicitMinHeight)) ? measuredMinHeight : explicitMinHeight; oldExplicitWidth = (isNaN(explicitWidth)) ? measuredWidth : explicitWidth; oldExplicitHeight = (isNaN(explicitHeight)) ? measuredHeight : explicitHeight; _local1 = true; } else { _local3 = (isNaN(explicitMinWidth)) ? measuredMinWidth : explicitMinWidth; if (_local3 != oldMinWidth){ oldMinWidth = _local3; _local1 = true; }; _local3 = (isNaN(explicitMinHeight)) ? measuredMinHeight : explicitMinHeight; if (_local3 != oldMinHeight){ oldMinHeight = _local3; _local1 = true; }; _local3 = (isNaN(explicitWidth)) ? measuredWidth : explicitWidth; if (_local3 != oldExplicitWidth){ oldExplicitWidth = _local3; _local1 = true; }; _local3 = (isNaN(explicitHeight)) ? measuredHeight : explicitHeight; if (_local3 != oldExplicitHeight){ oldExplicitHeight = _local3; _local1 = true; }; }; return (_local1); } public function get automationTabularData():Object{ if (automationDelegate){ return (automationDelegate.automationTabularData); }; return (null); } public function validateNow():void{ UIComponentGlobals.layoutManager.validateClient(this); } public function finishPrint(_arg1:Object, _arg2:IFlexDisplayObject):void{ } public function get repeaters():Array{ return ((_repeaters) ? _repeaters.slice(0) : []); } private function dispatchMoveEvent():void{ var _local1:MoveEvent = new MoveEvent(MoveEvent.MOVE); _local1.oldX = oldX; _local1.oldY = oldY; dispatchEvent(_local1); oldX = x; oldY = y; } public function drawFocus(_arg1:Boolean):void{ var _local4:DisplayObjectContainer; var _local5:Class; if (!parent){ return; }; var _local2:DisplayObject = getFocusObject(); var _local3:Sprite = (focusManager) ? focusManager.focusPane : null; if (((_arg1) && (!(preventDrawFocus)))){ _local4 = _local3.parent; if (_local4 != parent){ if (_local4){ if ((_local4 is ISystemManager)){ ISystemManager(_local4).focusPane = null; } else { IUIComponent(_local4).focusPane = null; }; }; if ((parent is ISystemManager)){ ISystemManager(parent).focusPane = _local3; } else { IUIComponent(parent).focusPane = _local3; }; }; _local5 = getStyle("focusSkin"); if (((_local2) && (!((_local2 is _local5))))){ _local3.removeChild(_local2); _local2 = null; }; if (!_local2){ _local2 = new (_local5); _local2.name = "focus"; _local3.addChild(_local2); }; if ((_local2 is ILayoutManagerClient)){ ILayoutManagerClient(_local2).nestLevel = nestLevel; }; if ((_local2 is ISimpleStyleClient)){ ISimpleStyleClient(_local2).styleName = this; }; addEventListener(MoveEvent.MOVE, focusObj_moveHandler, true); addEventListener(MoveEvent.MOVE, focusObj_moveHandler); addEventListener(ResizeEvent.RESIZE, focusObj_resizeHandler, true); addEventListener(ResizeEvent.RESIZE, focusObj_resizeHandler); addEventListener(Event.REMOVED, focusObj_removedHandler, true); _local2.visible = true; hasFocusRect = true; adjustFocusRect(); } else { if (hasFocusRect){ hasFocusRect = false; if (_local2){ _local2.visible = false; }; removeEventListener(MoveEvent.MOVE, focusObj_moveHandler); removeEventListener(MoveEvent.MOVE, focusObj_moveHandler, true); removeEventListener(ResizeEvent.RESIZE, focusObj_resizeHandler, true); removeEventListener(ResizeEvent.RESIZE, focusObj_resizeHandler); removeEventListener(Event.REMOVED, focusObj_removedHandler, true); }; }; } public function get flexContextMenu():IFlexContextMenu{ return (_flexContextMenu); } private function get indexedID():String{ var _local1:String = id; var _local2:Array = instanceIndices; if (_local2){ _local1 = (_local1 + (("[" + _local2.join("][")) + "]")); }; return (_local1); } public function get measuredMinHeight():Number{ return (_measuredMinHeight); } mx_internal function addingChild(_arg1:DisplayObject):void{ if ((((_arg1 is IUIComponent)) && (!(IUIComponent(_arg1).document)))){ IUIComponent(_arg1).document = (document) ? document : ApplicationGlobals.application; }; if ((((_arg1 is UIComponent)) && ((UIComponent(_arg1).moduleFactory == null)))){ if (moduleFactory != null){ UIComponent(_arg1).moduleFactory = moduleFactory; } else { if ((((document is IFlexModule)) && (!((document.moduleFactory == null))))){ UIComponent(_arg1).moduleFactory = document.moduleFactory; } else { if ((((parent is UIComponent)) && (!((UIComponent(parent).moduleFactory == null))))){ UIComponent(_arg1).moduleFactory = UIComponent(parent).moduleFactory; }; }; }; }; if ((((((_arg1 is IFontContextComponent)) && ((!(_arg1) is UIComponent)))) && ((IFontContextComponent(_arg1).fontContext == null)))){ IFontContextComponent(_arg1).fontContext = moduleFactory; }; if ((_arg1 is IUIComponent)){ IUIComponent(_arg1).parentChanged(this); }; if ((_arg1 is ILayoutManagerClient)){ ILayoutManagerClient(_arg1).nestLevel = (nestLevel + 1); } else { if ((_arg1 is IUITextField)){ IUITextField(_arg1).nestLevel = (nestLevel + 1); }; }; if ((_arg1 is InteractiveObject)){ if (doubleClickEnabled){ InteractiveObject(_arg1).doubleClickEnabled = true; }; }; if ((_arg1 is IStyleClient)){ IStyleClient(_arg1).regenerateStyleCache(true); } else { if ((((_arg1 is IUITextField)) && (IUITextField(_arg1).inheritingStyles))){ StyleProtoChain.initTextField(IUITextField(_arg1)); }; }; if ((_arg1 is ISimpleStyleClient)){ ISimpleStyleClient(_arg1).styleChanged(null); }; if ((_arg1 is IStyleClient)){ IStyleClient(_arg1).notifyStyleChangeInChildren(null, true); }; if ((_arg1 is UIComponent)){ UIComponent(_arg1).initThemeColor(); }; if ((_arg1 is UIComponent)){ UIComponent(_arg1).stylesInitialized(); }; } public function set repeaterIndices(_arg1:Array):void{ _repeaterIndices = _arg1; } protected function initializationComplete():void{ processedDescriptors = true; } public function set moduleFactory(_arg1:IFlexModuleFactory):void{ var _local4:UIComponent; var _local2:int = numChildren; var _local3:int; while (_local3 < _local2) { _local4 = (getChildAt(_local3) as UIComponent); if (!_local4){ } else { if ((((_local4.moduleFactory == null)) || ((_local4.moduleFactory == _moduleFactory)))){ _local4.moduleFactory = _arg1; }; }; _local3++; }; _moduleFactory = _arg1; } private function focusObj_removedHandler(_arg1:Event):void{ if (_arg1.target != this){ return; }; var _local2:DisplayObject = getFocusObject(); if (_local2){ _local2.visible = false; }; } mx_internal function updateCallbacks():void{ if (invalidateDisplayListFlag){ UIComponentGlobals.layoutManager.invalidateDisplayList(this); }; if (invalidateSizeFlag){ UIComponentGlobals.layoutManager.invalidateSize(this); }; if (invalidatePropertiesFlag){ UIComponentGlobals.layoutManager.invalidateProperties(this); }; if (systemManager){ if ((((methodQueue.length > 0)) && (!(listeningForRender)))){ _systemManager.stage.addEventListener(Event.RENDER, callLaterDispatcher); _systemManager.stage.addEventListener(Event.ENTER_FRAME, callLaterDispatcher); listeningForRender = true; }; _systemManager.stage.invalidate(); }; } public function set styleDeclaration(_arg1:CSSStyleDeclaration):void{ _styleDeclaration = _arg1; } override public function set doubleClickEnabled(_arg1:Boolean):void{ var _local2:IChildList; var _local4:InteractiveObject; super.doubleClickEnabled = _arg1; if ((this is IRawChildrenContainer)){ _local2 = IRawChildrenContainer(this).rawChildren; } else { _local2 = IChildList(this); }; var _local3:int; while (_local3 < _local2.numChildren) { _local4 = (_local2.getChildAt(_local3) as InteractiveObject); if (_local4){ _local4.doubleClickEnabled = _arg1; }; _local3++; }; } public function prepareToPrint(_arg1:IFlexDisplayObject):Object{ return (null); } public function get minHeight():Number{ if (!isNaN(explicitMinHeight)){ return (explicitMinHeight); }; return (measuredMinHeight); } public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{ var _local5:ISimpleStyleClient; cachedTextFormat = null; var _local3:int = numChildren; var _local4:int; while (_local4 < _local3) { _local5 = (getChildAt(_local4) as ISimpleStyleClient); if (_local5){ _local5.styleChanged(_arg1); if ((_local5 is IStyleClient)){ IStyleClient(_local5).notifyStyleChangeInChildren(_arg1, _arg2); }; }; _local4++; }; } public function get contentMouseX():Number{ return (mouseX); } public function get contentMouseY():Number{ return (mouseY); } public function get tweeningProperties():Array{ return (_tweeningProperties); } public function set explicitMaxWidth(_arg1:Number):void{ if (_explicitMaxWidth == _arg1){ return; }; _explicitMaxWidth = _arg1; invalidateSize(); var _local2:IInvalidating = (parent as IInvalidating); if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; dispatchEvent(new Event("explicitMaxWidthChanged")); } public function set document(_arg1:Object):void{ var _local4:IUIComponent; var _local2:int = numChildren; var _local3:int; while (_local3 < _local2) { _local4 = (getChildAt(_local3) as IUIComponent); if (!_local4){ } else { if ((((_local4.document == _document)) || ((_local4.document == ApplicationGlobals.application)))){ _local4.document = _arg1; }; }; _local3++; }; _document = _arg1; } public function validateSize(_arg1:Boolean=false):void{ var _local2:int; var _local3:DisplayObject; var _local4:Boolean; var _local5:IInvalidating; if (_arg1){ _local2 = 0; while (_local2 < numChildren) { _local3 = getChildAt(_local2); if ((_local3 is ILayoutManagerClient)){ (_local3 as ILayoutManagerClient).validateSize(true); }; _local2++; }; }; if (invalidateSizeFlag){ _local4 = measureSizes(); if (((_local4) && (includeInLayout))){ invalidateDisplayList(); _local5 = (parent as IInvalidating); if (_local5){ _local5.invalidateSize(); _local5.invalidateDisplayList(); }; }; }; } public function get validationSubField():String{ return (_validationSubField); } override public function dispatchEvent(_arg1:Event):Boolean{ if (dispatchEventHook != null){ dispatchEventHook(_arg1, this); }; return (super.dispatchEvent(_arg1)); } public function set id(_arg1:String):void{ _id = _arg1; } private function overlay_resizeHandler(_arg1:Event):void{ fillOverlay(overlay, overlayColor, null); } public function set updateCompletePendingFlag(_arg1:Boolean):void{ _updateCompletePendingFlag = _arg1; } final mx_internal function get $height():Number{ return (super.height); } protected function attachOverlay():void{ addChild(overlay); } public function get explicitMinHeight():Number{ return (_explicitMinHeight); } override public function set height(_arg1:Number):void{ var _local2:IInvalidating; if (explicitHeight != _arg1){ explicitHeight = _arg1; invalidateSize(); }; if (_height != _arg1){ invalidateProperties(); invalidateDisplayList(); _local2 = (parent as IInvalidating); if (((_local2) && (includeInLayout))){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; _height = _arg1; dispatchEvent(new Event("heightChanged")); }; } public function get numAutomationChildren():int{ if (automationDelegate){ return (automationDelegate.numAutomationChildren); }; return (0); } public function get parentApplication():Object{ var _local2:UIComponent; var _local1:Object = systemManager.document; if (_local1 == this){ _local2 = (_local1.systemManager.parent as UIComponent); _local1 = (_local2) ? _local2.systemManager.document : null; }; return (_local1); } public function localToContent(_arg1:Point):Point{ return (_arg1); } public function get repeaterIndex():int{ return ((_repeaterIndices) ? _repeaterIndices[(_repeaterIndices.length - 1)] : -1); } private function removeState(_arg1:String, _arg2:String):void{ var _local4:Array; var _local5:int; var _local3:State = getState(_arg1); if (_arg1 == _arg2){ return; }; if (_local3){ _local3.dispatchExitState(); _local4 = _local3.overrides; _local5 = _local4.length; while (_local5) { _local4[(_local5 - 1)].remove(this); _local5--; }; if (_local3.basedOn != _arg2){ removeState(_local3.basedOn, _arg2); }; }; } public function setStyle(_arg1:String, _arg2):void{ if (_arg1 == "styleName"){ styleName = _arg2; return; }; if (EffectManager.getEventForEffectTrigger(_arg1) != ""){ EffectManager.setStyle(_arg1, this); }; var _local3:Boolean = StyleManager.isInheritingStyle(_arg1); var _local4 = !((inheritingStyles == UIComponent.STYLE_UNINITIALIZED)); var _local5 = !((getStyle(_arg1) == _arg2)); if (!_styleDeclaration){ _styleDeclaration = new CSSStyleDeclaration(); _styleDeclaration.setStyle(_arg1, _arg2); if (_local4){ regenerateStyleCache(_local3); }; } else { _styleDeclaration.setStyle(_arg1, _arg2); }; if (((_local4) && (_local5))){ styleChanged(_arg1); notifyStyleChangeInChildren(_arg1, _local3); }; } public function get showInAutomationHierarchy():Boolean{ return (_showInAutomationHierarchy); } public function get systemManager():ISystemManager{ var _local1:DisplayObject; var _local2:DisplayObjectContainer; var _local3:IUIComponent; if (((!(_systemManager)) || (_systemManagerDirty))){ _local1 = root; if (((_local1) && (!((_local1 is Stage))))){ _systemManager = (_local1 as ISystemManager); } else { if (_local1){ _systemManager = (Stage(_local1).getChildAt(0) as ISystemManager); } else { _local2 = parent; while (_local2) { _local3 = (_local2 as IUIComponent); if (_local3){ _systemManager = _local3.systemManager; break; }; _local2 = _local2.parent; }; }; }; _systemManagerDirty = false; }; return (_systemManager); } private function isBaseState(_arg1:String):Boolean{ return (((!(_arg1)) || ((_arg1 == "")))); } public function set enabled(_arg1:Boolean):void{ _enabled = _arg1; cachedTextFormat = null; invalidateDisplayList(); dispatchEvent(new Event("enabledChanged")); } public function set focusEnabled(_arg1:Boolean):void{ _focusEnabled = _arg1; } public function get minWidth():Number{ if (!isNaN(explicitMinWidth)){ return (explicitMinWidth); }; return (measuredMinWidth); } private function setFocusLater(_arg1:Event=null):void{ var _local2:ISystemManager = systemManager; if (((_local2) && (_local2.stage))){ _local2.stage.removeEventListener(Event.ENTER_FRAME, setFocusLater); if (UIComponentGlobals.nextFocusObject){ _local2.stage.focus = UIComponentGlobals.nextFocusObject; }; UIComponentGlobals.nextFocusObject = null; }; } public function get currentState():String{ return ((_currentStateChanged) ? requestedCurrentState : _currentState); } public function initializeRepeaterArrays(_arg1:IRepeaterClient):void{ if (((((((_arg1) && (_arg1.instanceIndices))) && (!(_instanceIndices)))) && (!(_arg1.isDocument)))){ _instanceIndices = _arg1.instanceIndices; _repeaters = _arg1.repeaters; _repeaterIndices = _arg1.repeaterIndices; }; } public function get baselinePosition():Number{ if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ return (NaN); }; if (!validateBaselinePosition()){ return (NaN); }; var _local1:TextLineMetrics = measureText("Wj"); if (height < ((2 + _local1.ascent) + 2)){ return (int((height + ((_local1.ascent - height) / 2)))); }; return ((2 + _local1.ascent)); } public function get measuredWidth():Number{ return (_measuredWidth); } public function set instanceIndices(_arg1:Array):void{ _instanceIndices = _arg1; } public function set cachePolicy(_arg1:String):void{ if (_cachePolicy != _arg1){ _cachePolicy = _arg1; if (_arg1 == UIComponentCachePolicy.OFF){ cacheAsBitmap = false; } else { if (_arg1 == UIComponentCachePolicy.ON){ cacheAsBitmap = true; } else { cacheAsBitmap = (cacheAsBitmapCount > 0); }; }; }; } public function get automationValue():Array{ if (automationDelegate){ return (automationDelegate.automationValue); }; return ([]); } private function addedHandler(_arg1:Event):void{ if (_arg1.eventPhase != EventPhase.AT_TARGET){ return; }; if ((((parent is IContainer)) && (IContainer(parent).creatingContentPane))){ _arg1.stopImmediatePropagation(); return; }; } public function parentChanged(_arg1:DisplayObjectContainer):void{ if (!_arg1){ _parent = null; _nestLevel = 0; } else { if ((_arg1 is IStyleClient)){ _parent = _arg1; } else { if ((_arg1 is ISystemManager)){ _parent = _arg1; } else { _parent = _arg1.parent; }; }; }; } public function get owner():DisplayObjectContainer{ return ((_owner) ? _owner : parent); } public function get processedDescriptors():Boolean{ return (_processedDescriptors); } override public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{ var _local3:DisplayObjectContainer = _arg1.parent; if (((_local3) && (!((_local3 is Loader))))){ _local3.removeChild(_arg1); }; if (((overlayReferenceCount) && (!((_arg1 == overlay))))){ _arg2 = Math.min(_arg2, Math.max(0, (super.numChildren - 1))); }; addingChild(_arg1); $addChildAt(_arg1, _arg2); childAdded(_arg1); return (_arg1); } public function get maxWidth():Number{ return ((isNaN(explicitMaxWidth)) ? DEFAULT_MAX_WIDTH : explicitMaxWidth); } override public function set alpha(_arg1:Number):void{ super.alpha = _arg1; dispatchEvent(new Event("alphaChanged")); } private function removedHandler(_arg1:Event):void{ if (_arg1.eventPhase != EventPhase.AT_TARGET){ return; }; if ((((parent is IContainer)) && (IContainer(parent).creatingContentPane))){ _arg1.stopImmediatePropagation(); return; }; _systemManagerDirty = true; } public function callLater(_arg1:Function, _arg2:Array=null):void{ methodQueue.push(new MethodQueueElement(_arg1, _arg2)); var _local3:ISystemManager = systemManager; if (((_local3) && (_local3.stage))){ if (!listeningForRender){ _local3.stage.addEventListener(Event.RENDER, callLaterDispatcher); _local3.stage.addEventListener(Event.ENTER_FRAME, callLaterDispatcher); listeningForRender = true; }; _local3.stage.invalidate(); }; } public function get initialized():Boolean{ return (_initialized); } private function callLaterDispatcher2(_arg1:Event):void{ var _local6:MethodQueueElement; if (UIComponentGlobals.callLaterSuspendCount > 0){ return; }; var _local2:ISystemManager = systemManager; if (((((_local2) && (_local2.stage))) && (listeningForRender))){ _local2.stage.removeEventListener(Event.RENDER, callLaterDispatcher); _local2.stage.removeEventListener(Event.ENTER_FRAME, callLaterDispatcher); listeningForRender = false; }; var _local3:Array = methodQueue; methodQueue = []; var _local4:int = _local3.length; var _local5:int; while (_local5 < _local4) { _local6 = MethodQueueElement(_local3[_local5]); _local6.method.apply(null, _local6.args); _local5++; }; } public function measureHTMLText(_arg1:String):TextLineMetrics{ return (determineTextFormatFromStyles().measureHTMLText(_arg1)); } public function set descriptor(_arg1:UIComponentDescriptor):void{ _descriptor = _arg1; } private function getState(_arg1:String):State{ if (((!(states)) || (isBaseState(_arg1)))){ return (null); }; var _local2:int; while (_local2 < states.length) { if (states[_local2].name == _arg1){ return (states[_local2]); }; _local2++; }; var _local3:String = resourceManager.getString("core", "stateUndefined", [_arg1]); throw (new ArgumentError(_local3)); } public function validateProperties():void{ if (invalidatePropertiesFlag){ commitProperties(); invalidatePropertiesFlag = false; }; } mx_internal function get documentDescriptor():UIComponentDescriptor{ return (_documentDescriptor); } public function set includeInLayout(_arg1:Boolean):void{ var _local2:IInvalidating; if (_includeInLayout != _arg1){ _includeInLayout = _arg1; _local2 = (parent as IInvalidating); if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; dispatchEvent(new Event("includeInLayoutChanged")); }; } public function getClassStyleDeclarations():Array{ var myApplicationDomain:ApplicationDomain; var cache:Array; var myRoot:DisplayObject; var s:CSSStyleDeclaration; var factory:IFlexModuleFactory = ModuleManager.getAssociatedFactory(this); if (factory != null){ myApplicationDomain = ApplicationDomain(factory.info()["currentDomain"]); } else { myRoot = SystemManager.getSWFRoot(this); if (!myRoot){ return ([]); }; myApplicationDomain = myRoot.loaderInfo.applicationDomain; }; var className:String = getQualifiedClassName(this); className = className.replace("::", "."); cache = StyleManager.typeSelectorCache[className]; if (cache){ return (cache); }; var decls:Array = []; var classNames:Array = []; var caches:Array = []; var declcache:Array = []; while (((((!((className == null))) && (!((className == "mx.core.UIComponent"))))) && (!((className == "mx.core.UITextField"))))) { cache = StyleManager.typeSelectorCache[className]; if (cache){ decls = decls.concat(cache); break; }; s = StyleManager.getStyleDeclaration(className); if (s){ decls.unshift(s); classNames.push(className); caches.push(classNames); declcache.push(decls); decls = []; classNames = []; } else { classNames.push(className); }; try { className = getQualifiedSuperclassName(myApplicationDomain.getDefinition(className)); className = className.replace("::", "."); } catch(e:ReferenceError) { className = null; }; }; caches.push(classNames); declcache.push(decls); decls = []; while (caches.length) { classNames = caches.pop(); decls = decls.concat(declcache.pop()); while (classNames.length) { StyleManager.typeSelectorCache[classNames.pop()] = decls; }; }; return (decls); } public function set measuredMinWidth(_arg1:Number):void{ _measuredMinWidth = _arg1; } private function initializeState(_arg1:String):void{ var _local2:State = getState(_arg1); while (_local2) { _local2.initialize(); _local2 = getState(_local2.basedOn); }; } mx_internal function initProtoChain():void{ var _local1:CSSStyleDeclaration; var _local7:Object; var _local8:CSSStyleDeclaration; if (styleName){ if ((styleName is CSSStyleDeclaration)){ _local1 = CSSStyleDeclaration(styleName); } else { if ((((styleName is IFlexDisplayObject)) || ((styleName is IStyleClient)))){ StyleProtoChain.initProtoChainForUIComponentStyleName(this); return; }; if ((styleName is String)){ _local1 = StyleManager.getStyleDeclaration(("." + styleName)); }; }; }; var _local2:Object = StyleManager.stylesRoot; if (((_local2) && (_local2.effects))){ registerEffects(_local2.effects); }; var _local3:IStyleClient = (parent as IStyleClient); if (_local3){ _local7 = _local3.inheritingStyles; if (_local7 == UIComponent.STYLE_UNINITIALIZED){ _local7 = _local2; }; } else { if (isPopUp){ if ((((((FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0)) && (_owner))) && ((_owner is IStyleClient)))){ _local7 = IStyleClient(_owner).inheritingStyles; } else { _local7 = ApplicationGlobals.application.inheritingStyles; }; } else { _local7 = StyleManager.stylesRoot; }; }; var _local4:Array = getClassStyleDeclarations(); var _local5:int = _local4.length; var _local6:int; while (_local6 < _local5) { _local8 = _local4[_local6]; _local7 = _local8.addStyleToProtoChain(_local7, this); _local2 = _local8.addStyleToProtoChain(_local2, this); if (_local8.effects){ registerEffects(_local8.effects); }; _local6++; }; if (_local1){ _local7 = _local1.addStyleToProtoChain(_local7, this); _local2 = _local1.addStyleToProtoChain(_local2, this); if (_local1.effects){ registerEffects(_local1.effects); }; }; inheritingStyles = (_styleDeclaration) ? _styleDeclaration.addStyleToProtoChain(_local7, this) : _local7; nonInheritingStyles = (_styleDeclaration) ? _styleDeclaration.addStyleToProtoChain(_local2, this) : _local2; } public function get repeaterIndices():Array{ return ((_repeaterIndices) ? _repeaterIndices.slice() : []); } override public function removeChild(_arg1:DisplayObject):DisplayObject{ removingChild(_arg1); $removeChild(_arg1); childRemoved(_arg1); return (_arg1); } private function focusObj_moveHandler(_arg1:MoveEvent):void{ adjustFocusRect(); } public function get styleDeclaration():CSSStyleDeclaration{ return (_styleDeclaration); } override public function get doubleClickEnabled():Boolean{ return (super.doubleClickEnabled); } public function contentToLocal(_arg1:Point):Point{ return (_arg1); } private function creationCompleteHandler(_arg1:FlexEvent):void{ if (_currentStateChanged){ _currentStateChanged = false; commitCurrentState(); validateNow(); }; removeEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler); } public function set measuredHeight(_arg1:Number):void{ _measuredHeight = _arg1; } protected function createChildren():void{ } public function get activeEffects():Array{ return (_effectsStarted); } override public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{ if (((overlayReferenceCount) && (!((_arg1 == overlay))))){ _arg2 = Math.min(_arg2, Math.max(0, (super.numChildren - 2))); }; super.setChildIndex(_arg1, _arg2); } public function regenerateStyleCache(_arg1:Boolean):void{ var _local5:DisplayObject; initProtoChain(); var _local2:IChildList = ((this is IRawChildrenContainer)) ? IRawChildrenContainer(this).rawChildren : IChildList(this); var _local3:int = _local2.numChildren; var _local4:int; while (_local4 < _local3) { _local5 = _local2.getChildAt(_local4); if ((_local5 is IStyleClient)){ if (IStyleClient(_local5).inheritingStyles != UIComponent.STYLE_UNINITIALIZED){ IStyleClient(_local5).regenerateStyleCache(_arg1); }; } else { if ((_local5 is IUITextField)){ if (IUITextField(_local5).inheritingStyles){ StyleProtoChain.initTextField(IUITextField(_local5)); }; }; }; _local4++; }; } public function get updateCompletePendingFlag():Boolean{ return (_updateCompletePendingFlag); } protected function focusOutHandler(_arg1:FocusEvent):void{ if (isOurFocus(DisplayObject(_arg1.target))){ drawFocus(false); }; } public function getFocus():InteractiveObject{ var _local1:ISystemManager = systemManager; if (!_local1){ return (null); }; if (UIComponentGlobals.nextFocusObject){ return (UIComponentGlobals.nextFocusObject); }; return (_local1.stage.focus); } public function endEffectsStarted():void{ var _local1:int = _effectsStarted.length; var _local2:int; while (_local2 < _local1) { _effectsStarted[_local2].end(); _local2++; }; } protected function get unscaledHeight():Number{ return ((height / Math.abs(scaleY))); } public function get enabled():Boolean{ return (_enabled); } public function get focusEnabled():Boolean{ return (_focusEnabled); } override public function set cacheAsBitmap(_arg1:Boolean):void{ super.cacheAsBitmap = _arg1; cacheAsBitmapCount = (_arg1) ? 1 : 0; } mx_internal function removeOverlay():void{ if ((((((overlayReferenceCount > 0)) && ((--overlayReferenceCount == 0)))) && (overlay))){ removeEventListener("resize", overlay_resizeHandler); if (super.getChildByName("overlay")){ $removeChild(overlay); }; overlay = null; }; } public function set cacheHeuristic(_arg1:Boolean):void{ if (_cachePolicy == UIComponentCachePolicy.AUTO){ if (_arg1){ cacheAsBitmapCount++; } else { if (cacheAsBitmapCount != 0){ cacheAsBitmapCount--; }; }; super.cacheAsBitmap = !((cacheAsBitmapCount == 0)); }; } public function get cachePolicy():String{ return (_cachePolicy); } public function set maxHeight(_arg1:Number):void{ if (explicitMaxHeight == _arg1){ return; }; explicitMaxHeight = _arg1; } public function getConstraintValue(_arg1:String){ return (getStyle(_arg1)); } public function set focusManager(_arg1:IFocusManager):void{ _focusManager = _arg1; } public function clearStyle(_arg1:String):void{ setStyle(_arg1, undefined); } public function get descriptor():UIComponentDescriptor{ return (_descriptor); } public function set nonInheritingStyles(_arg1:Object):void{ _nonInheritingStyles = _arg1; } public function get cursorManager():ICursorManager{ var _local2:ICursorManager; var _local1:DisplayObject = parent; while (_local1) { if ((((_local1 is IUIComponent)) && (("cursorManager" in _local1)))){ _local2 = _local1["cursorManager"]; return (_local2); }; _local1 = _local1.parent; }; return (CursorManager.getInstance()); } public function set automationDelegate(_arg1:Object):void{ _automationDelegate = (_arg1 as IAutomationObject); } public function get measuredMinWidth():Number{ return (_measuredMinWidth); } public function createReferenceOnParentDocument(_arg1:IFlexDisplayObject):void{ var _local2:Array; var _local3:Object; var _local4:int; var _local5:int; var _local6:PropertyChangeEvent; var _local7:Object; if (((id) && (!((id == ""))))){ _local2 = _instanceIndices; if (!_local2){ _arg1[id] = this; } else { _local3 = _arg1[id]; if (!(_local3 is Array)){ _local3 = (_arg1[id] = []); }; _local4 = _local2.length; _local5 = 0; while (_local5 < (_local4 - 1)) { _local7 = _local3[_local2[_local5]]; if (!(_local7 is Array)){ _local7 = (_local3[_local2[_local5]] = []); }; _local3 = _local7; _local5++; }; _local3[_local2[(_local4 - 1)]] = this; _local6 = PropertyChangeEvent.createUpdateEvent(_arg1, id, _arg1[id], _arg1[id]); _arg1.dispatchEvent(_local6); }; }; } public function get repeater():IRepeater{ return ((_repeaters) ? _repeaters[(_repeaters.length - 1)] : null); } public function set isPopUp(_arg1:Boolean):void{ _isPopUp = _arg1; } public function get measuredHeight():Number{ return (_measuredHeight); } public function initialize():void{ if (initialized){ return; }; dispatchEvent(new FlexEvent(FlexEvent.PREINITIALIZE)); createChildren(); childrenCreated(); initializeAccessibility(); initializationComplete(); } override public function set width(_arg1:Number):void{ var _local2:IInvalidating; if (explicitWidth != _arg1){ explicitWidth = _arg1; invalidateSize(); }; if (_width != _arg1){ invalidateProperties(); invalidateDisplayList(); _local2 = (parent as IInvalidating); if (((_local2) && (includeInLayout))){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; _width = _arg1; dispatchEvent(new Event("widthChanged")); }; } public function set percentHeight(_arg1:Number):void{ if (_percentHeight == _arg1){ return; }; if (!isNaN(_arg1)){ _explicitHeight = NaN; }; _percentHeight = _arg1; var _local2:IInvalidating = (parent as IInvalidating); if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; } final mx_internal function set $visible(_arg1:Boolean):void{ super.visible = _arg1; } private function findCommonBaseState(_arg1:String, _arg2:String):String{ var _local3:State = getState(_arg1); var _local4:State = getState(_arg2); if (((!(_local3)) || (!(_local4)))){ return (""); }; if (((isBaseState(_local3.basedOn)) && (isBaseState(_local4.basedOn)))){ return (""); }; var _local5:Array = getBaseStates(_local3); var _local6:Array = getBaseStates(_local4); var _local7 = ""; while (_local5[(_local5.length - 1)] == _local6[(_local6.length - 1)]) { _local7 = _local5.pop(); _local6.pop(); if (((!(_local5.length)) || (!(_local6.length)))){ break; }; }; if (((_local5.length) && ((_local5[(_local5.length - 1)] == _local4.name)))){ _local7 = _local4.name; } else { if (((_local6.length) && ((_local6[(_local6.length - 1)] == _local3.name)))){ _local7 = _local3.name; }; }; return (_local7); } mx_internal function childRemoved(_arg1:DisplayObject):void{ if ((_arg1 is IUIComponent)){ if (IUIComponent(_arg1).document != _arg1){ IUIComponent(_arg1).document = null; }; IUIComponent(_arg1).parentChanged(null); }; } final mx_internal function $removeChildAt(_arg1:int):DisplayObject{ return (super.removeChildAt(_arg1)); } public function get maxHeight():Number{ return ((isNaN(explicitMaxHeight)) ? DEFAULT_MAX_HEIGHT : explicitMaxHeight); } protected function initializeAccessibility():void{ if (UIComponent.createAccessibilityImplementation != null){ UIComponent.createAccessibilityImplementation(this); }; } public function set explicitMaxHeight(_arg1:Number):void{ if (_explicitMaxHeight == _arg1){ return; }; _explicitMaxHeight = _arg1; invalidateSize(); var _local2:IInvalidating = (parent as IInvalidating); if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; dispatchEvent(new Event("explicitMaxHeightChanged")); } public function get focusManager():IFocusManager{ if (_focusManager){ return (_focusManager); }; var _local1:DisplayObject = parent; while (_local1) { if ((_local1 is IFocusManagerContainer)){ return (IFocusManagerContainer(_local1).focusManager); }; _local1 = _local1.parent; }; return (null); } public function set styleName(_arg1:Object):void{ if (_styleName === _arg1){ return; }; _styleName = _arg1; if (inheritingStyles == UIComponent.STYLE_UNINITIALIZED){ return; }; regenerateStyleCache(true); initThemeColor(); styleChanged("styleName"); notifyStyleChangeInChildren("styleName", true); } public function get automationDelegate():Object{ return (_automationDelegate); } protected function get resourceManager():IResourceManager{ return (_resourceManager); } mx_internal function validateBaselinePosition():Boolean{ var _local1:Number; var _local2:Number; if (!parent){ return (false); }; if ((((width == 0)) && ((height == 0)))){ validateNow(); _local1 = getExplicitOrMeasuredWidth(); _local2 = getExplicitOrMeasuredHeight(); setActualSize(_local1, _local2); }; validateNow(); return (true); } mx_internal function cancelAllCallLaters():void{ var _local1:ISystemManager = systemManager; if (((_local1) && (_local1.stage))){ if (listeningForRender){ _local1.stage.removeEventListener(Event.RENDER, callLaterDispatcher); _local1.stage.removeEventListener(Event.ENTER_FRAME, callLaterDispatcher); listeningForRender = false; }; }; methodQueue.splice(0); } private function updateCompleteHandler(_arg1:FlexEvent):void{ UIComponentGlobals.layoutManager.removeEventListener(FlexEvent.UPDATE_COMPLETE, updateCompleteHandler); processEffectFinished(_endingEffectInstances); _endingEffectInstances = []; } public function styleChanged(_arg1:String):void{ if ((((this is IFontContextComponent)) && (hasFontContextChanged()))){ invalidateProperties(); }; if (((((!(_arg1)) || ((_arg1 == "styleName")))) || (StyleManager.isSizeInvalidatingStyle(_arg1)))){ invalidateSize(); }; if (((((!(_arg1)) || ((_arg1 == "styleName")))) || ((_arg1 == "themeColor")))){ initThemeColor(); }; invalidateDisplayList(); if ((parent is IInvalidating)){ if (StyleManager.isParentSizeInvalidatingStyle(_arg1)){ IInvalidating(parent).invalidateSize(); }; if (StyleManager.isParentDisplayListInvalidatingStyle(_arg1)){ IInvalidating(parent).invalidateDisplayList(); }; }; } final mx_internal function get $visible():Boolean{ return (super.visible); } public function drawRoundRect(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:Object=null, _arg9:String=null, _arg10:Array=null, _arg11:Object=null):void{ var _local13:Number; var _local14:Array; var _local15:Matrix; var _local16:Object; var _local12:Graphics = graphics; if (((!(_arg3)) || (!(_arg4)))){ return; }; if (_arg6 !== null){ if ((_arg6 is Array)){ if ((_arg7 is Array)){ _local14 = (_arg7 as Array); } else { _local14 = [_arg7, _arg7]; }; if (!_arg10){ _arg10 = [0, 0xFF]; }; _local15 = null; if (_arg8){ if ((_arg8 is Matrix)){ _local15 = Matrix(_arg8); } else { _local15 = new Matrix(); if ((_arg8 is Number)){ _local15.createGradientBox(_arg3, _arg4, ((Number(_arg8) * Math.PI) / 180), _arg1, _arg2); } else { _local15.createGradientBox(_arg8.w, _arg8.h, _arg8.r, _arg8.x, _arg8.y); }; }; }; if (_arg9 == GradientType.RADIAL){ _local12.beginGradientFill(GradientType.RADIAL, (_arg6 as Array), _local14, _arg10, _local15); } else { _local12.beginGradientFill(GradientType.LINEAR, (_arg6 as Array), _local14, _arg10, _local15); }; } else { _local12.beginFill(Number(_arg6), Number(_arg7)); }; }; if (!_arg5){ _local12.drawRect(_arg1, _arg2, _arg3, _arg4); } else { if ((_arg5 is Number)){ _local13 = (Number(_arg5) * 2); _local12.drawRoundRect(_arg1, _arg2, _arg3, _arg4, _local13, _local13); } else { GraphicsUtil.drawRoundRectComplex(_local12, _arg1, _arg2, _arg3, _arg4, _arg5.tl, _arg5.tr, _arg5.bl, _arg5.br); }; }; if (_arg11){ _local16 = _arg11.r; if ((_local16 is Number)){ _local13 = (Number(_local16) * 2); _local12.drawRoundRect(_arg11.x, _arg11.y, _arg11.w, _arg11.h, _local13, _local13); } else { GraphicsUtil.drawRoundRectComplex(_local12, _arg11.x, _arg11.y, _arg11.w, _arg11.h, _local16.tl, _local16.tr, _local16.bl, _local16.br); }; }; if (_arg6 !== null){ _local12.endFill(); }; } public function move(_arg1:Number, _arg2:Number):void{ var _local3:Boolean; if (_arg1 != super.x){ super.x = _arg1; dispatchEvent(new Event("xChanged")); _local3 = true; }; if (_arg2 != super.y){ super.y = _arg2; dispatchEvent(new Event("yChanged")); _local3 = true; }; if (_local3){ dispatchMoveEvent(); }; } public function set toolTip(_arg1:String):void{ var _local2:String = _toolTip; _toolTip = _arg1; ToolTipManager.registerToolTip(this, _local2, _arg1); dispatchEvent(new Event("toolTipChanged")); } public function set repeaters(_arg1:Array):void{ _repeaters = _arg1; } public function get explicitMaxHeight():Number{ return (_explicitMaxHeight); } public function measureText(_arg1:String):TextLineMetrics{ return (determineTextFormatFromStyles().measureText(_arg1)); } public function get styleName():Object{ return (_styleName); } protected function createInModuleContext(_arg1:IFlexModuleFactory, _arg2:String):Object{ var _local3:Object; if (_arg1){ _local3 = _arg1.create(_arg2); }; return (_local3); } public function get parentDocument():Object{ var _local1:IUIComponent; var _local2:ISystemManager; if (document == this){ _local1 = (parent as IUIComponent); if (_local1){ return (_local1.document); }; _local2 = (parent as ISystemManager); if (_local2){ return (_local2.document); }; return (null); //unresolved jump }; return (document); } protected function childrenCreated():void{ invalidateProperties(); invalidateSize(); invalidateDisplayList(); } public function set flexContextMenu(_arg1:IFlexContextMenu):void{ if (_flexContextMenu){ _flexContextMenu.unsetContextMenu(this); }; _flexContextMenu = _arg1; if (_arg1 != null){ _flexContextMenu.setContextMenu(this); }; } public function set explicitWidth(_arg1:Number):void{ if (_explicitWidth == _arg1){ return; }; if (!isNaN(_arg1)){ _percentWidth = NaN; }; _explicitWidth = _arg1; invalidateSize(); var _local2:IInvalidating = (parent as IInvalidating); if (((_local2) && (includeInLayout))){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; dispatchEvent(new Event("explicitWidthChanged")); } private function setBorderColorForErrorString():void{ if (((!(_errorString)) || ((_errorString.length == 0)))){ if (!isNaN(origBorderColor)){ setStyle("borderColor", origBorderColor); saveBorderColor = true; }; } else { if (saveBorderColor){ saveBorderColor = false; origBorderColor = getStyle("borderColor"); }; setStyle("borderColor", getStyle("errorColor")); }; styleChanged("themeColor"); var _local1:IFocusManager = focusManager; var _local2:DisplayObject = (_local1) ? DisplayObject(_local1.getFocus()) : null; if (((((_local1) && (_local1.showFocusIndicator))) && ((_local2 == this)))){ drawFocus(true); }; } public function get explicitWidth():Number{ return (_explicitWidth); } public function invalidateSize():void{ if (!invalidateSizeFlag){ invalidateSizeFlag = true; if (((parent) && (UIComponentGlobals.layoutManager))){ UIComponentGlobals.layoutManager.invalidateSize(this); }; }; } public function set measuredMinHeight(_arg1:Number):void{ _measuredMinHeight = _arg1; } protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ } override public function set filters(_arg1:Array):void{ var _local2:int; var _local3:int; var _local4:IEventDispatcher; if (_filters){ _local2 = _filters.length; _local3 = 0; while (_local3 < _local2) { _local4 = (_filters[_local3] as IEventDispatcher); if (_local4){ _local4.removeEventListener("change", filterChangeHandler); }; _local3++; }; }; _filters = _arg1; if (_filters){ _local2 = _filters.length; _local3 = 0; while (_local3 < _local2) { _local4 = (_filters[_local3] as IEventDispatcher); if (_local4){ _local4.addEventListener("change", filterChangeHandler); }; _local3++; }; }; super.filters = _filters; } private static function get embeddedFontRegistry():IEmbeddedFontRegistry{ if (!_embeddedFontRegistry){ _embeddedFontRegistry = IEmbeddedFontRegistry(Singleton.getInstance("mx.core::IEmbeddedFontRegistry")); }; return (_embeddedFontRegistry); } public static function resumeBackgroundProcessing():void{ var _local1:ISystemManager; if (UIComponentGlobals.callLaterSuspendCount > 0){ UIComponentGlobals.callLaterSuspendCount--; if (UIComponentGlobals.callLaterSuspendCount == 0){ _local1 = SystemManagerGlobals.topLevelSystemManagers[0]; if (((_local1) && (_local1.stage))){ _local1.stage.invalidate(); }; }; }; } public static function suspendBackgroundProcessing():void{ UIComponentGlobals.callLaterSuspendCount++; } } }//package mx.core class MethodQueueElement { public var method:Function; public var args:Array; private function MethodQueueElement(_arg1:Function, _arg2:Array=null){ this.method = _arg1; this.args = _arg2; } }
Section 211
//UIComponentCachePolicy (mx.core.UIComponentCachePolicy) package mx.core { public final class UIComponentCachePolicy { public static const AUTO:String = "auto"; public static const ON:String = "on"; mx_internal static const VERSION:String = "3.0.0.0"; public static const OFF:String = "off"; } }//package mx.core
Section 212
//UIComponentDescriptor (mx.core.UIComponentDescriptor) package mx.core { public class UIComponentDescriptor extends ComponentDescriptor { mx_internal var instanceIndices:Array; public var stylesFactory:Function; public var effects:Array; mx_internal var repeaters:Array; mx_internal var repeaterIndices:Array; mx_internal static const VERSION:String = "3.0.0.0"; public function UIComponentDescriptor(_arg1:Object){ super(_arg1); } override public function toString():String{ return (("UIComponentDescriptor_" + id)); } } }//package mx.core
Section 213
//UIComponentGlobals (mx.core.UIComponentGlobals) package mx.core { import flash.display.*; import flash.geom.*; import mx.managers.*; public class UIComponentGlobals { mx_internal static var callLaterSuspendCount:int = 0; mx_internal static var layoutManager:ILayoutManager; mx_internal static var nextFocusObject:InteractiveObject; mx_internal static var designTime:Boolean = false; mx_internal static var tempMatrix:Matrix = new Matrix(); mx_internal static var callLaterDispatcherCount:int = 0; private static var _catchCallLaterExceptions:Boolean = false; public static function set catchCallLaterExceptions(_arg1:Boolean):void{ _catchCallLaterExceptions = _arg1; } public static function get designMode():Boolean{ return (designTime); } public static function set designMode(_arg1:Boolean):void{ designTime = _arg1; } public static function get catchCallLaterExceptions():Boolean{ return (_catchCallLaterExceptions); } } }//package mx.core
Section 214
//UITextField (mx.core.UITextField) package mx.core { import flash.display.*; import flash.text.*; import mx.managers.*; import mx.automation.*; import flash.events.*; import mx.resources.*; import mx.styles.*; import flash.utils.*; import mx.utils.*; public class UITextField extends FlexTextField implements IAutomationObject, IIMESupport, IFlexModule, IInvalidating, ISimpleStyleClient, IToolTipManagerClient, IUITextField { private var _enabled:Boolean;// = true private var untruncatedText:String; private var cachedEmbeddedFont:EmbeddedFont;// = null private var cachedTextFormat:TextFormat; private var _automationDelegate:IAutomationObject; private var _automationName:String; private var _styleName:Object; private var _document:Object; mx_internal var _toolTip:String; private var _nestLevel:int;// = 0 private var _explicitHeight:Number; private var _moduleFactory:IFlexModuleFactory; private var _initialized:Boolean;// = false private var _nonInheritingStyles:Object; private var _inheritingStyles:Object; private var _includeInLayout:Boolean;// = true private var invalidateDisplayListFlag:Boolean;// = true mx_internal var explicitColor:uint;// = 4294967295 private var _processedDescriptors:Boolean;// = true private var _updateCompletePendingFlag:Boolean;// = false private var explicitHTMLText:String;// = null mx_internal var _parent:DisplayObjectContainer; private var _imeMode:String;// = null private var resourceManager:IResourceManager; mx_internal var styleChangedFlag:Boolean;// = true private var _ignorePadding:Boolean;// = true private var _owner:DisplayObjectContainer; private var _explicitWidth:Number; mx_internal static const TEXT_WIDTH_PADDING:int = 5; mx_internal static const TEXT_HEIGHT_PADDING:int = 4; mx_internal static const VERSION:String = "3.0.0.0"; private static var truncationIndicatorResource:String; private static var _embeddedFontRegistry:IEmbeddedFontRegistry; mx_internal static var debuggingBorders:Boolean = false; public function UITextField(){ resourceManager = ResourceManager.getInstance(); _inheritingStyles = UIComponent.STYLE_UNINITIALIZED; _nonInheritingStyles = UIComponent.STYLE_UNINITIALIZED; super(); super.text = ""; focusRect = false; selectable = false; tabEnabled = false; if (debuggingBorders){ border = true; }; if (!truncationIndicatorResource){ truncationIndicatorResource = resourceManager.getString("core", "truncationIndicator"); }; addEventListener(Event.CHANGE, changeHandler); addEventListener("textFieldStyleChange", textFieldStyleChangeHandler); resourceManager.addEventListener(Event.CHANGE, resourceManager_changeHandler, false, 0, true); } public function set imeMode(_arg1:String):void{ _imeMode = _arg1; } public function get nestLevel():int{ return (_nestLevel); } private function textFieldStyleChangeHandler(_arg1:Event):void{ if (explicitHTMLText != null){ super.htmlText = explicitHTMLText; }; } public function truncateToFit(_arg1:String=null):Boolean{ var _local4:String; if (!_arg1){ _arg1 = truncationIndicatorResource; }; validateNow(); var _local2:String = super.text; untruncatedText = _local2; var _local3:Number = width; if (((!((_local2 == ""))) && (((textWidth + TEXT_WIDTH_PADDING) > (_local3 + 1E-14))))){ var _local5 = _local2; super.text = _local5; _local4 = _local5; _local2.slice(0, Math.floor(((_local3 / (textWidth + TEXT_WIDTH_PADDING)) * _local2.length))); while ((((_local4.length > 1)) && (((textWidth + TEXT_WIDTH_PADDING) > _local3)))) { _local4 = _local4.slice(0, -1); super.text = (_local4 + _arg1); }; return (true); }; return (false); } public function set nestLevel(_arg1:int):void{ if ((((_arg1 > 1)) && (!((_nestLevel == _arg1))))){ _nestLevel = _arg1; StyleProtoChain.initTextField(this); styleChangedFlag = true; validateNow(); }; } public function get minHeight():Number{ return (0); } public function getExplicitOrMeasuredHeight():Number{ return ((isNaN(explicitHeight)) ? measuredHeight : explicitHeight); } public function getStyle(_arg1:String){ if (StyleManager.inheritingStyles[_arg1]){ return ((inheritingStyles) ? inheritingStyles[_arg1] : IStyleClient(parent).getStyle(_arg1)); //unresolved jump }; return ((nonInheritingStyles) ? nonInheritingStyles[_arg1] : IStyleClient(parent).getStyle(_arg1)); } public function get className():String{ var _local1:String = getQualifiedClassName(this); var _local2:int = _local1.indexOf("::"); if (_local2 != -1){ _local1 = _local1.substr((_local2 + 2)); }; return (_local1); } public function setColor(_arg1:uint):void{ explicitColor = _arg1; styleChangedFlag = true; invalidateDisplayListFlag = true; validateNow(); } override public function replaceText(_arg1:int, _arg2:int, _arg3:String):void{ super.replaceText(_arg1, _arg2, _arg3); dispatchEvent(new Event("textReplace")); } private function creatingSystemManager():ISystemManager{ return ((((!((moduleFactory == null))) && ((moduleFactory is ISystemManager)))) ? ISystemManager(moduleFactory) : systemManager); } public function set document(_arg1:Object):void{ _document = _arg1; } public function get automationName():String{ if (_automationName){ return (_automationName); }; if (automationDelegate){ return (automationDelegate.automationName); }; return (""); } public function get explicitMinHeight():Number{ return (NaN); } public function get focusPane():Sprite{ return (null); } public function getTextStyles():TextFormat{ var _local1:TextFormat = new TextFormat(); _local1.align = getStyle("textAlign"); _local1.bold = (getStyle("fontWeight") == "bold"); if (enabled){ if (explicitColor == StyleManager.NOT_A_COLOR){ _local1.color = getStyle("color"); } else { _local1.color = explicitColor; }; } else { _local1.color = getStyle("disabledColor"); }; _local1.font = StringUtil.trimArrayElements(getStyle("fontFamily"), ","); _local1.indent = getStyle("textIndent"); _local1.italic = (getStyle("fontStyle") == "italic"); _local1.kerning = getStyle("kerning"); _local1.leading = getStyle("leading"); _local1.leftMargin = (ignorePadding) ? 0 : getStyle("paddingLeft"); _local1.letterSpacing = getStyle("letterSpacing"); _local1.rightMargin = (ignorePadding) ? 0 : getStyle("paddingRight"); _local1.size = getStyle("fontSize"); _local1.underline = (getStyle("textDecoration") == "underline"); cachedTextFormat = _local1; return (_local1); } override public function set text(_arg1:String):void{ if (!_arg1){ _arg1 = ""; }; if (((!(isHTML)) && ((super.text == _arg1)))){ return; }; super.text = _arg1; explicitHTMLText = null; if (invalidateDisplayListFlag){ validateNow(); }; } public function getExplicitOrMeasuredWidth():Number{ return ((isNaN(explicitWidth)) ? measuredWidth : explicitWidth); } public function get showInAutomationHierarchy():Boolean{ return (true); } public function set automationName(_arg1:String):void{ _automationName = _arg1; } public function get systemManager():ISystemManager{ var _local2:IUIComponent; var _local1:DisplayObject = parent; while (_local1) { _local2 = (_local1 as IUIComponent); if (_local2){ return (_local2.systemManager); }; _local1 = _local1.parent; }; return (null); } public function setStyle(_arg1:String, _arg2):void{ } public function get percentWidth():Number{ return (NaN); } public function get explicitHeight():Number{ return (_explicitHeight); } public function get baselinePosition():Number{ var _local1:TextLineMetrics; if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ _local1 = getLineMetrics(0); return (((height - 4) - _local1.descent)); }; if (!parent){ return (NaN); }; var _local2 = (text == ""); if (_local2){ super.text = "Wj"; }; _local1 = getLineMetrics(0); if (_local2){ super.text = ""; }; return ((2 + _local1.ascent)); } public function set enabled(_arg1:Boolean):void{ mouseEnabled = _arg1; _enabled = _arg1; styleChanged("color"); } public function get minWidth():Number{ return (0); } public function get automationValue():Array{ if (automationDelegate){ return (automationDelegate.automationValue); }; return ([""]); } public function get tweeningProperties():Array{ return (null); } public function get measuredWidth():Number{ validateNow(); if (!stage){ return ((textWidth + TEXT_WIDTH_PADDING)); }; return (((textWidth * transform.concatenatedMatrix.d) + TEXT_WIDTH_PADDING)); } public function set tweeningProperties(_arg1:Array):void{ } public function createAutomationIDPart(_arg1:IAutomationObject):Object{ return (null); } override public function get parent():DisplayObjectContainer{ return ((_parent) ? _parent : super.parent); } public function set updateCompletePendingFlag(_arg1:Boolean):void{ _updateCompletePendingFlag = _arg1; } public function setActualSize(_arg1:Number, _arg2:Number):void{ if (width != _arg1){ width = _arg1; }; if (height != _arg2){ height = _arg2; }; } public function get numAutomationChildren():int{ return (0); } public function set focusPane(_arg1:Sprite):void{ } public function getAutomationChildAt(_arg1:int):IAutomationObject{ return (null); } public function get inheritingStyles():Object{ return (_inheritingStyles); } public function get owner():DisplayObjectContainer{ return ((_owner) ? _owner : parent); } public function parentChanged(_arg1:DisplayObjectContainer):void{ if (!_arg1){ _parent = null; _nestLevel = 0; } else { if ((_arg1 is IStyleClient)){ _parent = _arg1; } else { if ((_arg1 is SystemManager)){ _parent = _arg1; } else { _parent = _arg1.parent; }; }; }; } public function get processedDescriptors():Boolean{ return (_processedDescriptors); } public function get maxWidth():Number{ return (UIComponent.DEFAULT_MAX_WIDTH); } private function getEmbeddedFont(_arg1:String, _arg2:Boolean, _arg3:Boolean):EmbeddedFont{ if (cachedEmbeddedFont){ if ((((cachedEmbeddedFont.fontName == _arg1)) && ((cachedEmbeddedFont.fontStyle == EmbeddedFontRegistry.getFontStyle(_arg2, _arg3))))){ return (cachedEmbeddedFont); }; }; cachedEmbeddedFont = new EmbeddedFont(_arg1, _arg2, _arg3); return (cachedEmbeddedFont); } public function get initialized():Boolean{ return (_initialized); } public function invalidateDisplayList():void{ invalidateDisplayListFlag = true; } public function invalidateProperties():void{ } override public function insertXMLText(_arg1:int, _arg2:int, _arg3:String, _arg4:Boolean=false):void{ super.insertXMLText(_arg1, _arg2, _arg3, _arg4); dispatchEvent(new Event("textInsert")); } public function set includeInLayout(_arg1:Boolean):void{ var _local2:IInvalidating; if (_includeInLayout != _arg1){ _includeInLayout = _arg1; _local2 = (parent as IInvalidating); if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; }; } override public function set htmlText(_arg1:String):void{ if (!_arg1){ _arg1 = ""; }; if (((isHTML) && ((super.htmlText == _arg1)))){ return; }; if (((cachedTextFormat) && ((styleSheet == null)))){ defaultTextFormat = cachedTextFormat; }; super.htmlText = _arg1; explicitHTMLText = _arg1; if (invalidateDisplayListFlag){ validateNow(); }; } public function set showInAutomationHierarchy(_arg1:Boolean):void{ } private function resourceManager_changeHandler(_arg1:Event):void{ truncationIndicatorResource = resourceManager.getString("core", "truncationIndicator"); if (untruncatedText != null){ super.text = untruncatedText; truncateToFit(); }; } public function set measuredMinWidth(_arg1:Number):void{ } public function set explicitHeight(_arg1:Number):void{ _explicitHeight = _arg1; } public function get explicitMinWidth():Number{ return (NaN); } public function set percentWidth(_arg1:Number):void{ } public function get imeMode():String{ return (_imeMode); } public function get moduleFactory():IFlexModuleFactory{ return (_moduleFactory); } public function set systemManager(_arg1:ISystemManager):void{ } public function get explicitMaxWidth():Number{ return (NaN); } public function get document():Object{ return (_document); } public function get updateCompletePendingFlag():Boolean{ return (_updateCompletePendingFlag); } public function replayAutomatableEvent(_arg1:Event):Boolean{ if (automationDelegate){ return (automationDelegate.replayAutomatableEvent(_arg1)); }; return (false); } public function get enabled():Boolean{ return (_enabled); } public function set owner(_arg1:DisplayObjectContainer):void{ _owner = _arg1; } public function get automationTabularData():Object{ return (null); } public function set nonInheritingStyles(_arg1:Object):void{ _nonInheritingStyles = _arg1; } public function get includeInLayout():Boolean{ return (_includeInLayout); } public function get measuredMinWidth():Number{ return (0); } public function set isPopUp(_arg1:Boolean):void{ } public function set automationDelegate(_arg1:Object):void{ _automationDelegate = (_arg1 as IAutomationObject); } public function get measuredHeight():Number{ validateNow(); if (!stage){ return ((textHeight + TEXT_HEIGHT_PADDING)); }; return (((textHeight * transform.concatenatedMatrix.a) + TEXT_HEIGHT_PADDING)); } public function set processedDescriptors(_arg1:Boolean):void{ _processedDescriptors = _arg1; } public function setFocus():void{ systemManager.stage.focus = this; } public function initialize():void{ } public function set percentHeight(_arg1:Number):void{ } public function resolveAutomationIDPart(_arg1:Object):Array{ return ([]); } public function set inheritingStyles(_arg1:Object):void{ _inheritingStyles = _arg1; } public function getUITextFormat():UITextFormat{ validateNow(); var _local1:UITextFormat = new UITextFormat(creatingSystemManager()); _local1.moduleFactory = moduleFactory; _local1.copyFrom(getTextFormat()); _local1.antiAliasType = antiAliasType; _local1.gridFitType = gridFitType; _local1.sharpness = sharpness; _local1.thickness = thickness; return (_local1); } private function changeHandler(_arg1:Event):void{ explicitHTMLText = null; } public function set initialized(_arg1:Boolean):void{ _initialized = _arg1; } public function get nonZeroTextHeight():Number{ var _local1:Number; if (super.text == ""){ super.text = "Wj"; _local1 = textHeight; super.text = ""; return (_local1); }; return (textHeight); } public function owns(_arg1:DisplayObject):Boolean{ return ((_arg1 == this)); } override public function setTextFormat(_arg1:TextFormat, _arg2:int=-1, _arg3:int=-1):void{ if (styleSheet){ return; }; super.setTextFormat(_arg1, _arg2, _arg3); dispatchEvent(new Event("textFormatChange")); } public function get nonInheritingStyles():Object{ return (_nonInheritingStyles); } public function setVisible(_arg1:Boolean, _arg2:Boolean=false):void{ this.visible = _arg1; } public function get maxHeight():Number{ return (UIComponent.DEFAULT_MAX_HEIGHT); } public function get automationDelegate():Object{ return (_automationDelegate); } public function get isPopUp():Boolean{ return (false); } public function set ignorePadding(_arg1:Boolean):void{ _ignorePadding = _arg1; styleChanged(null); } public function set styleName(_arg1:Object):void{ if (_styleName === _arg1){ return; }; _styleName = _arg1; if (parent){ StyleProtoChain.initTextField(this); styleChanged("styleName"); }; } public function styleChanged(_arg1:String):void{ styleChangedFlag = true; if (!invalidateDisplayListFlag){ invalidateDisplayListFlag = true; if (("callLater" in parent)){ Object(parent).callLater(validateNow); }; }; } public function get percentHeight():Number{ return (NaN); } private function get isHTML():Boolean{ return (!((explicitHTMLText == null))); } public function get explicitMaxHeight():Number{ return (NaN); } public function get styleName():Object{ return (_styleName); } public function set explicitWidth(_arg1:Number):void{ _explicitWidth = _arg1; } public function validateNow():void{ var _local1:TextFormat; var _local2:EmbeddedFont; var _local3:IFlexModuleFactory; var _local4:ISystemManager; if (!parent){ return; }; if (((!(isNaN(explicitWidth))) && (!((super.width == explicitWidth))))){ super.width = ((explicitWidth)>4) ? explicitWidth : 4; }; if (((!(isNaN(explicitHeight))) && (!((super.height == explicitHeight))))){ super.height = explicitHeight; }; if (styleChangedFlag){ _local1 = getTextStyles(); if (_local1.font){ _local2 = getEmbeddedFont(_local1.font, _local1.bold, _local1.italic); _local3 = embeddedFontRegistry.getAssociatedModuleFactory(_local2, moduleFactory); if (_local3 != null){ embedFonts = true; } else { _local4 = creatingSystemManager(); embedFonts = ((!((_local4 == null))) && (_local4.isFontFaceEmbedded(_local1))); }; } else { embedFonts = getStyle("embedFonts"); }; if (getStyle("fontAntiAliasType") != undefined){ antiAliasType = getStyle("fontAntiAliasType"); gridFitType = getStyle("fontGridFitType"); sharpness = getStyle("fontSharpness"); thickness = getStyle("fontThickness"); }; if (!styleSheet){ super.setTextFormat(_local1); defaultTextFormat = _local1; }; dispatchEvent(new Event("textFieldStyleChange")); }; styleChangedFlag = false; invalidateDisplayListFlag = false; } public function set toolTip(_arg1:String):void{ var _local2:String = _toolTip; _toolTip = _arg1; ToolTipManager.registerToolTip(this, _local2, _arg1); } public function move(_arg1:Number, _arg2:Number):void{ if (this.x != _arg1){ this.x = _arg1; }; if (this.y != _arg2){ this.y = _arg2; }; } public function get toolTip():String{ return (_toolTip); } public function get ignorePadding():Boolean{ return (_ignorePadding); } public function get explicitWidth():Number{ return (_explicitWidth); } public function invalidateSize():void{ invalidateDisplayListFlag = true; } public function set measuredMinHeight(_arg1:Number):void{ } public function get measuredMinHeight():Number{ return (0); } public function set moduleFactory(_arg1:IFlexModuleFactory):void{ _moduleFactory = _arg1; } private static function get embeddedFontRegistry():IEmbeddedFontRegistry{ if (!_embeddedFontRegistry){ _embeddedFontRegistry = IEmbeddedFontRegistry(Singleton.getInstance("mx.core::IEmbeddedFontRegistry")); }; return (_embeddedFontRegistry); } } }//package mx.core
Section 215
//UITextFormat (mx.core.UITextFormat) package mx.core { import flash.text.*; import mx.managers.*; public class UITextFormat extends TextFormat { private var systemManager:ISystemManager; public var sharpness:Number; public var gridFitType:String; public var antiAliasType:String; public var thickness:Number; private var cachedEmbeddedFont:EmbeddedFont;// = null private var _moduleFactory:IFlexModuleFactory; mx_internal static const VERSION:String = "3.0.0.0"; private static var _embeddedFontRegistry:IEmbeddedFontRegistry; private static var _textFieldFactory:ITextFieldFactory; public function UITextFormat(_arg1:ISystemManager, _arg2:String=null, _arg3:Object=null, _arg4:Object=null, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:String=null, _arg9:String=null, _arg10:String=null, _arg11:Object=null, _arg12:Object=null, _arg13:Object=null, _arg14:Object=null){ this.systemManager = _arg1; super(_arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11, _arg12, _arg13, _arg14); } public function set moduleFactory(_arg1:IFlexModuleFactory):void{ _moduleFactory = _arg1; } mx_internal function copyFrom(_arg1:TextFormat):void{ font = _arg1.font; size = _arg1.size; color = _arg1.color; bold = _arg1.bold; italic = _arg1.italic; underline = _arg1.underline; url = _arg1.url; target = _arg1.target; align = _arg1.align; leftMargin = _arg1.leftMargin; rightMargin = _arg1.rightMargin; indent = _arg1.indent; leading = _arg1.leading; } private function getEmbeddedFont(_arg1:String, _arg2:Boolean, _arg3:Boolean):EmbeddedFont{ if (cachedEmbeddedFont){ if ((((cachedEmbeddedFont.fontName == _arg1)) && ((cachedEmbeddedFont.fontStyle == EmbeddedFontRegistry.getFontStyle(_arg2, _arg3))))){ return (cachedEmbeddedFont); }; }; cachedEmbeddedFont = new EmbeddedFont(_arg1, _arg2, _arg3); return (cachedEmbeddedFont); } public function measureText(_arg1:String, _arg2:Boolean=true):TextLineMetrics{ return (measure(_arg1, false, _arg2)); } private function measure(_arg1:String, _arg2:Boolean, _arg3:Boolean):TextLineMetrics{ if (!_arg1){ _arg1 = ""; }; var _local4:Boolean; var _local5:IFlexModuleFactory = embeddedFontRegistry.getAssociatedModuleFactory(getEmbeddedFont(font, bold, italic), moduleFactory); _local4 = !((_local5 == null)); if (_local5 == null){ _local5 = systemManager; }; var _local6:TextField; _local6 = TextField(textFieldFactory.createTextField(_local5)); if (_arg2){ _local6.htmlText = ""; } else { _local6.text = ""; }; _local6.defaultTextFormat = this; if (font){ _local6.embedFonts = ((_local4) || (((!((systemManager == null))) && (systemManager.isFontFaceEmbedded(this))))); } else { _local6.embedFonts = false; }; _local6.antiAliasType = antiAliasType; _local6.gridFitType = gridFitType; _local6.sharpness = sharpness; _local6.thickness = thickness; if (_arg2){ _local6.htmlText = _arg1; } else { _local6.text = _arg1; }; var _local7:TextLineMetrics = _local6.getLineMetrics(0); if (_arg3){ _local7.width = Math.ceil(_local7.width); _local7.height = Math.ceil(_local7.height); }; return (_local7); } public function measureHTMLText(_arg1:String, _arg2:Boolean=true):TextLineMetrics{ return (measure(_arg1, true, _arg2)); } public function get moduleFactory():IFlexModuleFactory{ return (_moduleFactory); } private static function get embeddedFontRegistry():IEmbeddedFontRegistry{ if (!_embeddedFontRegistry){ _embeddedFontRegistry = IEmbeddedFontRegistry(Singleton.getInstance("mx.core::IEmbeddedFontRegistry")); }; return (_embeddedFontRegistry); } private static function get textFieldFactory():ITextFieldFactory{ if (!_textFieldFactory){ _textFieldFactory = ITextFieldFactory(Singleton.getInstance("mx.core::ITextFieldFactory")); }; return (_textFieldFactory); } } }//package mx.core
Section 216
//ActionEffectInstance (mx.effects.effectClasses.ActionEffectInstance) package mx.effects.effectClasses { import mx.core.*; import mx.effects.*; public class ActionEffectInstance extends EffectInstance { protected var playedAction:Boolean;// = false private var _startValue; mx_internal static const VERSION:String = "3.0.0.0"; public function ActionEffectInstance(_arg1:Object){ super(_arg1); } override public function play():void{ super.play(); if (!mx_internal::playReversed){ _startValue = saveStartValue(); }; playedAction = true; } protected function getStartValue(){ return (_startValue); } override public function end():void{ if (!playedAction){ play(); }; super.end(); } protected function saveStartValue(){ } } }//package mx.effects.effectClasses
Section 217
//AddChildActionInstance (mx.effects.effectClasses.AddChildActionInstance) package mx.effects.effectClasses { import flash.display.*; import mx.core.*; public class AddChildActionInstance extends ActionEffectInstance { public var index:int;// = -1 public var relativeTo:DisplayObjectContainer; public var position:String; mx_internal static const VERSION:String = "3.0.0.0"; public function AddChildActionInstance(_arg1:Object){ super(_arg1); } override public function play():void{ var _local1:DisplayObject = DisplayObject(target); super.play(); if (((!(relativeTo)) && (propertyChanges))){ if ((((propertyChanges.start.parent == null)) && (!((propertyChanges.end.parent == null))))){ relativeTo = propertyChanges.end.parent; position = "index"; index = propertyChanges.end.index; }; }; if (!mx_internal::playReversed){ if (((((target) && ((_local1.parent == null)))) && (relativeTo))){ switch (position){ case "index": if (index == -1){ relativeTo.addChild(_local1); } else { relativeTo.addChildAt(_local1, Math.min(index, relativeTo.numChildren)); }; break; case "before": relativeTo.parent.addChildAt(_local1, relativeTo.parent.getChildIndex(relativeTo)); break; case "after": relativeTo.parent.addChildAt(_local1, (relativeTo.parent.getChildIndex(relativeTo) + 1)); break; case "firstChild": relativeTo.addChildAt(_local1, 0); case "lastChild": relativeTo.addChild(_local1); }; }; } else { if (((((target) && (relativeTo))) && ((_local1.parent == relativeTo)))){ relativeTo.removeChild(_local1); }; }; finishRepeat(); } } }//package mx.effects.effectClasses
Section 218
//AddRemoveEffectTargetFilter (mx.effects.effectClasses.AddRemoveEffectTargetFilter) package mx.effects.effectClasses { import mx.effects.*; public class AddRemoveEffectTargetFilter extends EffectTargetFilter { public var add:Boolean;// = true mx_internal static const VERSION:String = "3.0.0.0"; public function AddRemoveEffectTargetFilter(){ filterProperties = ["parent"]; } override protected function defaultFilterFunction(_arg1:Array, _arg2:Object):Boolean{ var _local5:PropertyChanges; var _local3:int = _arg1.length; var _local4:int; while (_local4 < _local3) { _local5 = _arg1[_local4]; if (_local5.target == _arg2){ if (add){ return ((((_local5.start["parent"] == null)) && (!((_local5.end["parent"] == null))))); }; return (((!((_local5.start["parent"] == null))) && ((_local5.end["parent"] == null)))); }; _local4++; }; return (false); } } }//package mx.effects.effectClasses
Section 219
//AnimatePropertyInstance (mx.effects.effectClasses.AnimatePropertyInstance) package mx.effects.effectClasses { import mx.core.*; public class AnimatePropertyInstance extends TweenEffectInstance { public var roundValue:Boolean;// = false public var isStyle:Boolean;// = false public var property:String; public var toValue:Number; public var fromValue:Number; mx_internal static const VERSION:String = "3.0.0.0"; public function AnimatePropertyInstance(_arg1:Object){ super(_arg1); } private function getCurrentValue():Number{ var _local1:Number; if (!isStyle){ _local1 = target[property]; } else { _local1 = target.getStyle(property); }; return ((roundValue) ? Math.round(_local1) : _local1); } override public function play():void{ super.play(); if (isNaN(fromValue)){ fromValue = getCurrentValue(); }; if (isNaN(toValue)){ if (((propertyChanges) && (!((propertyChanges.end[property] === undefined))))){ toValue = propertyChanges.end[property]; } else { toValue = getCurrentValue(); }; }; tween = createTween(this, fromValue, toValue, duration); if (easingFunction != null){ tween.easingFunction = easingFunction; }; mx_internal::applyTweenStartValues(); } override public function onTweenUpdate(_arg1:Object):void{ if (!isStyle){ target[property] = (roundValue) ? Math.round(Number(_arg1)) : _arg1; } else { target.setStyle(property, _arg1); }; } } }//package mx.effects.effectClasses
Section 220
//CompositeEffectInstance (mx.effects.effectClasses.CompositeEffectInstance) package mx.effects.effectClasses { import flash.events.*; import mx.events.*; import mx.effects.*; public class CompositeEffectInstance extends EffectInstance { mx_internal var childSets:Array; mx_internal var activeEffectQueue:Array; private var _playheadTime:Number;// = 0 mx_internal var timerTween:Tween; mx_internal var endEffectCalled:Boolean; mx_internal static const VERSION:String = "3.0.0.0"; public function CompositeEffectInstance(_arg1:Object){ activeEffectQueue = []; childSets = []; super(_arg1); } override public function get playheadTime():Number{ return ((_playheadTime + super.playheadTime)); } override mx_internal function get actualDuration():Number{ var _local1:Number = NaN; if (repeatCount > 0){ _local1 = (((durationWithoutRepeat * repeatCount) + ((repeatDelay * repeatCount) - 1)) + startDelay); }; return (_local1); } override public function play():void{ timerTween = new Tween(this, 0, 0, durationWithoutRepeat); super.play(); } override public function finishEffect():void{ activeEffectQueue = null; super.finishEffect(); } mx_internal function hasRotateInstance():Boolean{ var _local1:int; var _local2:CompositeEffectInstance; if (childSets){ _local1 = 0; while (_local1 < childSets.length) { if (childSets[_local1].length > 0){ _local2 = (childSets[_local1][0] as CompositeEffectInstance); if ((((childSets[_local1][0] is RotateInstance)) || (((_local2) && (_local2.hasRotateInstance()))))){ return (true); }; }; _local1++; }; }; return (false); } mx_internal function get durationWithoutRepeat():Number{ return (0); } override public function initEffect(_arg1:Event):void{ var _local4:Array; var _local5:int; var _local6:int; super.initEffect(_arg1); var _local2:int = childSets.length; var _local3:int; while (_local3 < _local2) { _local4 = childSets[_local3]; _local5 = _local4.length; _local6 = 0; while (_local6 < _local5) { _local4[_local6].initEffect(_arg1); _local6++; }; _local3++; }; } override public function stop():void{ super.stop(); if (timerTween){ timerTween.stop(); }; } override public function reverse():void{ super.reverse(); super.playReversed = !(playReversed); if (timerTween){ timerTween.reverse(); }; } public function addChildSet(_arg1:Array):void{ var _local2:int; var _local3:int; if (_arg1){ _local2 = _arg1.length; if (_local2 > 0){ if (!childSets){ childSets = [_arg1]; } else { childSets.push(_arg1); }; _local3 = 0; while (_local3 < _local2) { _arg1[_local3].addEventListener(EffectEvent.EFFECT_END, effectEndHandler); _arg1[_local3].parentCompositeEffectInstance = this; _local3++; }; }; }; } protected function onEffectEnd(_arg1:IEffectInstance):void{ } override mx_internal function playWithNoDuration():void{ super.playWithNoDuration(); end(); } public function onTweenUpdate(_arg1:Object):void{ _playheadTime = (timerTween) ? timerTween.playheadTime : _playheadTime; } override public function pause():void{ super.pause(); if (timerTween){ timerTween.pause(); }; } mx_internal function effectEndHandler(_arg1:EffectEvent):void{ onEffectEnd(_arg1.effectInstance); } override public function resume():void{ super.resume(); if (timerTween){ timerTween.resume(); }; } public function onTweenEnd(_arg1:Object):void{ _playheadTime = (timerTween) ? timerTween.playheadTime : _playheadTime; } } }//package mx.effects.effectClasses
Section 221
//HideShowEffectTargetFilter (mx.effects.effectClasses.HideShowEffectTargetFilter) package mx.effects.effectClasses { import mx.effects.*; public class HideShowEffectTargetFilter extends EffectTargetFilter { public var show:Boolean;// = true mx_internal static const VERSION:String = "3.0.0.0"; public function HideShowEffectTargetFilter(){ filterProperties = ["visible"]; } override protected function defaultFilterFunction(_arg1:Array, _arg2:Object):Boolean{ var _local5:PropertyChanges; var _local3:int = _arg1.length; var _local4:int; while (_local4 < _local3) { _local5 = _arg1[_local4]; if (_local5.target == _arg2){ return ((_local5.end["visible"] == show)); }; _local4++; }; return (false); } } }//package mx.effects.effectClasses
Section 222
//PropertyChanges (mx.effects.effectClasses.PropertyChanges) package mx.effects.effectClasses { public class PropertyChanges { public var target:Object; public var start:Object; public var end:Object; mx_internal static const VERSION:String = "3.0.0.0"; public function PropertyChanges(_arg1:Object){ end = {}; start = {}; super(); this.target = _arg1; } } }//package mx.effects.effectClasses
Section 223
//RemoveChildActionInstance (mx.effects.effectClasses.RemoveChildActionInstance) package mx.effects.effectClasses { import flash.display.*; import mx.core.*; import flash.events.*; public class RemoveChildActionInstance extends ActionEffectInstance { private var _startParent:DisplayObjectContainer; private var _startIndex:Number; mx_internal static const VERSION:String = "3.0.0.0"; public function RemoveChildActionInstance(_arg1:Object){ super(_arg1); } override public function initEffect(_arg1:Event):void{ super.initEffect(_arg1); } override public function play():void{ var _local1:DisplayObject = DisplayObject(target); var _local2:Boolean; super.play(); if (propertyChanges){ _local2 = ((!((propertyChanges.start.parent == null))) && ((propertyChanges.end.parent == null))); }; if (!mx_internal::playReversed){ if (((((_local2) && (target))) && (!((_local1.parent == null))))){ _local1.parent.removeChild(_local1); }; } else { if (((_startParent) && (!(isNaN(_startIndex))))){ _startParent.addChildAt(_local1, _startIndex); }; }; finishRepeat(); } override protected function saveStartValue(){ var _local1:DisplayObject = DisplayObject(target); if (((target) && (!((_local1.parent == null))))){ _startIndex = _local1.parent.getChildIndex(_local1); _startParent = _local1.parent; }; } } }//package mx.effects.effectClasses
Section 224
//RotateInstance (mx.effects.effectClasses.RotateInstance) package mx.effects.effectClasses { import mx.effects.*; public class RotateInstance extends TweenEffectInstance { public var originX:Number; public var originY:Number; private var centerX:Number; private var centerY:Number; public var angleTo:Number;// = 360 private var originalOffsetX:Number; private var originalOffsetY:Number; private var newX:Number; private var newY:Number; public var angleFrom:Number;// = 0 mx_internal static const VERSION:String = "3.0.0.0"; public function RotateInstance(_arg1:Object){ super(_arg1); } override public function onTweenUpdate(_arg1:Object):void{ if (Math.abs((newX - target.x)) > 0.1){ centerX = (target.x + originalOffsetX); }; if (Math.abs((newY - target.y)) > 0.1){ centerY = (target.y + originalOffsetY); }; var _local2:Number = Number(_arg1); var _local3:Number = ((Math.PI * _local2) / 180); EffectManager.suspendEventHandling(); target.rotation = _local2; newX = ((centerX - (originX * Math.cos(_local3))) + (originY * Math.sin(_local3))); newY = ((centerY - (originX * Math.sin(_local3))) - (originY * Math.cos(_local3))); newX = Number(newX.toFixed(1)); newY = Number(newY.toFixed(1)); target.move(newX, newY); EffectManager.resumeEventHandling(); } override public function play():void{ super.play(); var _local1:Number = ((Math.PI * target.rotation) / 180); if (isNaN(originX)){ originX = (target.width / 2); }; if (isNaN(originY)){ originY = (target.height / 2); }; centerX = ((target.x + (originX * Math.cos(_local1))) - (originY * Math.sin(_local1))); centerY = ((target.y + (originX * Math.sin(_local1))) + (originY * Math.cos(_local1))); if (isNaN(angleFrom)){ angleFrom = target.rotation; }; if (isNaN(angleTo)){ angleTo = ((target.rotation)==0) ? ((angleFrom)>180) ? 360 : 0 : target.rotation; }; tween = createTween(this, angleFrom, angleTo, duration); target.rotation = angleFrom; _local1 = ((Math.PI * angleFrom) / 180); EffectManager.suspendEventHandling(); originalOffsetX = ((originX * Math.cos(_local1)) - (originY * Math.sin(_local1))); originalOffsetY = ((originX * Math.sin(_local1)) + (originY * Math.cos(_local1))); newX = Number((centerX - originalOffsetX).toFixed(1)); newY = Number((centerY - originalOffsetY).toFixed(1)); target.move(newX, newY); EffectManager.resumeEventHandling(); } } }//package mx.effects.effectClasses
Section 225
//SequenceInstance (mx.effects.effectClasses.SequenceInstance) package mx.effects.effectClasses { import mx.core.*; import mx.effects.*; public class SequenceInstance extends CompositeEffectInstance { private var startTime:Number;// = 0 private var currentInstanceDuration:Number;// = 0 private var currentSetIndex:int;// = -1 private var currentSet:Array; private var activeChildCount:Number; mx_internal static const VERSION:String = "3.0.0.0"; public function SequenceInstance(_arg1:Object){ super(_arg1); } override public function stop():void{ var _local1:Array; var _local2:Array; var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:Array; var _local8:int; var _local9:int; var _local10:IEffectInstance; if (((activeEffectQueue) && ((activeEffectQueue.length > 0)))){ _local1 = activeEffectQueue.concat(); activeEffectQueue = null; _local2 = _local1[currentSetIndex]; _local3 = _local2.length; _local4 = 0; while (_local4 < _local3) { _local2[_local4].stop(); _local4++; }; _local5 = _local1.length; _local6 = (currentSetIndex + 1); while (_local6 < _local5) { _local7 = _local1[_local6]; _local8 = _local7.length; _local9 = 0; while (_local9 < _local8) { _local10 = _local7[_local9]; _local10.effect.deleteInstance(_local10); _local9++; }; _local6++; }; }; super.stop(); } private function playNextChildSet(_arg1:Number=0):Boolean{ var _local2:EffectInstance; if (!playReversed){ if (((!(activeEffectQueue)) || ((currentSetIndex++ >= (activeEffectQueue.length - 1))))){ return (false); }; } else { if (currentSetIndex-- <= 0){ return (false); }; }; var _local3:Array = activeEffectQueue[currentSetIndex]; currentSet = []; var _local4:int; while (_local4 < _local3.length) { _local2 = _local3[_local4]; currentSet.push(_local2); _local2.playReversed = playReversed; if (_local2.suspendBackgroundProcessing){ UIComponent.suspendBackgroundProcessing(); }; _local2.startEffect(); _local4++; }; currentInstanceDuration = (currentInstanceDuration + _local2.actualDuration); return (true); } override mx_internal function get durationWithoutRepeat():Number{ var _local4:Array; var _local1:Number = 0; var _local2:int = childSets.length; var _local3:int; while (_local3 < _local2) { _local4 = childSets[_local3]; _local1 = (_local1 + _local4[0].actualDuration); _local3++; }; return (_local1); } override public function end():void{ var _local1:Array; var _local2:Array; var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:Array; var _local8:int; var _local9:int; endEffectCalled = true; if (((activeEffectQueue) && ((activeEffectQueue.length > 0)))){ _local1 = activeEffectQueue.concat(); activeEffectQueue = null; _local2 = _local1[currentSetIndex]; _local3 = _local2.length; _local4 = 0; while (_local4 < _local3) { _local2[_local4].end(); _local4++; }; _local5 = _local1.length; _local6 = (currentSetIndex + 1); while (_local6 < _local5) { _local7 = _local1[_local6]; _local8 = _local7.length; _local9 = 0; while (_local9 < _local8) { EffectInstance(_local7[_local9]).playWithNoDuration(); _local9++; }; _local6++; }; }; super.end(); } override public function reverse():void{ var _local1:int; var _local2:int; super.reverse(); if (((currentSet) && ((currentSet.length > 0)))){ _local1 = currentSet.length; _local2 = 0; while (_local2 < _local1) { currentSet[_local2].reverse(); _local2++; }; }; } override protected function onEffectEnd(_arg1:IEffectInstance):void{ if (Object(_arg1).suspendBackgroundProcessing){ UIComponent.resumeBackgroundProcessing(); }; if (endEffectCalled){ return; }; var _local2:int; while (_local2 < currentSet.length) { if (_arg1 == currentSet[_local2]){ currentSet.splice(_local2, 1); break; }; _local2++; }; if (currentSet.length == 0){ if (false == playNextChildSet()){ finishRepeat(); }; }; } override public function resume():void{ var _local1:int; var _local2:int; super.resume(); if (((currentSet) && ((currentSet.length > 0)))){ _local1 = currentSet.length; _local2 = 0; while (_local2 < _local1) { currentSet[_local2].resume(); _local2++; }; }; } override public function play():void{ var _local1:int; var _local2:int; var _local3:int; var _local4:int; var _local5:Array; activeEffectQueue = []; currentSetIndex = (playReversed) ? childSets.length : -1; _local1 = childSets.length; _local2 = 0; while (_local2 < _local1) { _local5 = childSets[_local2]; activeEffectQueue.push(_local5); _local2++; }; super.play(); startTime = Tween.intervalTime; if (activeEffectQueue.length == 0){ finishRepeat(); return; }; playNextChildSet(); } override public function pause():void{ var _local1:int; var _local2:int; super.pause(); if (((currentSet) && ((currentSet.length > 0)))){ _local1 = currentSet.length; _local2 = 0; while (_local2 < _local1) { currentSet[_local2].pause(); _local2++; }; }; } } }//package mx.effects.effectClasses
Section 226
//TweenEffectInstance (mx.effects.effectClasses.TweenEffectInstance) package mx.effects.effectClasses { import mx.core.*; import mx.events.*; import mx.effects.*; public class TweenEffectInstance extends EffectInstance { private var _seekTime:Number;// = 0 public var easingFunction:Function; public var tween:Tween; mx_internal var needToLayout:Boolean;// = false mx_internal static const VERSION:String = "3.0.0.0"; public function TweenEffectInstance(_arg1:Object){ super(_arg1); } override public function stop():void{ super.stop(); if (tween){ tween.stop(); }; } mx_internal function applyTweenStartValues():void{ if (duration > 0){ onTweenUpdate(tween.getCurrentValue(0)); }; } override public function get playheadTime():Number{ if (tween){ return ((tween.playheadTime + super.playheadTime)); }; return (0); } protected function createTween(_arg1:Object, _arg2:Object, _arg3:Object, _arg4:Number=-1, _arg5:Number=-1):Tween{ var _local6:Tween = new Tween(_arg1, _arg2, _arg3, _arg4, _arg5); _local6.addEventListener(TweenEvent.TWEEN_START, tweenEventHandler); _local6.addEventListener(TweenEvent.TWEEN_UPDATE, tweenEventHandler); _local6.addEventListener(TweenEvent.TWEEN_END, tweenEventHandler); if (easingFunction != null){ _local6.easingFunction = easingFunction; }; if (_seekTime > 0){ _local6.seek(_seekTime); }; _local6.playReversed = playReversed; return (_local6); } private function tweenEventHandler(_arg1:TweenEvent):void{ dispatchEvent(_arg1); } override public function end():void{ stopRepeat = true; if (delayTimer){ delayTimer.reset(); }; if (tween){ tween.endTween(); tween = null; }; } override public function reverse():void{ super.reverse(); if (tween){ tween.reverse(); }; super.playReversed = !(playReversed); } override mx_internal function set playReversed(_arg1:Boolean):void{ super.playReversed = _arg1; if (tween){ tween.playReversed = _arg1; }; } override public function resume():void{ super.resume(); if (tween){ tween.resume(); }; } public function onTweenEnd(_arg1:Object):void{ onTweenUpdate(_arg1); tween = null; if (needToLayout){ UIComponentGlobals.layoutManager.validateNow(); }; finishRepeat(); } public function onTweenUpdate(_arg1:Object):void{ } override public function pause():void{ super.pause(); if (tween){ tween.pause(); }; } public function seek(_arg1:Number):void{ if (tween){ tween.seek(_arg1); } else { _seekTime = _arg1; }; } } }//package mx.effects.effectClasses
Section 227
//ZoomInstance (mx.effects.effectClasses.ZoomInstance) package mx.effects.effectClasses { import mx.core.*; import flash.events.*; import mx.events.*; import mx.effects.*; public class ZoomInstance extends TweenEffectInstance { private var newY:Number; public var originY:Number; private var origX:Number; private var origY:Number; public var originX:Number; private var origPercentHeight:Number; public var zoomWidthFrom:Number; public var zoomWidthTo:Number; private var newX:Number; public var captureRollEvents:Boolean; private var origPercentWidth:Number; public var zoomHeightFrom:Number; private var origScaleX:Number; public var zoomHeightTo:Number; private var origScaleY:Number; private var scaledOriginX:Number; private var scaledOriginY:Number; private var show:Boolean;// = true private var _mouseHasMoved:Boolean;// = false mx_internal static const VERSION:String = "3.0.0.0"; public function ZoomInstance(_arg1:Object){ super(_arg1); } override public function finishEffect():void{ if (captureRollEvents){ target.removeEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false); target.removeEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false); target.removeEventListener(MouseEvent.MOUSE_MOVE, mouseEventHandler, false); }; super.finishEffect(); } private function getScaleFromWidth(_arg1:Number):Number{ return ((_arg1 / (target.width / Math.abs(target.scaleX)))); } override public function initEffect(_arg1:Event):void{ super.initEffect(_arg1); if ((((_arg1.type == FlexEvent.HIDE)) || ((_arg1.type == Event.REMOVED)))){ show = false; }; } private function getScaleFromHeight(_arg1:Number):Number{ return ((_arg1 / (target.height / Math.abs(target.scaleY)))); } private function applyPropertyChanges():void{ var _local2:Boolean; var _local3:Boolean; var _local1:PropertyChanges = propertyChanges; if (_local1){ _local2 = false; _local3 = false; if (_local1.end["scaleX"] !== undefined){ zoomWidthFrom = (isNaN(zoomWidthFrom)) ? target.scaleX : zoomWidthFrom; zoomWidthTo = (isNaN(zoomWidthTo)) ? _local1.end["scaleX"] : zoomWidthTo; _local3 = true; }; if (_local1.end["scaleY"] !== undefined){ zoomHeightFrom = (isNaN(zoomHeightFrom)) ? target.scaleY : zoomHeightFrom; zoomHeightTo = (isNaN(zoomHeightTo)) ? _local1.end["scaleY"] : zoomHeightTo; _local3 = true; }; if (_local3){ return; }; if (_local1.end["width"] !== undefined){ zoomWidthFrom = (isNaN(zoomWidthFrom)) ? getScaleFromWidth(target.width) : zoomWidthFrom; zoomWidthTo = (isNaN(zoomWidthTo)) ? getScaleFromWidth(_local1.end["width"]) : zoomWidthTo; _local2 = true; }; if (_local1.end["height"] !== undefined){ zoomHeightFrom = (isNaN(zoomHeightFrom)) ? getScaleFromHeight(target.height) : zoomHeightFrom; zoomHeightTo = (isNaN(zoomHeightTo)) ? getScaleFromHeight(_local1.end["height"]) : zoomHeightTo; _local2 = true; }; if (_local2){ return; }; if (_local1.end["visible"] !== undefined){ show = _local1.end["visible"]; }; }; } private function mouseEventHandler(_arg1:MouseEvent):void{ if (_arg1.type == MouseEvent.MOUSE_MOVE){ _mouseHasMoved = true; } else { if ((((_arg1.type == MouseEvent.ROLL_OUT)) || ((_arg1.type == MouseEvent.ROLL_OVER)))){ if (!_mouseHasMoved){ _arg1.stopImmediatePropagation(); }; _mouseHasMoved = false; }; }; } override public function play():void{ super.play(); applyPropertyChanges(); if (((((((isNaN(zoomWidthFrom)) && (isNaN(zoomWidthTo)))) && (isNaN(zoomHeightFrom)))) && (isNaN(zoomHeightTo)))){ if (show){ zoomWidthFrom = (zoomHeightFrom = 0); zoomWidthTo = target.scaleX; zoomHeightTo = target.scaleY; } else { zoomWidthFrom = target.scaleX; zoomHeightFrom = target.scaleY; zoomWidthTo = (zoomHeightTo = 0); }; } else { if (((isNaN(zoomWidthFrom)) && (isNaN(zoomWidthTo)))){ zoomWidthFrom = (zoomWidthTo = target.scaleX); } else { if (((isNaN(zoomHeightFrom)) && (isNaN(zoomHeightTo)))){ zoomHeightFrom = (zoomHeightTo = target.scaleY); }; }; if (isNaN(zoomWidthFrom)){ zoomWidthFrom = target.scaleX; } else { if (isNaN(zoomWidthTo)){ zoomWidthTo = ((zoomWidthFrom)==1) ? 0 : 1; }; }; if (isNaN(zoomHeightFrom)){ zoomHeightFrom = target.scaleY; } else { if (isNaN(zoomHeightTo)){ zoomHeightTo = ((zoomHeightFrom)==1) ? 0 : 1; }; }; }; if (zoomWidthFrom < 0.01){ zoomWidthFrom = 0.01; }; if (zoomWidthTo < 0.01){ zoomWidthTo = 0.01; }; if (zoomHeightFrom < 0.01){ zoomHeightFrom = 0.01; }; if (zoomHeightTo < 0.01){ zoomHeightTo = 0.01; }; origScaleX = target.scaleX; origScaleY = target.scaleY; newX = (origX = target.x); newY = (origY = target.y); if (isNaN(originX)){ scaledOriginX = (target.width / 2); } else { scaledOriginX = (originX * origScaleX); }; if (isNaN(originY)){ scaledOriginY = (target.height / 2); } else { scaledOriginY = (originY * origScaleY); }; scaledOriginX = Number(scaledOriginX.toFixed(1)); scaledOriginY = Number(scaledOriginY.toFixed(1)); origPercentWidth = target.percentWidth; if (!isNaN(origPercentWidth)){ target.width = target.width; }; origPercentHeight = target.percentHeight; if (!isNaN(origPercentHeight)){ target.height = target.height; }; tween = createTween(this, [zoomWidthFrom, zoomHeightFrom], [zoomWidthTo, zoomHeightTo], duration); if (captureRollEvents){ target.addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false); target.addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false); target.addEventListener(MouseEvent.MOUSE_MOVE, mouseEventHandler, false); }; } override public function onTweenEnd(_arg1:Object):void{ var _local2:Number; var _local3:Number; if (!isNaN(origPercentWidth)){ _local2 = target.width; target.percentWidth = origPercentWidth; if (((target.parent) && ((target.parent.autoLayout == false)))){ target.mx_internal::_width = _local2; }; }; if (!isNaN(origPercentHeight)){ _local3 = target.height; target.percentHeight = origPercentHeight; if (((target.parent) && ((target.parent.autoLayout == false)))){ target.mx_internal::_height = _local3; }; }; super.onTweenEnd(_arg1); if (mx_internal::hideOnEffectEnd){ EffectManager.suspendEventHandling(); target.scaleX = origScaleX; target.scaleY = origScaleY; target.move(origX, origY); EffectManager.resumeEventHandling(); }; } override public function onTweenUpdate(_arg1:Object):void{ EffectManager.suspendEventHandling(); if (Math.abs((newX - target.x)) > 0.1){ origX = (origX + (Number(target.x.toFixed(1)) - newX)); }; if (Math.abs((newY - target.y)) > 0.1){ origY = (origY + (Number(target.y.toFixed(1)) - newY)); }; target.scaleX = _arg1[0]; target.scaleY = _arg1[1]; var _local2:Number = (_arg1[0] / origScaleX); var _local3:Number = (_arg1[1] / origScaleY); var _local4:Number = (scaledOriginX * _local2); var _local5:Number = (scaledOriginY * _local3); newX = ((scaledOriginX - _local4) + origX); newY = ((scaledOriginY - _local5) + origY); newX = Number(newX.toFixed(1)); newY = Number(newY.toFixed(1)); target.move(newX, newY); tween.mx_internal::needToLayout = true; EffectManager.resumeEventHandling(); } } }//package mx.effects.effectClasses
Section 228
//AddChildAction (mx.effects.AddChildAction) package mx.effects { import flash.display.*; import mx.core.*; import mx.effects.effectClasses.*; public class AddChildAction extends Effect { private var localPropertyChanges:Array; public var relativeTo:DisplayObjectContainer; public var position:String;// = "index" public var index:int;// = -1 mx_internal static const VERSION:String = "3.0.0.0"; private static var AFFECTED_PROPERTIES:Array = ["parent", "index"]; public function AddChildAction(_arg1:Object=null){ super(_arg1); instanceClass = AddChildActionInstance; } override public function createInstances(_arg1:Array=null):Array{ if (!_arg1){ _arg1 = this.targets; }; if (((_arg1) && (mx_internal::propertyChangesArray))){ localPropertyChanges = mx_internal::propertyChangesArray; _arg1.sort(targetSortHandler); }; return (super.createInstances(_arg1)); } override protected function initInstance(_arg1:IEffectInstance):void{ super.initInstance(_arg1); var _local2:AddChildActionInstance = AddChildActionInstance(_arg1); _local2.relativeTo = relativeTo; _local2.index = index; _local2.position = position; } override public function getAffectedProperties():Array{ return (AFFECTED_PROPERTIES); } override protected function applyValueToTarget(_arg1:Object, _arg2:String, _arg3, _arg4:Object):void{ if ((((((_arg2 == "parent")) && (_arg1.parent))) && ((_arg3 == undefined)))){ _arg1.parent.removeChild(_arg1); }; } override protected function getValueFromTarget(_arg1:Object, _arg2:String){ if (_arg2 == "index"){ return ((_arg1.parent) ? _arg1.parent.getChildIndex(_arg1) : 0); }; return (super.getValueFromTarget(_arg1, _arg2)); } private function getPropertyChanges(_arg1:Object):PropertyChanges{ var _local2:int; while (_local2 < localPropertyChanges.length) { if (localPropertyChanges[_local2].target == _arg1){ return (localPropertyChanges[_local2]); }; _local2++; }; return (null); } private function targetSortHandler(_arg1:Object, _arg2:Object):Number{ var _local3:PropertyChanges = getPropertyChanges(_arg1); var _local4:PropertyChanges = getPropertyChanges(_arg2); if (((_local3) && (_local4))){ if (_local3.start.index > _local4.start.index){ return (1); }; if (_local3.start.index < _local4.start.index){ return (-1); }; }; return (0); } } }//package mx.effects
Section 229
//AnimateProperty (mx.effects.AnimateProperty) package mx.effects { import mx.effects.effectClasses.*; public class AnimateProperty extends TweenEffect { public var roundValue:Boolean;// = false public var isStyle:Boolean;// = false public var property:String; public var toValue:Number; public var fromValue:Number; mx_internal static const VERSION:String = "3.0.0.0"; public function AnimateProperty(_arg1:Object=null){ super(_arg1); instanceClass = AnimatePropertyInstance; } override protected function initInstance(_arg1:IEffectInstance):void{ var _local2:AnimatePropertyInstance; super.initInstance(_arg1); _local2 = AnimatePropertyInstance(_arg1); _local2.fromValue = fromValue; _local2.toValue = toValue; _local2.property = property; _local2.isStyle = isStyle; _local2.roundValue = roundValue; } override public function get relevantStyles():Array{ return ((isStyle) ? [property] : []); } override public function getAffectedProperties():Array{ return ([property]); } } }//package mx.effects
Section 230
//CompositeEffect (mx.effects.CompositeEffect) package mx.effects { import mx.effects.effectClasses.*; public class CompositeEffect extends Effect { private var _affectedProperties:Array; private var childTargets:Array; public var children:Array; mx_internal static const VERSION:String = "3.0.0.0"; public function CompositeEffect(_arg1:Object=null){ children = []; super(_arg1); instanceClass = CompositeEffectInstance; } override public function createInstances(_arg1:Array=null):Array{ if (!_arg1){ _arg1 = this.targets; }; childTargets = _arg1; var _local2:IEffectInstance = createInstance(); childTargets = null; return ((_local2) ? [_local2] : []); } override protected function initInstance(_arg1:IEffectInstance):void{ var _local4:int; var _local5:int; var _local6:Effect; super.initInstance(_arg1); var _local2:CompositeEffectInstance = CompositeEffectInstance(_arg1); var _local3:Object = childTargets; if (!(_local3 is Array)){ _local3 = [_local3]; }; if (children){ _local4 = children.length; _local5 = 0; while (_local5 < _local4) { _local6 = children[_local5]; if (propertyChangesArray != null){ _local6.propertyChangesArray = propertyChangesArray; }; if ((((_local6.filterObject == null)) && (filterObject))){ _local6.filterObject = filterObject; }; if (effectTargetHost){ _local6.effectTargetHost = effectTargetHost; }; if (_local6.targets.length == 0){ _local2.addChildSet(children[_local5].createInstances(_local3)); } else { _local2.addChildSet(children[_local5].createInstances(_local6.targets)); }; _local5++; }; }; } override mx_internal function captureValues(_arg1:Array, _arg2:Boolean):Array{ var _local5:Effect; var _local3:int = children.length; var _local4:int; while (_local4 < _local3) { _local5 = children[_local4]; _arg1 = _local5.captureValues(_arg1, _arg2); _local4++; }; return (_arg1); } public function addChild(_arg1:IEffect):void{ children.push(_arg1); _affectedProperties = null; } override mx_internal function applyStartValues(_arg1:Array, _arg2:Array):void{ var _local5:Effect; var _local6:Array; var _local3:int = children.length; var _local4:int; while (_local4 < _local3) { _local5 = children[_local4]; _local6 = ((_local5.targets.length > 0)) ? _local5.targets : _arg2; if ((((_local5.filterObject == null)) && (filterObject))){ _local5.filterObject = filterObject; }; _local5.applyStartValues(_arg1, _local6); _local4++; }; } override public function createInstance(_arg1:Object=null):IEffectInstance{ if (!childTargets){ childTargets = [_arg1]; }; var _local2:IEffectInstance = super.createInstance(_arg1); childTargets = null; return (_local2); } override protected function filterInstance(_arg1:Array, _arg2:Object):Boolean{ var _local3:Array; var _local4:int; var _local5:int; if (filterObject){ _local3 = targets; if (_local3.length == 0){ _local3 = childTargets; }; _local4 = _local3.length; _local5 = 0; while (_local5 < _local4) { if (filterObject.filterInstance(_arg1, effectTargetHost, _local3[_local5])){ return (true); }; _local5++; }; return (false); }; return (true); } override public function captureStartValues():void{ var _local1:Array = getChildrenTargets(); propertyChangesArray = []; var _local2:int = _local1.length; var _local3:int; while (_local3 < _local2) { propertyChangesArray.push(new PropertyChanges(_local1[_local3])); _local3++; }; propertyChangesArray = captureValues(propertyChangesArray, true); endValuesCaptured = false; } private function getChildrenTargets():Array{ var _local3:Array; var _local4:Effect; var _local5:int; var _local6:int; var _local7:int; var _local8:int; var _local9:String; var _local1:Array = []; var _local2:Object = {}; _local5 = children.length; _local6 = 0; while (_local6 < _local5) { _local4 = children[_local6]; if ((_local4 is CompositeEffect)){ _local3 = CompositeEffect(_local4).getChildrenTargets(); _local7 = _local3.length; _local8 = 0; while (_local8 < _local7) { if (_local3[_local8] != null){ _local2[_local3[_local8].toString()] = _local3[_local8]; }; _local8++; }; } else { if (_local4.targets != null){ _local7 = _local4.targets.length; _local8 = 0; while (_local8 < _local7) { if (_local4.targets[_local8] != null){ _local2[_local4.targets[_local8].toString()] = _local4.targets[_local8]; }; _local8++; }; }; }; _local6++; }; _local5 = targets.length; _local6 = 0; while (_local6 < _local5) { if (targets[_local6] != null){ _local2[targets[_local6].toString()] = targets[_local6]; }; _local6++; }; for (_local9 in _local2) { _local1.push(_local2[_local9]); }; return (_local1); } override public function getAffectedProperties():Array{ var _local1:Array; var _local2:int; var _local3:int; if (!_affectedProperties){ _local1 = []; _local2 = children.length; _local3 = 0; while (_local3 < _local2) { _local1 = _local1.concat(children[_local3].getAffectedProperties()); _local3++; }; _affectedProperties = _local1; }; return (_affectedProperties); } } }//package mx.effects
Section 231
//Effect (mx.effects.Effect) package mx.effects { import mx.core.*; import mx.managers.*; import flash.events.*; import mx.events.*; import mx.effects.effectClasses.*; import flash.utils.*; public class Effect extends EventDispatcher implements IEffect { private var _perElementOffset:Number;// = 0 private var _hideFocusRing:Boolean;// = false private var _customFilter:EffectTargetFilter; public var repeatCount:int;// = 1 public var suspendBackgroundProcessing:Boolean;// = false public var startDelay:int;// = 0 private var _relevantProperties:Array; private var _callValidateNow:Boolean;// = false mx_internal var applyActualDimensions:Boolean;// = true private var _filter:String; private var _triggerEvent:Event; private var _effectTargetHost:IEffectTargetHost; mx_internal var durationExplicitlySet:Boolean;// = false public var repeatDelay:int;// = 0 private var _targets:Array; mx_internal var propertyChangesArray:Array; mx_internal var filterObject:EffectTargetFilter; protected var endValuesCaptured:Boolean;// = false public var instanceClass:Class; private var _duration:Number;// = 500 private var isPaused:Boolean;// = false private var _relevantStyles:Array; private var _instances:Array; mx_internal static const VERSION:String = "3.0.0.0"; public function Effect(_arg1:Object=null){ _instances = []; instanceClass = IEffectInstance; _relevantStyles = []; _targets = []; super(); this.target = _arg1; } public function get targets():Array{ return (_targets); } public function set targets(_arg1:Array):void{ var _local2:int = _arg1.length; var _local3:int = (_local2 - 1); while (_local3 > 0) { if (_arg1[_local3] == null){ _arg1.splice(_local3, 1); }; _local3--; }; _targets = _arg1; } public function set hideFocusRing(_arg1:Boolean):void{ _hideFocusRing = _arg1; } public function get hideFocusRing():Boolean{ return (_hideFocusRing); } public function stop():void{ var _local3:IEffectInstance; var _local1:int = _instances.length; var _local2:int = _local1; while (_local2 >= 0) { _local3 = IEffectInstance(_instances[_local2]); if (_local3){ _local3.stop(); }; _local2--; }; } public function captureStartValues():void{ var _local1:int; var _local2:int; if (targets.length > 0){ propertyChangesArray = []; _callValidateNow = true; _local1 = targets.length; _local2 = 0; while (_local2 < _local1) { propertyChangesArray.push(new PropertyChanges(targets[_local2])); _local2++; }; propertyChangesArray = captureValues(propertyChangesArray, true); }; endValuesCaptured = false; } mx_internal function captureValues(_arg1:Array, _arg2:Boolean):Array{ var _local4:Object; var _local5:Object; var _local6:int; var _local7:int; var _local8:int; var _local9:int; var _local3:Array = (filterObject) ? mergeArrays(relevantProperties, filterObject.filterProperties) : relevantProperties; if (((_local3) && ((_local3.length > 0)))){ _local6 = _arg1.length; _local7 = 0; while (_local7 < _local6) { _local5 = _arg1[_local7].target; _local4 = (_arg2) ? _arg1[_local7].start : _arg1[_local7].end; _local8 = _local3.length; _local9 = 0; while (_local9 < _local8) { _local4[_local3[_local9]] = getValueFromTarget(_local5, _local3[_local9]); _local9++; }; _local7++; }; }; var _local10:Array = (filterObject) ? mergeArrays(relevantStyles, filterObject.filterStyles) : relevantStyles; if (((_local10) && ((_local10.length > 0)))){ _local6 = _arg1.length; _local7 = 0; while (_local7 < _local6) { _local5 = _arg1[_local7].target; _local4 = (_arg2) ? _arg1[_local7].start : _arg1[_local7].end; _local8 = _local10.length; _local9 = 0; while (_local9 < _local8) { _local4[_local10[_local9]] = _local5.getStyle(_local10[_local9]); _local9++; }; _local7++; }; }; return (_arg1); } protected function getValueFromTarget(_arg1:Object, _arg2:String){ if ((_arg2 in _arg1)){ return (_arg1[_arg2]); }; return (undefined); } public function set target(_arg1:Object):void{ _targets.splice(0); if (_arg1){ _targets[0] = _arg1; }; } public function get className():String{ var _local1:String = getQualifiedClassName(this); var _local2:int = _local1.indexOf("::"); if (_local2 != -1){ _local1 = _local1.substr((_local2 + 2)); }; return (_local1); } public function set perElementOffset(_arg1:Number):void{ _perElementOffset = _arg1; } public function resume():void{ var _local1:int; var _local2:int; if (((isPlaying) && (isPaused))){ isPaused = false; _local1 = _instances.length; _local2 = 0; while (_local2 < _local1) { IEffectInstance(_instances[_local2]).resume(); _local2++; }; }; } public function set duration(_arg1:Number):void{ durationExplicitlySet = true; _duration = _arg1; } public function play(_arg1:Array=null, _arg2:Boolean=false):Array{ var _local6:IEffectInstance; if ((((_arg1 == null)) && (!((propertyChangesArray == null))))){ if (_callValidateNow){ LayoutManager.getInstance().validateNow(); }; if (!endValuesCaptured){ propertyChangesArray = captureValues(propertyChangesArray, false); }; propertyChangesArray = stripUnchangedValues(propertyChangesArray); applyStartValues(propertyChangesArray, this.targets); }; var _local3:Array = createInstances(_arg1); var _local4:int = _local3.length; var _local5:int; while (_local5 < _local4) { _local6 = IEffectInstance(_local3[_local5]); Object(_local6).playReversed = _arg2; _local6.startEffect(); _local5++; }; return (_local3); } public function captureEndValues():void{ propertyChangesArray = captureValues(propertyChangesArray, false); endValuesCaptured = true; } protected function filterInstance(_arg1:Array, _arg2:Object):Boolean{ if (filterObject){ return (filterObject.filterInstance(_arg1, effectTargetHost, _arg2)); }; return (true); } public function get customFilter():EffectTargetFilter{ return (_customFilter); } public function get effectTargetHost():IEffectTargetHost{ return (_effectTargetHost); } public function set relevantProperties(_arg1:Array):void{ _relevantProperties = _arg1; } public function captureMoreStartValues(_arg1:Array):void{ var _local2:Array; var _local3:int; if (_arg1.length > 0){ _local2 = []; _local3 = 0; while (_local3 < _arg1.length) { _local2.push(new PropertyChanges(_arg1[_local3])); _local3++; }; _local2 = captureValues(_local2, true); propertyChangesArray = propertyChangesArray.concat(_local2); }; } public function deleteInstance(_arg1:IEffectInstance):void{ EventDispatcher(_arg1).removeEventListener(EffectEvent.EFFECT_START, effectStartHandler); EventDispatcher(_arg1).removeEventListener(EffectEvent.EFFECT_END, effectEndHandler); var _local2:int = _instances.length; var _local3:int; while (_local3 < _local2) { if (_instances[_local3] === _arg1){ _instances.splice(_local3, 1); }; _local3++; }; } public function get filter():String{ return (_filter); } public function set triggerEvent(_arg1:Event):void{ _triggerEvent = _arg1; } public function get target():Object{ if (_targets.length > 0){ return (_targets[0]); }; return (null); } public function get duration():Number{ return (_duration); } public function set customFilter(_arg1:EffectTargetFilter):void{ _customFilter = _arg1; filterObject = _arg1; } public function get perElementOffset():Number{ return (_perElementOffset); } public function set effectTargetHost(_arg1:IEffectTargetHost):void{ _effectTargetHost = _arg1; } public function get isPlaying():Boolean{ return (((_instances) && ((_instances.length > 0)))); } protected function effectEndHandler(_arg1:EffectEvent):void{ var _local2:IEffectInstance = IEffectInstance(_arg1.effectInstance); deleteInstance(_local2); dispatchEvent(_arg1); } public function get relevantProperties():Array{ if (_relevantProperties){ return (_relevantProperties); }; return (getAffectedProperties()); } public function createInstance(_arg1:Object=null):IEffectInstance{ var _local6:int; var _local7:int; if (!_arg1){ _arg1 = this.target; }; var _local2:IEffectInstance; var _local3:PropertyChanges; var _local4:Boolean; var _local5:Boolean; if (propertyChangesArray){ _local5 = true; _local4 = filterInstance(propertyChangesArray, _arg1); }; if (_local4){ _local2 = IEffectInstance(new instanceClass(_arg1)); initInstance(_local2); if (_local5){ _local6 = propertyChangesArray.length; _local7 = 0; while (_local7 < _local6) { if (propertyChangesArray[_local7].target == _arg1){ _local2.propertyChanges = propertyChangesArray[_local7]; }; _local7++; }; }; EventDispatcher(_local2).addEventListener(EffectEvent.EFFECT_START, effectStartHandler); EventDispatcher(_local2).addEventListener(EffectEvent.EFFECT_END, effectEndHandler); _instances.push(_local2); if (triggerEvent){ _local2.initEffect(triggerEvent); }; }; return (_local2); } protected function effectStartHandler(_arg1:EffectEvent):void{ dispatchEvent(_arg1); } public function getAffectedProperties():Array{ return ([]); } public function set relevantStyles(_arg1:Array):void{ _relevantStyles = _arg1; } public function get triggerEvent():Event{ return (_triggerEvent); } protected function applyValueToTarget(_arg1:Object, _arg2:String, _arg3, _arg4:Object):void{ var target = _arg1; var property = _arg2; var value = _arg3; var props = _arg4; if ((property in target)){ try { if (((((applyActualDimensions) && ((target is IFlexDisplayObject)))) && ((property == "height")))){ target.setActualSize(target.width, value); } else { if (((((applyActualDimensions) && ((target is IFlexDisplayObject)))) && ((property == "width")))){ target.setActualSize(value, target.height); } else { target[property] = value; }; }; } catch(e:Error) { }; }; } protected function initInstance(_arg1:IEffectInstance):void{ _arg1.duration = duration; Object(_arg1).durationExplicitlySet = durationExplicitlySet; _arg1.effect = this; _arg1.effectTargetHost = effectTargetHost; _arg1.hideFocusRing = hideFocusRing; _arg1.repeatCount = repeatCount; _arg1.repeatDelay = repeatDelay; _arg1.startDelay = startDelay; _arg1.suspendBackgroundProcessing = suspendBackgroundProcessing; } mx_internal function applyStartValues(_arg1:Array, _arg2:Array):void{ var _local6:int; var _local7:int; var _local8:Object; var _local9:Boolean; var _local3:Array = relevantProperties; var _local4:int = _arg1.length; var _local5:int; while (_local5 < _local4) { _local8 = _arg1[_local5].target; _local9 = false; _local6 = _arg2.length; _local7 = 0; while (_local7 < _local6) { if (_arg2[_local7] == _local8){ _local9 = filterInstance(_arg1, _local8); break; }; _local7++; }; if (_local9){ _local6 = _local3.length; _local7 = 0; while (_local7 < _local6) { if ((((_local3[_local7] in _arg1[_local5].start)) && ((_local3[_local7] in _local8)))){ applyValueToTarget(_local8, _local3[_local7], _arg1[_local5].start[_local3[_local7]], _arg1[_local5].start); }; _local7++; }; _local6 = relevantStyles.length; _local7 = 0; while (_local7 < _local6) { if ((relevantStyles[_local7] in _arg1[_local5].start)){ _local8.setStyle(relevantStyles[_local7], _arg1[_local5].start[relevantStyles[_local7]]); }; _local7++; }; }; _local5++; }; } public function end(_arg1:IEffectInstance=null):void{ var _local2:int; var _local3:int; var _local4:IEffectInstance; if (_arg1){ _arg1.end(); } else { _local2 = _instances.length; _local3 = _local2; while (_local3 >= 0) { _local4 = IEffectInstance(_instances[_local3]); if (_local4){ _local4.end(); }; _local3--; }; }; } public function get relevantStyles():Array{ return (_relevantStyles); } public function createInstances(_arg1:Array=null):Array{ var _local6:IEffectInstance; if (!_arg1){ _arg1 = this.targets; }; var _local2:Array = []; var _local3:int = _arg1.length; var _local4:Number = 0; var _local5:int; while (_local5 < _local3) { _local6 = createInstance(_arg1[_local5]); if (_local6){ _local6.startDelay = (_local6.startDelay + _local4); _local4 = (_local4 + perElementOffset); _local2.push(_local6); }; _local5++; }; triggerEvent = null; return (_local2); } public function pause():void{ var _local1:int; var _local2:int; if (((isPlaying) && (!(isPaused)))){ isPaused = true; _local1 = _instances.length; _local2 = 0; while (_local2 < _local1) { IEffectInstance(_instances[_local2]).pause(); _local2++; }; }; } public function set filter(_arg1:String):void{ if (!customFilter){ _filter = _arg1; switch (_arg1){ case "add": case "remove": filterObject = new AddRemoveEffectTargetFilter(); AddRemoveEffectTargetFilter(filterObject).add = (_arg1 == "add"); break; case "hide": case "show": filterObject = new HideShowEffectTargetFilter(); HideShowEffectTargetFilter(filterObject).show = (_arg1 == "show"); break; case "move": filterObject = new EffectTargetFilter(); filterObject.filterProperties = ["x", "y"]; break; case "resize": filterObject = new EffectTargetFilter(); filterObject.filterProperties = ["width", "height"]; break; case "addItem": filterObject = new EffectTargetFilter(); filterObject.requiredSemantics = {added:true}; break; case "removeItem": filterObject = new EffectTargetFilter(); filterObject.requiredSemantics = {removed:true}; break; case "replacedItem": filterObject = new EffectTargetFilter(); filterObject.requiredSemantics = {replaced:true}; break; case "replacementItem": filterObject = new EffectTargetFilter(); filterObject.requiredSemantics = {replacement:true}; break; default: filterObject = null; break; }; }; } public function reverse():void{ var _local1:int; var _local2:int; if (isPlaying){ _local1 = _instances.length; _local2 = 0; while (_local2 < _local1) { IEffectInstance(_instances[_local2]).reverse(); _local2++; }; }; } private static function mergeArrays(_arg1:Array, _arg2:Array):Array{ var _local3:int; var _local4:Boolean; var _local5:int; if (_arg2){ _local3 = 0; while (_local3 < _arg2.length) { _local4 = true; _local5 = 0; while (_local5 < _arg1.length) { if (_arg1[_local5] == _arg2[_local3]){ _local4 = false; break; }; _local5++; }; if (_local4){ _arg1.push(_arg2[_local3]); }; _local3++; }; }; return (_arg1); } private static function stripUnchangedValues(_arg1:Array):Array{ var _local3:Object; var _local2:int; while (_local2 < _arg1.length) { for (_local3 in _arg1[_local2].start) { if ((((_arg1[_local2].start[_local3] == _arg1[_local2].end[_local3])) || ((((((((typeof(_arg1[_local2].start[_local3]) == "number")) && ((typeof(_arg1[_local2].end[_local3]) == "number")))) && (isNaN(_arg1[_local2].start[_local3])))) && (isNaN(_arg1[_local2].end[_local3])))))){ delete _arg1[_local2].start[_local3]; delete _arg1[_local2].end[_local3]; }; }; _local2++; }; return (_arg1); } } }//package mx.effects
Section 232
//EffectInstance (mx.effects.EffectInstance) package mx.effects { import mx.core.*; import flash.events.*; import mx.events.*; import mx.effects.effectClasses.*; import flash.utils.*; public class EffectInstance extends EventDispatcher implements IEffectInstance { private var _hideFocusRing:Boolean; private var delayStartTime:Number;// = 0 mx_internal var stopRepeat:Boolean;// = false private var playCount:int;// = 0 private var _repeatCount:int;// = 0 private var _suspendBackgroundProcessing:Boolean;// = false mx_internal var delayTimer:Timer; private var _triggerEvent:Event; private var _effectTargetHost:IEffectTargetHost; mx_internal var parentCompositeEffectInstance:EffectInstance; mx_internal var durationExplicitlySet:Boolean;// = false private var _effect:IEffect; private var _target:Object; mx_internal var hideOnEffectEnd:Boolean;// = false private var _startDelay:int;// = 0 private var delayElapsedTime:Number;// = 0 private var _repeatDelay:int;// = 0 private var _propertyChanges:PropertyChanges; private var _duration:Number;// = 500 private var _playReversed:Boolean; mx_internal static const VERSION:String = "3.0.0.0"; public function EffectInstance(_arg1:Object){ this.target = _arg1; } public function get playheadTime():Number{ return ((((Math.max((playCount - 1), 0) * duration) + (Math.max((playCount - 2), 0) * repeatDelay)) + (playReversed) ? 0 : startDelay)); } public function get hideFocusRing():Boolean{ return (_hideFocusRing); } public function stop():void{ if (delayTimer){ delayTimer.reset(); }; stopRepeat = true; finishEffect(); } public function finishEffect():void{ playCount = 0; dispatchEvent(new EffectEvent(EffectEvent.EFFECT_END, false, false, this)); if (target){ target.dispatchEvent(new EffectEvent(EffectEvent.EFFECT_END, false, false, this)); }; if ((target is UIComponent)){ UIComponent(target).effectFinished(this); }; EffectManager.effectFinished(this); } public function set hideFocusRing(_arg1:Boolean):void{ _hideFocusRing = _arg1; } public function finishRepeat():void{ if (((((!(stopRepeat)) && (!((playCount == 0))))) && ((((playCount < repeatCount)) || ((repeatCount == 0)))))){ if (repeatDelay > 0){ delayTimer = new Timer(repeatDelay, 1); delayStartTime = getTimer(); delayTimer.addEventListener(TimerEvent.TIMER, delayTimerHandler); delayTimer.start(); } else { play(); }; } else { finishEffect(); }; } mx_internal function get playReversed():Boolean{ return (_playReversed); } public function set effect(_arg1:IEffect):void{ _effect = _arg1; } public function get className():String{ var _local1:String = getQualifiedClassName(this); var _local2:int = _local1.indexOf("::"); if (_local2 != -1){ _local1 = _local1.substr((_local2 + 2)); }; return (_local1); } public function set duration(_arg1:Number):void{ durationExplicitlySet = true; _duration = _arg1; } mx_internal function set playReversed(_arg1:Boolean):void{ _playReversed = _arg1; } public function resume():void{ if (((((delayTimer) && (!(delayTimer.running)))) && (!(isNaN(delayElapsedTime))))){ delayTimer.delay = (playReversed) ? delayElapsedTime : (delayTimer.delay - delayElapsedTime); delayTimer.start(); }; } public function get propertyChanges():PropertyChanges{ return (_propertyChanges); } public function set target(_arg1:Object):void{ _target = _arg1; } public function get repeatCount():int{ return (_repeatCount); } mx_internal function playWithNoDuration():void{ duration = 0; repeatCount = 1; repeatDelay = 0; startDelay = 0; startEffect(); } public function get startDelay():int{ return (_startDelay); } mx_internal function get actualDuration():Number{ var _local1:Number = NaN; if (repeatCount > 0){ _local1 = (((duration * repeatCount) + ((repeatDelay * repeatCount) - 1)) + startDelay); }; return (_local1); } public function play():void{ playCount++; dispatchEvent(new EffectEvent(EffectEvent.EFFECT_START, false, false, this)); if (target){ target.dispatchEvent(new EffectEvent(EffectEvent.EFFECT_START, false, false, this)); }; } public function get suspendBackgroundProcessing():Boolean{ return (_suspendBackgroundProcessing); } public function get effectTargetHost():IEffectTargetHost{ return (_effectTargetHost); } public function set repeatDelay(_arg1:int):void{ _repeatDelay = _arg1; } public function set propertyChanges(_arg1:PropertyChanges):void{ _propertyChanges = _arg1; } mx_internal function eventHandler(_arg1:Event):void{ if ((((_arg1.type == FlexEvent.SHOW)) && ((hideOnEffectEnd == true)))){ hideOnEffectEnd = false; _arg1.target.removeEventListener(FlexEvent.SHOW, eventHandler); }; } public function set repeatCount(_arg1:int):void{ _repeatCount = _arg1; } private function delayTimerHandler(_arg1:TimerEvent):void{ delayTimer.reset(); delayStartTime = NaN; delayElapsedTime = NaN; play(); } public function set suspendBackgroundProcessing(_arg1:Boolean):void{ _suspendBackgroundProcessing = _arg1; } public function set triggerEvent(_arg1:Event):void{ _triggerEvent = _arg1; } public function set startDelay(_arg1:int):void{ _startDelay = _arg1; } public function get effect():IEffect{ return (_effect); } public function set effectTargetHost(_arg1:IEffectTargetHost):void{ _effectTargetHost = _arg1; } public function get target():Object{ return (_target); } public function startEffect():void{ EffectManager.effectStarted(this); if ((target is UIComponent)){ UIComponent(target).effectStarted(this); }; if ((((startDelay > 0)) && (!(playReversed)))){ delayTimer = new Timer(startDelay, 1); delayStartTime = getTimer(); delayTimer.addEventListener(TimerEvent.TIMER, delayTimerHandler); delayTimer.start(); } else { play(); }; } public function get repeatDelay():int{ return (_repeatDelay); } public function get duration():Number{ if (((!(durationExplicitlySet)) && (parentCompositeEffectInstance))){ return (parentCompositeEffectInstance.duration); }; return (_duration); } public function initEffect(_arg1:Event):void{ triggerEvent = _arg1; switch (_arg1.type){ case "resizeStart": case "resizeEnd": if (!durationExplicitlySet){ duration = 250; }; break; case FlexEvent.HIDE: target.setVisible(true, true); hideOnEffectEnd = true; target.addEventListener(FlexEvent.SHOW, eventHandler); break; }; } public function get triggerEvent():Event{ return (_triggerEvent); } public function end():void{ if (delayTimer){ delayTimer.reset(); }; stopRepeat = true; finishEffect(); } public function reverse():void{ if (repeatCount > 0){ playCount = ((repeatCount - playCount) + 1); }; } public function pause():void{ if (((((delayTimer) && (delayTimer.running))) && (!(isNaN(delayStartTime))))){ delayTimer.stop(); delayElapsedTime = (getTimer() - delayStartTime); }; } } }//package mx.effects
Section 233
//EffectManager (mx.effects.EffectManager) package mx.effects { import flash.display.*; import mx.core.*; import flash.events.*; import mx.events.*; import mx.resources.*; import flash.utils.*; public class EffectManager extends EventDispatcher { mx_internal static const VERSION:String = "3.0.0.0"; private static var _resourceManager:IResourceManager; private static var effects:Dictionary = new Dictionary(true); mx_internal static var effectsPlaying:Array = []; private static var targetsInfo:Array = []; private static var effectTriggersForEvent:Object = {}; mx_internal static var lastEffectCreated:Effect; private static var eventHandlingSuspendCount:Number = 0; private static var eventsForEffectTriggers:Object = {}; public static function suspendEventHandling():void{ eventHandlingSuspendCount++; } mx_internal static function registerEffectTrigger(_arg1:String, _arg2:String):void{ var _local3:Number; if (_arg1 != ""){ if (_arg2 == ""){ _local3 = _arg1.length; if ((((_local3 > 6)) && ((_arg1.substring((_local3 - 6)) == "Effect")))){ _arg2 = _arg1.substring(0, (_local3 - 6)); }; }; if (_arg2 != ""){ effectTriggersForEvent[_arg2] = _arg1; eventsForEffectTriggers[_arg1] = _arg2; }; }; } private static function removedEffectHandler(_arg1:DisplayObject, _arg2:DisplayObjectContainer, _arg3:int, _arg4:Event):void{ suspendEventHandling(); _arg2.addChildAt(_arg1, _arg3); resumeEventHandling(); createAndPlayEffect(_arg4, _arg1); } private static function createAndPlayEffect(_arg1:Event, _arg2:Object):void{ var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local9:String; var _local10:String; var _local11:Array; var _local12:Array; var _local13:Array; var _local14:Array; var _local15:EffectInstance; var _local3:Effect = createEffectForType(_arg2, _arg1.type); if (!_local3){ return; }; if ((((_local3 is Zoom)) && ((_arg1.type == MoveEvent.MOVE)))){ _local9 = resourceManager.getString("effects", "incorrectTrigger"); throw (new Error(_local9)); }; if (_arg2.initialized == false){ _local10 = _arg1.type; if ((((((((((_local10 == MoveEvent.MOVE)) || ((_local10 == ResizeEvent.RESIZE)))) || ((_local10 == FlexEvent.SHOW)))) || ((_local10 == FlexEvent.HIDE)))) || ((_local10 == Event.CHANGE)))){ _local3 = null; return; }; }; if ((_local3.target is IUIComponent)){ _local11 = IUIComponent(_local3.target).tweeningProperties; if (((_local11) && ((_local11.length > 0)))){ _local12 = _local3.getAffectedProperties(); _local4 = _local11.length; _local6 = _local12.length; _local5 = 0; while (_local5 < _local4) { _local7 = 0; while (_local7 < _local6) { if (_local11[_local5] == _local12[_local7]){ _local3 = null; return; }; _local7++; }; _local5++; }; }; }; if ((((_local3.target is UIComponent)) && (UIComponent(_local3.target).isEffectStarted))){ _local13 = _local3.getAffectedProperties(); _local5 = 0; while (_local5 < _local13.length) { _local14 = _local3.target.getEffectsForProperty(_local13[_local5]); if (_local14.length > 0){ if (_arg1.type == ResizeEvent.RESIZE){ return; }; _local7 = 0; while (_local7 < _local14.length) { _local15 = _local14[_local7]; if ((((_arg1.type == FlexEvent.SHOW)) && (_local15.hideOnEffectEnd))){ _local15.target.removeEventListener(FlexEvent.SHOW, _local15.eventHandler); _local15.hideOnEffectEnd = false; }; _local15.end(); _local7++; }; }; _local5++; }; }; _local3.triggerEvent = _arg1; _local3.addEventListener(EffectEvent.EFFECT_END, EffectManager.effectEndHandler); lastEffectCreated = _local3; var _local8:Array = _local3.play(); _local4 = _local8.length; _local5 = 0; while (_local5 < _local4) { effectsPlaying.push(new EffectNode(_local3, _local8[_local5])); _local5++; }; if (_local3.suspendBackgroundProcessing){ UIComponent.suspendBackgroundProcessing(); }; } public static function endEffectsForTarget(_arg1:IUIComponent):void{ var _local4:EffectInstance; var _local2:int = effectsPlaying.length; var _local3:int = (_local2 - 1); while (_local3 >= 0) { _local4 = effectsPlaying[_local3].instance; if (_local4.target == _arg1){ _local4.end(); }; _local3--; }; } private static function cacheOrUncacheTargetAsBitmap(_arg1:IUIComponent, _arg2:Boolean=true, _arg3:Boolean=true):void{ var _local4:int; var _local5:int; var _local6:Object; _local4 = targetsInfo.length; _local5 = 0; while (_local5 < _local4) { if (targetsInfo[_local5].target == _arg1){ _local6 = targetsInfo[_local5]; break; }; _local5++; }; if (!_local6){ _local6 = {target:_arg1, bitmapEffectsCount:0, vectorEffectsCount:0}; targetsInfo.push(_local6); }; if (_arg2){ if (_arg3){ _local6.bitmapEffectsCount++; if ((((_local6.vectorEffectsCount == 0)) && ((_arg1 is IDeferredInstantiationUIComponent)))){ IDeferredInstantiationUIComponent(_arg1).cacheHeuristic = true; }; } else { if ((((((_local6.vectorEffectsCount++ == 0)) && ((_arg1 is IDeferredInstantiationUIComponent)))) && ((IDeferredInstantiationUIComponent(_arg1).cachePolicy == UIComponentCachePolicy.AUTO)))){ _arg1.cacheAsBitmap = false; }; }; } else { if (_arg3){ if (_local6.bitmapEffectsCount != 0){ _local6.bitmapEffectsCount--; }; if ((_arg1 is IDeferredInstantiationUIComponent)){ IDeferredInstantiationUIComponent(_arg1).cacheHeuristic = false; }; } else { if (_local6.vectorEffectsCount != 0){ if ((((--_local6.vectorEffectsCount == 0)) && (!((_local6.bitmapEffectsCount == 0))))){ _local4 = _local6.bitmapEffectsCount; _local5 = 0; while (_local5 < _local4) { if ((_arg1 is IDeferredInstantiationUIComponent)){ IDeferredInstantiationUIComponent(_arg1).cacheHeuristic = true; }; _local5++; }; }; }; }; if ((((_local6.bitmapEffectsCount == 0)) && ((_local6.vectorEffectsCount == 0)))){ _local4 = targetsInfo.length; _local5 = 0; while (_local5 < _local4) { if (targetsInfo[_local5].target == _arg1){ targetsInfo.splice(_local5, 1); break; }; _local5++; }; }; }; } mx_internal static function eventHandler(_arg1:Event):void{ var _local2:FocusEvent; var _local3:DisplayObject; var _local4:int; var _local5:DisplayObjectContainer; var _local6:int; if (!(_arg1.currentTarget is IFlexDisplayObject)){ return; }; if (eventHandlingSuspendCount > 0){ return; }; if ((((_arg1 is FocusEvent)) && ((((_arg1.type == FocusEvent.FOCUS_OUT)) || ((_arg1.type == FocusEvent.FOCUS_IN)))))){ _local2 = FocusEvent(_arg1); if (((_local2.relatedObject) && (((_local2.currentTarget.contains(_local2.relatedObject)) || ((_local2.currentTarget == _local2.relatedObject)))))){ return; }; }; if ((((((_arg1.type == Event.ADDED)) || ((_arg1.type == Event.REMOVED)))) && (!((_arg1.target == _arg1.currentTarget))))){ return; }; if (_arg1.type == Event.REMOVED){ if ((_arg1.target is UIComponent)){ if (UIComponent(_arg1.target).initialized == false){ return; }; if (UIComponent(_arg1.target).isEffectStarted){ _local4 = 0; while (_local4 < UIComponent(_arg1.target)._effectsStarted.length) { if (UIComponent(_arg1.target)._effectsStarted[_local4].triggerEvent.type == Event.REMOVED){ return; }; _local4++; }; }; }; _local3 = (_arg1.target as DisplayObject); if (_local3 != null){ _local5 = (_local3.parent as DisplayObjectContainer); if (_local5 != null){ _local6 = _local5.getChildIndex(_local3); if (_local6 >= 0){ if ((_local3 is UIComponent)){ UIComponent(_local3).callLater(removedEffectHandler, [_local3, _local5, _local6, _arg1]); }; }; }; }; } else { createAndPlayEffect(_arg1, _arg1.currentTarget); }; } mx_internal static function endBitmapEffect(_arg1:IUIComponent):void{ cacheOrUncacheTargetAsBitmap(_arg1, false, true); } private static function animateSameProperty(_arg1:Effect, _arg2:Effect, _arg3:EffectInstance):Boolean{ var _local4:Array; var _local5:Array; var _local6:int; var _local7:int; var _local8:int; var _local9:int; if (_arg1.target == _arg3.target){ _local4 = _arg1.getAffectedProperties(); _local5 = _arg2.getAffectedProperties(); _local6 = _local4.length; _local7 = _local5.length; _local8 = 0; while (_local8 < _local6) { _local9 = 0; while (_local9 < _local7) { if (_local4[_local8] == _local5[_local9]){ return (true); }; _local9++; }; _local8++; }; }; return (false); } mx_internal static function effectFinished(_arg1:EffectInstance):void{ delete effects[_arg1]; } mx_internal static function effectsInEffect():Boolean{ var _local1:*; for (_local1 in effects) { return (true); }; return (false); } mx_internal static function effectEndHandler(_arg1:EffectEvent):void{ var _local5:DisplayObject; var _local6:DisplayObjectContainer; var _local2:IEffectInstance = _arg1.effectInstance; var _local3:int = effectsPlaying.length; var _local4:int = (_local3 - 1); while (_local4 >= 0) { if (effectsPlaying[_local4].instance == _local2){ effectsPlaying.splice(_local4, 1); break; }; _local4--; }; if (Object(_local2).hideOnEffectEnd == true){ _local2.target.removeEventListener(FlexEvent.SHOW, Object(_local2).eventHandler); _local2.target.setVisible(false, true); }; if (((_local2.triggerEvent) && ((_local2.triggerEvent.type == Event.REMOVED)))){ _local5 = (_local2.target as DisplayObject); if (_local5 != null){ _local6 = (_local5.parent as DisplayObjectContainer); if (_local6 != null){ suspendEventHandling(); _local6.removeChild(_local5); resumeEventHandling(); }; }; }; if (_local2.suspendBackgroundProcessing){ UIComponent.resumeBackgroundProcessing(); }; } mx_internal static function startBitmapEffect(_arg1:IUIComponent):void{ cacheOrUncacheTargetAsBitmap(_arg1, true, true); } mx_internal static function setStyle(_arg1:String, _arg2):void{ var _local3:String = eventsForEffectTriggers[_arg1]; if (((!((_local3 == null))) && (!((_local3 == ""))))){ _arg2.addEventListener(_local3, EffectManager.eventHandler, false, EventPriority.EFFECT); }; } mx_internal static function getEventForEffectTrigger(_arg1:String):String{ var effectTrigger = _arg1; if (eventsForEffectTriggers){ try { return (eventsForEffectTriggers[effectTrigger]); } catch(e:Error) { return (""); }; }; return (""); } mx_internal static function createEffectForType(_arg1:Object, _arg2:String):Effect{ var cls:Class; var effectObj:Effect; var doc:Object; var target = _arg1; var type = _arg2; var trigger:String = effectTriggersForEvent[type]; if (trigger == ""){ trigger = (type + "Effect"); }; var value:Object = target.getStyle(trigger); if (!value){ return (null); }; if ((value is Class)){ cls = Class(value); return (new cls(target)); }; try { if ((value is String)){ doc = target.parentDocument; if (!doc){ doc = ApplicationGlobals.application; }; effectObj = doc[value]; } else { if ((value is Effect)){ effectObj = Effect(value); }; }; if (effectObj){ effectObj.target = target; return (effectObj); }; } catch(e:Error) { }; var effectClass:Class = Class(target.systemManager.getDefinitionByName(("mx.effects." + value))); if (effectClass){ return (new effectClass(target)); }; return (null); } mx_internal static function effectStarted(_arg1:EffectInstance):void{ effects[_arg1] = 1; } public static function resumeEventHandling():void{ eventHandlingSuspendCount--; } mx_internal static function startVectorEffect(_arg1:IUIComponent):void{ cacheOrUncacheTargetAsBitmap(_arg1, true, false); } mx_internal static function endVectorEffect(_arg1:IUIComponent):void{ cacheOrUncacheTargetAsBitmap(_arg1, false, false); } private static function get resourceManager():IResourceManager{ if (!_resourceManager){ _resourceManager = ResourceManager.getInstance(); }; return (_resourceManager); } } }//package mx.effects class EffectNode { public var factory:Effect; public var instance:EffectInstance; private function EffectNode(_arg1:Effect, _arg2:EffectInstance){ this.factory = _arg1; this.instance = _arg2; } }
Section 234
//EffectTargetFilter (mx.effects.EffectTargetFilter) package mx.effects { import mx.effects.effectClasses.*; public class EffectTargetFilter { public var filterFunction:Function; public var filterStyles:Array; public var filterProperties:Array; public var requiredSemantics:Object;// = null mx_internal static const VERSION:String = "3.0.0.0"; public function EffectTargetFilter(){ filterFunction = defaultFilterFunctionEx; filterProperties = []; filterStyles = []; super(); } protected function defaultFilterFunctionEx(_arg1:Array, _arg2:IEffectTargetHost, _arg3:Object):Boolean{ var _local4:String; if (requiredSemantics){ for (_local4 in requiredSemantics) { if (!_arg2){ return (false); }; if (_arg2.getRendererSemanticValue(_arg3, _local4) != requiredSemantics[_local4]){ return (false); }; }; return (true); }; return (defaultFilterFunction(_arg1, _arg3)); } protected function defaultFilterFunction(_arg1:Array, _arg2:Object):Boolean{ var _local5:PropertyChanges; var _local6:Array; var _local7:int; var _local8:int; var _local3:int = _arg1.length; var _local4:int; while (_local4 < _local3) { _local5 = _arg1[_local4]; if (_local5.target == _arg2){ _local6 = filterProperties.concat(filterStyles); _local7 = _local6.length; _local8 = 0; while (_local8 < _local7) { if (((!((_local5.start[_local6[_local8]] === undefined))) && (!((_local5.end[_local6[_local8]] == _local5.start[_local6[_local8]]))))){ return (true); }; _local8++; }; }; _local4++; }; return (false); } public function filterInstance(_arg1:Array, _arg2:IEffectTargetHost, _arg3:Object):Boolean{ if (filterFunction.length == 2){ return (filterFunction(_arg1, _arg3)); }; return (filterFunction(_arg1, _arg2, _arg3)); } } }//package mx.effects
Section 235
//IAbstractEffect (mx.effects.IAbstractEffect) package mx.effects { import flash.events.*; public interface IAbstractEffect extends IEventDispatcher { } }//package mx.effects
Section 236
//IEffect (mx.effects.IEffect) package mx.effects { import flash.events.*; public interface IEffect extends IAbstractEffect { function captureMoreStartValues(_arg1:Array):void; function get triggerEvent():Event; function set targets(_arg1:Array):void; function captureStartValues():void; function get hideFocusRing():Boolean; function get customFilter():EffectTargetFilter; function get effectTargetHost():IEffectTargetHost; function set triggerEvent(_arg1:Event):void; function set hideFocusRing(_arg1:Boolean):void; function captureEndValues():void; function get target():Object; function set customFilter(_arg1:EffectTargetFilter):void; function get duration():Number; function get perElementOffset():Number; function get targets():Array; function set effectTargetHost(_arg1:IEffectTargetHost):void; function get relevantStyles():Array; function set relevantProperties(_arg1:Array):void; function set target(_arg1:Object):void; function get className():String; function get isPlaying():Boolean; function deleteInstance(_arg1:IEffectInstance):void; function set duration(_arg1:Number):void; function createInstances(_arg1:Array=null):Array; function end(_arg1:IEffectInstance=null):void; function set perElementOffset(_arg1:Number):void; function resume():void; function stop():void; function set filter(_arg1:String):void; function createInstance(_arg1:Object=null):IEffectInstance; function play(_arg1:Array=null, _arg2:Boolean=false):Array; function pause():void; function get relevantProperties():Array; function get filter():String; function reverse():void; function getAffectedProperties():Array; function set relevantStyles(_arg1:Array):void; } }//package mx.effects
Section 237
//IEffectInstance (mx.effects.IEffectInstance) package mx.effects { import flash.events.*; import mx.effects.effectClasses.*; public interface IEffectInstance { function get playheadTime():Number; function get triggerEvent():Event; function set triggerEvent(_arg1:Event):void; function get hideFocusRing():Boolean; function initEffect(_arg1:Event):void; function set startDelay(_arg1:int):void; function get effectTargetHost():IEffectTargetHost; function finishEffect():void; function set hideFocusRing(_arg1:Boolean):void; function finishRepeat():void; function set repeatDelay(_arg1:int):void; function get effect():IEffect; function startEffect():void; function get duration():Number; function get target():Object; function get startDelay():int; function stop():void; function set effectTargetHost(_arg1:IEffectTargetHost):void; function set propertyChanges(_arg1:PropertyChanges):void; function set effect(_arg1:IEffect):void; function get className():String; function set duration(_arg1:Number):void; function set target(_arg1:Object):void; function end():void; function resume():void; function get propertyChanges():PropertyChanges; function set repeatCount(_arg1:int):void; function reverse():void; function get repeatCount():int; function pause():void; function get repeatDelay():int; function set suspendBackgroundProcessing(_arg1:Boolean):void; function play():void; function get suspendBackgroundProcessing():Boolean; } }//package mx.effects
Section 238
//IEffectTargetHost (mx.effects.IEffectTargetHost) package mx.effects { public interface IEffectTargetHost { function unconstrainRenderer(_arg1:Object):void; function removeDataEffectItem(_arg1:Object):void; function getRendererSemanticValue(_arg1:Object, _arg2:String):Object; function addDataEffectItem(_arg1:Object):void; } }//package mx.effects
Section 239
//RemoveChildAction (mx.effects.RemoveChildAction) package mx.effects { import mx.effects.effectClasses.*; public class RemoveChildAction extends Effect { mx_internal static const VERSION:String = "3.0.0.0"; private static var AFFECTED_PROPERTIES:Array = ["parent", "index"]; public function RemoveChildAction(_arg1:Object=null){ super(_arg1); instanceClass = RemoveChildActionInstance; } override public function getAffectedProperties():Array{ return (AFFECTED_PROPERTIES); } override protected function getValueFromTarget(_arg1:Object, _arg2:String){ if (_arg2 == "index"){ return ((_arg1.parent) ? _arg1.parent.getChildIndex(_arg1) : 0); }; return (super.getValueFromTarget(_arg1, _arg2)); } override mx_internal function applyStartValues(_arg1:Array, _arg2:Array):void{ if (_arg1){ _arg1.sort(propChangesSortHandler); }; super.applyStartValues(_arg1, _arg2); } private function propChangesSortHandler(_arg1:PropertyChanges, _arg2:PropertyChanges):Number{ if (_arg1.start.index > _arg2.start.index){ return (1); }; if (_arg1.start.index < _arg2.start.index){ return (-1); }; return (0); } override protected function applyValueToTarget(_arg1:Object, _arg2:String, _arg3, _arg4:Object):void{ if ((((((_arg2 == "parent")) && ((_arg1.parent == null)))) && (_arg3))){ _arg3.addChildAt(_arg1, Math.min(_arg4.index, _arg3.numChildren)); }; } } }//package mx.effects
Section 240
//Sequence (mx.effects.Sequence) package mx.effects { import mx.effects.effectClasses.*; public class Sequence extends CompositeEffect { mx_internal static const VERSION:String = "3.0.0.0"; public function Sequence(_arg1:Object=null){ super(_arg1); instanceClass = SequenceInstance; } override protected function initInstance(_arg1:IEffectInstance):void{ super.initInstance(_arg1); } } }//package mx.effects
Section 241
//Tween (mx.effects.Tween) package mx.effects { import mx.core.*; import flash.events.*; import mx.events.*; import flash.utils.*; public class Tween extends EventDispatcher { private var started:Boolean;// = false private var previousUpdateTime:Number; public var duration:Number;// = 3000 private var id:int; private var arrayMode:Boolean; private var _isPlaying:Boolean;// = true private var startValue:Object; public var listener:Object; private var userEquation:Function; mx_internal var needToLayout:Boolean;// = false private var updateFunction:Function; private var _doSeek:Boolean;// = false mx_internal var startTime:Number; private var endFunction:Function; private var endValue:Object; private var _doReverse:Boolean;// = false private var _playheadTime:Number;// = 0 private var _invertValues:Boolean;// = false private var maxDelay:Number;// = 87.5 mx_internal static const VERSION:String = "3.0.0.0"; private static var timer:Timer = null; private static var interval:Number = 10; mx_internal static var activeTweens:Array = []; mx_internal static var intervalTime:Number = NAN; public function Tween(_arg1:Object, _arg2:Object, _arg3:Object, _arg4:Number=-1, _arg5:Number=-1, _arg6:Function=null, _arg7:Function=null){ userEquation = defaultEasingFunction; super(); if (!_arg1){ return; }; if ((_arg2 is Array)){ arrayMode = true; }; this.listener = _arg1; this.startValue = _arg2; this.endValue = _arg3; if (((!(isNaN(_arg4))) && (!((_arg4 == -1))))){ this.duration = _arg4; }; if (((!(isNaN(_arg5))) && (!((_arg5 == -1))))){ maxDelay = (1000 / _arg5); }; this.updateFunction = _arg6; this.endFunction = _arg7; if (_arg4 == 0){ id = -1; endTween(); } else { Tween.addTween(this); }; } mx_internal function get playheadTime():Number{ return (_playheadTime); } public function stop():void{ if (id >= 0){ Tween.removeTweenAt(id); }; } mx_internal function get playReversed():Boolean{ return (_invertValues); } mx_internal function set playReversed(_arg1:Boolean):void{ _invertValues = _arg1; } public function resume():void{ _isPlaying = true; startTime = (intervalTime - _playheadTime); if (_doReverse){ reverse(); _doReverse = false; }; } public function setTweenHandlers(_arg1:Function, _arg2:Function):void{ this.updateFunction = _arg1; this.endFunction = _arg2; } private function defaultEasingFunction(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((_arg3 / 2) * (Math.sin((Math.PI * ((_arg1 / _arg4) - 0.5))) + 1)) + _arg2)); } public function set easingFunction(_arg1:Function):void{ userEquation = _arg1; } public function endTween():void{ var _local1:TweenEvent = new TweenEvent(TweenEvent.TWEEN_END); var _local2:Object = getCurrentValue(duration); _local1.value = _local2; dispatchEvent(_local1); if (endFunction != null){ endFunction(_local2); } else { listener.onTweenEnd(_local2); }; if (id >= 0){ Tween.removeTweenAt(id); }; } public function reverse():void{ if (_isPlaying){ _doReverse = false; seek((duration - _playheadTime)); _invertValues = !(_invertValues); } else { _doReverse = !(_doReverse); }; } mx_internal function getCurrentValue(_arg1:Number):Object{ var _local2:Array; var _local3:int; var _local4:int; if (duration == 0){ return (endValue); }; if (_invertValues){ _arg1 = (duration - _arg1); }; if (arrayMode){ _local2 = []; _local3 = startValue.length; _local4 = 0; while (_local4 < _local3) { _local2[_local4] = userEquation(_arg1, startValue[_local4], (endValue[_local4] - startValue[_local4]), duration); _local4++; }; return (_local2); //unresolved jump }; return (userEquation(_arg1, startValue, (Number(endValue) - Number(startValue)), duration)); } mx_internal function doInterval():Boolean{ var _local2:Number; var _local3:Object; var _local4:TweenEvent; var _local5:TweenEvent; var _local1:Boolean; previousUpdateTime = intervalTime; if (((_isPlaying) || (_doSeek))){ _local2 = (intervalTime - startTime); _playheadTime = _local2; _local3 = getCurrentValue(_local2); if ((((_local2 >= duration)) && (!(_doSeek)))){ endTween(); _local1 = true; } else { if (!started){ _local5 = new TweenEvent(TweenEvent.TWEEN_START); dispatchEvent(_local5); started = true; }; _local4 = new TweenEvent(TweenEvent.TWEEN_UPDATE); _local4.value = _local3; dispatchEvent(_local4); if (updateFunction != null){ updateFunction(_local3); } else { listener.onTweenUpdate(_local3); }; }; _doSeek = false; }; return (_local1); } public function pause():void{ _isPlaying = false; } public function seek(_arg1:Number):void{ var _local2:Number = intervalTime; previousUpdateTime = _local2; startTime = (_local2 - _arg1); _doSeek = true; } mx_internal static function removeTween(_arg1:Tween):void{ removeTweenAt(_arg1.id); } private static function addTween(_arg1:Tween):void{ _arg1.id = activeTweens.length; activeTweens.push(_arg1); if (!timer){ timer = new Timer(interval); timer.addEventListener(TimerEvent.TIMER, timerHandler); timer.start(); } else { timer.start(); }; if (isNaN(intervalTime)){ intervalTime = getTimer(); }; _arg1.startTime = (_arg1.previousUpdateTime = intervalTime); } private static function timerHandler(_arg1:TimerEvent):void{ var _local6:Tween; var _local2:Boolean; var _local3:Number = intervalTime; intervalTime = getTimer(); var _local4:int = activeTweens.length; var _local5:int = _local4; while (_local5 >= 0) { _local6 = Tween(activeTweens[_local5]); if (_local6){ _local6.needToLayout = false; _local6.doInterval(); if (_local6.needToLayout){ _local2 = true; }; }; _local5--; }; if (_local2){ UIComponentGlobals.layoutManager.validateNow(); }; _arg1.updateAfterEvent(); } private static function removeTweenAt(_arg1:int):void{ var _local4:Tween; if ((((_arg1 >= activeTweens.length)) || ((_arg1 < 0)))){ return; }; activeTweens.splice(_arg1, 1); var _local2:int = activeTweens.length; var _local3:int = _arg1; while (_local3 < _local2) { _local4 = Tween(activeTweens[_local3]); _local4.id--; _local3++; }; if (_local2 == 0){ intervalTime = NaN; timer.reset(); }; } } }//package mx.effects
Section 242
//TweenEffect (mx.effects.TweenEffect) package mx.effects { import flash.events.*; import mx.events.*; import mx.effects.effectClasses.*; public class TweenEffect extends Effect { public var easingFunction:Function;// = null mx_internal static const VERSION:String = "3.0.0.0"; public function TweenEffect(_arg1:Object=null){ super(_arg1); instanceClass = TweenEffectInstance; } protected function tweenEventHandler(_arg1:TweenEvent):void{ dispatchEvent(_arg1); } override protected function initInstance(_arg1:IEffectInstance):void{ super.initInstance(_arg1); TweenEffectInstance(_arg1).easingFunction = easingFunction; EventDispatcher(_arg1).addEventListener(TweenEvent.TWEEN_START, tweenEventHandler); EventDispatcher(_arg1).addEventListener(TweenEvent.TWEEN_UPDATE, tweenEventHandler); EventDispatcher(_arg1).addEventListener(TweenEvent.TWEEN_END, tweenEventHandler); } } }//package mx.effects
Section 243
//Zoom (mx.effects.Zoom) package mx.effects { import mx.effects.effectClasses.*; public class Zoom extends TweenEffect { public var zoomHeightFrom:Number; public var zoomWidthTo:Number; public var originX:Number; public var zoomHeightTo:Number; public var originY:Number; public var captureRollEvents:Boolean; public var zoomWidthFrom:Number; mx_internal static const VERSION:String = "3.0.0.0"; private static var AFFECTED_PROPERTIES:Array = ["scaleX", "scaleY", "x", "y", "width", "height"]; public function Zoom(_arg1:Object=null){ super(_arg1); instanceClass = ZoomInstance; applyActualDimensions = false; relevantProperties = ["scaleX", "scaleY", "width", "height", "visible"]; } override protected function initInstance(_arg1:IEffectInstance):void{ var _local2:ZoomInstance; super.initInstance(_arg1); _local2 = ZoomInstance(_arg1); _local2.zoomWidthFrom = zoomWidthFrom; _local2.zoomWidthTo = zoomWidthTo; _local2.zoomHeightFrom = zoomHeightFrom; _local2.zoomHeightTo = zoomHeightTo; _local2.originX = originX; _local2.originY = originY; _local2.captureRollEvents = captureRollEvents; } override public function getAffectedProperties():Array{ return (AFFECTED_PROPERTIES); } } }//package mx.effects
Section 244
//ChildExistenceChangedEvent (mx.events.ChildExistenceChangedEvent) package mx.events { import flash.display.*; import flash.events.*; public class ChildExistenceChangedEvent extends Event { public var relatedObject:DisplayObject; public static const CHILD_REMOVE:String = "childRemove"; mx_internal static const VERSION:String = "3.0.0.0"; public static const OVERLAY_CREATED:String = "overlayCreated"; public static const CHILD_ADD:String = "childAdd"; public function ChildExistenceChangedEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:DisplayObject=null){ super(_arg1, _arg2, _arg3); this.relatedObject = _arg4; } override public function clone():Event{ return (new ChildExistenceChangedEvent(type, bubbles, cancelable, relatedObject)); } } }//package mx.events
Section 245
//CloseEvent (mx.events.CloseEvent) package mx.events { import flash.events.*; public class CloseEvent extends Event { public var detail:int; mx_internal static const VERSION:String = "3.0.0.0"; public static const CLOSE:String = "close"; public function CloseEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:int=-1){ super(_arg1, _arg2, _arg3); this.detail = _arg4; } override public function clone():Event{ return (new CloseEvent(type, bubbles, cancelable, detail)); } } }//package mx.events
Section 246
//CollectionEvent (mx.events.CollectionEvent) package mx.events { import flash.events.*; public class CollectionEvent extends Event { public var kind:String; public var location:int; public var items:Array; public var oldLocation:int; mx_internal static const VERSION:String = "3.0.0.0"; public static const COLLECTION_CHANGE:String = "collectionChange"; public function CollectionEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:int=-1, _arg6:int=-1, _arg7:Array=null){ super(_arg1, _arg2, _arg3); this.kind = _arg4; this.location = _arg5; this.oldLocation = _arg6; this.items = (_arg7) ? _arg7 : []; } override public function toString():String{ return (formatToString("CollectionEvent", "kind", "location", "oldLocation", "type", "bubbles", "cancelable", "eventPhase")); } override public function clone():Event{ return (new CollectionEvent(type, bubbles, cancelable, kind, location, oldLocation, items)); } } }//package mx.events
Section 247
//CollectionEventKind (mx.events.CollectionEventKind) package mx.events { public final class CollectionEventKind { public static const ADD:String = "add"; public static const REMOVE:String = "remove"; public static const UPDATE:String = "update"; public static const MOVE:String = "move"; mx_internal static const EXPAND:String = "expand"; public static const REPLACE:String = "replace"; mx_internal static const VERSION:String = "3.0.0.0"; public static const REFRESH:String = "refresh"; public static const RESET:String = "reset"; } }//package mx.events
Section 248
//DragEvent (mx.events.DragEvent) package mx.events { import mx.core.*; import flash.events.*; public class DragEvent extends MouseEvent { public var draggedItem:Object; public var action:String; public var dragInitiator:IUIComponent; public var dragSource:DragSource; public static const DRAG_DROP:String = "dragDrop"; public static const DRAG_COMPLETE:String = "dragComplete"; public static const DRAG_EXIT:String = "dragExit"; public static const DRAG_ENTER:String = "dragEnter"; public static const DRAG_START:String = "dragStart"; mx_internal static const VERSION:String = "3.0.0.0"; public static const DRAG_OVER:String = "dragOver"; public function DragEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=true, _arg4:IUIComponent=null, _arg5:DragSource=null, _arg6:String=null, _arg7:Boolean=false, _arg8:Boolean=false, _arg9:Boolean=false){ super(_arg1, _arg2, _arg3); this.dragInitiator = _arg4; this.dragSource = _arg5; this.action = _arg6; this.ctrlKey = _arg7; this.altKey = _arg8; this.shiftKey = _arg9; } override public function clone():Event{ var _local1:DragEvent = new DragEvent(type, bubbles, cancelable, dragInitiator, dragSource, action, ctrlKey, altKey, shiftKey); _local1.relatedObject = this.relatedObject; _local1.localX = this.localX; _local1.localY = this.localY; return (_local1); } } }//package mx.events
Section 249
//DynamicEvent (mx.events.DynamicEvent) package mx.events { import flash.events.*; public dynamic class DynamicEvent extends Event { mx_internal static const VERSION:String = "3.0.0.0"; public function DynamicEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } override public function clone():Event{ var _local2:String; var _local1:DynamicEvent = new DynamicEvent(type, bubbles, cancelable); for (_local2 in this) { _local1[_local2] = this[_local2]; }; return (_local1); } } }//package mx.events
Section 250
//EffectEvent (mx.events.EffectEvent) package mx.events { import flash.events.*; import mx.effects.*; public class EffectEvent extends Event { public var effectInstance:IEffectInstance; public static const EFFECT_START:String = "effectStart"; mx_internal static const VERSION:String = "3.0.0.0"; public static const EFFECT_END:String = "effectEnd"; public function EffectEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:IEffectInstance=null){ super(_arg1, _arg2, _arg3); this.effectInstance = _arg4; } override public function clone():Event{ return (new EffectEvent(type, bubbles, cancelable, effectInstance)); } } }//package mx.events
Section 251
//FlexEvent (mx.events.FlexEvent) package mx.events { import mx.core.*; import flash.events.*; public class FlexEvent extends Event { public static const ADD:String = "add"; public static const TRANSFORM_CHANGE:String = "transformChange"; public static const INIT_COMPLETE:String = "initComplete"; public static const REMOVE:String = "remove"; public static const BUTTON_DOWN:String = "buttonDown"; public static const EXIT_STATE:String = "exitState"; public static const CREATION_COMPLETE:String = "creationComplete"; public static const REPEAT:String = "repeat"; public static const LOADING:String = "loading"; public static const REPEAT_START:String = "repeatStart"; public static const INITIALIZE:String = "initialize"; public static const ENTER_STATE:String = "enterState"; public static const URL_CHANGED:String = "urlChanged"; public static const REPEAT_END:String = "repeatEnd"; mx_internal static const VERSION:String = "3.0.0.0"; public static const HIDE:String = "hide"; public static const ENTER:String = "enter"; public static const PRELOADER_DONE:String = "preloaderDone"; public static const CURSOR_UPDATE:String = "cursorUpdate"; public static const PREINITIALIZE:String = "preinitialize"; public static const INVALID:String = "invalid"; public static const IDLE:String = "idle"; public static const VALID:String = "valid"; public static const DATA_CHANGE:String = "dataChange"; public static const APPLICATION_COMPLETE:String = "applicationComplete"; public static const VALUE_COMMIT:String = "valueCommit"; public static const UPDATE_COMPLETE:String = "updateComplete"; public static const INIT_PROGRESS:String = "initProgress"; public static const SHOW:String = "show"; public function FlexEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } override public function clone():Event{ return (new FlexEvent(type, bubbles, cancelable)); } } }//package mx.events
Section 252
//FlexMouseEvent (mx.events.FlexMouseEvent) package mx.events { import flash.display.*; import flash.events.*; public class FlexMouseEvent extends MouseEvent { public static const MOUSE_DOWN_OUTSIDE:String = "mouseDownOutside"; public static const MOUSE_WHEEL_OUTSIDE:String = "mouseWheelOutside"; mx_internal static const VERSION:String = "3.0.0.0"; public function FlexMouseEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Number=0, _arg5:Number=0, _arg6:InteractiveObject=null, _arg7:Boolean=false, _arg8:Boolean=false, _arg9:Boolean=false, _arg10:Boolean=false, _arg11:int=0){ super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11); } override public function clone():Event{ return (new FlexMouseEvent(type, bubbles, cancelable, localX, localY, relatedObject, ctrlKey, altKey, shiftKey, buttonDown, delta)); } } }//package mx.events
Section 253
//IndexChangedEvent (mx.events.IndexChangedEvent) package mx.events { import flash.display.*; import flash.events.*; public class IndexChangedEvent extends Event { public var newIndex:Number; public var triggerEvent:Event; public var relatedObject:DisplayObject; public var oldIndex:Number; public static const HEADER_SHIFT:String = "headerShift"; public static const CHANGE:String = "change"; mx_internal static const VERSION:String = "3.0.0.0"; public static const CHILD_INDEX_CHANGE:String = "childIndexChange"; public function IndexChangedEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:DisplayObject=null, _arg5:Number=-1, _arg6:Number=-1, _arg7:Event=null){ super(_arg1, _arg2, _arg3); this.relatedObject = _arg4; this.oldIndex = _arg5; this.newIndex = _arg6; this.triggerEvent = _arg7; } override public function clone():Event{ return (new IndexChangedEvent(type, bubbles, cancelable, relatedObject, oldIndex, newIndex, triggerEvent)); } } }//package mx.events
Section 254
//ModuleEvent (mx.events.ModuleEvent) package mx.events { import mx.core.*; import flash.events.*; import mx.modules.*; public class ModuleEvent extends ProgressEvent { public var errorText:String; private var _module:IModuleInfo; public static const READY:String = "ready"; public static const ERROR:String = "error"; public static const PROGRESS:String = "progress"; mx_internal static const VERSION:String = "3.0.0.0"; public static const SETUP:String = "setup"; public static const UNLOAD:String = "unload"; public function ModuleEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null, _arg7:IModuleInfo=null){ super(_arg1, _arg2, _arg3, _arg4, _arg5); this.errorText = _arg6; this._module = _arg7; } public function get module():IModuleInfo{ if (_module){ return (_module); }; return ((target as IModuleInfo)); } override public function clone():Event{ return (new ModuleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText, module)); } } }//package mx.events
Section 255
//MoveEvent (mx.events.MoveEvent) package mx.events { import flash.events.*; public class MoveEvent extends Event { public var oldX:Number; public var oldY:Number; mx_internal static const VERSION:String = "3.0.0.0"; public static const MOVE:String = "move"; public function MoveEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Number=NaN, _arg5:Number=NaN){ super(_arg1, _arg2, _arg3); this.oldX = _arg4; this.oldY = _arg5; } override public function clone():Event{ return (new MoveEvent(type, bubbles, cancelable, oldX, oldY)); } } }//package mx.events
Section 256
//PropertyChangeEvent (mx.events.PropertyChangeEvent) package mx.events { import flash.events.*; public class PropertyChangeEvent extends Event { public var newValue:Object; public var kind:String; public var property:Object; public var oldValue:Object; public var source:Object; mx_internal static const VERSION:String = "3.0.0.0"; public static const PROPERTY_CHANGE:String = "propertyChange"; public function PropertyChangeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:Object=null){ super(_arg1, _arg2, _arg3); this.kind = _arg4; this.property = _arg5; this.oldValue = _arg6; this.newValue = _arg7; this.source = _arg8; } override public function clone():Event{ return (new PropertyChangeEvent(type, bubbles, cancelable, kind, property, oldValue, newValue, source)); } public static function createUpdateEvent(_arg1:Object, _arg2:Object, _arg3:Object, _arg4:Object):PropertyChangeEvent{ var _local5:PropertyChangeEvent = new PropertyChangeEvent(PROPERTY_CHANGE); _local5.kind = PropertyChangeEventKind.UPDATE; _local5.oldValue = _arg3; _local5.newValue = _arg4; _local5.source = _arg1; _local5.property = _arg2; return (_local5); } } }//package mx.events
Section 257
//PropertyChangeEventKind (mx.events.PropertyChangeEventKind) package mx.events { public final class PropertyChangeEventKind { mx_internal static const VERSION:String = "3.0.0.0"; public static const UPDATE:String = "update"; public static const DELETE:String = "delete"; } }//package mx.events
Section 258
//ResizeEvent (mx.events.ResizeEvent) package mx.events { import flash.events.*; public class ResizeEvent extends Event { public var oldHeight:Number; public var oldWidth:Number; mx_internal static const VERSION:String = "3.0.0.0"; public static const RESIZE:String = "resize"; public function ResizeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Number=NaN, _arg5:Number=NaN){ super(_arg1, _arg2, _arg3); this.oldWidth = _arg4; this.oldHeight = _arg5; } override public function clone():Event{ return (new ResizeEvent(type, bubbles, cancelable, oldWidth, oldHeight)); } } }//package mx.events
Section 259
//ResourceEvent (mx.events.ResourceEvent) package mx.events { import mx.core.*; import flash.events.*; public class ResourceEvent extends ProgressEvent { public var errorText:String; mx_internal static const VERSION:String = "3.0.0.0"; public static const COMPLETE:String = "complete"; public static const PROGRESS:String = "progress"; public static const ERROR:String = "error"; public function ResourceEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null){ super(_arg1, _arg2, _arg3, _arg4, _arg5); this.errorText = _arg6; } override public function clone():Event{ return (new ResourceEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText)); } } }//package mx.events
Section 260
//RSLEvent (mx.events.RSLEvent) package mx.events { import mx.core.*; import flash.events.*; import flash.net.*; public class RSLEvent extends ProgressEvent { public var errorText:String; public var rslIndex:int; public var rslTotal:int; public var url:URLRequest; public static const RSL_PROGRESS:String = "rslProgress"; public static const RSL_ERROR:String = "rslError"; mx_internal static const VERSION:String = "3.0.0.0"; public static const RSL_COMPLETE:String = "rslComplete"; public function RSLEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:int=-1, _arg5:int=-1, _arg6:int=-1, _arg7:int=-1, _arg8:URLRequest=null, _arg9:String=null){ super(_arg1, _arg2, _arg3, _arg4, _arg5); this.rslIndex = _arg6; this.rslTotal = _arg7; this.url = _arg8; this.errorText = _arg9; } override public function clone():Event{ return (new RSLEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, rslIndex, rslTotal, url, errorText)); } } }//package mx.events
Section 261
//ScrollEvent (mx.events.ScrollEvent) package mx.events { import flash.events.*; public class ScrollEvent extends Event { public var detail:String; public var delta:Number; public var position:Number; public var direction:String; mx_internal static const VERSION:String = "3.0.0.0"; public static const SCROLL:String = "scroll"; public function ScrollEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:Number=NaN, _arg6:String=null, _arg7:Number=NaN){ super(_arg1, _arg2, _arg3); this.detail = _arg4; this.position = _arg5; this.direction = _arg6; this.delta = _arg7; } override public function clone():Event{ return (new ScrollEvent(type, bubbles, cancelable, detail, position, direction, delta)); } } }//package mx.events
Section 262
//ScrollEventDetail (mx.events.ScrollEventDetail) package mx.events { public final class ScrollEventDetail { public static const LINE_UP:String = "lineUp"; public static const AT_RIGHT:String = "atRight"; public static const PAGE_UP:String = "pageUp"; public static const LINE_DOWN:String = "lineDown"; public static const PAGE_DOWN:String = "pageDown"; public static const AT_LEFT:String = "atLeft"; public static const PAGE_RIGHT:String = "pageRight"; public static const THUMB_POSITION:String = "thumbPosition"; public static const AT_TOP:String = "atTop"; public static const LINE_LEFT:String = "lineLeft"; public static const AT_BOTTOM:String = "atBottom"; public static const LINE_RIGHT:String = "lineRight"; public static const THUMB_TRACK:String = "thumbTrack"; public static const PAGE_LEFT:String = "pageLeft"; mx_internal static const VERSION:String = "3.0.0.0"; } }//package mx.events
Section 263
//ScrollEventDirection (mx.events.ScrollEventDirection) package mx.events { public final class ScrollEventDirection { public static const HORIZONTAL:String = "horizontal"; public static const VERTICAL:String = "vertical"; mx_internal static const VERSION:String = "3.0.0.0"; } }//package mx.events
Section 264
//SliderEvent (mx.events.SliderEvent) package mx.events { import flash.events.*; public class SliderEvent extends Event { public var value:Number; public var triggerEvent:Event; public var clickTarget:String; public var thumbIndex:int; public var keyCode:int; public static const THUMB_PRESS:String = "thumbPress"; public static const CHANGE:String = "change"; mx_internal static const VERSION:String = "3.0.0.0"; public static const THUMB_DRAG:String = "thumbDrag"; public static const THUMB_RELEASE:String = "thumbRelease"; public function SliderEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:int=-1, _arg5:Number=NaN, _arg6:Event=null, _arg7:String=null, _arg8:int=-1){ super(_arg1, _arg2, _arg3); this.thumbIndex = _arg4; this.value = _arg5; this.triggerEvent = _arg6; this.clickTarget = _arg7; this.keyCode = _arg8; } override public function clone():Event{ return (new SliderEvent(type, bubbles, cancelable, thumbIndex, value, triggerEvent, clickTarget, keyCode)); } } }//package mx.events
Section 265
//SliderEventClickTarget (mx.events.SliderEventClickTarget) package mx.events { public final class SliderEventClickTarget { public static const THUMB:String = "thumb"; mx_internal static const VERSION:String = "3.0.0.0"; public static const TRACK:String = "track"; } }//package mx.events
Section 266
//StateChangeEvent (mx.events.StateChangeEvent) package mx.events { import flash.events.*; public class StateChangeEvent extends Event { public var newState:String; public var oldState:String; public static const CURRENT_STATE_CHANGING:String = "currentStateChanging"; public static const CURRENT_STATE_CHANGE:String = "currentStateChange"; mx_internal static const VERSION:String = "3.0.0.0"; public function StateChangeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:String=null){ super(_arg1, _arg2, _arg3); this.oldState = _arg4; this.newState = _arg5; } override public function clone():Event{ return (new StateChangeEvent(type, bubbles, cancelable, oldState, newState)); } } }//package mx.events
Section 267
//StyleEvent (mx.events.StyleEvent) package mx.events { import mx.core.*; import flash.events.*; public class StyleEvent extends ProgressEvent { public var errorText:String; mx_internal static const VERSION:String = "3.0.0.0"; public static const COMPLETE:String = "complete"; public static const PROGRESS:String = "progress"; public static const ERROR:String = "error"; public function StyleEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null){ super(_arg1, _arg2, _arg3, _arg4, _arg5); this.errorText = _arg6; } override public function clone():Event{ return (new StyleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText)); } } }//package mx.events
Section 268
//ToolTipEvent (mx.events.ToolTipEvent) package mx.events { import mx.core.*; import flash.events.*; public class ToolTipEvent extends Event { public var toolTip:IToolTip; public static const TOOL_TIP_SHOWN:String = "toolTipShown"; public static const TOOL_TIP_CREATE:String = "toolTipCreate"; public static const TOOL_TIP_SHOW:String = "toolTipShow"; public static const TOOL_TIP_HIDE:String = "toolTipHide"; public static const TOOL_TIP_END:String = "toolTipEnd"; mx_internal static const VERSION:String = "3.0.0.0"; public static const TOOL_TIP_START:String = "toolTipStart"; public function ToolTipEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:IToolTip=null){ super(_arg1, _arg2, _arg3); this.toolTip = _arg4; } override public function clone():Event{ return (new ToolTipEvent(type, bubbles, cancelable, toolTip)); } } }//package mx.events
Section 269
//TweenEvent (mx.events.TweenEvent) package mx.events { import flash.events.*; public class TweenEvent extends Event { public var value:Object; public static const TWEEN_END:String = "tweenEnd"; mx_internal static const VERSION:String = "3.0.0.0"; public static const TWEEN_UPDATE:String = "tweenUpdate"; public static const TWEEN_START:String = "tweenStart"; public function TweenEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Object=null){ super(_arg1, _arg2, _arg3); this.value = _arg4; } override public function clone():Event{ return (new TweenEvent(type, bubbles, cancelable, value)); } } }//package mx.events
Section 270
//ValidationResultEvent (mx.events.ValidationResultEvent) package mx.events { import flash.events.*; public class ValidationResultEvent extends Event { public var results:Array; public var field:String; public static const INVALID:String = "invalid"; mx_internal static const VERSION:String = "3.0.0.0"; public static const VALID:String = "valid"; public function ValidationResultEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:Array=null){ super(_arg1, _arg2, _arg3); this.field = _arg4; this.results = _arg5; } public function get message():String{ var _local1 = ""; var _local2:int = results.length; var _local3:int; while (_local3 < _local2) { if (results[_local3].isError){ _local1 = (_local1 + ((_local1 == "")) ? "" : "\n"); _local1 = (_local1 + results[_local3].errorMessage); }; _local3++; }; return (_local1); } override public function clone():Event{ return (new ValidationResultEvent(type, bubbles, cancelable, field, results)); } } }//package mx.events
Section 271
//Formatter (mx.formatters.Formatter) package mx.formatters { import flash.events.*; import mx.resources.*; public class Formatter { private var _resourceManager:IResourceManager; public var error:String; mx_internal static const VERSION:String = "3.0.0.0"; private static var defaultInvalidFormatErrorOverride:String; private static var _defaultInvalidValueError:String; private static var _static_resourceManager:IResourceManager; private static var initialized:Boolean = false; private static var defaultInvalidValueErrorOverride:String; private static var _defaultInvalidFormatError:String; public function Formatter(){ _resourceManager = ResourceManager.getInstance(); super(); resourceManager.addEventListener(Event.CHANGE, resourceManager_changeHandler, false, 0, true); resourcesChanged(); } protected function resourcesChanged():void{ } private function resourceManager_changeHandler(_arg1:Event):void{ resourcesChanged(); } public function format(_arg1:Object):String{ error = ("This format function is abstract. " + "Subclasses must override it."); return (""); } protected function get resourceManager():IResourceManager{ return (_resourceManager); } private static function static_resourcesChanged():void{ defaultInvalidFormatError = defaultInvalidFormatErrorOverride; defaultInvalidValueError = defaultInvalidValueErrorOverride; } public static function set defaultInvalidValueError(_arg1:String):void{ defaultInvalidValueErrorOverride = _arg1; _defaultInvalidValueError = ((_arg1)!=null) ? _arg1 : static_resourceManager.getString("formatters", "defaultInvalidValueError"); } private static function static_resourceManager_changeHandler(_arg1:Event):void{ static_resourcesChanged(); } public static function get defaultInvalidValueError():String{ initialize(); return (_defaultInvalidValueError); } private static function get static_resourceManager():IResourceManager{ if (!_static_resourceManager){ _static_resourceManager = ResourceManager.getInstance(); }; return (_static_resourceManager); } public static function set defaultInvalidFormatError(_arg1:String):void{ defaultInvalidFormatErrorOverride = _arg1; _defaultInvalidFormatError = ((_arg1)!=null) ? _arg1 : static_resourceManager.getString("formatters", "defaultInvalidFormatError"); } private static function initialize():void{ if (!initialized){ static_resourceManager.addEventListener(Event.CHANGE, static_resourceManager_changeHandler, false, 0, true); static_resourcesChanged(); initialized = true; }; } public static function get defaultInvalidFormatError():String{ initialize(); return (_defaultInvalidFormatError); } } }//package mx.formatters
Section 272
//NumberBase (mx.formatters.NumberBase) package mx.formatters { public class NumberBase { public var thousandsSeparatorTo:String; public var decimalSeparatorTo:String; public var isValid:Boolean;// = false public var thousandsSeparatorFrom:String; public var decimalSeparatorFrom:String; mx_internal static const VERSION:String = "3.0.0.0"; public function NumberBase(_arg1:String=".", _arg2:String=",", _arg3:String=".", _arg4:String=","){ this.decimalSeparatorFrom = _arg1; this.thousandsSeparatorFrom = _arg2; this.decimalSeparatorTo = _arg3; this.thousandsSeparatorTo = _arg4; isValid = true; } public function formatThousands(_arg1:String):String{ var _local7:int; var _local8:int; var _local9:int; var _local10:Array; var _local11:int; var _local2:Number = Number(_arg1); var _local3 = (_local2 < 0); var _local4:String = Math.abs(_local2).toString(); var _local5:Array = Math.abs(_local2).toString().split(((_local4.indexOf(decimalSeparatorTo))!=-1) ? decimalSeparatorTo : "."); var _local6:int = String(_local5[0]).length; if (_local6 > 3){ _local7 = int(Math.floor((_local6 / 3))); if ((_local6 % 3) == 0){ _local7--; }; _local8 = _local6; _local9 = (_local8 - 3); _local10 = []; _local11 = 0; while (_local11 <= _local7) { _local10[_local11] = _local5[0].slice(_local9, _local8); _local9 = int(Math.max((_local9 - 3), 0)); _local8 = int(Math.max((_local8 - 3), 1)); _local11++; }; _local10.reverse(); _local5[0] = _local10.join(thousandsSeparatorTo); }; _local4 = _local5.join(decimalSeparatorTo); if (_local3){ _local4 = ("-" + _local4); }; return (_local4.toString()); } public function formatDecimal(_arg1:String):String{ var _local2:Array = _arg1.split("."); return (_local2.join(decimalSeparatorTo)); } public function parseNumberString(_arg1:String):String{ var _local5:String; var _local6:String; var _local8:String; var _local9:int; var _local2:Array = _arg1.split(decimalSeparatorFrom); if (_local2.length > 2){ return (null); }; var _local3:int = _arg1.length; var _local4:int; var _local7:Boolean; while (_local4 < _local3) { _local5 = _arg1.charAt(_local4); _local4++; if (((((("0" <= _local5)) && ((_local5 <= "9")))) || ((_local5 == decimalSeparatorFrom)))){ _local8 = _arg1.charAt((_local4 - 2)); if (_local8 == "-"){ _local7 = true; }; _local6 = ""; --_local4; _local9 = _local4; while (_local9 < _local3) { _local5 = _arg1.charAt(_local4); _local4++; if (((("0" <= _local5)) && ((_local5 <= "9")))){ _local6 = (_local6 + _local5); } else { if (_local5 == decimalSeparatorFrom){ _local6 = (_local6 + "."); } else { if (((!((_local5 == thousandsSeparatorFrom))) || ((_local4 >= _local3)))){ break; }; }; }; _local9++; }; }; }; return ((_local7) ? ("-" + _local6) : _local6); } public function formatPrecision(_arg1:String, _arg2:int):String{ var _local4:String; var _local5:String; if (_arg2 == -1){ return (_arg1); }; var _local3:Array = _arg1.split(decimalSeparatorTo); _local3[0] = ((_local3[0].length == 0)) ? "0" : _local3[0]; if (_arg2 > 0){ _local4 = (_local3[1]) ? String(_local3[1]) : ""; _local5 = (_local4 + "000000000000000000000000000000000"); _arg1 = ((_local3[0] + decimalSeparatorTo) + _local5.substr(0, _arg2)); } else { _arg1 = String(_local3[0]); }; return (_arg1.toString()); } public function formatRounding(_arg1:String, _arg2:String):String{ var _local3:Number = Number(_arg1); if (_arg2 != NumberBaseRoundType.NONE){ if (_arg2 == NumberBaseRoundType.UP){ _local3 = Math.ceil(_local3); } else { if (_arg2 == NumberBaseRoundType.DOWN){ _local3 = Math.floor(_local3); } else { if (_arg2 == NumberBaseRoundType.NEAREST){ _local3 = Math.round(_local3); } else { isValid = false; return (""); }; }; }; }; return (_local3.toString()); } public function formatNegative(_arg1:String, _arg2:Boolean):String{ if (_arg2){ if (_arg1.charAt(0) != "-"){ _arg1 = ("-" + _arg1); }; } else { if (!_arg2){ if (_arg1.charAt(0) == "-"){ _arg1 = _arg1.substr(1, (_arg1.length - 1)); }; _arg1 = (("(" + _arg1) + ")"); } else { isValid = false; return (""); }; }; return (_arg1); } public function formatRoundingWithPrecision(_arg1:String, _arg2:String, _arg3:int):String{ var _local4:Number = Number(_arg1); if (_arg2 == NumberBaseRoundType.NONE){ if (_arg3 == -1){ return (_local4.toString()); }; } else { if (_arg3 < 0){ _arg3 = 0; }; _local4 = (_local4 * Math.pow(10, _arg3)); _local4 = Number(_local4.toString()); if (_arg2 == NumberBaseRoundType.UP){ _local4 = Math.ceil(_local4); } else { if (_arg2 == NumberBaseRoundType.DOWN){ _local4 = Math.floor(_local4); } else { if (_arg2 == NumberBaseRoundType.NEAREST){ _local4 = Math.round(_local4); } else { isValid = false; return (""); }; }; }; _local4 = (_local4 / Math.pow(10, _arg3)); }; return (_local4.toString()); } } }//package mx.formatters
Section 273
//NumberBaseRoundType (mx.formatters.NumberBaseRoundType) package mx.formatters { public final class NumberBaseRoundType { public static const DOWN:String = "down"; mx_internal static const VERSION:String = "3.0.0.0"; public static const UP:String = "up"; public static const NEAREST:String = "nearest"; public static const NONE:String = "none"; } }//package mx.formatters
Section 274
//NumberFormatter (mx.formatters.NumberFormatter) package mx.formatters { public class NumberFormatter extends Formatter { private var roundingOverride:String; private var thousandsSeparatorFromOverride:String; private var _useNegativeSign:Object; private var decimalSeparatorFromOverride:String; private var _decimalSeparatorTo:String; private var useThousandsSeparatorOverride:Object; private var _thousandsSeparatorTo:String; private var useNegativeSignOverride:Object; private var thousandsSeparatorToOverride:String; private var decimalSeparatorToOverride:String; private var precisionOverride:Object; private var _rounding:String; private var _useThousandsSeparator:Object; private var _thousandsSeparatorFrom:String; private var _decimalSeparatorFrom:String; private var _precision:Object; mx_internal static const VERSION:String = "3.0.0.0"; public function set precision(_arg1:Object):void{ precisionOverride = _arg1; _precision = ((_arg1)!=null) ? int(_arg1) : resourceManager.getInt("formatters", "numberFormatterPrecision"); } public function get useNegativeSign():Object{ return (_useNegativeSign); } override protected function resourcesChanged():void{ super.resourcesChanged(); decimalSeparatorFrom = decimalSeparatorFromOverride; decimalSeparatorTo = decimalSeparatorToOverride; precision = precisionOverride; rounding = roundingOverride; thousandsSeparatorFrom = thousandsSeparatorFromOverride; thousandsSeparatorTo = thousandsSeparatorToOverride; useNegativeSign = useNegativeSignOverride; useThousandsSeparator = useThousandsSeparatorOverride; } public function get rounding():String{ return (_rounding); } public function set thousandsSeparatorTo(_arg1:String):void{ thousandsSeparatorToOverride = _arg1; _thousandsSeparatorTo = ((_arg1)!=null) ? _arg1 : resourceManager.getString("SharedResources", "thousandsSeparatorTo"); } public function get thousandsSeparatorFrom():String{ return (_thousandsSeparatorFrom); } public function set decimalSeparatorTo(_arg1:String):void{ decimalSeparatorToOverride = _arg1; _decimalSeparatorTo = ((_arg1)!=null) ? _arg1 : resourceManager.getString("SharedResources", "decimalSeparatorTo"); } public function set useNegativeSign(_arg1:Object):void{ useNegativeSignOverride = _arg1; _useNegativeSign = ((_arg1)!=null) ? Boolean(_arg1) : resourceManager.getBoolean("formatters", "useNegativeSign"); } override public function format(_arg1:Object):String{ var _local8:String; var _local9:Number; if (error){ error = null; }; if (((useThousandsSeparator) && ((((decimalSeparatorFrom == thousandsSeparatorFrom)) || ((decimalSeparatorTo == thousandsSeparatorTo)))))){ error = defaultInvalidFormatError; return (""); }; if ((((decimalSeparatorTo == "")) || (!(isNaN(Number(decimalSeparatorTo)))))){ error = defaultInvalidFormatError; return (""); }; var _local2:NumberBase = new NumberBase(decimalSeparatorFrom, thousandsSeparatorFrom, decimalSeparatorTo, thousandsSeparatorTo); if ((_arg1 is String)){ _arg1 = _local2.parseNumberString(String(_arg1)); }; if ((((_arg1 === null)) || (isNaN(Number(_arg1))))){ error = defaultInvalidValueError; return (""); }; var _local3 = (Number(_arg1) < 0); var _local4:String = _arg1.toString(); var _local5:Array = _local4.split("."); var _local6:int = (_local5[1]) ? String(_local5[1]).length : 0; if (precision <= _local6){ if (rounding != NumberBaseRoundType.NONE){ _local4 = _local2.formatRoundingWithPrecision(_local4, rounding, int(precision)); }; }; var _local7:Number = Number(_local4); if (Math.abs(_local7) >= 1){ _local5 = _local4.split("."); _local8 = (useThousandsSeparator) ? _local2.formatThousands(String(_local5[0])) : String(_local5[0]); if (((!((_local5[1] == null))) && (!((_local5[1] == ""))))){ _local4 = ((_local8 + decimalSeparatorTo) + _local5[1]); } else { _local4 = _local8; }; } else { if (Math.abs(_local7) > 0){ if (_local4.indexOf("e") != -1){ _local9 = (Math.abs(_local7) + 1); _local4 = _local9.toString(); }; _local4 = (decimalSeparatorTo + _local4.substring((_local4.indexOf(".") + 1))); }; }; _local4 = _local2.formatPrecision(_local4, int(precision)); if (Number(_local4) == 0){ _local3 = false; }; if (_local3){ _local4 = _local2.formatNegative(_local4, useNegativeSign); }; if (!_local2.isValid){ error = defaultInvalidFormatError; return (""); }; return (_local4); } public function get decimalSeparatorFrom():String{ return (_decimalSeparatorFrom); } public function set rounding(_arg1:String):void{ roundingOverride = _arg1; _rounding = ((_arg1)!=null) ? _arg1 : resourceManager.getString("formatters", "rounding"); } public function get thousandsSeparatorTo():String{ return (_thousandsSeparatorTo); } public function get decimalSeparatorTo():String{ return (_decimalSeparatorTo); } public function set thousandsSeparatorFrom(_arg1:String):void{ thousandsSeparatorFromOverride = _arg1; _thousandsSeparatorFrom = ((_arg1)!=null) ? _arg1 : resourceManager.getString("SharedResources", "thousandsSeparatorFrom"); } public function set useThousandsSeparator(_arg1:Object):void{ useThousandsSeparatorOverride = _arg1; _useThousandsSeparator = ((_arg1)!=null) ? Boolean(_arg1) : resourceManager.getBoolean("formatters", "useThousandsSeparator"); } public function get useThousandsSeparator():Object{ return (_useThousandsSeparator); } public function set decimalSeparatorFrom(_arg1:String):void{ decimalSeparatorFromOverride = _arg1; _decimalSeparatorFrom = ((_arg1)!=null) ? _arg1 : resourceManager.getString("SharedResources", "decimalSeparatorFrom"); } public function get precision():Object{ return (_precision); } } }//package mx.formatters
Section 275
//RectangularDropShadow (mx.graphics.RectangularDropShadow) package mx.graphics { import flash.display.*; import flash.geom.*; import mx.core.*; import mx.utils.*; import flash.filters.*; public class RectangularDropShadow { private var leftShadow:BitmapData; private var _tlRadius:Number;// = 0 private var _trRadius:Number;// = 0 private var _angle:Number;// = 45 private var topShadow:BitmapData; private var _distance:Number;// = 4 private var rightShadow:BitmapData; private var _alpha:Number;// = 0.4 private var shadow:BitmapData; private var _brRadius:Number;// = 0 private var _blRadius:Number;// = 0 private var _color:int;// = 0 private var bottomShadow:BitmapData; private var changed:Boolean;// = true mx_internal static const VERSION:String = "3.0.0.0"; public function get blRadius():Number{ return (_blRadius); } public function set brRadius(_arg1:Number):void{ if (_brRadius != _arg1){ _brRadius = _arg1; changed = true; }; } public function set color(_arg1:int):void{ if (_color != _arg1){ _color = _arg1; changed = true; }; } public function drawShadow(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):void{ var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; if (changed){ createShadowBitmaps(); changed = false; }; _arg4 = Math.ceil(_arg4); _arg5 = Math.ceil(_arg5); var _local6:int = (leftShadow) ? leftShadow.width : 0; var _local7:int = (rightShadow) ? rightShadow.width : 0; var _local8:int = (topShadow) ? topShadow.height : 0; var _local9:int = (bottomShadow) ? bottomShadow.height : 0; var _local10:int = (_local6 + _local7); var _local11:int = (_local8 + _local9); var _local12:Number = ((_arg5 + _local11) / 2); var _local13:Number = ((_arg4 + _local10) / 2); var _local14:Matrix = new Matrix(); if (((leftShadow) || (topShadow))){ _local15 = Math.min((tlRadius + _local10), _local13); _local16 = Math.min((tlRadius + _local11), _local12); _local14.tx = (_arg2 - _local6); _local14.ty = (_arg3 - _local8); _arg1.beginBitmapFill(shadow, _local14); _arg1.drawRect((_arg2 - _local6), (_arg3 - _local8), _local15, _local16); _arg1.endFill(); }; if (((rightShadow) || (topShadow))){ _local17 = Math.min((trRadius + _local10), _local13); _local18 = Math.min((trRadius + _local11), _local12); _local14.tx = (((_arg2 + _arg4) + _local7) - shadow.width); _local14.ty = (_arg3 - _local8); _arg1.beginBitmapFill(shadow, _local14); _arg1.drawRect((((_arg2 + _arg4) + _local7) - _local17), (_arg3 - _local8), _local17, _local18); _arg1.endFill(); }; if (((leftShadow) || (bottomShadow))){ _local19 = Math.min((blRadius + _local10), _local13); _local20 = Math.min((blRadius + _local11), _local12); _local14.tx = (_arg2 - _local6); _local14.ty = (((_arg3 + _arg5) + _local9) - shadow.height); _arg1.beginBitmapFill(shadow, _local14); _arg1.drawRect((_arg2 - _local6), (((_arg3 + _arg5) + _local9) - _local20), _local19, _local20); _arg1.endFill(); }; if (((rightShadow) || (bottomShadow))){ _local21 = Math.min((brRadius + _local10), _local13); _local22 = Math.min((brRadius + _local11), _local12); _local14.tx = (((_arg2 + _arg4) + _local7) - shadow.width); _local14.ty = (((_arg3 + _arg5) + _local9) - shadow.height); _arg1.beginBitmapFill(shadow, _local14); _arg1.drawRect((((_arg2 + _arg4) + _local7) - _local21), (((_arg3 + _arg5) + _local9) - _local22), _local21, _local22); _arg1.endFill(); }; if (leftShadow){ _local14.tx = (_arg2 - _local6); _local14.ty = 0; _arg1.beginBitmapFill(leftShadow, _local14); _arg1.drawRect((_arg2 - _local6), ((_arg3 - _local8) + _local16), _local6, ((((_arg5 + _local8) + _local9) - _local16) - _local20)); _arg1.endFill(); }; if (rightShadow){ _local14.tx = (_arg2 + _arg4); _local14.ty = 0; _arg1.beginBitmapFill(rightShadow, _local14); _arg1.drawRect((_arg2 + _arg4), ((_arg3 - _local8) + _local18), _local7, ((((_arg5 + _local8) + _local9) - _local18) - _local22)); _arg1.endFill(); }; if (topShadow){ _local14.tx = 0; _local14.ty = (_arg3 - _local8); _arg1.beginBitmapFill(topShadow, _local14); _arg1.drawRect(((_arg2 - _local6) + _local15), (_arg3 - _local8), ((((_arg4 + _local6) + _local7) - _local15) - _local17), _local8); _arg1.endFill(); }; if (bottomShadow){ _local14.tx = 0; _local14.ty = (_arg3 + _arg5); _arg1.beginBitmapFill(bottomShadow, _local14); _arg1.drawRect(((_arg2 - _local6) + _local19), (_arg3 + _arg5), ((((_arg4 + _local6) + _local7) - _local19) - _local21), _local9); _arg1.endFill(); }; } public function get brRadius():Number{ return (_brRadius); } public function get angle():Number{ return (_angle); } private function createShadowBitmaps():void{ var _local1:Number = ((Math.max(tlRadius, blRadius) + (2 * distance)) + Math.max(trRadius, brRadius)); var _local2:Number = ((Math.max(tlRadius, trRadius) + (2 * distance)) + Math.max(blRadius, brRadius)); if ((((_local1 < 0)) || ((_local2 < 0)))){ return; }; var _local3:Shape = new FlexShape(); var _local4:Graphics = _local3.graphics; _local4.beginFill(0xFFFFFF); GraphicsUtil.drawRoundRectComplex(_local4, 0, 0, _local1, _local2, tlRadius, trRadius, blRadius, brRadius); _local4.endFill(); var _local5:BitmapData = new BitmapData(_local1, _local2, true, 0); _local5.draw(_local3, new Matrix()); var _local6:DropShadowFilter = new DropShadowFilter(distance, angle, color, alpha); _local6.knockout = true; var _local7:Rectangle = new Rectangle(0, 0, _local1, _local2); var _local8:Rectangle = _local5.generateFilterRect(_local7, _local6); var _local9:Number = (_local7.left - _local8.left); var _local10:Number = (_local8.right - _local7.right); var _local11:Number = (_local7.top - _local8.top); var _local12:Number = (_local8.bottom - _local7.bottom); shadow = new BitmapData(_local8.width, _local8.height); shadow.applyFilter(_local5, _local7, new Point(_local9, _local11), _local6); var _local13:Point = new Point(0, 0); var _local14:Rectangle = new Rectangle(); if (_local9 > 0){ _local14.x = 0; _local14.y = ((tlRadius + _local11) + _local12); _local14.width = _local9; _local14.height = 1; leftShadow = new BitmapData(_local9, 1); leftShadow.copyPixels(shadow, _local14, _local13); } else { leftShadow = null; }; if (_local10 > 0){ _local14.x = (shadow.width - _local10); _local14.y = ((trRadius + _local11) + _local12); _local14.width = _local10; _local14.height = 1; rightShadow = new BitmapData(_local10, 1); rightShadow.copyPixels(shadow, _local14, _local13); } else { rightShadow = null; }; if (_local11 > 0){ _local14.x = ((tlRadius + _local9) + _local10); _local14.y = 0; _local14.width = 1; _local14.height = _local11; topShadow = new BitmapData(1, _local11); topShadow.copyPixels(shadow, _local14, _local13); } else { topShadow = null; }; if (_local12 > 0){ _local14.x = ((blRadius + _local9) + _local10); _local14.y = (shadow.height - _local12); _local14.width = 1; _local14.height = _local12; bottomShadow = new BitmapData(1, _local12); bottomShadow.copyPixels(shadow, _local14, _local13); } else { bottomShadow = null; }; } public function get alpha():Number{ return (_alpha); } public function get color():int{ return (_color); } public function set angle(_arg1:Number):void{ if (_angle != _arg1){ _angle = _arg1; changed = true; }; } public function set trRadius(_arg1:Number):void{ if (_trRadius != _arg1){ _trRadius = _arg1; changed = true; }; } public function set tlRadius(_arg1:Number):void{ if (_tlRadius != _arg1){ _tlRadius = _arg1; changed = true; }; } public function get trRadius():Number{ return (_trRadius); } public function set distance(_arg1:Number):void{ if (_distance != _arg1){ _distance = _arg1; changed = true; }; } public function get distance():Number{ return (_distance); } public function get tlRadius():Number{ return (_tlRadius); } public function set alpha(_arg1:Number):void{ if (_alpha != _arg1){ _alpha = _arg1; changed = true; }; } public function set blRadius(_arg1:Number):void{ if (_blRadius != _arg1){ _blRadius = _arg1; changed = true; }; } } }//package mx.graphics
Section 276
//RoundedRectangle (mx.graphics.RoundedRectangle) package mx.graphics { import flash.geom.*; import mx.core.*; public class RoundedRectangle extends Rectangle { public var cornerRadius:Number;// = 0 mx_internal static const VERSION:String = "3.0.0.0"; public function RoundedRectangle(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0){ super(_arg1, _arg2, _arg3, _arg4); this.cornerRadius = _arg5; } } }//package mx.graphics
Section 277
//PriorityQueue (mx.managers.layoutClasses.PriorityQueue) package mx.managers.layoutClasses { import flash.display.*; import mx.core.*; import mx.managers.*; public class PriorityQueue { private var maxPriority:int;// = -1 private var arrayOfArrays:Array; private var minPriority:int;// = 0 mx_internal static const VERSION:String = "3.0.0.0"; public function PriorityQueue(){ arrayOfArrays = []; super(); } public function addObject(_arg1:Object, _arg2:int):void{ if (!arrayOfArrays[_arg2]){ arrayOfArrays[_arg2] = []; }; arrayOfArrays[_arg2].push(_arg1); if (maxPriority < minPriority){ minPriority = (maxPriority = _arg2); } else { if (_arg2 < minPriority){ minPriority = _arg2; }; if (_arg2 > maxPriority){ maxPriority = _arg2; }; }; } public function removeSmallest():Object{ var _local1:Object; if (minPriority <= maxPriority){ while (((!(arrayOfArrays[minPriority])) || ((arrayOfArrays[minPriority].length == 0)))) { minPriority++; if (minPriority > maxPriority){ return (null); }; }; _local1 = arrayOfArrays[minPriority].shift(); while (((!(arrayOfArrays[minPriority])) || ((arrayOfArrays[minPriority].length == 0)))) { minPriority++; if (minPriority > maxPriority){ break; }; }; }; return (_local1); } public function removeLargestChild(_arg1:ILayoutManagerClient):Object{ var _local5:int; var _local2:Object; var _local3:int = maxPriority; var _local4:int = _arg1.nestLevel; while (_local4 <= _local3) { if (((arrayOfArrays[_local3]) && ((arrayOfArrays[_local3].length > 0)))){ _local5 = 0; while (_local5 < arrayOfArrays[_local3].length) { if (contains(DisplayObject(_arg1), arrayOfArrays[_local3][_local5])){ _local2 = arrayOfArrays[_local3][_local5]; arrayOfArrays[_local3].splice(_local5, 1); return (_local2); }; _local5++; }; _local3--; } else { if (_local3 == maxPriority){ maxPriority--; }; _local3--; if (_local3 < _local4){ break; }; }; }; return (_local2); } public function isEmpty():Boolean{ return ((minPriority > maxPriority)); } public function removeLargest():Object{ var _local1:Object; if (minPriority <= maxPriority){ while (((!(arrayOfArrays[maxPriority])) || ((arrayOfArrays[maxPriority].length == 0)))) { maxPriority--; if (maxPriority < minPriority){ return (null); }; }; _local1 = arrayOfArrays[maxPriority].shift(); while (((!(arrayOfArrays[maxPriority])) || ((arrayOfArrays[maxPriority].length == 0)))) { maxPriority--; if (maxPriority < minPriority){ break; }; }; }; return (_local1); } public function removeSmallestChild(_arg1:ILayoutManagerClient):Object{ var _local4:int; var _local2:Object; var _local3:int = _arg1.nestLevel; while (_local3 <= maxPriority) { if (((arrayOfArrays[_local3]) && ((arrayOfArrays[_local3].length > 0)))){ _local4 = 0; while (_local4 < arrayOfArrays[_local3].length) { if (contains(DisplayObject(_arg1), arrayOfArrays[_local3][_local4])){ _local2 = arrayOfArrays[_local3][_local4]; arrayOfArrays[_local3].splice(_local4, 1); return (_local2); }; _local4++; }; _local3++; } else { if (_local3 == minPriority){ minPriority++; }; _local3++; if (_local3 > maxPriority){ break; }; }; }; return (_local2); } public function removeAll():void{ arrayOfArrays.splice(0); minPriority = 0; maxPriority = -1; } private function contains(_arg1:DisplayObject, _arg2:DisplayObject):Boolean{ var _local3:IChildList; if ((_arg1 is IRawChildrenContainer)){ _local3 = IRawChildrenContainer(_arg1).rawChildren; return (_local3.contains(_arg2)); }; if ((_arg1 is DisplayObjectContainer)){ return (DisplayObjectContainer(_arg1).contains(_arg2)); }; return ((_arg1 == _arg2)); } } }//package mx.managers.layoutClasses
Section 278
//CursorManager (mx.managers.CursorManager) package mx.managers { import mx.core.*; public class CursorManager { mx_internal static const VERSION:String = "3.0.0.0"; public static const NO_CURSOR:int = 0; private static var _impl:ICursorManager; private static var implClassDependency:CursorManagerImpl; public static function set currentCursorYOffset(_arg1:Number):void{ impl.currentCursorYOffset = _arg1; } mx_internal static function registerToUseBusyCursor(_arg1:Object):void{ impl.registerToUseBusyCursor(_arg1); } public static function get currentCursorID():int{ return (impl.currentCursorID); } public static function getInstance():ICursorManager{ return (impl); } public static function removeBusyCursor():void{ impl.removeBusyCursor(); } public static function setCursor(_arg1:Class, _arg2:int=2, _arg3:Number=0, _arg4:Number=0):int{ return (impl.setCursor(_arg1, _arg2, _arg3, _arg4)); } public static function set currentCursorID(_arg1:int):void{ impl.currentCursorID = _arg1; } mx_internal static function unRegisterToUseBusyCursor(_arg1:Object):void{ impl.unRegisterToUseBusyCursor(_arg1); } private static function get impl():ICursorManager{ if (!_impl){ _impl = ICursorManager(Singleton.getInstance("mx.managers::ICursorManager")); }; return (_impl); } public static function removeAllCursors():void{ impl.removeAllCursors(); } public static function setBusyCursor():void{ impl.setBusyCursor(); } public static function showCursor():void{ impl.showCursor(); } public static function hideCursor():void{ impl.hideCursor(); } public static function removeCursor(_arg1:int):void{ impl.removeCursor(_arg1); } public static function get currentCursorXOffset():Number{ return (impl.currentCursorXOffset); } public static function get currentCursorYOffset():Number{ return (impl.currentCursorYOffset); } public static function set currentCursorXOffset(_arg1:Number):void{ impl.currentCursorXOffset = _arg1; } } }//package mx.managers
Section 279
//CursorManagerImpl (mx.managers.CursorManagerImpl) package mx.managers { import flash.display.*; import flash.text.*; import mx.core.*; import flash.events.*; import mx.styles.*; import flash.ui.*; public class CursorManagerImpl implements ICursorManager { private var showSystemCursor:Boolean;// = false private var nextCursorID:int;// = 1 private var systemManager:ISystemManager;// = null private var cursorList:Array; private var _currentCursorYOffset:Number;// = 0 private var cursorHolder:Sprite; private var currentCursor:DisplayObject; private var _currentCursorID:int;// = 0 private var listenForContextMenu:Boolean;// = false private var showCustomCursor:Boolean;// = false private var initialized:Boolean;// = false private var overTextField:Boolean;// = false private var _currentCursorXOffset:Number;// = 0 private var busyCursorList:Array; private var overLink:Boolean;// = false private var sourceArray:Array; mx_internal static const VERSION:String = "3.0.0.0"; private static var instance:ICursorManager; public function CursorManagerImpl(_arg1:ISystemManager=null){ cursorList = []; busyCursorList = []; sourceArray = []; super(); if (((instance) && (!(_arg1)))){ throw (new Error("Instance already exists.")); }; if (_arg1){ this.systemManager = _arg1; } else { this.systemManager = ApplicationGlobals.application.systemManager; }; } public function set currentCursorYOffset(_arg1:Number):void{ _currentCursorYOffset = _arg1; } public function get currentCursorXOffset():Number{ return (_currentCursorXOffset); } public function removeCursor(_arg1:int):void{ var _local2:Object; var _local3:CursorQueueItem; for (_local2 in cursorList) { _local3 = cursorList[_local2]; if (_local3.cursorID == _arg1){ cursorList.splice(_local2, 1); showCurrentCursor(); break; }; }; } public function get currentCursorID():int{ return (_currentCursorID); } public function set currentCursorID(_arg1:int):void{ _currentCursorID = _arg1; } public function removeAllCursors():void{ cursorList.splice(0); showCurrentCursor(); } private function priorityCompare(_arg1:CursorQueueItem, _arg2:CursorQueueItem):int{ if (_arg1.priority < _arg2.priority){ return (-1); }; if (_arg1.priority == _arg2.priority){ return (0); }; return (1); } public function setBusyCursor():void{ var _local1:CSSStyleDeclaration = StyleManager.getStyleDeclaration("CursorManager"); var _local2:Class = _local1.getStyle("busyCursor"); busyCursorList.push(setCursor(_local2, CursorManagerPriority.LOW)); } public function showCursor():void{ if (cursorHolder){ cursorHolder.visible = true; }; } private function findSource(_arg1:Object):int{ var _local2:int = sourceArray.length; var _local3:int; while (_local3 < _local2) { if (sourceArray[_local3] === _arg1){ return (_local3); }; _local3++; }; return (-1); } private function showCurrentCursor():void{ var _local1:InteractiveObject; var _local2:InteractiveObject; var _local3:CursorQueueItem; var _local4:ISystemManager; if (cursorList.length > 0){ if (!initialized){ cursorHolder = new FlexSprite(); cursorHolder.name = "cursorHolder"; cursorHolder.mouseEnabled = false; initialized = true; }; _local3 = cursorList[0]; if (currentCursorID == CursorManager.NO_CURSOR){ Mouse.hide(); }; if (_local3.cursorID != currentCursorID){ if (cursorHolder.numChildren > 0){ cursorHolder.removeChildAt(0); }; currentCursor = new _local3.cursorClass(); if (currentCursor){ if ((currentCursor is InteractiveObject)){ InteractiveObject(currentCursor).mouseEnabled = false; }; _local4 = (_local3.systemManager) ? _local3.systemManager : ApplicationGlobals.application.systemManager; if (((systemManager) && (!((systemManager == _local4))))){ systemManager.cursorChildren.removeChild(cursorHolder); }; systemManager = _local4; if (!systemManager.cursorChildren.contains(cursorHolder)){ systemManager.cursorChildren.addChild(cursorHolder); }; cursorHolder.addChild(currentCursor); if (!listenForContextMenu){ _local1 = (systemManager.document as InteractiveObject); if (((_local1) && (_local1.contextMenu))){ _local1.contextMenu.addEventListener(ContextMenuEvent.MENU_SELECT, contextMenu_menuSelectHandler); listenForContextMenu = true; }; _local2 = (systemManager as InteractiveObject); if (((_local2) && (_local2.contextMenu))){ _local2.contextMenu.addEventListener(ContextMenuEvent.MENU_SELECT, contextMenu_menuSelectHandler); listenForContextMenu = true; }; }; if ((systemManager is SystemManager)){ cursorHolder.x = (SystemManager(systemManager).mouseX + _local3.x); cursorHolder.y = (SystemManager(systemManager).mouseY + _local3.y); } else { if ((systemManager is DisplayObject)){ cursorHolder.x = (DisplayObject(systemManager).mouseX + _local3.x); cursorHolder.y = (DisplayObject(systemManager).mouseY + _local3.y); } else { cursorHolder.x = _local3.x; cursorHolder.y = _local3.y; }; }; systemManager.stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true, EventPriority.CURSOR_MANAGEMENT); }; currentCursorID = _local3.cursorID; currentCursorXOffset = _local3.x; currentCursorYOffset = _local3.y; }; } else { if (currentCursorID != CursorManager.NO_CURSOR){ currentCursorID = CursorManager.NO_CURSOR; currentCursorXOffset = 0; currentCursorYOffset = 0; systemManager.stage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true); cursorHolder.removeChild(currentCursor); if (listenForContextMenu){ _local1 = (systemManager.document as InteractiveObject); if (((_local1) && (_local1.contextMenu))){ _local1.contextMenu.removeEventListener(ContextMenuEvent.MENU_SELECT, contextMenu_menuSelectHandler); }; _local2 = (systemManager as InteractiveObject); if (((_local2) && (_local2.contextMenu))){ _local2.contextMenu.removeEventListener(ContextMenuEvent.MENU_SELECT, contextMenu_menuSelectHandler); }; listenForContextMenu = false; }; }; Mouse.show(); }; } public function get currentCursorYOffset():Number{ return (_currentCursorYOffset); } private function contextMenu_menuSelectHandler(_arg1:ContextMenuEvent):void{ showCustomCursor = true; systemManager.stage.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); } public function hideCursor():void{ if (cursorHolder){ cursorHolder.visible = false; }; } public function registerToUseBusyCursor(_arg1:Object):void{ if (((_arg1) && ((_arg1 is EventDispatcher)))){ _arg1.addEventListener(ProgressEvent.PROGRESS, progressHandler); _arg1.addEventListener(Event.COMPLETE, completeHandler); _arg1.addEventListener(IOErrorEvent.IO_ERROR, completeHandler); }; } private function completeHandler(_arg1:Event):void{ var _local2:int = findSource(_arg1.target); if (_local2 != -1){ sourceArray.splice(_local2, 1); removeBusyCursor(); }; } public function setCursor(_arg1:Class, _arg2:int=2, _arg3:Number=0, _arg4:Number=0):int{ var _local5:int = nextCursorID++; var _local6:CursorQueueItem = new CursorQueueItem(); _local6.cursorID = _local5; _local6.cursorClass = _arg1; _local6.priority = _arg2; _local6.x = _arg3; _local6.y = _arg4; if (systemManager){ _local6.systemManager = systemManager; } else { _local6.systemManager = ApplicationGlobals.application.systemManager; }; cursorList.push(_local6); cursorList.sort(priorityCompare); showCurrentCursor(); return (_local5); } private function progressHandler(_arg1:ProgressEvent):void{ var _local2:int = findSource(_arg1.target); if (_local2 == -1){ sourceArray.push(_arg1.target); setBusyCursor(); }; } public function removeBusyCursor():void{ if (busyCursorList.length > 0){ removeCursor(int(busyCursorList.pop())); }; } private function mouseMoveHandler(_arg1:MouseEvent):void{ if ((systemManager is SystemManager)){ cursorHolder.x = (SystemManager(systemManager).mouseX + currentCursorXOffset); cursorHolder.y = (SystemManager(systemManager).mouseY + currentCursorYOffset); } else { if ((systemManager is DisplayObject)){ cursorHolder.x = (DisplayObject(systemManager).mouseX + currentCursorXOffset); cursorHolder.y = (DisplayObject(systemManager).mouseY + currentCursorYOffset); } else { cursorHolder.x = currentCursorXOffset; cursorHolder.y = currentCursorYOffset; }; }; var _local2:Object = _arg1.target; if (((((!(overTextField)) && ((_local2 is TextField)))) && ((_local2.type == TextFieldType.INPUT)))){ overTextField = true; showSystemCursor = true; } else { if (((overTextField) && (!((((_local2 is TextField)) && ((_local2.type == TextFieldType.INPUT))))))){ overTextField = false; showCustomCursor = true; }; }; if (showSystemCursor){ showSystemCursor = false; cursorHolder.visible = false; Mouse.show(); }; if (showCustomCursor){ showCustomCursor = false; cursorHolder.visible = true; Mouse.hide(); }; } public function unRegisterToUseBusyCursor(_arg1:Object):void{ if (((_arg1) && ((_arg1 is EventDispatcher)))){ _arg1.removeEventListener(ProgressEvent.PROGRESS, progressHandler); _arg1.removeEventListener(Event.COMPLETE, completeHandler); _arg1.removeEventListener(IOErrorEvent.IO_ERROR, completeHandler); }; } private function mouseOverHandler(_arg1:MouseEvent):void{ systemManager.stage.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); mouseMoveHandler(_arg1); } public function set currentCursorXOffset(_arg1:Number):void{ _currentCursorXOffset = _arg1; } public static function getInstance():ICursorManager{ if (!instance){ instance = new (CursorManagerImpl); }; return (instance); } } }//package mx.managers class CursorQueueItem { public var priority:int;// = 2 public var cursorClass:Class;// = null public var cursorID:int;// = 0 public var x:Number; public var y:Number; public var systemManager:ISystemManager; mx_internal static const VERSION:String = "3.0.0.0"; private function CursorQueueItem(){ } }
Section 280
//CursorManagerPriority (mx.managers.CursorManagerPriority) package mx.managers { public final class CursorManagerPriority { public static const HIGH:int = 1; public static const MEDIUM:int = 2; mx_internal static const VERSION:String = "3.0.0.0"; public static const LOW:int = 3; } }//package mx.managers
Section 281
//FocusManager (mx.managers.FocusManager) package mx.managers { import flash.display.*; import flash.text.*; import mx.core.*; import flash.events.*; import mx.events.*; import flash.system.*; import flash.ui.*; public class FocusManager implements IFocusManager { private var focusableObjects:Array; private var _showFocusIndicator:Boolean;// = false private var defButton:IButton; private var _form:IFocusManagerContainer; private var focusableCandidates:Array; private var LARGE_TAB_INDEX:int;// = 99999 private var browserFocusComponent:InteractiveObject; private var activated:Boolean;// = false private var _defaultButton:IButton; private var calculateCandidates:Boolean;// = true private var _focusPane:Sprite; private var lastFocus:IFocusManagerComponent; private var _defaultButtonEnabled:Boolean;// = true public var browserMode:Boolean; private var lastAction:String; mx_internal static const VERSION:String = "3.0.0.0"; public function FocusManager(_arg1:IFocusManagerContainer, _arg2:Boolean=false){ browserMode = (((Capabilities.playerType == "ActiveX")) && (!(_arg2))); _arg1.focusManager = this; _form = _arg1; focusableObjects = []; focusPane = new FlexSprite(); focusPane.name = "focusPane"; addFocusables(DisplayObject(_arg1)); _arg1.addEventListener(Event.ADDED, addedHandler); _arg1.addEventListener(Event.REMOVED, removedHandler); _arg1.addEventListener(FlexEvent.SHOW, showHandler); _arg1.addEventListener(FlexEvent.HIDE, hideHandler); if ((_arg1.systemManager is SystemManager)){ if (_arg1 != SystemManager(_arg1.systemManager).application){ _arg1.addEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler); }; }; _arg1.systemManager.addFocusManager(_arg1); } public function deactivate():void{ form.systemManager.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler); form.systemManager.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler); form.removeEventListener(FocusEvent.FOCUS_IN, focusInHandler, true); form.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true); form.systemManager.stage.removeEventListener(Event.ACTIVATE, activateHandler); form.systemManager.stage.removeEventListener(Event.DEACTIVATE, deactivateHandler); form.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); form.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true); activated = false; } 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))){ if (((!((InteractiveObject(_local10).tabIndex == InteractiveObject(_local7).tabIndex))) && (!(_local8.selected)))){ return (getIndexOfNextObject(_arg1, _arg2, _arg3, _arg4)); }; _arg1 = _local9; break; }; }; _local9++; }; }; return (_arg1); }; }; return (_arg1); } private function mouseFocusChangeHandler(_arg1:FocusEvent):void{ var _local2:TextField; if ((_arg1.relatedObject is TextField)){ _local2 = (_arg1.relatedObject as TextField); if ((((_local2.type == "input")) || (_local2.selectable))){ return; }; }; _arg1.preventDefault(); } mx_internal function set form(_arg1:IFocusManagerContainer):void{ _form = _arg1; } private function addFocusables(_arg1:DisplayObject, _arg2:Boolean=false):void{ var focusable:IFocusManagerComponent; var doc:DisplayObjectContainer; var i:int; var rawChildren:IChildList; var o = _arg1; var skipTopLevel = _arg2; if ((((o is IFocusManagerComponent)) && (!(skipTopLevel)))){ focusable = IFocusManagerComponent(o); if (focusable.focusEnabled){ if (((focusable.tabEnabled) && (isTabVisible(o)))){ focusableObjects.push(o); calculateCandidates = true; }; o.addEventListener("tabEnabledChange", tabEnabledChangeHandler); o.addEventListener("tabIndexChange", tabIndexChangeHandler); }; }; if ((o is DisplayObjectContainer)){ doc = DisplayObjectContainer(o); o.addEventListener("tabChildrenChange", tabChildrenChangeHandler); if (doc.tabChildren){ if ((o is IRawChildrenContainer)){ rawChildren = IRawChildrenContainer(o).rawChildren; i = 0; while (i < rawChildren.numChildren) { try { addFocusables(rawChildren.getChildAt(i)); } catch(error:SecurityError) { }; i = (i + 1); }; } else { i = 0; while (i < doc.numChildren) { try { addFocusables(doc.getChildAt(i)); } catch(error:SecurityError) { }; i = (i + 1); }; }; }; }; } private function getMaxTabIndex():int{ var _local4:Number; var _local1:Number = 0; var _local2:int = focusableObjects.length; var _local3:int; while (_local3 < _local2) { _local4 = focusableObjects[_local3].tabIndex; if (!isNaN(_local4)){ _local1 = Math.max(_local1, _local4); }; _local3++; }; return (_local1); } private function showHandler(_arg1:Event):void{ form.systemManager.activate(form); } public function toString():String{ return ((Object(form).toString() + ".focusManager")); } private function mouseDownHandler(_arg1:MouseEvent):void{ if (_arg1.isDefaultPrevented()){ return; }; var _local2:DisplayObject = getTopLevelFocusTarget(InteractiveObject(_arg1.target)); if (!_local2){ return; }; showFocusIndicator = false; if (((((!((_local2 == lastFocus))) || ((lastAction == "ACTIVATE")))) && (!((_local2 is TextField))))){ setFocus(IFocusManagerComponent(_local2)); }; lastAction = "MOUSEDOWN"; } private function sortByDepth(_arg1:IFocusManagerComponent, _arg2:IFocusManagerComponent):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); } private function focusOutHandler(_arg1:FocusEvent):void{ var _local2:InteractiveObject = InteractiveObject(_arg1.target); } public function setFocus(_arg1:IFocusManagerComponent):void{ _arg1.setFocus(); } private function getChildIndex(_arg1:DisplayObjectContainer, _arg2:DisplayObject):int{ var parent = _arg1; var child = _arg2; try { return (parent.getChildIndex(child)); } catch(e:Error) { if ((parent is IRawChildrenContainer)){ return (IRawChildrenContainer(parent).rawChildren.getChildIndex(child)); }; throw (e); }; throw (new Error("FocusManager.getChildIndex failed")); } public function findFocusManagerComponent(_arg1:InteractiveObject):IFocusManagerComponent{ while (_arg1) { if ((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))){ return (IFocusManagerComponent(_arg1)); }; _arg1 = _arg1.parent; }; return (null); } private function sortFocusableObjectsTabIndex():void{ var _local3:IFocusManagerComponent; focusableCandidates = []; var _local1:int = focusableObjects.length; var _local2:int; while (_local2 < _local1) { _local3 = focusableObjects[_local2]; if (((_local3.tabIndex) && (!(isNaN(Number(_local3.tabIndex)))))){ focusableCandidates.push(_local3); }; _local2++; }; focusableCandidates.sort(sortByTabIndex); } private function removeFocusables(_arg1:DisplayObject, _arg2:Boolean):void{ var _local3:int; if ((_arg1 is DisplayObjectContainer)){ if (!_arg2){ _arg1.removeEventListener("tabChildrenChange", tabChildrenChangeHandler); }; _local3 = 0; while (_local3 < focusableObjects.length) { if (isParent(DisplayObjectContainer(_arg1), focusableObjects[_local3])){ if (focusableObjects[_local3] == lastFocus){ lastFocus.drawFocus(false); lastFocus = null; }; focusableObjects[_local3].removeEventListener("tabEnabledChange", tabEnabledChangeHandler); focusableObjects[_local3].removeEventListener("tabIndexChange", tabIndexChangeHandler); focusableObjects.splice(_local3, 1); _local3--; calculateCandidates = true; }; _local3++; }; }; } private function setFocusToNextObject(_arg1:FocusEvent):void{ if (focusableObjects.length == 0){ return; }; var _local2:IFocusManagerComponent = getNextFocusManagerComponent(_arg1.shiftKey); if (_local2){ if ((_local2 is IFocusManagerComplexComponent)){ IFocusManagerComplexComponent(_local2).assignFocus((_arg1.shiftKey) ? "bottom" : "top"); } else { setFocus(_local2); }; }; } private function getTopLevelFocusTarget(_arg1:InteractiveObject):InteractiveObject{ while (_arg1 != InteractiveObject(form)) { if ((((((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))) && (IFocusManagerComponent(_arg1).mouseFocusEnabled))) && (((_arg1 is IUIComponent)) ? IUIComponent(_arg1).enabled : true))){ return (_arg1); }; _arg1 = _arg1.parent; if (_arg1 == null){ break; }; }; return (null); } public function set defaultButton(_arg1:IButton):void{ var _local2:IButton = (_arg1) ? IButton(_arg1) : null; if (_local2 != _defaultButton){ if (_defaultButton){ _defaultButton.emphasized = false; }; if (defButton){ defButton.emphasized = false; }; _defaultButton = _local2; defButton = _local2; if (_local2){ _local2.emphasized = true; }; }; } mx_internal function sendDefaultButtonEvent():void{ defButton.dispatchEvent(new MouseEvent("click")); } public function getFocus():IFocusManagerComponent{ var _local1:InteractiveObject = form.systemManager.stage.focus; return (findFocusManagerComponent(_local1)); } private function isEnabledAndVisible(_arg1:DisplayObject):Boolean{ var _local2:DisplayObjectContainer = DisplayObject(form).parent; while (_arg1 != _local2) { if ((_arg1 is IUIComponent)){ if (!IUIComponent(_arg1).enabled){ return (false); }; }; if (!_arg1.visible){ return (false); }; _arg1 = _arg1.parent; }; return (true); } private function deactivateHandler(_arg1:Event):void{ var _local2:InteractiveObject = InteractiveObject(_arg1.target); } private function hideHandler(_arg1:Event):void{ form.systemManager.deactivate(form); } private function addedHandler(_arg1:Event):void{ var _local2:DisplayObject = DisplayObject(_arg1.target); if (_local2.stage){ addFocusables(DisplayObject(_arg1.target)); }; } public function hideFocus():void{ if (showFocusIndicator){ showFocusIndicator = false; if (lastFocus){ lastFocus.drawFocus(false); }; }; } 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, true); }; } 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); } public function set focusPane(_arg1:Sprite):void{ _focusPane = _arg1; } private function keyFocusChangeHandler(_arg1:FocusEvent):void{ showFocusIndicator = true; if ((((_arg1.keyCode == Keyboard.TAB)) && (!(_arg1.isDefaultPrevented())))){ if (browserFocusComponent){ if (browserFocusComponent.tabIndex == LARGE_TAB_INDEX){ browserFocusComponent.tabIndex = -1; }; browserFocusComponent = null; return; }; setFocusToNextObject(_arg1); _arg1.preventDefault(); }; } private function getIndexOfFocusedObject(_arg1:DisplayObject):int{ var _local4:IUIComponent; if (!_arg1){ return (-1); }; var _local2:int = focusableCandidates.length; var _local3:int; _local3 = 0; while (_local3 < _local2) { if (focusableCandidates[_local3] == _arg1){ return (_local3); }; _local3++; }; _local3 = 0; while (_local3 < _local2) { _local4 = (focusableCandidates[_local3] as IUIComponent); if (((_local4) && (_local4.owns(_arg1)))){ return (_local3); }; _local3++; }; return (-1); } private function isParent(_arg1:DisplayObjectContainer, _arg2:DisplayObject):Boolean{ if ((_arg1 is IRawChildrenContainer)){ return (IRawChildrenContainer(_arg1).rawChildren.contains(_arg2)); }; return (_arg1.contains(_arg2)); } private function removedHandler(_arg1:Event):void{ var _local2:int; var _local3:DisplayObject = DisplayObject(_arg1.target); if ((_local3 is IFocusManagerComponent)){ _local2 = 0; while (_local2 < focusableObjects.length) { if (_local3 == focusableObjects[_local2]){ if (_local3 == lastFocus){ lastFocus.drawFocus(false); lastFocus = null; }; _local3.removeEventListener("tabEnabledChange", tabEnabledChangeHandler); _local3.removeEventListener("tabIndexChange", tabIndexChangeHandler); focusableObjects.splice(_local2, 1); calculateCandidates = true; break; }; _local2++; }; }; removeFocusables(_local3, false); } mx_internal function get form():IFocusManagerContainer{ return (_form); } private function tabIndexChangeHandler(_arg1:Event):void{ calculateCandidates = true; } private function sortFocusableObjects():void{ var _local3:InteractiveObject; focusableCandidates = []; var _local1:int = focusableObjects.length; var _local2:int; while (_local2 < _local1) { _local3 = focusableObjects[_local2]; if (((((_local3.tabIndex) && (!(isNaN(Number(_local3.tabIndex)))))) && ((_local3.tabIndex > 0)))){ sortFocusableObjectsTabIndex(); return; }; focusableCandidates.push(_local3); _local2++; }; focusableCandidates.sort(sortByDepth); } public function get nextTabIndex():int{ return ((getMaxTabIndex() + 1)); } public function get defaultButton():IButton{ return (_defaultButton); } public function showFocus():void{ if (!showFocusIndicator){ showFocusIndicator = true; if (lastFocus){ lastFocus.drawFocus(true); }; }; } private function activateHandler(_arg1:Event):void{ var _local2:InteractiveObject = InteractiveObject(_arg1.target); if (((lastFocus) && (!(browserMode)))){ lastFocus.setFocus(); }; lastAction = "ACTIVATE"; } public function getNextFocusManagerComponent(_arg1:Boolean=false):IFocusManagerComponent{ var _local8:IFocusManagerGroup; if (focusableObjects.length == 0){ return (null); }; if (calculateCandidates){ sortFocusableObjects(); calculateCandidates = false; }; var _local2:DisplayObject = form.systemManager.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])); } public function get focusPane():Sprite{ return (_focusPane); } public function set defaultButtonEnabled(_arg1:Boolean):void{ _defaultButtonEnabled = _arg1; } private function keyDownHandler(_arg1:KeyboardEvent):void{ var _local3:DisplayObject; var _local4:String; var _local5:int; var _local6:int; var _local7:IFocusManagerGroup; var _local2:SystemManager = (form.systemManager as SystemManager); if (_local2){ _local2.idleCounter = 0; }; if (_arg1.keyCode == Keyboard.TAB){ lastAction = "KEY"; if (calculateCandidates){ sortFocusableObjects(); calculateCandidates = false; }; }; if (browserMode){ if ((((_arg1.keyCode == Keyboard.TAB)) && ((focusableCandidates.length > 0)))){ _local3 = form.systemManager.stage.focus; _local3 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local3))); _local4 = ""; if ((_local3 is IFocusManagerGroup)){ _local7 = IFocusManagerGroup(_local3); _local4 = _local7.groupName; }; _local5 = getIndexOfFocusedObject(_local3); _local6 = getIndexOfNextObject(_local5, _arg1.shiftKey, false, _local4); if (_arg1.shiftKey){ if (_local6 >= _local5){ browserFocusComponent = form.systemManager.stage.focus; if (browserFocusComponent.tabIndex == -1){ browserFocusComponent.tabIndex = 0; }; }; } else { if (_local6 <= _local5){ browserFocusComponent = form.systemManager.stage.focus; if (browserFocusComponent.tabIndex == -1){ browserFocusComponent.tabIndex = LARGE_TAB_INDEX; }; }; }; }; }; if (((((((defaultButtonEnabled) && ((_arg1.keyCode == Keyboard.ENTER)))) && (defaultButton))) && (defButton.enabled))){ defButton.callLater(sendDefaultButtonEvent); }; } private function focusInHandler(_arg1:FocusEvent):void{ var _local3:IButton; var _local2:InteractiveObject = InteractiveObject(_arg1.target); if (isParent(DisplayObjectContainer(form), _local2)){ lastFocus = findFocusManagerComponent(InteractiveObject(_local2)); if ((lastFocus is IButton)){ _local3 = (lastFocus as IButton); if (defButton){ defButton.emphasized = false; defButton = _local3; _local3.emphasized = true; }; } else { if (((defButton) && (!((defButton == _defaultButton))))){ defButton.emphasized = false; defButton = _defaultButton; _defaultButton.emphasized = true; }; }; }; } public function set showFocusIndicator(_arg1:Boolean):void{ _showFocusIndicator = _arg1; } private function sortByTabIndex(_arg1:IFocusManagerComponent, _arg2:IFocusManagerComponent):int{ var _local3:int = _arg1.tabIndex; var _local4:int = _arg2.tabIndex; if (_local3 == -1){ _local3 = int.MAX_VALUE; }; if (_local4 == -1){ _local4 = int.MAX_VALUE; }; return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : sortByDepth(_arg1, _arg2)); } public function activate():void{ if (activated){ return; }; form.systemManager.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true); form.systemManager.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.systemManager.stage.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true); form.systemManager.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 get defaultButtonEnabled():Boolean{ return (_defaultButtonEnabled); } private function isTabVisible(_arg1:DisplayObject):Boolean{ var _local2:DisplayObject = DisplayObject(form.systemManager); if (!_local2){ return (false); }; var _local3:DisplayObjectContainer = _arg1.parent; while (((_local3) && (!((_local3 == _local2))))) { if (!_local3.tabChildren){ return (false); }; _local3 = _local3.parent; }; return (true); } private function creationCompleteHandler(_arg1:FlexEvent):void{ if (((DisplayObject(form).visible) && (!(activated)))){ form.systemManager.activate(form); }; } public function get showFocusIndicator():Boolean{ return (_showFocusIndicator); } private function tabEnabledChangeHandler(_arg1:Event):void{ calculateCandidates = true; var _local2:InteractiveObject = InteractiveObject(_arg1.target); var _local3:int = focusableObjects.length; var _local4:int; while (_local4 < _local3) { if (focusableObjects[_local4] == _local2){ break; }; _local4++; }; if (_local2.tabEnabled){ if ((((_local4 == _local3)) && (isTabVisible(_local2)))){ focusableObjects.push(_local2); }; } else { if (_local4 < _local3){ focusableObjects.splice(_local4, 1); }; }; } } }//package mx.managers
Section 282
//ICursorManager (mx.managers.ICursorManager) package mx.managers { public interface ICursorManager { function removeAllCursors():void; function set currentCursorYOffset(_arg1:Number):void; function removeBusyCursor():void; function unRegisterToUseBusyCursor(_arg1:Object):void; function hideCursor():void; function get currentCursorID():int; function registerToUseBusyCursor(_arg1:Object):void; function setBusyCursor():void; function showCursor():void; function set currentCursorID(_arg1:int):void; function setCursor(_arg1:Class, _arg2:int=2, _arg3:Number=0, _arg4:Number=0):int; function removeCursor(_arg1:int):void; function get currentCursorXOffset():Number; function get currentCursorYOffset():Number; function set currentCursorXOffset(_arg1:Number):void; } }//package mx.managers
Section 283
//IFocusManager (mx.managers.IFocusManager) package mx.managers { import flash.display.*; import mx.core.*; public interface IFocusManager { function get focusPane():Sprite; function getFocus():IFocusManagerComponent; function deactivate():void; function set defaultButton(_arg1:IButton):void; function set focusPane(_arg1:Sprite):void; function set showFocusIndicator(_arg1:Boolean):void; function get defaultButtonEnabled():Boolean; function findFocusManagerComponent(_arg1:InteractiveObject):IFocusManagerComponent; function get nextTabIndex():int; function get defaultButton():IButton; function get showFocusIndicator():Boolean; function setFocus(_arg1:IFocusManagerComponent):void; function activate():void; function showFocus():void; function set defaultButtonEnabled(_arg1:Boolean):void; function hideFocus():void; function getNextFocusManagerComponent(_arg1:Boolean=false):IFocusManagerComponent; } }//package mx.managers
Section 284
//IFocusManagerComplexComponent (mx.managers.IFocusManagerComplexComponent) package mx.managers { public interface IFocusManagerComplexComponent extends IFocusManagerComponent { function assignFocus(_arg1:String):void; function get hasFocusableContent():Boolean; } }//package mx.managers
Section 285
//IFocusManagerComponent (mx.managers.IFocusManagerComponent) package mx.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 mx.managers
Section 286
//IFocusManagerContainer (mx.managers.IFocusManagerContainer) package mx.managers { import flash.display.*; import flash.events.*; public interface IFocusManagerContainer extends IEventDispatcher { function set focusManager(_arg1:IFocusManager):void; function get focusManager():IFocusManager; function get systemManager():ISystemManager; function contains(_arg1:DisplayObject):Boolean; } }//package mx.managers
Section 287
//IFocusManagerGroup (mx.managers.IFocusManagerGroup) package mx.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 mx.managers
Section 288
//ILayoutManager (mx.managers.ILayoutManager) package mx.managers { import flash.events.*; public interface ILayoutManager extends IEventDispatcher { function validateNow():void; function validateClient(_arg1:ILayoutManagerClient, _arg2:Boolean=false):void; function isInvalid():Boolean; function invalidateDisplayList(_arg1:ILayoutManagerClient):void; function set usePhasedInstantiation(_arg1:Boolean):void; function invalidateSize(_arg1:ILayoutManagerClient):void; function get usePhasedInstantiation():Boolean; function invalidateProperties(_arg1:ILayoutManagerClient):void; } }//package mx.managers
Section 289
//ILayoutManagerClient (mx.managers.ILayoutManagerClient) package mx.managers { import flash.events.*; public interface ILayoutManagerClient extends IEventDispatcher { function get updateCompletePendingFlag():Boolean; function set updateCompletePendingFlag(_arg1:Boolean):void; function set initialized(_arg1:Boolean):void; function validateProperties():void; function validateDisplayList():void; function get nestLevel():int; function get initialized():Boolean; function get processedDescriptors():Boolean; function validateSize(_arg1:Boolean=false):void; function set nestLevel(_arg1:int):void; function set processedDescriptors(_arg1:Boolean):void; } }//package mx.managers
Section 290
//ISystemManager (mx.managers.ISystemManager) package mx.managers { import flash.display.*; import flash.geom.*; import mx.core.*; import flash.text.*; import flash.events.*; public interface ISystemManager extends IEventDispatcher, IChildList, IFlexModuleFactory { function get focusPane():Sprite; function get loaderInfo():LoaderInfo; function get toolTipChildren():IChildList; function set focusPane(_arg1:Sprite):void; function isTopLevel():Boolean; function get popUpChildren():IChildList; function get screen():Rectangle; function isFontFaceEmbedded(_arg1:TextFormat):Boolean; function get rawChildren():IChildList; function get topLevelSystemManager():ISystemManager; function getDefinitionByName(_arg1:String):Object; function activate(_arg1:IFocusManagerContainer):void; function deactivate(_arg1:IFocusManagerContainer):void; function get cursorChildren():IChildList; function set document(_arg1:Object):void; function get embeddedFontList():Object; function set numModalWindows(_arg1:int):void; function removeFocusManager(_arg1:IFocusManagerContainer):void; function get document():Object; function get numModalWindows():int; function addFocusManager(_arg1:IFocusManagerContainer):void; function get stage():Stage; } }//package mx.managers
Section 291
//IToolTipManager2 (mx.managers.IToolTipManager2) package mx.managers { import flash.display.*; import mx.core.*; import mx.effects.*; public interface IToolTipManager2 { function registerToolTip(_arg1:DisplayObject, _arg2:String, _arg3:String):void; function get enabled():Boolean; function set enabled(_arg1:Boolean):void; function get scrubDelay():Number; function set hideEffect(_arg1:IAbstractEffect):void; function createToolTip(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String=null, _arg5:IUIComponent=null):IToolTip; function set scrubDelay(_arg1:Number):void; function set hideDelay(_arg1:Number):void; function get currentTarget():DisplayObject; function set showDelay(_arg1:Number):void; function get showDelay():Number; function get showEffect():IAbstractEffect; function get hideDelay():Number; function get currentToolTip():IToolTip; function get hideEffect():IAbstractEffect; function set currentToolTip(_arg1:IToolTip):void; function get toolTipClass():Class; function registerErrorString(_arg1:DisplayObject, _arg2:String, _arg3:String):void; function destroyToolTip(_arg1:IToolTip):void; function set toolTipClass(_arg1:Class):void; function sizeTip(_arg1:IToolTip):void; function set currentTarget(_arg1:DisplayObject):void; function set showEffect(_arg1:IAbstractEffect):void; } }//package mx.managers
Section 292
//IToolTipManagerClient (mx.managers.IToolTipManagerClient) package mx.managers { import mx.core.*; public interface IToolTipManagerClient extends IFlexDisplayObject { function get toolTip():String; function set toolTip(_arg1:String):void; } }//package mx.managers
Section 293
//LayoutManager (mx.managers.LayoutManager) package mx.managers { import flash.display.*; import mx.core.*; import flash.events.*; import mx.events.*; import mx.managers.layoutClasses.*; public class LayoutManager extends EventDispatcher implements ILayoutManager { private var invalidateClientPropertiesFlag:Boolean;// = false private var invalidateDisplayListQueue:PriorityQueue; private var updateCompleteQueue:PriorityQueue; private var invalidateDisplayListFlag:Boolean;// = false private var invalidateClientSizeFlag:Boolean;// = false private var invalidateSizeQueue:PriorityQueue; private var originalFrameRate:Number; private var invalidatePropertiesFlag:Boolean;// = false private var invalidatePropertiesQueue:PriorityQueue; private var invalidateSizeFlag:Boolean;// = false private var callLaterPending:Boolean;// = false private var _usePhasedInstantiation:Boolean;// = false private var callLaterObject:UIComponent; private var targetLevel:int;// = 2147483647 mx_internal static const VERSION:String = "3.0.0.0"; private static var instance:LayoutManager; public function LayoutManager(){ updateCompleteQueue = new PriorityQueue(); invalidatePropertiesQueue = new PriorityQueue(); invalidateSizeQueue = new PriorityQueue(); invalidateDisplayListQueue = new PriorityQueue(); super(); } public function set usePhasedInstantiation(_arg1:Boolean):void{ var _local2:Stage; if (_usePhasedInstantiation != _arg1){ _usePhasedInstantiation = _arg1; _local2 = SystemManagerGlobals.topLevelSystemManagers[0].stage; if (_arg1){ originalFrameRate = _local2.frameRate; _local2.frameRate = 1000; } else { _local2.frameRate = originalFrameRate; }; }; } private function waitAFrame():void{ callLaterObject.callLater(doPhasedInstantiation); } public function validateClient(_arg1:ILayoutManagerClient, _arg2:Boolean=false):void{ var _local3:ILayoutManagerClient; var _local4:int; var _local5:Boolean; var _local6:int = targetLevel; if (targetLevel == int.MAX_VALUE){ targetLevel = _arg1.nestLevel; }; while (!(_local5)) { _local5 = true; _local3 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallestChild(_arg1)); while (_local3) { _local3.validateProperties(); if (!_local3.updateCompletePendingFlag){ updateCompleteQueue.addObject(_local3, _local3.nestLevel); _local3.updateCompletePendingFlag = true; }; _local3 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallestChild(_arg1)); }; if (invalidatePropertiesQueue.isEmpty()){ invalidatePropertiesFlag = false; invalidateClientPropertiesFlag = false; }; _local3 = ILayoutManagerClient(invalidateSizeQueue.removeLargestChild(_arg1)); while (_local3) { _local3.validateSize(); if (!_local3.updateCompletePendingFlag){ updateCompleteQueue.addObject(_local3, _local3.nestLevel); _local3.updateCompletePendingFlag = true; }; if (invalidateClientPropertiesFlag){ _local3 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallestChild(_arg1)); if (_local3){ invalidatePropertiesQueue.addObject(_local3, _local3.nestLevel); _local5 = false; break; }; }; _local3 = ILayoutManagerClient(invalidateSizeQueue.removeLargestChild(_arg1)); }; if (invalidateSizeQueue.isEmpty()){ invalidateSizeFlag = false; invalidateClientSizeFlag = false; }; if (!_arg2){ _local3 = ILayoutManagerClient(invalidateDisplayListQueue.removeSmallestChild(_arg1)); while (_local3) { _local3.validateDisplayList(); if (!_local3.updateCompletePendingFlag){ updateCompleteQueue.addObject(_local3, _local3.nestLevel); _local3.updateCompletePendingFlag = true; }; if (invalidateClientPropertiesFlag){ _local3 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallestChild(_arg1)); if (_local3){ invalidatePropertiesQueue.addObject(_local3, _local3.nestLevel); _local5 = false; break; }; }; if (invalidateClientSizeFlag){ _local3 = ILayoutManagerClient(invalidateSizeQueue.removeLargestChild(_arg1)); if (_local3){ invalidateSizeQueue.addObject(_local3, _local3.nestLevel); _local5 = false; break; }; }; _local3 = ILayoutManagerClient(invalidateDisplayListQueue.removeSmallestChild(_arg1)); }; if (invalidateDisplayListQueue.isEmpty()){ invalidateDisplayListFlag = false; }; }; }; if (_local6 == int.MAX_VALUE){ targetLevel = int.MAX_VALUE; if (!_arg2){ _local3 = ILayoutManagerClient(updateCompleteQueue.removeLargestChild(_arg1)); while (_local3) { if (!_local3.initialized){ _local3.initialized = true; }; _local3.dispatchEvent(new FlexEvent(FlexEvent.UPDATE_COMPLETE)); _local3.updateCompletePendingFlag = false; _local3 = ILayoutManagerClient(updateCompleteQueue.removeLargestChild(_arg1)); }; }; }; } private function validateProperties():void{ var _local1:ILayoutManagerClient = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallest()); while (_local1) { _local1.validateProperties(); if (!_local1.updateCompletePendingFlag){ updateCompleteQueue.addObject(_local1, _local1.nestLevel); _local1.updateCompletePendingFlag = true; }; _local1 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallest()); }; if (invalidatePropertiesQueue.isEmpty()){ invalidatePropertiesFlag = false; }; } public function invalidateProperties(_arg1:ILayoutManagerClient):void{ if (((!(invalidatePropertiesFlag)) && (ApplicationGlobals.application.systemManager))){ invalidatePropertiesFlag = true; if (!callLaterPending){ if (!callLaterObject){ callLaterObject = new UIComponent(); callLaterObject.systemManager = ApplicationGlobals.application.systemManager; callLaterObject.callLater(waitAFrame); } else { callLaterObject.callLater(doPhasedInstantiation); }; callLaterPending = true; }; }; if (targetLevel <= _arg1.nestLevel){ invalidateClientPropertiesFlag = true; }; invalidatePropertiesQueue.addObject(_arg1, _arg1.nestLevel); } public function invalidateDisplayList(_arg1:ILayoutManagerClient):void{ if (((!(invalidateDisplayListFlag)) && (ApplicationGlobals.application.systemManager))){ invalidateDisplayListFlag = true; if (!callLaterPending){ if (!callLaterObject){ callLaterObject = new UIComponent(); callLaterObject.systemManager = ApplicationGlobals.application.systemManager; callLaterObject.callLater(waitAFrame); } else { callLaterObject.callLater(doPhasedInstantiation); }; callLaterPending = true; }; }; invalidateDisplayListQueue.addObject(_arg1, _arg1.nestLevel); } private function validateDisplayList():void{ var _local1:ILayoutManagerClient = ILayoutManagerClient(invalidateDisplayListQueue.removeSmallest()); while (_local1) { _local1.validateDisplayList(); if (!_local1.updateCompletePendingFlag){ updateCompleteQueue.addObject(_local1, _local1.nestLevel); _local1.updateCompletePendingFlag = true; }; _local1 = ILayoutManagerClient(invalidateDisplayListQueue.removeSmallest()); }; if (invalidateDisplayListQueue.isEmpty()){ invalidateDisplayListFlag = false; }; } public function validateNow():void{ var _local1:int; if (!usePhasedInstantiation){ _local1 = 0; while (((callLaterPending) && ((_local1 < 100)))) { doPhasedInstantiation(); }; }; } private function validateSize():void{ var _local1:ILayoutManagerClient = ILayoutManagerClient(invalidateSizeQueue.removeLargest()); while (_local1) { _local1.validateSize(); if (!_local1.updateCompletePendingFlag){ updateCompleteQueue.addObject(_local1, _local1.nestLevel); _local1.updateCompletePendingFlag = true; }; _local1 = ILayoutManagerClient(invalidateSizeQueue.removeLargest()); }; if (invalidateSizeQueue.isEmpty()){ invalidateSizeFlag = false; }; } private function doPhasedInstantiation():void{ var _local1:ILayoutManagerClient; if (usePhasedInstantiation){ if (invalidatePropertiesFlag){ validateProperties(); ApplicationGlobals.application.dispatchEvent(new Event("validatePropertiesComplete")); } else { if (invalidateSizeFlag){ validateSize(); ApplicationGlobals.application.dispatchEvent(new Event("validateSizeComplete")); } else { if (invalidateDisplayListFlag){ validateDisplayList(); ApplicationGlobals.application.dispatchEvent(new Event("validateDisplayListComplete")); }; }; }; } else { if (invalidatePropertiesFlag){ validateProperties(); }; if (invalidateSizeFlag){ validateSize(); }; if (invalidateDisplayListFlag){ validateDisplayList(); }; }; if (((((invalidatePropertiesFlag) || (invalidateSizeFlag))) || (invalidateDisplayListFlag))){ callLaterObject.callLater(doPhasedInstantiation); } else { usePhasedInstantiation = false; callLaterPending = false; _local1 = ILayoutManagerClient(updateCompleteQueue.removeLargest()); while (_local1) { if (((!(_local1.initialized)) && (_local1.processedDescriptors))){ _local1.initialized = true; }; _local1.dispatchEvent(new FlexEvent(FlexEvent.UPDATE_COMPLETE)); _local1.updateCompletePendingFlag = false; _local1 = ILayoutManagerClient(updateCompleteQueue.removeLargest()); }; dispatchEvent(new FlexEvent(FlexEvent.UPDATE_COMPLETE)); }; } public function isInvalid():Boolean{ return (((((invalidatePropertiesFlag) || (invalidateSizeFlag))) || (invalidateDisplayListFlag))); } public function get usePhasedInstantiation():Boolean{ return (_usePhasedInstantiation); } public function invalidateSize(_arg1:ILayoutManagerClient):void{ if (((!(invalidateSizeFlag)) && (ApplicationGlobals.application.systemManager))){ invalidateSizeFlag = true; if (!callLaterPending){ if (!callLaterObject){ callLaterObject = new UIComponent(); callLaterObject.systemManager = ApplicationGlobals.application.systemManager; callLaterObject.callLater(waitAFrame); } else { callLaterObject.callLater(doPhasedInstantiation); }; callLaterPending = true; }; }; if (targetLevel <= _arg1.nestLevel){ invalidateClientSizeFlag = true; }; invalidateSizeQueue.addObject(_arg1, _arg1.nestLevel); } public static function getInstance():LayoutManager{ if (!instance){ instance = new (LayoutManager); }; return (instance); } } }//package mx.managers
Section 294
//SystemChildrenList (mx.managers.SystemChildrenList) package mx.managers { import flash.display.*; import flash.geom.*; import mx.core.*; public class SystemChildrenList implements IChildList { private var lowerBoundReference:QName; private var upperBoundReference:QName; private var owner:SystemManager; mx_internal static const VERSION:String = "3.0.0.0"; public function SystemChildrenList(_arg1:SystemManager, _arg2:QName, _arg3:QName){ this.owner = _arg1; this.lowerBoundReference = _arg2; this.upperBoundReference = _arg3; } public function getChildAt(_arg1:int):DisplayObject{ var _local2:DisplayObject = owner.mx_internal::rawChildren_getChildAt((owner[lowerBoundReference] + _arg1)); return (_local2); } public function getChildByName(_arg1:String):DisplayObject{ return (owner.mx_internal::rawChildren_getChildByName(_arg1)); } public function removeChildAt(_arg1:int):DisplayObject{ var _local2:DisplayObject = owner.mx_internal::rawChildren_removeChildAt((_arg1 + owner[lowerBoundReference])); var _local3 = owner; var _local4 = upperBoundReference; var _local5 = (_local3[_local4] - 1); _local3[_local4] = _local5; return (_local2); } public function getChildIndex(_arg1:DisplayObject):int{ var _local2:int = owner.mx_internal::rawChildren_getChildIndex(_arg1); _local2 = (_local2 - owner[lowerBoundReference]); return (_local2); } public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{ var _local3 = owner; _local3.mx_internal::rawChildren_addChildAt(_arg1, (owner[lowerBoundReference] + _arg2)); _local3 = owner; var _local4 = upperBoundReference; var _local5 = (_local3[_local4] + 1); _local3[_local4] = _local5; return (_arg1); } public function getObjectsUnderPoint(_arg1:Point):Array{ return (owner.mx_internal::rawChildren_getObjectsUnderPoint(_arg1)); } public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{ var _local3 = owner; _local3.mx_internal::rawChildren_setChildIndex(_arg1, (owner[lowerBoundReference] + _arg2)); } public function get numChildren():int{ return ((owner[upperBoundReference] - owner[lowerBoundReference])); } public function contains(_arg1:DisplayObject):Boolean{ var _local2:int; if (owner.mx_internal::rawChildren_contains(_arg1)){ while (_arg1.parent != owner) { _arg1 = _arg1.parent; }; _local2 = owner.mx_internal::rawChildren_getChildIndex(_arg1); if ((((_local2 >= owner[lowerBoundReference])) && ((_local2 < owner[upperBoundReference])))){ return (true); }; }; return (false); } public function removeChild(_arg1:DisplayObject):DisplayObject{ var _local2:int = owner.mx_internal::rawChildren_getChildIndex(_arg1); if ((((owner[lowerBoundReference] <= _local2)) && ((_local2 < owner[upperBoundReference])))){ var _local3 = owner; _local3.mx_internal::rawChildren_removeChild(_arg1); _local3 = owner; var _local4 = upperBoundReference; var _local5 = (_local3[_local4] - 1); _local3[_local4] = _local5; }; return (_arg1); } public function addChild(_arg1:DisplayObject):DisplayObject{ var _local2 = owner; _local2.mx_internal::rawChildren_addChildAt(_arg1, owner[upperBoundReference]); _local2 = owner; var _local3 = upperBoundReference; var _local4 = (_local2[_local3] + 1); _local2[_local3] = _local4; return (_arg1); } } }//package mx.managers
Section 295
//SystemManager (mx.managers.SystemManager) package mx.managers { import flash.display.*; import flash.geom.*; import mx.core.*; import flash.text.*; import flash.events.*; import mx.events.*; import mx.styles.*; import mx.resources.*; import flash.system.*; import mx.preloaders.*; import flash.utils.*; import mx.messaging.config.*; public class SystemManager extends MovieClip implements IChildList, IFlexDisplayObject, IFlexModuleFactory, ISystemManager { mx_internal var nestLevel:int;// = 0 private var forms:Array; private var mouseCatcher:Sprite; private var _height:Number; private var preloader:Preloader; private var _document:Object; private var _topLevelSystemManager:ISystemManager; private var _toolTipIndex:int;// = 0 private var _rawChildren:SystemRawChildrenList; private var _explicitHeight:Number; private var _toolTipChildren:SystemChildrenList; private var form:IFocusManagerContainer; private var _width:Number; private var initialized:Boolean;// = false private var _focusPane:Sprite; private var _fontList:Object;// = null private var isStageRoot:Boolean;// = true private var _popUpChildren:SystemChildrenList; private var rslSizes:Array;// = null private var _topMostIndex:int;// = 0 private var nextFrameTimer:Timer;// = null private var topLevel:Boolean;// = true private var _cursorIndex:int;// = 0 mx_internal var _mouseX; mx_internal var _mouseY; private var _numModalWindows:int;// = 0 private var _screen:Rectangle; mx_internal var idleCounter:int;// = 0 private var _cursorChildren:SystemChildrenList; private var initCallbackFunctions:Array; private var _noTopMostIndex:int;// = 0 private var _applicationIndex:int;// = 1 private var idleTimer:Timer; private var doneExecutingInitCallbacks:Boolean;// = false private var _explicitWidth:Number; mx_internal var topLevelWindow:IUIComponent; private static const IDLE_THRESHOLD:Number = 1000; private static const IDLE_INTERVAL:Number = 100; mx_internal static const VERSION:String = "3.0.0.0"; mx_internal static var lastSystemManager:SystemManager; mx_internal static var allSystemManagers:Dictionary = new Dictionary(true); public function SystemManager(){ initCallbackFunctions = []; forms = []; super(); if (stage){ stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; }; if ((((SystemManagerGlobals.topLevelSystemManagers.length > 0)) && (!(stage)))){ topLevel = false; }; if (!stage){ isStageRoot = false; }; if (topLevel){ SystemManagerGlobals.topLevelSystemManagers.push(this); }; lastSystemManager = this; var _local1:Array = info()["compiledLocales"]; ResourceBundle.locale = (((!((_local1 == null))) && ((_local1.length > 0)))) ? _local1[0] : "en_US"; executeCallbacks(); stop(); if (((topLevel) && (!((currentFrame == 1))))){ throw (new Error((("The SystemManager constructor was called when the currentFrame was at " + currentFrame) + " Please add this SWF to bug 129782."))); }; if (((root) && (root.loaderInfo))){ root.loaderInfo.addEventListener(Event.INIT, initHandler); }; } mx_internal function addingChild(_arg1:DisplayObject):void{ var _local4:DisplayObjectContainer; var _local2 = 1; if (!topLevel){ _local4 = parent.parent; while (_local4) { if ((_local4 is ILayoutManagerClient)){ _local2 = (ILayoutManagerClient(_local4).nestLevel + 1); break; }; _local4 = _local4.parent; }; }; nestLevel = _local2; if ((_arg1 is IUIComponent)){ IUIComponent(_arg1).systemManager = this; }; var _local3:Class = Class(getDefinitionByName("mx.core.UIComponent")); if ((((_arg1 is IUIComponent)) && (!(IUIComponent(_arg1).document)))){ IUIComponent(_arg1).document = document; }; if ((_arg1 is ILayoutManagerClient)){ ILayoutManagerClient(_arg1).nestLevel = (nestLevel + 1); }; if ((_arg1 is InteractiveObject)){ if (doubleClickEnabled){ InteractiveObject(_arg1).doubleClickEnabled = true; }; }; if ((_arg1 is IUIComponent)){ IUIComponent(_arg1).parentChanged(this); }; if ((_arg1 is IStyleClient)){ IStyleClient(_arg1).regenerateStyleCache(true); }; if ((_arg1 is ISimpleStyleClient)){ ISimpleStyleClient(_arg1).styleChanged(null); }; if ((_arg1 is IStyleClient)){ IStyleClient(_arg1).notifyStyleChangeInChildren(null, true); }; if (((_local3) && ((_arg1 is _local3)))){ _local3(_arg1).initThemeColor(); }; if (((_local3) && ((_arg1 is _local3)))){ _local3(_arg1).stylesInitialized(); }; } private function idleTimer_timerHandler(_arg1:TimerEvent):void{ idleCounter++; if ((idleCounter * IDLE_INTERVAL) > IDLE_THRESHOLD){ dispatchEvent(new FlexEvent(FlexEvent.IDLE)); }; } public function getExplicitOrMeasuredHeight():Number{ return ((isNaN(explicitHeight)) ? measuredHeight : explicitHeight); } mx_internal function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{ var _local6:IStyleClient; var _local3:Boolean; var _local4:int = rawChildren.numChildren; var _local5:int; while (_local5 < _local4) { _local6 = (rawChildren.getChildAt(_local5) as IStyleClient); if (_local6){ _local6.styleChanged(_arg1); _local6.notifyStyleChangeInChildren(_arg1, _arg2); }; if (isTopLevelWindow(DisplayObject(_local6))){ _local3 = true; }; _local4 = rawChildren.numChildren; _local5++; }; if (((!(_local3)) && ((topLevelWindow is IStyleClient)))){ IStyleClient(topLevelWindow).styleChanged(_arg1); IStyleClient(topLevelWindow).notifyStyleChangeInChildren(_arg1, _arg2); }; } mx_internal function rawChildren_getObjectsUnderPoint(_arg1:Point):Array{ return (super.getObjectsUnderPoint(_arg1)); } private function initHandler(_arg1:Event):void{ allSystemManagers[this] = this.loaderInfo.url; root.loaderInfo.removeEventListener(Event.INIT, initHandler); var _local2:int = ((totalFrames)==1) ? 0 : 1; addFrameScript(_local2, docFrameHandler); var _local3:int = (_local2 + 1); while (_local3 < totalFrames) { addFrameScript(_local3, extraFrameHandler); _local3++; }; initialize(); } override public function contains(_arg1:DisplayObject):Boolean{ var _local2:int; var _local3:int; var _local4:DisplayObject; if (super.contains(_arg1)){ if (_arg1.parent == this){ _local2 = super.getChildIndex(_arg1); if (_local2 < noTopMostIndex){ return (true); }; } else { _local3 = 0; while (_local3 < noTopMostIndex) { _local4 = super.getChildAt(_local3); if ((_local4 is IRawChildrenContainer)){ if (IRawChildrenContainer(_local4).rawChildren.contains(_arg1)){ return (true); }; }; if ((_local4 is DisplayObjectContainer)){ if (DisplayObjectContainer(_local4).contains(_arg1)){ return (true); }; }; _local3++; }; }; }; return (false); } public function getDefinitionByName(_arg1:String):Object{ var _local3:Object; var _local2:ApplicationDomain = (((!(topLevel)) && ((parent is Loader)))) ? Loader(parent).contentLoaderInfo.applicationDomain : (info()["currentDomain"] as ApplicationDomain); if (_local2.hasDefinition(_arg1)){ _local3 = _local2.getDefinition(_arg1); }; return (_local3); } public function get embeddedFontList():Object{ var _local1:Object; var _local2:String; var _local3:Object; if (_fontList == null){ _fontList = {}; _local1 = info()["fonts"]; for (_local2 in _local1) { _fontList[_local2] = _local1[_local2]; }; if (((!(topLevel)) && (_topLevelSystemManager))){ _local3 = _topLevelSystemManager.embeddedFontList; for (_local2 in _local3) { _fontList[_local2] = _local3[_local2]; }; }; }; return (_fontList); } mx_internal function set cursorIndex(_arg1:int):void{ var _local2:int = (_arg1 - _cursorIndex); _cursorIndex = _arg1; } public function set document(_arg1:Object):void{ _document = _arg1; } override public function getChildAt(_arg1:int):DisplayObject{ return (super.getChildAt((applicationIndex + _arg1))); } public function get rawChildren():IChildList{ if (!_rawChildren){ _rawChildren = new SystemRawChildrenList(this); }; return (_rawChildren); } override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ if ((((_arg1 == FlexEvent.IDLE)) && (!(idleTimer)))){ idleTimer = new Timer(IDLE_INTERVAL); idleTimer.addEventListener(TimerEvent.TIMER, idleTimer_timerHandler); idleTimer.start(); addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true); addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler, true); }; super.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); } public function removeFocusManager(_arg1:IFocusManagerContainer):void{ var _local2:int = forms.length; var _local3:int; while (_local3 < _local2) { if (forms[_local3] == _arg1){ if (form == _arg1){ deactivate(_arg1); }; forms.splice(_local3, 1); return; }; _local3++; }; } private function mouseMoveHandler(_arg1:MouseEvent):void{ idleCounter = 0; } public function get focusPane():Sprite{ return (_focusPane); } override public function get mouseX():Number{ if (_mouseX === undefined){ return (super.mouseX); }; return (_mouseX); } private function mouseDownHandler(_arg1:MouseEvent):void{ var _local2:int; var _local3:DisplayObject; var _local4:Boolean; var _local5:int; var _local6:int; var _local7:int; var _local8:int; var _local9:IChildList; idleCounter = 0; if (numModalWindows == 0){ if (forms.length > 1){ _local2 = forms.length; _local3 = DisplayObject(_arg1.target); _local4 = document.rawChildren.contains(_local3); while (_local3) { _local5 = 0; while (_local5 < _local2) { if (forms[_local5] == _local3){ _local6 = 0; if (((!((_local3 == form))) && ((_local3 is IFocusManagerContainer)))){ activate(IFocusManagerContainer(_local3)); }; if (popUpChildren.contains(_local3)){ _local9 = popUpChildren; } else { _local9 = this; }; _local7 = _local9.getChildIndex(_local3); _local8 = _local7; _local2 = forms.length; _local6 = 0; while (_local6 < _local2) { if (_local9.contains(forms[_local6])){ if (_local9.getChildIndex(forms[_local6]) > _local7){ _local8 = Math.max(_local9.getChildIndex(forms[_local6]), _local8); }; }; _local6++; }; if ((((_local8 > _local7)) && (!(_local4)))){ _local9.setChildIndex(_local3, _local8); }; return; }; _local5++; }; _local3 = _local3.parent; }; }; }; } public function get screen():Rectangle{ if (!_screen){ Stage_resizeHandler(); }; return (_screen); } mx_internal function set topMostIndex(_arg1:int):void{ var _local2:int = (_arg1 - _topMostIndex); _topMostIndex = _arg1; toolTipIndex = (toolTipIndex + _local2); } mx_internal function docFrameHandler(_arg1:Event=null):void{ var _local2:TextFieldFactory; var _local4:int; var _local5:int; var _local6:Class; Singleton.registerClass("mx.managers::IBrowserManager", Class(getDefinitionByName("mx.managers::BrowserManagerImpl"))); Singleton.registerClass("mx.managers::ICursorManager", Class(getDefinitionByName("mx.managers::CursorManagerImpl"))); Singleton.registerClass("mx.managers::IHistoryManager", Class(getDefinitionByName("mx.managers::HistoryManagerImpl"))); Singleton.registerClass("mx.managers::ILayoutManager", Class(getDefinitionByName("mx.managers::LayoutManager"))); Singleton.registerClass("mx.managers::IPopUpManager", Class(getDefinitionByName("mx.managers::PopUpManagerImpl"))); Singleton.registerClass("mx.managers::IToolTipManager2", Class(getDefinitionByName("mx.managers::ToolTipManagerImpl"))); if (Capabilities.playerType == "Desktop"){ Singleton.registerClass("mx.managers::IDragManager", Class(getDefinitionByName("mx.managers::NativeDragManagerImpl"))); if (Singleton.getClass("mx.managers::IDragManager") == null){ Singleton.registerClass("mx.managers::IDragManager", Class(getDefinitionByName("mx.managers::DragManagerImpl"))); }; } else { Singleton.registerClass("mx.managers::IDragManager", Class(getDefinitionByName("mx.managers::DragManagerImpl"))); }; Singleton.registerClass("mx.core::ITextFieldFactory", Class(getDefinitionByName("mx.core::TextFieldFactory"))); executeCallbacks(); doneExecutingInitCallbacks = true; var _local3:Array = info()["mixins"]; if (((_local3) && ((_local3.length > 0)))){ _local4 = _local3.length; _local5 = 0; while (_local5 < _local4) { _local6 = Class(getDefinitionByName(_local3[_local5])); var _local7 = _local6; _local7["init"](this); _local5++; }; }; installCompiledResourceBundles(); initializeTopLevelWindow(null); deferredNextFrame(); } private function Stage_resizeHandler(_arg1:Event=null):void{ var _local2:Number = stage.stageWidth; var _local3:Number = stage.stageHeight; var _local4:Number = loaderInfo.width; var _local5:Number = loaderInfo.height; var _local6:Number = ((_local4 - _local2) / 2); var _local7:Number = ((_local5 - _local3) / 2); var _local8:String = stage.align; if (_local8 == StageAlign.TOP){ _local7 = 0; } else { if (_local8 == StageAlign.BOTTOM){ _local7 = (_local5 - _local3); } else { if (_local8 == StageAlign.LEFT){ _local6 = 0; } else { if (_local8 == StageAlign.RIGHT){ _local6 = (_local4 - _local2); } else { if ((((_local8 == StageAlign.TOP_LEFT)) || ((_local8 == "LT")))){ _local7 = 0; _local6 = 0; } else { if (_local8 == StageAlign.TOP_RIGHT){ _local7 = 0; _local6 = (_local4 - _local2); } else { if (_local8 == StageAlign.BOTTOM_LEFT){ _local7 = (_local5 - _local3); _local6 = 0; } else { if (_local8 == StageAlign.BOTTOM_RIGHT){ _local7 = (_local5 - _local3); _local6 = (_local4 - _local2); }; }; }; }; }; }; }; }; if (!_screen){ _screen = new Rectangle(); }; _screen.x = _local6; _screen.y = _local7; _screen.width = _local2; _screen.height = _local3; if (isStageRoot){ _width = stage.stageWidth; _height = stage.stageHeight; }; if (_arg1){ resizeMouseCatcher(); dispatchEvent(_arg1); }; } public function get explicitHeight():Number{ return (_explicitHeight); } public function get preloaderBackgroundSize():String{ return (info()["backgroundSize"]); } public function isTopLevel():Boolean{ return (topLevel); } override public function get mouseY():Number{ if (_mouseY === undefined){ return (super.mouseY); }; return (_mouseY); } public function getExplicitOrMeasuredWidth():Number{ return ((isNaN(explicitWidth)) ? measuredWidth : explicitWidth); } public function deactivate(_arg1:IFocusManagerContainer):void{ var _local2:IFocusManagerContainer; var _local3:int; var _local4:int; var _local5:IFocusManagerContainer; if (form){ if ((((form == _arg1)) && ((forms.length > 1)))){ form.focusManager.deactivate(); _local3 = forms.length; _local4 = 0; while (_local4 < _local3) { _local5 = forms[_local4]; if (_local5 == _arg1){ _local4 = (_local4 + 1); while (_local4 < _local3) { _local5 = forms[_local4]; if ((((Sprite(_local5).visible == true)) && (IUIComponent(_local5).enabled))){ _local2 = _local5; }; _local4++; }; form = _local2; break; } else { if (((Sprite(_local5).visible) && (IUIComponent(_local5).enabled))){ _local2 = _local5; }; }; _local4++; }; if (form){ form.focusManager.activate(); }; }; }; } override public function getChildByName(_arg1:String):DisplayObject{ return (super.getChildByName(_arg1)); } override public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{ noTopMostIndex++; return (rawChildren_addChildAt(_arg1, (applicationIndex + _arg2))); } public function get measuredWidth():Number{ return ((topLevelWindow) ? topLevelWindow.getExplicitOrMeasuredWidth() : loaderInfo.width); } public function info():Object{ return ({}); } mx_internal function get toolTipIndex():int{ return (_toolTipIndex); } public function setActualSize(_arg1:Number, _arg2:Number):void{ if (isStageRoot){ return; }; _width = _arg1; _height = _arg2; if (mouseCatcher){ mouseCatcher.width = _arg1; mouseCatcher.height = _arg2; }; dispatchEvent(new Event(Event.RESIZE)); } public function set focusPane(_arg1:Sprite):void{ if (_arg1){ addChild(_arg1); _arg1.x = 0; _arg1.y = 0; _arg1.scrollRect = null; _focusPane = _arg1; } else { removeChild(_focusPane); _focusPane = null; }; } mx_internal function set applicationIndex(_arg1:int):void{ _applicationIndex = _arg1; } private function executeCallbacks():void{ var _local1:Function; if (!parent){ return; }; while (initCallbackFunctions.length > 0) { _local1 = initCallbackFunctions.shift(); _local1(this); }; } public function get popUpChildren():IChildList{ if (!topLevel){ return (_topLevelSystemManager.popUpChildren); }; if (!_popUpChildren){ _popUpChildren = new SystemChildrenList(this, new QName(mx_internal, "noTopMostIndex"), new QName(mx_internal, "topMostIndex")); }; return (_popUpChildren); } public function set explicitHeight(_arg1:Number):void{ _explicitHeight = _arg1; } override public function removeChild(_arg1:DisplayObject):DisplayObject{ noTopMostIndex--; return (rawChildren_removeChild(_arg1)); } override public function addChild(_arg1:DisplayObject):DisplayObject{ noTopMostIndex++; return (rawChildren_addChildAt(_arg1, (noTopMostIndex - 1))); } public function create(... _args):Object{ var _local4:String; var _local5:int; var _local6:int; var _local2:String = info()["mainClassName"]; if (_local2 == null){ _local4 = loaderInfo.loaderURL; _local5 = _local4.lastIndexOf("."); _local6 = _local4.lastIndexOf("/"); _local2 = _local4.substring((_local6 + 1), _local5); }; var _local3:Class = Class(getDefinitionByName(_local2)); return ((_local3) ? new (_local3) : null); } override public function get stage():Stage{ var _local1:Stage = super.stage; if (_local1){ return (_local1); }; if (((!(topLevel)) && (_topLevelSystemManager))){ return (_topLevelSystemManager.stage); }; return (null); } mx_internal function rawChildren_removeChild(_arg1:DisplayObject):DisplayObject{ removingChild(_arg1); super.removeChild(_arg1); childRemoved(_arg1); return (_arg1); } final mx_internal function get $numChildren():int{ return (super.numChildren); } public function get toolTipChildren():IChildList{ if (!topLevel){ return (_topLevelSystemManager.toolTipChildren); }; if (!_toolTipChildren){ _toolTipChildren = new SystemChildrenList(this, new QName(mx_internal, "topMostIndex"), new QName(mx_internal, "toolTipIndex")); }; return (_toolTipChildren); } override public function getChildIndex(_arg1:DisplayObject):int{ return ((super.getChildIndex(_arg1) - applicationIndex)); } private function mouseUpHandler(_arg1:MouseEvent):void{ idleCounter = 0; } mx_internal function rawChildren_getChildIndex(_arg1:DisplayObject):int{ return (super.getChildIndex(_arg1)); } public function activate(_arg1:IFocusManagerContainer):void{ var _local2:IFocusManagerContainer; if (form){ if (((!((form == _arg1))) && ((forms.length > 1)))){ _local2 = form; _local2.focusManager.deactivate(); }; }; form = _arg1; if (_arg1.focusManager){ _arg1.focusManager.activate(); }; } private function deferredNextFrame():void{ if ((currentFrame + 1) > totalFrames){ return; }; if ((currentFrame + 1) <= framesLoaded){ nextFrame(); } else { nextFrameTimer = new Timer(100); nextFrameTimer.addEventListener(TimerEvent.TIMER, nextFrameTimerHandler); nextFrameTimer.start(); }; } mx_internal function get cursorIndex():int{ return (_cursorIndex); } mx_internal function rawChildren_contains(_arg1:DisplayObject):Boolean{ return (super.contains(_arg1)); } override public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{ super.setChildIndex(_arg1, (applicationIndex + _arg2)); } public function get document():Object{ return (_document); } private function resizeMouseCatcher():void{ var _local1:Graphics; if (mouseCatcher){ _local1 = mouseCatcher.graphics; _local1.clear(); _local1.beginFill(0, 0); _local1.drawRect(0, 0, stage.stageWidth, stage.stageHeight); _local1.endFill(); }; } override public function get height():Number{ return (_height); } mx_internal function rawChildren_getChildAt(_arg1:int):DisplayObject{ return (super.getChildAt(_arg1)); } mx_internal function set noTopMostIndex(_arg1:int):void{ var _local2:int = (_arg1 - _noTopMostIndex); _noTopMostIndex = _arg1; topMostIndex = (topMostIndex + _local2); } override public function getObjectsUnderPoint(_arg1:Point):Array{ var _local5:DisplayObject; var _local6:Array; var _local2:Array = []; var _local3:int = topMostIndex; var _local4:int; while (_local4 < _local3) { _local5 = super.getChildAt(_local4); if ((_local5 is DisplayObjectContainer)){ _local6 = DisplayObjectContainer(_local5).getObjectsUnderPoint(_arg1); if (_local6){ _local2 = _local2.concat(_local6); }; }; _local4++; }; return (_local2); } mx_internal function get topMostIndex():int{ return (_topMostIndex); } mx_internal function regenerateStyleCache(_arg1:Boolean):void{ var _local5:IStyleClient; var _local2:Boolean; var _local3:int = rawChildren.numChildren; var _local4:int; while (_local4 < _local3) { _local5 = (rawChildren.getChildAt(_local4) as IStyleClient); if (_local5){ _local5.regenerateStyleCache(_arg1); }; if (isTopLevelWindow(DisplayObject(_local5))){ _local2 = true; }; _local3 = rawChildren.numChildren; _local4++; }; if (((!(_local2)) && ((topLevelWindow is IStyleClient)))){ IStyleClient(topLevelWindow).regenerateStyleCache(_arg1); }; } public function addFocusManager(_arg1:IFocusManagerContainer):void{ forms.push(_arg1); } public function isFontFaceEmbedded(_arg1:TextFormat):Boolean{ var _local6:Font; var _local7:String; var _local2:String = _arg1.font; var _local3:Array = Font.enumerateFonts(); var _local4:int; while (_local4 < _local3.length) { _local6 = Font(_local3[_local4]); if (_local6.fontName == _local2){ _local7 = "regular"; if (((_arg1.bold) && (_arg1.italic))){ _local7 = "boldItalic"; } else { if (_arg1.bold){ _local7 = "bold"; } else { if (_arg1.italic){ _local7 = "italic"; }; }; }; if (_local6.fontStyle == _local7){ return (true); }; }; _local4++; }; if (((((!(_local2)) || (!(embeddedFontList)))) || (!(embeddedFontList[_local2])))){ return (false); }; var _local5:Object = embeddedFontList[_local2]; return (!(((((((_arg1.bold) && (!(_local5.bold)))) || (((_arg1.italic) && (!(_local5.italic)))))) || (((((!(_arg1.bold)) && (!(_arg1.italic)))) && (!(_local5.regular))))))); } mx_internal function rawChildren_setChildIndex(_arg1:DisplayObject, _arg2:int):void{ super.setChildIndex(_arg1, _arg2); } mx_internal function childAdded(_arg1:DisplayObject):void{ _arg1.dispatchEvent(new FlexEvent(FlexEvent.ADD)); if ((_arg1 is IUIComponent)){ IUIComponent(_arg1).initialize(); }; } override public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ if (_arg1 == FlexEvent.IDLE){ super.removeEventListener(_arg1, _arg2, _arg3); if (((!(hasEventListener(FlexEvent.IDLE))) && (idleTimer))){ idleTimer.stop(); idleTimer = null; removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler); removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); }; } else { super.removeEventListener(_arg1, _arg2, _arg3); }; } private function extraFrameHandler(_arg1:Event=null):void{ var _local3:Class; var _local2:Object = info()["frames"]; if (((_local2) && (_local2[currentLabel]))){ _local3 = Class(getDefinitionByName(_local2[currentLabel])); var _local4 = _local3; _local4["frame"](this); }; deferredNextFrame(); } public function get application():IUIComponent{ return (IUIComponent(_document)); } override public function removeChildAt(_arg1:int):DisplayObject{ noTopMostIndex--; return (rawChildren_removeChildAt((applicationIndex + _arg1))); } mx_internal function rawChildren_removeChildAt(_arg1:int):DisplayObject{ var _local2:DisplayObject = super.getChildAt(_arg1); removingChild(_local2); super.removeChildAt(_arg1); childRemoved(_local2); return (_local2); } private function installCompiledResourceBundles():void{ var _local1:Object = this.info(); var _local2:ApplicationDomain = (((!(topLevel)) && ((parent is Loader)))) ? Loader(parent).contentLoaderInfo.applicationDomain : _local1["currentDomain"]; var _local3:Array = _local1["compiledLocales"]; var _local4:Array = _local1["compiledResourceBundleNames"]; var _local5:IResourceManager = ResourceManager.getInstance(); _local5.installCompiledResourceBundles(_local2, _local3, _local4); if (!_local5.localeChain){ _local5.localeChain = _local3; }; } mx_internal function removingChild(_arg1:DisplayObject):void{ _arg1.dispatchEvent(new FlexEvent(FlexEvent.REMOVE)); } mx_internal function get applicationIndex():int{ return (_applicationIndex); } mx_internal function set toolTipIndex(_arg1:int):void{ var _local2:int = (_arg1 - _toolTipIndex); _toolTipIndex = _arg1; cursorIndex = (cursorIndex + _local2); } public function get cursorChildren():IChildList{ if (!topLevel){ return (_topLevelSystemManager.cursorChildren); }; if (!_cursorChildren){ _cursorChildren = new SystemChildrenList(this, new QName(mx_internal, "toolTipIndex"), new QName(mx_internal, "cursorIndex")); }; return (_cursorChildren); } public function get preloaderBackgroundImage():Object{ return (info()["backgroundImage"]); } public function set numModalWindows(_arg1:int):void{ _numModalWindows = _arg1; } public function get preloaderBackgroundAlpha():Number{ return (info()["backgroundAlpha"]); } mx_internal function rawChildren_getChildByName(_arg1:String):DisplayObject{ return (super.getChildByName(_arg1)); } private function preloader_preloaderDoneHandler(_arg1:Event):void{ var _local2:IUIComponent = topLevelWindow; preloader.removeEventListener(FlexEvent.PRELOADER_DONE, preloader_preloaderDoneHandler); _popUpChildren.removeChild(preloader); preloader = null; mouseCatcher = new FlexSprite(); mouseCatcher.name = "mouseCatcher"; noTopMostIndex++; super.addChildAt(mouseCatcher, 0); resizeMouseCatcher(); if (!topLevel){ mouseCatcher.visible = false; mask = mouseCatcher; }; noTopMostIndex++; super.addChildAt(DisplayObject(_local2), 1); _local2.dispatchEvent(new FlexEvent(FlexEvent.APPLICATION_COMPLETE)); dispatchEvent(new FlexEvent(FlexEvent.APPLICATION_COMPLETE)); } public function get preloaderBackgroundColor():uint{ var _local1:* = info()["backgroundColor"]; if (_local1 == undefined){ return (StyleManager.NOT_A_COLOR); }; return (StyleManager.getColorName(_local1)); } public function get topLevelSystemManager():ISystemManager{ if (topLevel){ return (this); }; return (_topLevelSystemManager); } mx_internal function initialize():void{ var _local6:int; var _local7:int; var _local9:EmbeddedFontRegistry; var _local13:Class; var _local14:Object; var _local15:RSLItem; if (isStageRoot){ _width = stage.stageWidth; _height = stage.stageHeight; } else { _width = loaderInfo.width; _height = loaderInfo.height; }; preloader = new Preloader(); preloader.addEventListener(FlexEvent.INIT_PROGRESS, preloader_initProgressHandler); preloader.addEventListener(FlexEvent.PRELOADER_DONE, preloader_preloaderDoneHandler); if (!_popUpChildren){ _popUpChildren = new SystemChildrenList(this, new QName(mx_internal, "noTopMostIndex"), new QName(mx_internal, "topMostIndex")); }; _popUpChildren.addChild(preloader); var _local1:Array = info()["rsls"]; var _local2:Array = info()["cdRsls"]; var _local3:Boolean; if (info()["usePreloader"] != undefined){ _local3 = info()["usePreloader"]; }; var _local4:Class = (info()["preloader"] as Class); if (((_local3) && (!(_local4)))){ _local4 = DownloadProgressBar; }; var _local5:Array = []; if (((_local2) && ((_local2.length > 0)))){ _local13 = Class(getDefinitionByName("mx.core::CrossDomainRSLItem")); _local6 = _local2.length; _local7 = 0; while (_local7 < _local6) { _local14 = new _local13(_local2[_local7]["rsls"], _local2[_local7]["policyFiles"], _local2[_local7]["digests"], _local2[_local7]["types"], _local2[_local7]["isSigned"]); _local5.push(_local14); _local7++; }; }; if (((!((_local1 == null))) && ((_local1.length > 0)))){ _local6 = _local1.length; _local7 = 0; while (_local7 < _local6) { _local15 = new RSLItem(_local1[_local7].url); _local5.push(_local15); _local7++; }; }; Singleton.registerClass("mx.resources::IResourceManager", Class(getDefinitionByName("mx.resources::ResourceManagerImpl"))); var _local8:IResourceManager = ResourceManager.getInstance(); Singleton.registerClass("mx.core::IEmbeddedFontRegistry", Class(getDefinitionByName("mx.core::EmbeddedFontRegistry"))); Singleton.registerClass("mx.styles::IStyleManager", Class(getDefinitionByName("mx.styles::StyleManagerImpl"))); Singleton.registerClass("mx.styles::IStyleManager2", Class(getDefinitionByName("mx.styles::StyleManagerImpl"))); var _local10:String = loaderInfo.parameters["localeChain"]; if (((!((_local10 == null))) && (!((_local10 == ""))))){ _local8.localeChain = _local10.split(","); }; var _local11:String = loaderInfo.parameters["resourceModuleURLs"]; var _local12:Array = (_local11) ? _local11.split(",") : null; preloader.initialize(_local3, _local4, preloaderBackgroundColor, preloaderBackgroundAlpha, preloaderBackgroundImage, preloaderBackgroundSize, (isStageRoot) ? stage.stageWidth : loaderInfo.width, (isStageRoot) ? stage.stageHeight : loaderInfo.height, null, null, _local5, _local12); } private function appCreationCompleteHandler(_arg1:FlexEvent):void{ var _local2:DisplayObjectContainer; if (((!(topLevel)) && (parent))){ _local2 = parent.parent; while (_local2) { if ((_local2 is IInvalidating)){ IInvalidating(_local2).invalidateSize(); IInvalidating(_local2).invalidateDisplayList(); return; }; _local2 = _local2.parent; }; }; } public function get measuredHeight():Number{ return ((topLevelWindow) ? topLevelWindow.getExplicitOrMeasuredHeight() : loaderInfo.height); } mx_internal function rawChildren_addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{ addingChild(_arg1); super.addChildAt(_arg1, _arg2); childAdded(_arg1); return (_arg1); } private function nextFrameTimerHandler(_arg1:TimerEvent):void{ if ((currentFrame + 1) <= framesLoaded){ nextFrame(); nextFrameTimer.removeEventListener(TimerEvent.TIMER, nextFrameTimerHandler); nextFrameTimer.reset(); }; } mx_internal function childRemoved(_arg1:DisplayObject):void{ if ((_arg1 is IUIComponent)){ IUIComponent(_arg1).parentChanged(null); }; } mx_internal function get noTopMostIndex():int{ return (_noTopMostIndex); } override public function get numChildren():int{ return ((noTopMostIndex - applicationIndex)); } private function initializeTopLevelWindow(_arg1:Event):void{ var _local2:IUIComponent; var _local3:DisplayObjectContainer; initialized = true; if (!parent){ return; }; if (!topLevel){ _local3 = parent.parent; if (!_local3){ return; }; while (_local3) { if ((_local3 is IUIComponent)){ _topLevelSystemManager = IUIComponent(_local3).systemManager; break; }; _local3 = _local3.parent; }; }; addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler, true); if (((topLevel) && (stage))){ stage.addEventListener(Event.RESIZE, Stage_resizeHandler, false, 0, true); }; _local2 = (topLevelWindow = IUIComponent(create())); document = _local2; if (document){ IEventDispatcher(_local2).addEventListener(FlexEvent.CREATION_COMPLETE, appCreationCompleteHandler); if (((topLevel) && (stage))){ LoaderConfig._url = loaderInfo.url; LoaderConfig._parameters = loaderInfo.parameters; _width = stage.stageWidth; _height = stage.stageHeight; IFlexDisplayObject(_local2).setActualSize(stage.stageWidth, stage.stageHeight); } else { IFlexDisplayObject(_local2).setActualSize(loaderInfo.width, loaderInfo.height); }; if (preloader){ preloader.registerApplication(_local2); }; addingChild(DisplayObject(_local2)); childAdded(DisplayObject(_local2)); } else { document = this; }; } public function get numModalWindows():int{ return (_numModalWindows); } public function isTopLevelWindow(_arg1:DisplayObject):Boolean{ return ((((_arg1 is IUIComponent)) && ((IUIComponent(_arg1) == topLevelWindow)))); } override public function get width():Number{ return (_width); } public function move(_arg1:Number, _arg2:Number):void{ } public function set explicitWidth(_arg1:Number):void{ _explicitWidth = _arg1; } private function preloader_initProgressHandler(_arg1:Event):void{ preloader.removeEventListener(FlexEvent.INIT_PROGRESS, preloader_initProgressHandler); deferredNextFrame(); } public function get explicitWidth():Number{ return (_explicitWidth); } mx_internal function rawChildren_addChild(_arg1:DisplayObject):DisplayObject{ addingChild(_arg1); super.addChild(_arg1); childAdded(_arg1); return (_arg1); } public static function getSWFRoot(_arg1:Object):DisplayObject{ var p:*; var sm:ISystemManager; var domain:ApplicationDomain; var cls:Class; var object = _arg1; var className:String = getQualifiedClassName(object); for (p in allSystemManagers) { sm = (p as ISystemManager); domain = sm.loaderInfo.applicationDomain; try { cls = Class(domain.getDefinition(className)); if ((object is cls)){ return ((sm as DisplayObject)); }; } catch(e:Error) { }; }; return (null); } mx_internal static function registerInitCallback(_arg1:Function):void{ if (((!(allSystemManagers)) || (!(lastSystemManager)))){ return; }; var _local2:SystemManager = lastSystemManager; if (_local2.doneExecutingInitCallbacks){ _arg1(_local2); } else { _local2.initCallbackFunctions.push(_arg1); }; } } }//package mx.managers
Section 296
//SystemManagerGlobals (mx.managers.SystemManagerGlobals) package mx.managers { public class SystemManagerGlobals { public static var topLevelSystemManagers:Array = []; public static var bootstrapLoaderInfoURL:String; } }//package mx.managers
Section 297
//SystemRawChildrenList (mx.managers.SystemRawChildrenList) package mx.managers { import flash.display.*; import flash.geom.*; import mx.core.*; public class SystemRawChildrenList implements IChildList { private var owner:SystemManager; mx_internal static const VERSION:String = "3.0.0.0"; public function SystemRawChildrenList(_arg1:SystemManager){ this.owner = _arg1; } public function getChildAt(_arg1:int):DisplayObject{ return (owner.mx_internal::rawChildren_getChildAt(_arg1)); } public function addChild(_arg1:DisplayObject):DisplayObject{ return (owner.mx_internal::rawChildren_addChild(_arg1)); } public function getChildIndex(_arg1:DisplayObject):int{ return (owner.mx_internal::rawChildren_getChildIndex(_arg1)); } public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{ var _local3 = owner; _local3.mx_internal::rawChildren_setChildIndex(_arg1, _arg2); } public function getChildByName(_arg1:String):DisplayObject{ return (owner.mx_internal::rawChildren_getChildByName(_arg1)); } public function removeChildAt(_arg1:int):DisplayObject{ return (owner.mx_internal::rawChildren_removeChildAt(_arg1)); } public function get numChildren():int{ return (owner.mx_internal::$numChildren); } public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{ return (owner.mx_internal::rawChildren_addChildAt(_arg1, _arg2)); } public function getObjectsUnderPoint(_arg1:Point):Array{ return (owner.mx_internal::rawChildren_getObjectsUnderPoint(_arg1)); } public function contains(_arg1:DisplayObject):Boolean{ return (owner.mx_internal::rawChildren_contains(_arg1)); } public function removeChild(_arg1:DisplayObject):DisplayObject{ return (owner.mx_internal::rawChildren_removeChild(_arg1)); } } }//package mx.managers
Section 298
//ToolTipManager (mx.managers.ToolTipManager) package mx.managers { import flash.display.*; import mx.core.*; import flash.events.*; import mx.effects.*; public class ToolTipManager extends EventDispatcher { mx_internal static const VERSION:String = "3.0.0.0"; private static var implClassDependency:ToolTipManagerImpl; private static var _impl:IToolTipManager2; mx_internal static function registerToolTip(_arg1:DisplayObject, _arg2:String, _arg3:String):void{ impl.registerToolTip(_arg1, _arg2, _arg3); } public static function get enabled():Boolean{ return (impl.enabled); } public static function set enabled(_arg1:Boolean):void{ impl.enabled = _arg1; } public static function createToolTip(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String=null, _arg5:IUIComponent=null):IToolTip{ return (impl.createToolTip(_arg1, _arg2, _arg3, _arg4, _arg5)); } public static function set hideDelay(_arg1:Number):void{ impl.hideDelay = _arg1; } public static function set showDelay(_arg1:Number):void{ impl.showDelay = _arg1; } public static function get showDelay():Number{ return (impl.showDelay); } public static function destroyToolTip(_arg1:IToolTip):void{ return (impl.destroyToolTip(_arg1)); } public static function get scrubDelay():Number{ return (impl.scrubDelay); } public static function get toolTipClass():Class{ return (impl.toolTipClass); } mx_internal static function registerErrorString(_arg1:DisplayObject, _arg2:String, _arg3:String):void{ impl.registerErrorString(_arg1, _arg2, _arg3); } mx_internal static function sizeTip(_arg1:IToolTip):void{ impl.sizeTip(_arg1); } public static function set currentTarget(_arg1:DisplayObject):void{ impl.currentTarget = _arg1; } public static function set showEffect(_arg1:IAbstractEffect):void{ impl.showEffect = _arg1; } private static function get impl():IToolTipManager2{ if (!_impl){ _impl = IToolTipManager2(Singleton.getInstance("mx.managers::IToolTipManager2")); }; return (_impl); } public static function get hideDelay():Number{ return (impl.hideDelay); } public static function set hideEffect(_arg1:IAbstractEffect):void{ impl.hideEffect = _arg1; } public static function set scrubDelay(_arg1:Number):void{ impl.scrubDelay = _arg1; } public static function get currentToolTip():IToolTip{ return (impl.currentToolTip); } public static function set currentToolTip(_arg1:IToolTip):void{ impl.currentToolTip = _arg1; } public static function get showEffect():IAbstractEffect{ return (impl.showEffect); } public static function get currentTarget():DisplayObject{ return (impl.currentTarget); } public static function get hideEffect():IAbstractEffect{ return (impl.hideEffect); } public static function set toolTipClass(_arg1:Class):void{ impl.toolTipClass = _arg1; } } }//package mx.managers
Section 299
//ToolTipManagerImpl (mx.managers.ToolTipManagerImpl) package mx.managers { import flash.display.*; import flash.geom.*; import mx.core.*; import flash.events.*; import mx.events.*; import mx.styles.*; import mx.controls.*; import mx.effects.*; import flash.utils.*; import mx.validators.*; public class ToolTipManagerImpl extends EventDispatcher implements IToolTipManager2 { private var _enabled:Boolean;// = true mx_internal var isError:Boolean; private var _showDelay:Number;// = 500 private var _hideEffect:IAbstractEffect; mx_internal var hideTimer:Timer; private var _scrubDelay:Number;// = 100 private var _toolTipClass:Class; mx_internal var currentText:String; mx_internal var showTimer:Timer; private var _currentToolTip:IToolTip; mx_internal var scrubTimer:Timer; mx_internal var previousTarget:DisplayObject; private var _currentTarget:DisplayObject; private var _showEffect:IAbstractEffect; mx_internal var initialized:Boolean;// = false private var _hideDelay:Number;// = 10000 mx_internal static const VERSION:String = "3.0.0.0"; private static var instance:IToolTipManager2; public function ToolTipManagerImpl(){ _toolTipClass = ToolTip; super(); if (instance){ throw (new Error("Instance already exists.")); }; } mx_internal function systemManager_mouseDownHandler(_arg1:MouseEvent):void{ reset(); } public function set showDelay(_arg1:Number):void{ _showDelay = _arg1; } mx_internal function hideEffectEnded():void{ var _local1:ToolTipEvent; reset(); if (previousTarget){ _local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_END); _local1.toolTip = currentToolTip; previousTarget.dispatchEvent(_local1); }; } public function set scrubDelay(_arg1:Number):void{ _scrubDelay = _arg1; } public function get currentToolTip():IToolTip{ return (_currentToolTip); } private function mouseIsOver(_arg1:DisplayObject):Boolean{ if (((!(_arg1)) || (!(_arg1.stage)))){ return (false); }; if ((((_arg1.stage.mouseX == 0)) && ((_arg1.stage.mouseY == 0)))){ return (false); }; return (_arg1.hitTestPoint(_arg1.stage.mouseX, _arg1.stage.mouseY, true)); } mx_internal function toolTipMouseOutHandler(_arg1:MouseEvent):void{ checkIfTargetChanged(_arg1.relatedObject); } public function get enabled():Boolean{ return (_enabled); } public function createToolTip(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String=null, _arg5:IUIComponent=null):IToolTip{ var _local6:ToolTip = new ToolTip(); var _local7:ISystemManager = (_arg5) ? _arg5.systemManager : ApplicationGlobals.application.systemManager; _local7.toolTipChildren.addChild(_local6); if (_arg4){ _local6.setStyle("styleName", "errorTip"); _local6.setStyle("borderStyle", _arg4); }; _local6.text = _arg1; sizeTip(_local6); _local6.move(_arg2, _arg3); return ((_local6 as IToolTip)); } mx_internal function reset():void{ var _local1:ISystemManager; showTimer.reset(); hideTimer.reset(); if (currentToolTip){ if (((showEffect) || (hideEffect))){ currentToolTip.removeEventListener(EffectEvent.EFFECT_END, effectEndHandler); }; EffectManager.endEffectsForTarget(currentToolTip); _local1 = currentToolTip.systemManager; _local1.toolTipChildren.removeChild(DisplayObject(currentToolTip)); currentToolTip = null; scrubTimer.delay = scrubDelay; scrubTimer.reset(); if (scrubDelay > 0){ scrubTimer.delay = scrubDelay; scrubTimer.start(); }; }; } public function get toolTipClass():Class{ return (_toolTipClass); } public function set currentToolTip(_arg1:IToolTip):void{ _currentToolTip = _arg1; } private function hideImmediately(_arg1:DisplayObject):void{ checkIfTargetChanged(null); } mx_internal function showTip():void{ var _local2:ISystemManager; var _local1:ToolTipEvent = new ToolTipEvent(ToolTipEvent.TOOL_TIP_SHOW); _local1.toolTip = currentToolTip; currentTarget.dispatchEvent(_local1); if (isError){ currentTarget.addEventListener("change", changeHandler); } else { _local2 = getSystemManager(currentTarget); _local2.addEventListener(MouseEvent.MOUSE_DOWN, systemManager_mouseDownHandler); }; currentToolTip.visible = true; if (!showEffect){ showEffectEnded(); }; } mx_internal function effectEndHandler(_arg1:EffectEvent):void{ if (_arg1.effectInstance.effect == showEffect){ showEffectEnded(); } else { if (_arg1.effectInstance.effect == hideEffect){ hideEffectEnded(); }; }; } public function get hideDelay():Number{ return (_hideDelay); } public function get currentTarget():DisplayObject{ return (_currentTarget); } mx_internal function showEffectEnded():void{ var _local1:ToolTipEvent; if (hideDelay == 0){ hideTip(); } else { if (hideDelay < Infinity){ hideTimer.delay = hideDelay; hideTimer.start(); }; }; if (currentTarget){ _local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_SHOWN); _local1.toolTip = currentToolTip; currentTarget.dispatchEvent(_local1); }; } public function get hideEffect():IAbstractEffect{ return (_hideEffect); } mx_internal function changeHandler(_arg1:Event):void{ reset(); } public function set enabled(_arg1:Boolean):void{ _enabled = _arg1; } mx_internal function errorTipMouseOverHandler(_arg1:MouseEvent):void{ checkIfTargetChanged(DisplayObject(_arg1.target)); } public function get showDelay():Number{ return (_showDelay); } public function registerErrorString(_arg1:DisplayObject, _arg2:String, _arg3:String):void{ if (((!(_arg2)) && (_arg3))){ _arg1.addEventListener(MouseEvent.MOUSE_OVER, errorTipMouseOverHandler); _arg1.addEventListener(MouseEvent.MOUSE_OUT, errorTipMouseOutHandler); if (mouseIsOver(_arg1)){ showImmediately(_arg1); }; } else { if (((_arg2) && (!(_arg3)))){ _arg1.removeEventListener(MouseEvent.MOUSE_OVER, errorTipMouseOverHandler); _arg1.removeEventListener(MouseEvent.MOUSE_OUT, errorTipMouseOutHandler); if (mouseIsOver(_arg1)){ hideImmediately(_arg1); }; }; }; } mx_internal function initialize():void{ if (!showTimer){ showTimer = new Timer(0, 1); showTimer.addEventListener(TimerEvent.TIMER, showTimer_timerHandler); }; if (!hideTimer){ hideTimer = new Timer(0, 1); hideTimer.addEventListener(TimerEvent.TIMER, hideTimer_timerHandler); }; if (!scrubTimer){ scrubTimer = new Timer(0, 1); }; initialized = true; } public function destroyToolTip(_arg1:IToolTip):void{ var _local2:ISystemManager = _arg1.systemManager; _local2.toolTipChildren.removeChild(DisplayObject(_arg1)); } public function get scrubDelay():Number{ return (_scrubDelay); } mx_internal function checkIfTargetChanged(_arg1:DisplayObject):void{ if (!enabled){ return; }; findTarget(_arg1); if (currentTarget != previousTarget){ targetChanged(); previousTarget = currentTarget; }; } public function set toolTipClass(_arg1:Class):void{ _toolTipClass = _arg1; } private function getGlobalBounds(_arg1:DisplayObject):Rectangle{ var _local2:Point = new Point(0, 0); _local2 = _arg1.localToGlobal(_local2); return (new Rectangle(_local2.x, _local2.y, _arg1.width, _arg1.height)); } mx_internal function positionTip():void{ var _local1:Number; var _local2:Number; var _local5:Rectangle; var _local6:Point; var _local7:IToolTip; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local3:Number = currentToolTip.screen.width; var _local4:Number = currentToolTip.screen.height; if (isError){ _local5 = getGlobalBounds(currentTarget); _local1 = (_local5.right + 4); _local2 = (_local5.top - 1); if ((_local1 + currentToolTip.width) > _local3){ _local8 = NaN; _local9 = NaN; _local1 = (_local5.left - 2); if (((_local1 + currentToolTip.width) + 4) > _local3){ _local8 = ((_local3 - _local1) - 4); _local9 = Object(toolTipClass).maxWidth; Object(toolTipClass).maxWidth = _local8; if ((currentToolTip is IStyleClient)){ IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipAbove"); }; currentToolTip["text"] = currentToolTip["text"]; Object(toolTipClass).maxWidth = _local9; } else { if ((currentToolTip is IStyleClient)){ IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipAbove"); }; currentToolTip["text"] = currentToolTip["text"]; }; if ((currentToolTip.height + 2) < _local5.top){ _local2 = (_local5.top - (currentToolTip.height + 2)); } else { _local2 = (_local5.bottom + 2); if (!isNaN(_local8)){ Object(toolTipClass).maxWidth = _local8; }; if ((currentToolTip is IStyleClient)){ IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipBelow"); }; currentToolTip["text"] = currentToolTip["text"]; if (!isNaN(_local9)){ Object(toolTipClass).maxWidth = _local9; }; }; }; sizeTip(currentToolTip); _local6 = new Point(_local1, _local2); _local7 = currentToolTip; _local6 = DisplayObject(_local7).root.globalToLocal(_local6); _local1 = _local6.x; _local2 = _local6.y; } else { _local1 = (ApplicationGlobals.application.mouseX + 11); _local2 = (ApplicationGlobals.application.mouseY + 22); _local10 = currentToolTip.width; if ((_local1 + _local10) > _local3){ _local1 = (_local3 - _local10); }; _local11 = currentToolTip.height; if ((_local2 + _local11) > _local4){ _local2 = (_local4 - _local11); }; }; currentToolTip.move(_local1, _local2); } mx_internal function errorTipMouseOutHandler(_arg1:MouseEvent):void{ checkIfTargetChanged(_arg1.relatedObject); } mx_internal function findTarget(_arg1:DisplayObject):void{ while (_arg1) { if ((_arg1 is IValidatorListener)){ currentText = IValidatorListener(_arg1).errorString; if (((!((currentText == null))) && (!((currentText == ""))))){ currentTarget = _arg1; isError = true; return; }; }; if ((_arg1 is IToolTipManagerClient)){ currentText = IToolTipManagerClient(_arg1).toolTip; if (currentText != null){ currentTarget = _arg1; isError = false; return; }; }; _arg1 = _arg1.parent; }; currentText = null; currentTarget = null; } public function registerToolTip(_arg1:DisplayObject, _arg2:String, _arg3:String):void{ if (((!(_arg2)) && (_arg3))){ _arg1.addEventListener(MouseEvent.MOUSE_OVER, toolTipMouseOverHandler); _arg1.addEventListener(MouseEvent.MOUSE_OUT, toolTipMouseOutHandler); if (mouseIsOver(_arg1)){ showImmediately(_arg1); }; } else { if (((_arg2) && (!(_arg3)))){ _arg1.removeEventListener(MouseEvent.MOUSE_OVER, toolTipMouseOverHandler); _arg1.removeEventListener(MouseEvent.MOUSE_OUT, toolTipMouseOutHandler); if (mouseIsOver(_arg1)){ hideImmediately(_arg1); }; }; }; } private function showImmediately(_arg1:DisplayObject):void{ var _local2:Number = ToolTipManager.showDelay; ToolTipManager.showDelay = 0; checkIfTargetChanged(_arg1); ToolTipManager.showDelay = _local2; } public function set hideDelay(_arg1:Number):void{ _hideDelay = _arg1; } private function getSystemManager(_arg1:DisplayObject):ISystemManager{ return (((_arg1 is IUIComponent)) ? IUIComponent(_arg1).systemManager : null); } public function set currentTarget(_arg1:DisplayObject):void{ _currentTarget = _arg1; } public function sizeTip(_arg1:IToolTip):void{ if ((_arg1 is IInvalidating)){ IInvalidating(_arg1).validateNow(); }; _arg1.setActualSize(_arg1.getExplicitOrMeasuredWidth(), _arg1.getExplicitOrMeasuredHeight()); } mx_internal function showTimer_timerHandler(_arg1:TimerEvent):void{ if (currentTarget){ createTip(); initializeTip(); positionTip(); showTip(); }; } mx_internal function hideTimer_timerHandler(_arg1:TimerEvent):void{ hideTip(); } public function set showEffect(_arg1:IAbstractEffect):void{ _showEffect = (_arg1 as IAbstractEffect); } public function set hideEffect(_arg1:IAbstractEffect):void{ _hideEffect = (_arg1 as IAbstractEffect); } mx_internal function targetChanged():void{ var _local1:ToolTipEvent; if (!initialized){ initialize(); }; if (((previousTarget) && (currentToolTip))){ _local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_HIDE); _local1.toolTip = currentToolTip; previousTarget.dispatchEvent(_local1); }; reset(); if (currentTarget){ if (currentText == ""){ return; }; _local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_START); currentTarget.dispatchEvent(_local1); if ((((showDelay == 0)) || (scrubTimer.running))){ createTip(); initializeTip(); positionTip(); showTip(); } else { showTimer.delay = showDelay; showTimer.start(); }; }; } mx_internal function initializeTip():void{ if ((currentToolTip is ToolTip)){ ToolTip(currentToolTip).text = currentText; }; if (((isError) && ((currentToolTip is IStyleClient)))){ IStyleClient(currentToolTip).setStyle("styleName", "errorTip"); }; sizeTip(currentToolTip); if ((currentToolTip is IStyleClient)){ if (showEffect){ IStyleClient(currentToolTip).setStyle("showEffect", showEffect); }; if (hideEffect){ IStyleClient(currentToolTip).setStyle("hideEffect", hideEffect); }; }; if (((showEffect) || (hideEffect))){ currentToolTip.addEventListener(EffectEvent.EFFECT_END, effectEndHandler); }; } public function get showEffect():IAbstractEffect{ return (_showEffect); } mx_internal function toolTipMouseOverHandler(_arg1:MouseEvent):void{ checkIfTargetChanged(DisplayObject(_arg1.target)); } mx_internal function hideTip():void{ var _local1:ToolTipEvent; var _local2:ISystemManager; if (previousTarget){ _local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_HIDE); _local1.toolTip = currentToolTip; previousTarget.dispatchEvent(_local1); }; if (currentToolTip){ currentToolTip.visible = false; }; if (isError){ if (currentTarget){ currentTarget.removeEventListener("change", changeHandler); }; } else { if (previousTarget){ _local2 = getSystemManager(previousTarget); _local2.removeEventListener(MouseEvent.MOUSE_DOWN, systemManager_mouseDownHandler); }; }; if (!hideEffect){ hideEffectEnded(); }; } mx_internal function createTip():void{ var _local1:ToolTipEvent = new ToolTipEvent(ToolTipEvent.TOOL_TIP_CREATE); currentTarget.dispatchEvent(_local1); if (_local1.toolTip){ currentToolTip = _local1.toolTip; } else { currentToolTip = new toolTipClass(); }; currentToolTip.visible = false; var _local2:ISystemManager = getSystemManager(currentTarget); _local2.toolTipChildren.addChild(DisplayObject(currentToolTip)); } public static function getInstance():IToolTipManager2{ if (!instance){ instance = new (ToolTipManagerImpl); }; return (instance); } } }//package mx.managers
Section 300
//LoaderConfig (mx.messaging.config.LoaderConfig) package mx.messaging.config { import mx.core.*; public class LoaderConfig { mx_internal static const VERSION:String = "3.0.0.0"; mx_internal static var _url:String = null; mx_internal static var _parameters:Object; public static function get url():String{ return (_url); } public static function get parameters():Object{ return (_parameters); } } }//package mx.messaging.config
Section 301
//IModuleInfo (mx.modules.IModuleInfo) package mx.modules { import mx.core.*; import flash.events.*; import flash.system.*; public interface IModuleInfo extends IEventDispatcher { function get ready():Boolean; function get loaded():Boolean; function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null):void; function release():void; function get error():Boolean; function get data():Object; function publish(_arg1:IFlexModuleFactory):void; function get factory():IFlexModuleFactory; function set data(_arg1:Object):void; function get url():String; function get setup():Boolean; function unload():void; } }//package mx.modules
Section 302
//ModuleManager (mx.modules.ModuleManager) package mx.modules { import mx.core.*; public class ModuleManager { mx_internal static const VERSION:String = "3.0.0.0"; public static function getModule(_arg1:String):IModuleInfo{ return (getSingleton().getModule(_arg1)); } private static function getSingleton():Object{ if (!ModuleManagerGlobals.managerSingleton){ ModuleManagerGlobals.managerSingleton = new ModuleManagerImpl(); }; return (ModuleManagerGlobals.managerSingleton); } public static function getAssociatedFactory(_arg1:Object):IFlexModuleFactory{ return (getSingleton().getAssociatedFactory(_arg1)); } } }//package mx.modules import flash.display.*; import mx.core.*; import flash.events.*; import mx.events.*; import flash.system.*; import flash.net.*; import flash.utils.*; class ModuleInfoProxy extends EventDispatcher implements IModuleInfo { private var _data:Object; private var info:ModuleInfo; private var referenced:Boolean;// = false private function ModuleInfoProxy(_arg1:ModuleInfo){ this.info = _arg1; _arg1.addEventListener(ModuleEvent.SETUP, moduleEventHandler, false, 0, true); _arg1.addEventListener(ModuleEvent.PROGRESS, moduleEventHandler, false, 0, true); _arg1.addEventListener(ModuleEvent.READY, moduleEventHandler, false, 0, true); _arg1.addEventListener(ModuleEvent.ERROR, moduleEventHandler, false, 0, true); _arg1.addEventListener(ModuleEvent.UNLOAD, moduleEventHandler, false, 0, true); } public function get loaded():Boolean{ return (info.loaded); } public function release():void{ if (referenced){ info.removeReference(); referenced = false; }; } public function get error():Boolean{ return (info.error); } public function get factory():IFlexModuleFactory{ return (info.factory); } public function publish(_arg1:IFlexModuleFactory):void{ info.publish(_arg1); } public function set data(_arg1:Object):void{ _data = _arg1; } public function get ready():Boolean{ return (info.ready); } public function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null):void{ var _local3:ModuleEvent; info.resurrect(); if (!referenced){ info.addReference(); referenced = true; }; if (info.error){ dispatchEvent(new ModuleEvent(ModuleEvent.ERROR)); } else { if (info.loaded){ if (info.setup){ dispatchEvent(new ModuleEvent(ModuleEvent.SETUP)); if (info.ready){ _local3 = new ModuleEvent(ModuleEvent.PROGRESS); _local3.bytesLoaded = info.size; _local3.bytesTotal = info.size; dispatchEvent(_local3); dispatchEvent(new ModuleEvent(ModuleEvent.READY)); }; }; } else { info.load(_arg1, _arg2); }; }; } private function moduleEventHandler(_arg1:ModuleEvent):void{ dispatchEvent(_arg1); } public function get url():String{ return (info.url); } public function get data():Object{ return (_data); } public function get setup():Boolean{ return (info.setup); } public function unload():void{ info.unload(); info.removeEventListener(ModuleEvent.SETUP, moduleEventHandler); info.removeEventListener(ModuleEvent.PROGRESS, moduleEventHandler); info.removeEventListener(ModuleEvent.READY, moduleEventHandler); info.removeEventListener(ModuleEvent.ERROR, moduleEventHandler); info.removeEventListener(ModuleEvent.UNLOAD, moduleEventHandler); } } class ModuleManagerImpl extends EventDispatcher { private var moduleList:Object; private function ModuleManagerImpl(){ moduleList = {}; super(); } public function getModule(_arg1:String):IModuleInfo{ var _local2:ModuleInfo = (moduleList[_arg1] as ModuleInfo); if (!_local2){ _local2 = new ModuleInfo(_arg1); moduleList[_arg1] = _local2; }; return (new ModuleInfoProxy(_local2)); } public function getAssociatedFactory(_arg1:Object):IFlexModuleFactory{ var m:Object; var info:ModuleInfo; var domain:ApplicationDomain; var cls:Class; var object = _arg1; var className:String = getQualifiedClassName(object); for each (m in moduleList) { info = (m as ModuleInfo); if (!info.ready){ } else { domain = info.applicationDomain; try { cls = Class(domain.getDefinition(className)); if ((object is cls)){ return (info.factory); }; } catch(error:Error) { }; }; }; return (null); } } class ModuleInfo extends EventDispatcher { private var _error:Boolean;// = false private var loader:Loader; private var factoryInfo:FactoryInfo; private var limbo:Dictionary; private var _loaded:Boolean;// = false private var _ready:Boolean;// = false private var numReferences:int;// = 0 private var _url:String; private var _setup:Boolean;// = false private function ModuleInfo(_arg1:String){ _url = _arg1; } private function clearLoader():void{ if (loader){ if (loader.contentLoaderInfo){ loader.contentLoaderInfo.removeEventListener(Event.INIT, initHandler); loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, completeHandler); loader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, progressHandler); loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler); loader.contentLoaderInfo.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler); }; try { if (loader.content){ loader.content.removeEventListener("ready", readyHandler); }; } catch(error:Error) { }; if (_loaded){ try { loader.close(); } catch(error:Error) { }; }; try { loader.unload(); } catch(error:Error) { }; loader = null; }; } public function get size():int{ return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.bytesTotal : 0); } public function get loaded():Boolean{ return ((limbo) ? false : _loaded); } public function release():void{ if (((_ready) && (!(limbo)))){ limbo = new Dictionary(true); limbo[factoryInfo] = 1; factoryInfo = null; } else { unload(); }; } public function get error():Boolean{ return ((limbo) ? false : _error); } public function get factory():IFlexModuleFactory{ return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.factory : null); } public function completeHandler(_arg1:Event):void{ var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable); _local2.bytesLoaded = loader.contentLoaderInfo.bytesLoaded; _local2.bytesTotal = loader.contentLoaderInfo.bytesTotal; dispatchEvent(_local2); } public function publish(_arg1:IFlexModuleFactory):void{ if (factoryInfo){ return; }; if (_url.indexOf("published://") != 0){ return; }; factoryInfo = new FactoryInfo(); factoryInfo.factory = _arg1; _loaded = true; _setup = true; _ready = true; _error = false; dispatchEvent(new ModuleEvent(ModuleEvent.SETUP)); dispatchEvent(new ModuleEvent(ModuleEvent.PROGRESS)); dispatchEvent(new ModuleEvent(ModuleEvent.READY)); } public function initHandler(_arg1:Event):void{ var moduleEvent:ModuleEvent; var event = _arg1; factoryInfo = new FactoryInfo(); try { factoryInfo.factory = (loader.content as IFlexModuleFactory); } catch(error:Error) { }; if (!factoryInfo.factory){ moduleEvent = new ModuleEvent(ModuleEvent.ERROR, event.bubbles, event.cancelable); moduleEvent.bytesLoaded = 0; moduleEvent.bytesTotal = 0; moduleEvent.errorText = "SWF is not a loadable module"; dispatchEvent(moduleEvent); return; }; loader.content.addEventListener("ready", readyHandler); try { factoryInfo.applicationDomain = loader.contentLoaderInfo.applicationDomain; } catch(error:Error) { }; _setup = true; dispatchEvent(new ModuleEvent(ModuleEvent.SETUP)); } public function resurrect():void{ var _local1:Object; if (((!(factoryInfo)) && (limbo))){ for (_local1 in limbo) { factoryInfo = (_local1 as FactoryInfo); break; }; limbo = null; }; if (!factoryInfo){ if (_loaded){ dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD)); }; loader = null; _loaded = false; _setup = false; _ready = false; _error = false; }; } public function errorHandler(_arg1:ErrorEvent):void{ _error = true; var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.ERROR, _arg1.bubbles, _arg1.cancelable); _local2.bytesLoaded = 0; _local2.bytesTotal = 0; _local2.errorText = _arg1.text; dispatchEvent(_local2); } public function get ready():Boolean{ return ((limbo) ? false : _ready); } public function removeReference():void{ numReferences--; if (numReferences == 0){ release(); }; } public function addReference():void{ numReferences++; } public function progressHandler(_arg1:ProgressEvent):void{ var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable); _local2.bytesLoaded = _arg1.bytesLoaded; _local2.bytesTotal = _arg1.bytesTotal; dispatchEvent(_local2); } public function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null):void{ if (_loaded){ return; }; _loaded = true; limbo = null; if (_url.indexOf("published://") == 0){ return; }; var _local3:URLRequest = new URLRequest(_url); var _local4:LoaderContext = new LoaderContext(); _local4.applicationDomain = (_arg1) ? _arg1 : new ApplicationDomain(ApplicationDomain.currentDomain); _local4.securityDomain = _arg2; if ((((_arg2 == null)) && ((Security.sandboxType == Security.REMOTE)))){ _local4.securityDomain = SecurityDomain.currentDomain; }; loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler); loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler); loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler); loader.load(_local3, _local4); } public function get url():String{ return (_url); } public function get applicationDomain():ApplicationDomain{ return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.applicationDomain : null); } public function readyHandler(_arg1:Event):void{ _ready = true; factoryInfo.bytesTotal = loader.contentLoaderInfo.bytesTotal; clearLoader(); dispatchEvent(new ModuleEvent(ModuleEvent.READY)); } public function get setup():Boolean{ return ((limbo) ? false : _setup); } public function unload():void{ clearLoader(); if (_loaded){ dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD)); }; limbo = null; factoryInfo = null; _loaded = false; _setup = false; _ready = false; _error = false; } } class FactoryInfo { public var bytesTotal:int;// = 0 public var factory:IFlexModuleFactory; public var applicationDomain:ApplicationDomain; private function FactoryInfo(){ } }
Section 303
//ModuleManagerGlobals (mx.modules.ModuleManagerGlobals) package mx.modules { public class ModuleManagerGlobals { public static var managerSingleton:Object = null; } }//package mx.modules
Section 304
//DownloadProgressBar (mx.preloaders.DownloadProgressBar) package mx.preloaders { import flash.display.*; import flash.geom.*; import mx.core.*; import flash.text.*; import flash.events.*; import mx.events.*; import flash.system.*; import mx.graphics.*; import flash.net.*; import flash.utils.*; public class DownloadProgressBar extends Sprite implements IPreloaderDisplay { protected var MINIMUM_DISPLAY_TIME:uint;// = 0 private var _barFrameRect:RoundedRectangle; private var _stageHeight:Number;// = 375 private var _stageWidth:Number;// = 500 private var _percentRect:Rectangle; private var _percentObj:TextField; private var _downloadingLabel:String;// = "Loading" private var _showProgressBar:Boolean;// = true private var _yOffset:Number;// = 20 private var _initProgressCount:uint;// = 0 private var _barSprite:Sprite; private var _visible:Boolean;// = false private var _barRect:RoundedRectangle; private var _showingDisplay:Boolean;// = false private var _backgroundSize:String;// = "" private var _initProgressTotal:uint;// = 12 private var _startedInit:Boolean;// = false private var _showLabel:Boolean;// = true private var _value:Number;// = 0 private var _labelRect:Rectangle; private var _backgroundImage:Object; private var _backgroundAlpha:Number;// = 1 private var _backgroundColor:uint; private var _startedLoading:Boolean;// = false private var _showPercentage:Boolean;// = false private var _barFrameSprite:Sprite; protected var DOWNLOAD_PERCENTAGE:uint;// = 60 private var _displayStartCount:uint;// = 0 private var _labelObj:TextField; private var _borderRect:RoundedRectangle; private var _maximum:Number;// = 0 private var _displayTime:int; private var _label:String;// = "" private var _preloader:Sprite; private var _xOffset:Number;// = 20 private var _startTime:int; mx_internal static const VERSION:String = "3.0.0.0"; private static var _initializingLabel:String = "Initializing"; public function DownloadProgressBar(){ _labelRect = labelRect; _percentRect = percentRect; _borderRect = borderRect; _barFrameRect = barFrameRect; _barRect = barRect; super(); } protected function getPercentLoaded(_arg1:Number, _arg2:Number):Number{ var _local3:Number; if ((((((((_arg1 == 0)) || ((_arg2 == 0)))) || (isNaN(_arg2)))) || (isNaN(_arg1)))){ return (0); }; _local3 = ((100 * _arg1) / _arg2); if (((isNaN(_local3)) || ((_local3 <= 0)))){ return (0); }; if (_local3 > 99){ return (99); }; return (Math.round(_local3)); } protected function get labelFormat():TextFormat{ var _local1:TextFormat = new TextFormat(); _local1.color = 0x333333; _local1.font = "Verdana"; _local1.size = 10; return (_local1); } private function calcScale():void{ var _local1:Number; if ((((stageWidth < 160)) || ((stageHeight < 120)))){ scaleX = 1; scaleY = 1; } else { if ((((stageWidth < 240)) || ((stageHeight < 150)))){ createChildren(); _local1 = Math.min((stageWidth / 240), (stageHeight / 150)); scaleX = _local1; scaleY = _local1; } else { createChildren(); }; }; } protected function get percentRect():Rectangle{ return (new Rectangle(108, 4, 34, 16)); } protected function set showLabel(_arg1:Boolean):void{ _showLabel = _arg1; draw(); } private function calcBackgroundSize():Number{ var _local2:int; var _local1:Number = NaN; if (backgroundSize){ _local2 = backgroundSize.indexOf("%"); if (_local2 != -1){ _local1 = Number(backgroundSize.substr(0, _local2)); }; }; return (_local1); } private function show():void{ _showingDisplay = true; calcScale(); draw(); _displayTime = getTimer(); } private function loadBackgroundImage(_arg1:Object):void{ var cls:Class; var newStyleObj:DisplayObject; var loader:Loader; var loaderContext:LoaderContext; var classOrString = _arg1; if (((classOrString) && ((classOrString as Class)))){ cls = Class(classOrString); initBackgroundImage(new (cls)); } else { if (((classOrString) && ((classOrString is String)))){ try { cls = Class(getDefinitionByName(String(classOrString))); } catch(e:Error) { }; if (cls){ newStyleObj = new (cls); initBackgroundImage(newStyleObj); } else { loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loader_completeHandler); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loader_ioErrorHandler); loaderContext = new LoaderContext(); loaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain); loader.load(new URLRequest(String(classOrString)), loaderContext); }; }; }; } protected function set showPercentage(_arg1:Boolean):void{ _showPercentage = _arg1; draw(); } protected function get barFrameRect():RoundedRectangle{ return (new RoundedRectangle(14, 40, 154, 4)); } private function loader_ioErrorHandler(_arg1:IOErrorEvent):void{ } protected function rslErrorHandler(_arg1:RSLEvent):void{ _preloader.removeEventListener(ProgressEvent.PROGRESS, progressHandler); _preloader.removeEventListener(Event.COMPLETE, completeHandler); _preloader.removeEventListener(RSLEvent.RSL_PROGRESS, rslProgressHandler); _preloader.removeEventListener(RSLEvent.RSL_COMPLETE, rslCompleteHandler); _preloader.removeEventListener(RSLEvent.RSL_ERROR, rslErrorHandler); _preloader.removeEventListener(FlexEvent.INIT_PROGRESS, initProgressHandler); _preloader.removeEventListener(FlexEvent.INIT_COMPLETE, initCompleteHandler); if (!_showingDisplay){ show(); _showingDisplay = true; }; label = ((("RSL Error " + (_arg1.rslIndex + 1)) + " of ") + _arg1.rslTotal); var _local2:ErrorField = new ErrorField(this.parent); _local2.show(_arg1.errorText); } protected function rslCompleteHandler(_arg1:RSLEvent):void{ label = ((("Loaded library " + _arg1.rslIndex) + " of ") + _arg1.rslTotal); } protected function get borderRect():RoundedRectangle{ return (new RoundedRectangle(0, 0, 182, 60, 4)); } protected function showDisplayForDownloading(_arg1:int, _arg2:ProgressEvent):Boolean{ return ((((_arg1 > 700)) && ((_arg2.bytesLoaded < (_arg2.bytesTotal / 2))))); } protected function createChildren():void{ var _local2:TextField; var _local3:TextField; var _local1:Graphics = graphics; if (backgroundColor != 4294967295){ _local1.beginFill(backgroundColor, backgroundAlpha); _local1.drawRect(0, 0, stageWidth, stageHeight); }; if (backgroundImage != null){ loadBackgroundImage(backgroundImage); }; _barFrameSprite = new Sprite(); _barSprite = new Sprite(); addChild(_barFrameSprite); addChild(_barSprite); _local1.beginFill(0xCCCCCC, 0.4); _local1.drawRoundRect(calcX(_borderRect.x), calcY(_borderRect.y), _borderRect.width, _borderRect.height, (_borderRect.cornerRadius * 2), (_borderRect.cornerRadius * 2)); _local1.drawRoundRect(calcX((_borderRect.x + 1)), calcY((_borderRect.y + 1)), (_borderRect.width - 2), (_borderRect.height - 2), (_borderRect.cornerRadius - (1 * 2)), (_borderRect.cornerRadius - (1 * 2))); _local1.endFill(); _local1.beginFill(0xCCCCCC, 0.4); _local1.drawRoundRect(calcX((_borderRect.x + 1)), calcY((_borderRect.y + 1)), (_borderRect.width - 2), (_borderRect.height - 2), (_borderRect.cornerRadius - (1 * 2)), (_borderRect.cornerRadius - (1 * 2))); _local1.endFill(); var _local4:Graphics = _barFrameSprite.graphics; var _local5:Matrix = new Matrix(); _local5.createGradientBox(_barFrameRect.width, _barFrameRect.height, (Math.PI / 2), calcX(_barFrameRect.x), calcY(_barFrameRect.y)); _local4.beginGradientFill(GradientType.LINEAR, [6054502, 11909306], [1, 1], [0, 0xFF], _local5); _local4.drawRoundRect(calcX(_barFrameRect.x), calcY(_barFrameRect.y), _barFrameRect.width, _barFrameRect.height, (_barFrameRect.cornerRadius * 2), (_barFrameRect.cornerRadius * 2)); _local4.drawRoundRect(calcX((_barFrameRect.x + 1)), calcY((_barFrameRect.y + 1)), (_barFrameRect.width - 2), (_barFrameRect.height - 2), (_barFrameRect.cornerRadius * 2), (_barFrameRect.cornerRadius * 2)); _local4.endFill(); _labelObj = new TextField(); _labelObj.x = calcX(_labelRect.x); _labelObj.y = calcY(_labelRect.y); _labelObj.width = _labelRect.width; _labelObj.height = _labelRect.height; _labelObj.selectable = false; _labelObj.defaultTextFormat = labelFormat; addChild(_labelObj); _percentObj = new TextField(); _percentObj.x = calcX(_percentRect.x); _percentObj.y = calcY(_percentRect.y); _percentObj.width = _percentRect.width; _percentObj.height = _percentRect.height; _percentObj.selectable = false; _percentObj.defaultTextFormat = percentFormat; addChild(_percentObj); var _local6:RectangularDropShadow = new RectangularDropShadow(); _local6.color = 0; _local6.angle = 90; _local6.alpha = 0.6; _local6.distance = 2; _local6.tlRadius = (_local6.trRadius = (_local6.blRadius = (_local6.brRadius = _borderRect.cornerRadius))); _local6.drawShadow(_local1, calcX(_borderRect.x), calcY(_borderRect.y), _borderRect.width, _borderRect.height); _local1.lineStyle(1, 0xFFFFFF, 0.3); _local1.moveTo((calcX(_borderRect.x) + _borderRect.cornerRadius), calcY(_borderRect.y)); _local1.lineTo(((calcX(_borderRect.x) - _borderRect.cornerRadius) + _borderRect.width), calcY(_borderRect.y)); } private function draw():void{ var _local1:Number; if (_startedLoading){ if (!_startedInit){ _local1 = Math.round(((getPercentLoaded(_value, _maximum) * DOWNLOAD_PERCENTAGE) / 100)); } else { _local1 = Math.round((((getPercentLoaded(_value, _maximum) * (100 - DOWNLOAD_PERCENTAGE)) / 100) + DOWNLOAD_PERCENTAGE)); }; } else { _local1 = getPercentLoaded(_value, _maximum); }; if (_labelObj){ _labelObj.text = _label; }; if (_percentObj){ if (!_showPercentage){ _percentObj.visible = false; _percentObj.text = ""; } else { _percentObj.text = (String(_local1) + "%"); }; }; if (((_barSprite) && (_barFrameSprite))){ if (!_showProgressBar){ _barSprite.visible = false; _barFrameSprite.visible = false; } else { drawProgressBar(_local1); }; }; } private function timerHandler(_arg1:Event=null):void{ dispatchEvent(new Event(Event.COMPLETE)); } private function hide():void{ } public function get backgroundSize():String{ return (_backgroundSize); } protected function center(_arg1:Number, _arg2:Number):void{ _xOffset = Math.floor(((_arg1 - _borderRect.width) / 2)); _yOffset = Math.floor(((_arg2 - _borderRect.height) / 2)); } protected function progressHandler(_arg1:ProgressEvent):void{ var _local2:uint = _arg1.bytesLoaded; var _local3:uint = _arg1.bytesTotal; var _local4:int = (getTimer() - _startTime); if (((_showingDisplay) || (showDisplayForDownloading(_local4, _arg1)))){ if (!_startedLoading){ show(); label = downloadingLabel; _startedLoading = true; }; setProgress(_arg1.bytesLoaded, _arg1.bytesTotal); }; } protected function initProgressHandler(_arg1:Event):void{ var _local3:Number; var _local2:int = (getTimer() - _startTime); _initProgressCount++; if (((!(_showingDisplay)) && (showDisplayForInit(_local2, _initProgressCount)))){ _displayStartCount = _initProgressCount; show(); } else { if (_showingDisplay){ if (!_startedInit){ _startedInit = true; label = initializingLabel; }; _local3 = ((100 * _initProgressCount) / (_initProgressTotal - _displayStartCount)); setProgress(_local3, 100); }; }; } protected function set downloadingLabel(_arg1:String):void{ _downloadingLabel = _arg1; } public function get stageWidth():Number{ return (_stageWidth); } protected function get showPercentage():Boolean{ return (_showPercentage); } override public function get visible():Boolean{ return (_visible); } public function set stageHeight(_arg1:Number):void{ _stageHeight = _arg1; } public function initialize():void{ _startTime = getTimer(); center(stageWidth, stageHeight); } protected function rslProgressHandler(_arg1:RSLEvent):void{ } protected function get barRect():RoundedRectangle{ return (new RoundedRectangle(14, 39, 154, 6, 0)); } protected function get percentFormat():TextFormat{ var _local1:TextFormat = new TextFormat(); _local1.align = "right"; _local1.color = 0; _local1.font = "Verdana"; _local1.size = 10; return (_local1); } public function set backgroundImage(_arg1:Object):void{ _backgroundImage = _arg1; } private function calcX(_arg1:Number):Number{ return ((_arg1 + _xOffset)); } private function calcY(_arg1:Number):Number{ return ((_arg1 + _yOffset)); } public function set backgroundAlpha(_arg1:Number):void{ _backgroundAlpha = _arg1; } private function initCompleteHandler(_arg1:Event):void{ var _local3:Timer; var _local2:int = (getTimer() - _displayTime); if (((_showingDisplay) && ((_local2 < MINIMUM_DISPLAY_TIME)))){ _local3 = new Timer((MINIMUM_DISPLAY_TIME - _local2), 1); _local3.addEventListener(TimerEvent.TIMER, timerHandler); _local3.start(); } else { timerHandler(); }; } public function set backgroundColor(_arg1:uint):void{ _backgroundColor = _arg1; } private function initBackgroundImage(_arg1:DisplayObject):void{ var _local7:Number; var _local8:Number; var _local9:Number; addChildAt(_arg1, 0); var _local2:Number = _arg1.width; var _local3:Number = _arg1.height; var _local4:Number = calcBackgroundSize(); if (isNaN(_local4)){ _local7 = 1; _local8 = 1; } else { _local9 = (_local4 * 0.01); _local7 = ((_local9 * stageWidth) / _local2); _local8 = ((_local9 * stageHeight) / _local3); }; _arg1.scaleX = _local7; _arg1.scaleY = _local8; var _local5:Number = Math.round((0.5 * (stageWidth - (_local2 * _local7)))); var _local6:Number = Math.round((0.5 * (stageHeight - (_local3 * _local8)))); _arg1.x = _local5; _arg1.y = _local6; if (!isNaN(backgroundAlpha)){ _arg1.alpha = backgroundAlpha; }; } public function set backgroundSize(_arg1:String):void{ _backgroundSize = _arg1; } protected function showDisplayForInit(_arg1:int, _arg2:int):Boolean{ return ((((_arg1 > 300)) && ((_arg2 == 2)))); } protected function get downloadingLabel():String{ return (_downloadingLabel); } private function loader_completeHandler(_arg1:Event):void{ var _local2:DisplayObject = DisplayObject(LoaderInfo(_arg1.target).loader); initBackgroundImage(_local2); } protected function setProgress(_arg1:Number, _arg2:Number):void{ if (((((((!(isNaN(_arg1))) && (!(isNaN(_arg2))))) && ((_arg1 >= 0)))) && ((_arg2 > 0)))){ _value = Number(_arg1); _maximum = Number(_arg2); draw(); }; } public function get stageHeight():Number{ return (_stageHeight); } public function get backgroundImage():Object{ return (_backgroundImage); } public function get backgroundAlpha():Number{ if (!isNaN(_backgroundAlpha)){ return (_backgroundAlpha); }; return (1); } private function drawProgressBar(_arg1:Number):void{ var _local11:Number; var _local2:Graphics = _barSprite.graphics; _local2.clear(); var _local3:Array = [0xFFFFFF, 0xFFFFFF]; var _local4:Array = [0, 0xFF]; var _local5:Matrix = new Matrix(); var _local6:Number = ((_barRect.width * _arg1) / 100); var _local7:Number = (_local6 / 2); var _local8:Number = (_barRect.height - 4); var _local9:Number = calcX(_barRect.x); var _local10:Number = (calcY(_barRect.y) + 2); _local5.createGradientBox(_local7, _local8, 0, _local9, _local10); _local2.beginGradientFill(GradientType.LINEAR, _local3, [0.39, 0.85], _local4, _local5); _local2.drawRect(_local9, _local10, _local7, _local8); _local5.createGradientBox(_local7, _local8, 0, (_local9 + _local7), _local10); _local2.beginGradientFill(GradientType.LINEAR, _local3, [0.85, 1], _local4, _local5); _local2.drawRect((_local9 + _local7), _local10, _local7, _local8); _local7 = (_local6 / 3); _local8 = _barRect.height; _local10 = calcY(_barRect.y); _local11 = ((_local10 + _local8) - 1); _local5.createGradientBox(_local7, _local8, 0, _local9, _local10); _local2.beginGradientFill(GradientType.LINEAR, _local3, [0.05, 0.15], _local4, _local5); _local2.drawRect(_local9, _local10, _local7, 1); _local2.drawRect(_local9, _local11, _local7, 1); _local5.createGradientBox(_local7, _local8, 0, (_local9 + _local7), _local10); _local2.beginGradientFill(GradientType.LINEAR, _local3, [0.15, 0.25], _local4, _local5); _local2.drawRect((_local9 + _local7), _local10, _local7, 1); _local2.drawRect((_local9 + _local7), _local11, _local7, 1); _local5.createGradientBox(_local7, _local8, 0, (_local9 + (_local7 * 2)), _local10); _local2.beginGradientFill(GradientType.LINEAR, _local3, [0.25, 0.1], _local4, _local5); _local2.drawRect((_local9 + (_local7 * 2)), _local10, _local7, 1); _local2.drawRect((_local9 + (_local7 * 2)), _local11, _local7, 1); _local7 = (_local6 / 3); _local8 = _barRect.height; _local10 = (calcY(_barRect.y) + 1); _local11 = ((calcY(_barRect.y) + _local8) - 2); _local5.createGradientBox(_local7, _local8, 0, _local9, _local10); _local2.beginGradientFill(GradientType.LINEAR, _local3, [0.15, 0.3], _local4, _local5); _local2.drawRect(_local9, _local10, _local7, 1); _local2.drawRect(_local9, _local11, _local7, 1); _local5.createGradientBox(_local7, _local8, 0, (_local9 + _local7), _local10); _local2.beginGradientFill(GradientType.LINEAR, _local3, [0.3, 0.4], _local4, _local5); _local2.drawRect((_local9 + _local7), _local10, _local7, 1); _local2.drawRect((_local9 + _local7), _local11, _local7, 1); _local5.createGradientBox(_local7, _local8, 0, (_local9 + (_local7 * 2)), _local10); _local2.beginGradientFill(GradientType.LINEAR, _local3, [0.4, 0.25], _local4, _local5); _local2.drawRect((_local9 + (_local7 * 2)), _local10, _local7, 1); _local2.drawRect((_local9 + (_local7 * 2)), _local11, _local7, 1); } public function get backgroundColor():uint{ return (_backgroundColor); } public function set stageWidth(_arg1:Number):void{ _stageWidth = _arg1; } protected function completeHandler(_arg1:Event):void{ } protected function set label(_arg1:String):void{ if (!(_arg1 is Function)){ _label = _arg1; }; draw(); } public function set preloader(_arg1:Sprite):void{ _preloader = _arg1; _arg1.addEventListener(ProgressEvent.PROGRESS, progressHandler); _arg1.addEventListener(Event.COMPLETE, completeHandler); _arg1.addEventListener(RSLEvent.RSL_PROGRESS, rslProgressHandler); _arg1.addEventListener(RSLEvent.RSL_COMPLETE, rslCompleteHandler); _arg1.addEventListener(RSLEvent.RSL_ERROR, rslErrorHandler); _arg1.addEventListener(FlexEvent.INIT_PROGRESS, initProgressHandler); _arg1.addEventListener(FlexEvent.INIT_COMPLETE, initCompleteHandler); } protected function get label():String{ return (_label); } protected function get labelRect():Rectangle{ return (new Rectangle(14, 17, 100, 16)); } override public function set visible(_arg1:Boolean):void{ if (((!(_visible)) && (_arg1))){ show(); } else { if (((_visible) && (!(_arg1)))){ hide(); }; }; _visible = _arg1; } protected function get showLabel():Boolean{ return (_showLabel); } public static function get initializingLabel():String{ return (_initializingLabel); } public static function set initializingLabel(_arg1:String):void{ _initializingLabel = _arg1; } } }//package mx.preloaders import flash.display.*; import flash.text.*; import flash.system.*; class ErrorField extends Sprite { private const TEXT_MARGIN_PX:int = 10; private const MAX_WIDTH_INCHES:int = 6; private const MIN_WIDTH_INCHES:int = 2; private var parentContainer:DisplayObjectContainer; private function ErrorField(_arg1:DisplayObjectContainer){ this.parentContainer = _arg1; } public function show(_arg1:String):void{ if ((((_arg1 == null)) || ((_arg1.length == 0)))){ return; }; var _local2:Stage = parentContainer.stage; var _local3:TextField = new TextField(); _local3.autoSize = TextFieldAutoSize.LEFT; _local3.multiline = true; _local3.wordWrap = true; _local3.background = true; _local3.defaultTextFormat = labelFormat; _local3.text = _arg1; _local3.width = Math.max((MIN_WIDTH_INCHES * Capabilities.screenDPI), (_local2.stageWidth - (TEXT_MARGIN_PX * 2))); _local3.width = Math.min((MAX_WIDTH_INCHES * Capabilities.screenDPI), _local3.width); _local3.y = Math.max(0, ((_local2.stageHeight - TEXT_MARGIN_PX) - _local3.height)); _local3.x = ((_local2.stageWidth - _local3.width) / 2); parentContainer.addChild(this); this.addChild(_local3); } protected function get labelFormat():TextFormat{ var _local1:TextFormat = new TextFormat(); _local1.color = 0; _local1.font = "Verdana"; _local1.size = 10; return (_local1); } }
Section 305
//IPreloaderDisplay (mx.preloaders.IPreloaderDisplay) package mx.preloaders { import flash.display.*; import flash.events.*; public interface IPreloaderDisplay extends IEventDispatcher { function set backgroundAlpha(_arg1:Number):void; function get stageHeight():Number; function get stageWidth():Number; function set backgroundColor(_arg1:uint):void; function set preloader(_arg1:Sprite):void; function get backgroundImage():Object; function get backgroundSize():String; function get backgroundAlpha():Number; function set stageHeight(_arg1:Number):void; function get backgroundColor():uint; function set stageWidth(_arg1:Number):void; function set backgroundImage(_arg1:Object):void; function set backgroundSize(_arg1:String):void; function initialize():void; } }//package mx.preloaders
Section 306
//Preloader (mx.preloaders.Preloader) package mx.preloaders { import flash.display.*; import mx.core.*; import flash.events.*; import mx.events.*; import flash.utils.*; public class Preloader extends Sprite { private var app:IEventDispatcher;// = null private var showDisplay:Boolean; private var timer:Timer; private var rslDone:Boolean;// = false private var displayClass:IPreloaderDisplay;// = null private var rslListLoader:RSLListLoader; mx_internal static const VERSION:String = "3.0.0.0"; private function getByteValues():Object{ var _local1:LoaderInfo = root.loaderInfo; var _local2:int = _local1.bytesLoaded; var _local3:int = _local1.bytesTotal; var _local4:int = (rslListLoader) ? rslListLoader.getItemCount() : 0; var _local5:int; while (_local5 < _local4) { _local2 = (_local2 + rslListLoader.getItem(_local5).loaded); _local3 = (_local3 + rslListLoader.getItem(_local5).total); _local5++; }; return ({loaded:_local2, total:_local3}); } private function appProgressHandler(_arg1:Event):void{ dispatchEvent(new FlexEvent(FlexEvent.INIT_PROGRESS)); } private function dispatchAppEndEvent(_arg1:Object=null):void{ dispatchEvent(new FlexEvent(FlexEvent.INIT_COMPLETE)); if (!showDisplay){ displayClassCompleteHandler(null); }; } private function ioErrorHandler(_arg1:IOErrorEvent):void{ } private function appCreationCompleteHandler(_arg1:FlexEvent):void{ dispatchAppEndEvent(); } mx_internal function rslErrorHandler(_arg1:ErrorEvent):void{ var _local2:int = rslListLoader.getIndex(); var _local3:RSLItem = rslListLoader.getItem(_local2); var _local4:RSLEvent = new RSLEvent(RSLEvent.RSL_ERROR); _local4.bytesLoaded = 0; _local4.bytesTotal = 0; _local4.rslIndex = _local2; _local4.rslTotal = rslListLoader.getItemCount(); _local4.url = _local3.urlRequest; _local4.errorText = decodeURI(_arg1.text); dispatchEvent(_local4); } public function initialize(_arg1:Boolean, _arg2:Class, _arg3:uint, _arg4:Number, _arg5:Object, _arg6:String, _arg7:Number, _arg8:Number, _arg9:Array=null, _arg10:Array=null, _arg11:Array=null, _arg12:Array=null):void{ var _local13:int; var _local14:int; var _local15:RSLItem; var _local16:ResourceModuleRSLItem; if (((((!((_arg9 == null))) || (!((_arg10 == null))))) && (!((_arg11 == null))))){ throw (new Error("RSLs may only be specified by using libs and sizes or rslList, not both.")); }; root.loaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler); if (((_arg9) && ((_arg9.length > 0)))){ if (_arg11 == null){ _arg11 = []; }; _local13 = _arg9.length; _local14 = 0; while (_local14 < _local13) { _local15 = new RSLItem(_arg9[_local14]); _arg11.push(_local15); _local14++; }; }; if (((_arg12) && ((_arg12.length > 0)))){ _local13 = _arg12.length; _local14 = 0; while (_local14 < _local13) { _local16 = new ResourceModuleRSLItem(_arg12[_local14]); _arg11.push(_local16); _local14++; }; }; rslListLoader = new RSLListLoader(_arg11); this.showDisplay = _arg1; timer = new Timer(10); timer.addEventListener(TimerEvent.TIMER, timerHandler); timer.start(); if (_arg1){ displayClass = new (_arg2); displayClass.addEventListener(Event.COMPLETE, displayClassCompleteHandler); addChild(DisplayObject(displayClass)); displayClass.backgroundColor = _arg3; displayClass.backgroundAlpha = _arg4; displayClass.backgroundImage = _arg5; displayClass.backgroundSize = _arg6; displayClass.stageWidth = _arg7; displayClass.stageHeight = _arg8; displayClass.initialize(); displayClass.preloader = this; }; if (rslListLoader.getItemCount() > 0){ rslListLoader.load(mx_internal::rslProgressHandler, mx_internal::rslCompleteHandler, mx_internal::rslErrorHandler, mx_internal::rslErrorHandler, mx_internal::rslErrorHandler); } else { rslDone = true; }; } mx_internal function rslProgressHandler(_arg1:ProgressEvent):void{ var _local2:int = rslListLoader.getIndex(); var _local3:RSLItem = rslListLoader.getItem(_local2); var _local4:RSLEvent = new RSLEvent(RSLEvent.RSL_PROGRESS); _local4.bytesLoaded = _arg1.bytesLoaded; _local4.bytesTotal = _arg1.bytesTotal; _local4.rslIndex = _local2; _local4.rslTotal = rslListLoader.getItemCount(); _local4.url = _local3.urlRequest; dispatchEvent(_local4); } public function registerApplication(_arg1:IEventDispatcher):void{ _arg1.addEventListener("validatePropertiesComplete", appProgressHandler); _arg1.addEventListener("validateSizeComplete", appProgressHandler); _arg1.addEventListener("validateDisplayListComplete", appProgressHandler); _arg1.addEventListener(FlexEvent.CREATION_COMPLETE, appCreationCompleteHandler); this.app = _arg1; } mx_internal function rslCompleteHandler(_arg1:Event):void{ var _local2:int = rslListLoader.getIndex(); var _local3:RSLItem = rslListLoader.getItem(_local2); var _local4:RSLEvent = new RSLEvent(RSLEvent.RSL_COMPLETE); _local4.bytesLoaded = _local3.total; _local4.bytesTotal = _local3.total; _local4.rslIndex = _local2; _local4.rslTotal = rslListLoader.getItemCount(); _local4.url = _local3.urlRequest; dispatchEvent(_local4); rslDone = ((_local2 + 1) == _local4.rslTotal); } private function timerHandler(_arg1:TimerEvent):void{ if (!root){ return; }; var _local2:Object = getByteValues(); var _local3:int = _local2.loaded; var _local4:int = _local2.total; dispatchEvent(new ProgressEvent(ProgressEvent.PROGRESS, false, false, _local3, _local4)); if (((rslDone) && ((((((((_local3 >= _local4)) && ((_local4 > 0)))) || ((((_local4 == 0)) && ((_local3 > 0)))))) || ((((((root is MovieClip)) && ((MovieClip(root).totalFrames > 2)))) && ((MovieClip(root).framesLoaded >= 2)))))))){ timer.removeEventListener(TimerEvent.TIMER, timerHandler); timer.reset(); dispatchEvent(new Event(Event.COMPLETE)); dispatchEvent(new FlexEvent(FlexEvent.INIT_PROGRESS)); }; } private function displayClassCompleteHandler(_arg1:Event):void{ if (displayClass){ displayClass.removeEventListener(Event.COMPLETE, displayClassCompleteHandler); }; if (root){ root.loaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler); }; if (app){ app.removeEventListener("validatePropertiesComplete", appProgressHandler); app.removeEventListener("validateSizeComplete", appProgressHandler); app.removeEventListener("validateDisplayListComplete", appProgressHandler); app.removeEventListener(FlexEvent.CREATION_COMPLETE, appCreationCompleteHandler); app = null; }; dispatchEvent(new FlexEvent(FlexEvent.PRELOADER_DONE)); } } }//package mx.preloaders
Section 307
//IResourceBundle (mx.resources.IResourceBundle) package mx.resources { public interface IResourceBundle { function get content():Object; function get locale():String; function get bundleName():String; } }//package mx.resources
Section 308
//IResourceManager (mx.resources.IResourceManager) package mx.resources { import flash.events.*; import flash.system.*; public interface IResourceManager extends IEventDispatcher { function loadResourceModule(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher; function getBoolean(_arg1:String, _arg2:String, _arg3:String=null):Boolean; function getClass(_arg1:String, _arg2:String, _arg3:String=null):Class; function getLocales():Array; function removeResourceBundlesForLocale(_arg1:String):void; function getResourceBundle(_arg1:String, _arg2:String):IResourceBundle; function get localeChain():Array; function getInt(_arg1:String, _arg2:String, _arg3:String=null):int; function update():void; function set localeChain(_arg1:Array):void; function getUint(_arg1:String, _arg2:String, _arg3:String=null):uint; function addResourceBundle(_arg1:IResourceBundle):void; function getStringArray(_arg1:String, _arg2:String, _arg3:String=null):Array; function getBundleNamesForLocale(_arg1:String):Array; function removeResourceBundle(_arg1:String, _arg2:String):void; function getObject(_arg1:String, _arg2:String, _arg3:String=null); function getString(_arg1:String, _arg2:String, _arg3:Array=null, _arg4:String=null):String; function installCompiledResourceBundles(_arg1:ApplicationDomain, _arg2:Array, _arg3:Array):void; function unloadResourceModule(_arg1:String, _arg2:Boolean=true):void; function findResourceBundleWithResource(_arg1:String, _arg2:String):IResourceBundle; function getNumber(_arg1:String, _arg2:String, _arg3:String=null):Number; } }//package mx.resources
Section 309
//IResourceModule (mx.resources.IResourceModule) package mx.resources { public interface IResourceModule { function get resourceBundles():Array; } }//package mx.resources
Section 310
//ResourceBundle (mx.resources.ResourceBundle) package mx.resources { import mx.core.*; import flash.system.*; import mx.utils.*; public class ResourceBundle implements IResourceBundle { mx_internal var _locale:String; private var _content:Object; mx_internal var _bundleName:String; mx_internal static const VERSION:String = "3.0.0.0"; mx_internal static var backupApplicationDomain:ApplicationDomain; mx_internal static var locale:String; public function ResourceBundle(_arg1:String=null, _arg2:String=null){ _content = {}; super(); mx_internal::_locale = _arg1; mx_internal::_bundleName = _arg2; _content = getContent(); } protected function getContent():Object{ return ({}); } public function getString(_arg1:String):String{ return (String(_getObject(_arg1))); } public function get content():Object{ return (_content); } public function getBoolean(_arg1:String, _arg2:Boolean=true):Boolean{ var _local3:String = _getObject(_arg1).toLowerCase(); if (_local3 == "false"){ return (false); }; if (_local3 == "true"){ return (true); }; return (_arg2); } public function getStringArray(_arg1:String):Array{ var _local2:Array = _getObject(_arg1).split(","); var _local3:int = _local2.length; var _local4:int; while (_local4 < _local3) { _local2[_local4] = StringUtil.trim(_local2[_local4]); _local4++; }; return (_local2); } public function getObject(_arg1:String):Object{ return (_getObject(_arg1)); } private function _getObject(_arg1:String):Object{ var _local2:Object = content[_arg1]; if (!_local2){ throw (new Error(((("Key " + _arg1) + " was not found in resource bundle ") + bundleName))); }; return (_local2); } public function get locale():String{ return (mx_internal::_locale); } public function get bundleName():String{ return (mx_internal::_bundleName); } public function getNumber(_arg1:String):Number{ return (Number(_getObject(_arg1))); } private static function getClassByName(_arg1:String, _arg2:ApplicationDomain):Class{ var _local3:Class; if (_arg2.hasDefinition(_arg1)){ _local3 = (_arg2.getDefinition(_arg1) as Class); }; return (_local3); } public static function getResourceBundle(_arg1:String, _arg2:ApplicationDomain=null):ResourceBundle{ var _local3:String; var _local4:Class; var _local5:Object; var _local6:ResourceBundle; if (!_arg2){ _arg2 = ApplicationDomain.currentDomain; }; _local3 = (((mx_internal::locale + "$") + _arg1) + "_properties"); _local4 = getClassByName(_local3, _arg2); if (!_local4){ _local3 = (_arg1 + "_properties"); _local4 = getClassByName(_local3, _arg2); }; if (!_local4){ _local3 = _arg1; _local4 = getClassByName(_local3, _arg2); }; if (((!(_local4)) && (mx_internal::backupApplicationDomain))){ _local3 = (_arg1 + "_properties"); _local4 = getClassByName(_local3, mx_internal::backupApplicationDomain); if (!_local4){ _local3 = _arg1; _local4 = getClassByName(_local3, mx_internal::backupApplicationDomain); }; }; if (_local4){ _local5 = new (_local4); if ((_local5 is ResourceBundle)){ _local6 = ResourceBundle(_local5); return (_local6); }; }; throw (new Error(("Could not find resource bundle " + _arg1))); } } }//package mx.resources
Section 311
//ResourceManager (mx.resources.ResourceManager) package mx.resources { import mx.core.*; public class ResourceManager { mx_internal static const VERSION:String = "3.0.0.0"; private static var implClassDependency:ResourceManagerImpl; private static var instance:IResourceManager; public static function getInstance():IResourceManager{ if (!instance){ instance = IResourceManager(Singleton.getInstance("mx.resources::IResourceManager")); }; return (instance); } } }//package mx.resources
Section 312
//ResourceManagerImpl (mx.resources.ResourceManagerImpl) package mx.resources { import mx.core.*; import flash.events.*; import mx.events.*; import flash.system.*; import mx.modules.*; import flash.utils.*; import mx.utils.*; public class ResourceManagerImpl extends EventDispatcher implements IResourceManager { private var resourceModules:Object; private var initializedForNonFrameworkApp:Boolean;// = false private var localeMap:Object; private var _localeChain:Array; mx_internal static const VERSION:String = "3.0.0.0"; private static var instance:IResourceManager; public function ResourceManagerImpl(){ localeMap = {}; resourceModules = {}; super(); } public function get localeChain():Array{ return (_localeChain); } public function set localeChain(_arg1:Array):void{ _localeChain = _arg1; update(); } public function getStringArray(_arg1:String, _arg2:String, _arg3:String=null):Array{ var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3); if (!_local4){ return (null); }; var _local5:* = _local4.content[_arg2]; var _local6:Array = String(_local5).split(","); var _local7:int = _local6.length; var _local8:int; while (_local8 < _local7) { _local6[_local8] = StringUtil.trim(_local6[_local8]); _local8++; }; return (_local6); } mx_internal function installCompiledResourceBundle(_arg1:ApplicationDomain, _arg2:String, _arg3:String):void{ var _local4:String; var _local5:String = _arg3; var _local6:int = _arg3.indexOf(":"); if (_local6 != -1){ _local4 = _arg3.substring(0, _local6); _local5 = _arg3.substring((_local6 + 1)); }; if (getResourceBundle(_arg2, _arg3)){ return; }; var _local7 = (((_arg2 + "$") + _local5) + "_properties"); if (_local4 != null){ _local7 = ((_local4 + ".") + _local7); }; var _local8:Class; if (_arg1.hasDefinition(_local7)){ _local8 = Class(_arg1.getDefinition(_local7)); }; if (!_local8){ _local7 = _arg3; if (_arg1.hasDefinition(_local7)){ _local8 = Class(_arg1.getDefinition(_local7)); }; }; if (!_local8){ _local7 = (_arg3 + "_properties"); if (_arg1.hasDefinition(_local7)){ _local8 = Class(_arg1.getDefinition(_local7)); }; }; if (!_local8){ throw (new Error((((("Could not find compiled resource bundle '" + _arg3) + "' for locale '") + _arg2) + "'."))); }; var _local9:ResourceBundle = ResourceBundle(new (_local8)); _local9.mx_internal::_locale = _arg2; _local9.mx_internal::_bundleName = _arg3; addResourceBundle(_local9); } public function getString(_arg1:String, _arg2:String, _arg3:Array=null, _arg4:String=null):String{ var _local5:IResourceBundle = findBundle(_arg1, _arg2, _arg4); if (!_local5){ return (null); }; var _local6:String = String(_local5.content[_arg2]); if (_arg3){ _local6 = StringUtil.substitute(_local6, _arg3); }; return (_local6); } public function loadResourceModule(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher{ var moduleInfo:IModuleInfo; var resourceEventDispatcher:ResourceEventDispatcher; var timer:Timer; var timerHandler:Function; var url = _arg1; var updateFlag = _arg2; var applicationDomain = _arg3; var securityDomain = _arg4; moduleInfo = ModuleManager.getModule(url); resourceEventDispatcher = new ResourceEventDispatcher(moduleInfo); var readyHandler:Function = function (_arg1:ModuleEvent):void{ var _local2:* = _arg1.module.factory.create(); resourceModules[_arg1.module.url].resourceModule = _local2; if (updateFlag){ update(); }; }; moduleInfo.addEventListener(ModuleEvent.READY, readyHandler, false, 0, true); var errorHandler:Function = function (_arg1:ModuleEvent):void{ var _local3:ResourceEvent; var _local2:String = ("Unable to load resource module from " + url); if (resourceEventDispatcher.willTrigger(ResourceEvent.ERROR)){ _local3 = new ResourceEvent(ResourceEvent.ERROR, _arg1.bubbles, _arg1.cancelable); _local3.bytesLoaded = 0; _local3.bytesTotal = 0; _local3.errorText = _local2; resourceEventDispatcher.dispatchEvent(_local3); } else { throw (new Error(_local2)); }; }; moduleInfo.addEventListener(ModuleEvent.ERROR, errorHandler, false, 0, true); resourceModules[url] = new ResourceModuleInfo(moduleInfo, readyHandler, errorHandler); timer = new Timer(0); timerHandler = function (_arg1:TimerEvent):void{ timer.removeEventListener(TimerEvent.TIMER, timerHandler); timer.stop(); moduleInfo.load(applicationDomain, securityDomain); }; timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true); timer.start(); return (resourceEventDispatcher); } public function getLocales():Array{ var _local2:String; var _local1:Array = []; for (_local2 in localeMap) { _local1.push(_local2); }; return (_local1); } public function removeResourceBundlesForLocale(_arg1:String):void{ delete localeMap[_arg1]; } public function getResourceBundle(_arg1:String, _arg2:String):IResourceBundle{ var _local3:Object = localeMap[_arg1]; if (!_local3){ return (null); }; return (_local3[_arg2]); } private function dumpResourceModule(_arg1):void{ var _local2:ResourceBundle; var _local3:String; for each (_local2 in _arg1.resourceBundles) { trace(_local2.locale, _local2.bundleName); for (_local3 in _local2.content) { }; }; } public function getObject(_arg1:String, _arg2:String, _arg3:String=null){ var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3); if (!_local4){ return (undefined); }; return (_local4.content[_arg2]); } public function addResourceBundle(_arg1:IResourceBundle):void{ var _local2:String = _arg1.locale; var _local3:String = _arg1.bundleName; if (!localeMap[_local2]){ localeMap[_local2] = {}; }; localeMap[_local2][_local3] = _arg1; } private function findBundle(_arg1:String, _arg2:String, _arg3:String):IResourceBundle{ supportNonFrameworkApps(); return (((_arg3)!=null) ? getResourceBundle(_arg3, _arg1) : findResourceBundleWithResource(_arg1, _arg2)); } public function getInt(_arg1:String, _arg2:String, _arg3:String=null):int{ var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3); if (!_local4){ return (0); }; var _local5:* = _local4.content[_arg2]; return (int(_local5)); } private function supportNonFrameworkApps():void{ if (initializedForNonFrameworkApp){ return; }; initializedForNonFrameworkApp = true; if (getLocales().length > 0){ return; }; var _local1:ApplicationDomain = ApplicationDomain.currentDomain; if (!_local1.hasDefinition("_CompiledResourceBundleInfo")){ return; }; var _local2:Class = Class(_local1.getDefinition("_CompiledResourceBundleInfo")); var _local3:Array = _local2.compiledLocales; var _local4:Array = _local2.compiledResourceBundleNames; installCompiledResourceBundles(_local1, _local3, _local4); localeChain = _local3; } public function getClass(_arg1:String, _arg2:String, _arg3:String=null):Class{ var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3); if (!_local4){ return (null); }; var _local5:* = _local4.content[_arg2]; return ((_local5 as Class)); } public function getNumber(_arg1:String, _arg2:String, _arg3:String=null):Number{ var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3); if (!_local4){ return (NaN); }; var _local5:* = _local4.content[_arg2]; return (Number(_local5)); } public function update():void{ dispatchEvent(new Event(Event.CHANGE)); } public function getBundleNamesForLocale(_arg1:String):Array{ var _local3:String; var _local2:Array = []; for (_local3 in localeMap[_arg1]) { _local2.push(_local3); }; return (_local2); } public function removeResourceBundle(_arg1:String, _arg2:String):void{ delete localeMap[_arg1][_arg2]; if (getBundleNamesForLocale(_arg1).length == 0){ delete localeMap[_arg1]; }; } public function installCompiledResourceBundles(_arg1:ApplicationDomain, _arg2:Array, _arg3:Array):void{ var _local7:String; var _local8:int; var _local9:String; var _local4:int = (_arg2) ? _arg2.length : 0; var _local5:int = (_arg3) ? _arg3.length : 0; var _local6:int; while (_local6 < _local4) { _local7 = _arg2[_local6]; _local8 = 0; while (_local8 < _local5) { _local9 = _arg3[_local8]; mx_internal::installCompiledResourceBundle(_arg1, _local7, _local9); _local8++; }; _local6++; }; } public function findResourceBundleWithResource(_arg1:String, _arg2:String):IResourceBundle{ var _local5:String; var _local6:Object; var _local7:ResourceBundle; if (!_localeChain){ return (null); }; var _local3:int = _localeChain.length; var _local4:int; while (_local4 < _local3) { _local5 = localeChain[_local4]; _local6 = localeMap[_local5]; if (!_local6){ } else { _local7 = _local6[_arg1]; if (!_local7){ } else { if ((_arg2 in _local7.content)){ return (_local7); }; }; }; _local4++; }; return (null); } public function getUint(_arg1:String, _arg2:String, _arg3:String=null):uint{ var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3); if (!_local4){ return (0); }; var _local5:* = _local4.content[_arg2]; return (uint(_local5)); } public function getBoolean(_arg1:String, _arg2:String, _arg3:String=null):Boolean{ var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3); if (!_local4){ return (false); }; var _local5:* = _local4.content[_arg2]; return ((String(_local5).toLowerCase() == "true")); } public function unloadResourceModule(_arg1:String, _arg2:Boolean=true):void{ throw (new Error("unloadResourceModule() is not yet implemented.")); } public static function getInstance():IResourceManager{ if (!instance){ instance = new (ResourceManagerImpl); }; return (instance); } } }//package mx.resources import flash.events.*; import mx.events.*; import mx.modules.*; class ResourceModuleInfo { public var resourceModule:IResourceModule; public var errorHandler:Function; public var readyHandler:Function; public var moduleInfo:IModuleInfo; private function ResourceModuleInfo(_arg1:IModuleInfo, _arg2:Function, _arg3:Function){ this.moduleInfo = _arg1; this.readyHandler = _arg2; this.errorHandler = _arg3; } } class ResourceEventDispatcher extends EventDispatcher { private function ResourceEventDispatcher(_arg1:IModuleInfo){ _arg1.addEventListener(ModuleEvent.ERROR, moduleInfo_errorHandler, false, 0, true); _arg1.addEventListener(ModuleEvent.PROGRESS, moduleInfo_progressHandler, false, 0, true); _arg1.addEventListener(ModuleEvent.READY, moduleInfo_readyHandler, false, 0, true); } private function moduleInfo_progressHandler(_arg1:ModuleEvent):void{ var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable); _local2.bytesLoaded = _arg1.bytesLoaded; _local2.bytesTotal = _arg1.bytesTotal; dispatchEvent(_local2); } private function moduleInfo_readyHandler(_arg1:ModuleEvent):void{ var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.COMPLETE); dispatchEvent(_local2); } private function moduleInfo_errorHandler(_arg1:ModuleEvent):void{ var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.ERROR, _arg1.bubbles, _arg1.cancelable); _local2.bytesLoaded = _arg1.bytesLoaded; _local2.bytesTotal = _arg1.bytesTotal; _local2.errorText = _arg1.errorText; dispatchEvent(_local2); } }
Section 313
//IResponder (mx.rpc.IResponder) package mx.rpc { public interface IResponder { function fault(_arg1:Object):void; function result(_arg1:Object):void; } }//package mx.rpc
Section 314
//ApplicationBackground (mx.skins.halo.ApplicationBackground) package mx.skins.halo { import flash.display.*; import mx.utils.*; import mx.skins.*; public class ApplicationBackground extends ProgrammaticSkin { mx_internal static const VERSION:String = "3.0.0.0"; override public function get measuredWidth():Number{ return (8); } override public function get measuredHeight():Number{ return (8); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local6:uint; super.updateDisplayList(_arg1, _arg2); var _local3:Graphics = graphics; var _local4:Array = getStyle("backgroundGradientColors"); var _local5:Array = getStyle("backgroundGradientAlphas"); if (!_local4){ _local6 = getStyle("backgroundColor"); if (isNaN(_local6)){ _local6 = 0xFFFFFF; }; _local4 = []; _local4[0] = ColorUtil.adjustBrightness(_local6, 15); _local4[1] = ColorUtil.adjustBrightness(_local6, -25); }; if (!_local5){ _local5 = [1, 1]; }; _local3.clear(); drawRoundRect(0, 0, _arg1, _arg2, 0, _local4, _local5, verticalGradientMatrix(0, 0, _arg1, _arg2)); } } }//package mx.skins.halo
Section 315
//BrokenImageBorderSkin (mx.skins.halo.BrokenImageBorderSkin) package mx.skins.halo { import flash.display.*; import mx.skins.*; public class BrokenImageBorderSkin extends ProgrammaticSkin { mx_internal static const VERSION:String = "3.0.0.0"; override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ super.updateDisplayList(_arg1, _arg2); var _local3:Graphics = graphics; _local3.clear(); _local3.lineStyle(1, getStyle("borderColor")); _local3.drawRect(0, 0, _arg1, _arg2); } } }//package mx.skins.halo
Section 316
//BusyCursor (mx.skins.halo.BusyCursor) package mx.skins.halo { import flash.display.*; import mx.core.*; import flash.events.*; import mx.styles.*; public class BusyCursor extends FlexSprite { private var hourHand:Shape; private var minuteHand:Shape; mx_internal static const VERSION:String = "3.0.0.0"; public function BusyCursor(){ var _local6:Graphics; super(); var _local1:CSSStyleDeclaration = StyleManager.getStyleDeclaration("CursorManager"); var _local2:Class = _local1.getStyle("busyCursorBackground"); var _local3:DisplayObject = new (_local2); if ((_local3 is InteractiveObject)){ InteractiveObject(_local3).mouseEnabled = false; }; addChild(_local3); var _local4:Number = -0.5; var _local5:Number = -0.5; minuteHand = new FlexShape(); minuteHand.name = "minuteHand"; _local6 = minuteHand.graphics; _local6.beginFill(0); _local6.moveTo(_local4, _local5); _local6.lineTo((1 + _local4), (0 + _local5)); _local6.lineTo((1 + _local4), (5 + _local5)); _local6.lineTo((0 + _local4), (5 + _local5)); _local6.lineTo((0 + _local4), (0 + _local5)); _local6.endFill(); addChild(minuteHand); hourHand = new FlexShape(); hourHand.name = "hourHand"; _local6 = hourHand.graphics; _local6.beginFill(0); _local6.moveTo(_local4, _local5); _local6.lineTo((4 + _local4), (0 + _local5)); _local6.lineTo((4 + _local4), (1 + _local5)); _local6.lineTo((0 + _local4), (1 + _local5)); _local6.lineTo((0 + _local4), (0 + _local5)); _local6.endFill(); addChild(hourHand); addEventListener(Event.ADDED, handleAdded); addEventListener(Event.REMOVED, handleRemoved); } private function enterFrameHandler(_arg1:Event):void{ minuteHand.rotation = (minuteHand.rotation + 12); hourHand.rotation = (hourHand.rotation + 1); } private function handleAdded(_arg1:Event):void{ addEventListener(Event.ENTER_FRAME, enterFrameHandler); } private function handleRemoved(_arg1:Event):void{ removeEventListener(Event.ENTER_FRAME, enterFrameHandler); } } }//package mx.skins.halo
Section 317
//ButtonSkin (mx.skins.halo.ButtonSkin) package mx.skins.halo { import flash.display.*; import mx.core.*; import mx.styles.*; import mx.utils.*; import mx.skins.*; public class ButtonSkin extends Border { mx_internal static const VERSION:String = "3.0.0.0"; private static var cache:Object = {}; override public function get measuredWidth():Number{ return (UIComponent.DEFAULT_MEASURED_MIN_WIDTH); } override public function get measuredHeight():Number{ return (UIComponent.DEFAULT_MEASURED_MIN_HEIGHT); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local16:Number; var _local17:Array; var _local18:Array; var _local19:Array; var _local20:Array; var _local21:Array; var _local22:Array; super.updateDisplayList(_arg1, _arg2); var _local3:uint = getStyle("borderColor"); var _local4:Number = getStyle("cornerRadius"); var _local5:Array = getStyle("fillAlphas"); var _local6:Array = getStyle("fillColors"); StyleManager.getColorNames(_local6); var _local7:Array = getStyle("highlightAlphas"); var _local8:uint = getStyle("themeColor"); var _local9:Object = calcDerivedStyles(_local8, _local6[0], _local6[1]); var _local10:Number = ColorUtil.adjustBrightness2(_local3, -50); var _local11:Number = ColorUtil.adjustBrightness2(_local8, -25); var _local12:Boolean; if ((parent is IButton)){ _local12 = IButton(parent).emphasized; }; var _local13:Number = Math.max(0, _local4); var _local14:Number = Math.max(0, (_local4 - 1)); var _local15:Number = Math.max(0, (_local4 - 2)); graphics.clear(); switch (name){ case "selectedUpSkin": case "selectedOverSkin": drawRoundRect(0, 0, _arg1, _arg2, _local13, [_local8, _local11], 1, verticalGradientMatrix(0, 0, _arg1, _arg2)); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _local14, [_local6[1], _local6[1]], 1, verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2))); break; case "upSkin": _local17 = [_local6[0], _local6[1]]; _local18 = [_local5[0], _local5[1]]; if (_local12){ drawRoundRect(0, 0, _arg1, _arg2, _local13, [_local8, _local11], 1, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:2, y:2, w:(_arg1 - 4), h:(_arg2 - 4), r:(_local4 - 2)}); drawRoundRect(2, 2, (_arg1 - 4), (_arg2 - 4), _local15, _local17, _local18, verticalGradientMatrix(2, 2, (_arg1 - 2), (_arg2 - 2))); drawRoundRect(2, 2, (_arg1 - 4), ((_arg2 - 4) / 2), {tl:_local15, tr:_local15, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local7, verticalGradientMatrix(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2))); } else { drawRoundRect(0, 0, _arg1, _arg2, _local13, [_local3, _local10], 1, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:(_local4 - 1)}); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _local14, _local17, _local18, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2))); drawRoundRect(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2), {tl:_local14, tr:_local14, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local7, verticalGradientMatrix(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2))); }; break; case "overSkin": if (_local6.length > 2){ _local19 = [_local6[2], _local6[3]]; } else { _local19 = [_local6[0], _local6[1]]; }; if (_local5.length > 2){ _local20 = [_local5[2], _local5[3]]; } else { _local20 = [_local5[0], _local5[1]]; }; drawRoundRect(0, 0, _arg1, _arg2, _local13, [_local8, _local11], 1, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:(_local4 - 1)}); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _local14, _local19, _local20, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2))); drawRoundRect(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2), {tl:_local14, tr:_local14, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local7, verticalGradientMatrix(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2))); break; case "downSkin": case "selectedDownSkin": drawRoundRect(0, 0, _arg1, _arg2, _local13, [_local8, _local11], 1, verticalGradientMatrix(0, 0, _arg1, _arg2)); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _local14, [_local9.fillColorPress1, _local9.fillColorPress2], 1, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2))); drawRoundRect(2, 2, (_arg1 - 4), ((_arg2 - 4) / 2), {tl:_local15, tr:_local15, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local7, verticalGradientMatrix(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2))); break; case "disabledSkin": case "selectedDisabledSkin": _local21 = [_local6[0], _local6[1]]; _local22 = [Math.max(0, (_local5[0] - 0.15)), Math.max(0, (_local5[1] - 0.15))]; drawRoundRect(0, 0, _arg1, _arg2, _local13, [_local3, _local10], 0.5, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:(_local4 - 1)}); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _local14, _local21, _local22, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2))); break; }; } private static function calcDerivedStyles(_arg1:uint, _arg2:uint, _arg3:uint):Object{ var _local5:Object; var _local4:String = HaloColors.getCacheKey(_arg1, _arg2, _arg3); if (!cache[_local4]){ _local5 = (cache[_local4] = {}); HaloColors.addHaloColors(_local5, _arg1, _arg2, _arg3); }; return (cache[_local4]); } } }//package mx.skins.halo
Section 318
//HaloBorder (mx.skins.halo.HaloBorder) package mx.skins.halo { import flash.display.*; import mx.core.*; import mx.styles.*; import mx.graphics.*; import mx.utils.*; import mx.skins.*; public class HaloBorder extends RectangularBorder { mx_internal var radiusObj:Object; mx_internal var backgroundHole:Object; mx_internal var radius:Number; mx_internal var bRoundedCorners:Boolean; mx_internal var backgroundColor:Object; private var dropShadow:RectangularDropShadow; protected var _borderMetrics:EdgeMetrics; mx_internal var backgroundAlphaName:String; mx_internal static const VERSION:String = "3.0.0.0"; private static var BORDER_WIDTHS:Object = {none:0, solid:1, inset:2, outset:2, alert:3, dropdown:2, menuBorder:1, comboNonEdit:2}; public function HaloBorder(){ BORDER_WIDTHS["default"] = 3; } override public function styleChanged(_arg1:String):void{ if ((((((((((_arg1 == null)) || ((_arg1 == "styleName")))) || ((_arg1 == "borderStyle")))) || ((_arg1 == "borderThickness")))) || ((_arg1 == "borderSides")))){ _borderMetrics = null; }; invalidateDisplayList(); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ if (((isNaN(_arg1)) || (isNaN(_arg2)))){ return; }; super.updateDisplayList(_arg1, _arg2); backgroundColor = getBackgroundColor(); bRoundedCorners = false; backgroundAlphaName = "backgroundAlpha"; backgroundHole = null; radius = 0; radiusObj = null; drawBorder(_arg1, _arg2); drawBackground(_arg1, _arg2); } mx_internal function drawBorder(_arg1:Number, _arg2:Number):void{ var _local5:Number; var _local6:uint; var _local7:uint; var _local8:String; var _local9:Number; var _local10:uint; var _local11:Boolean; var _local12:uint; var _local13:Array; var _local14:Array; var _local15:uint; var _local16:uint; var _local17:uint; var _local18:uint; var _local19:Boolean; var _local20:Object; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Object; var _local27:Number; var _local28:Number; var _local29:IContainer; var _local30:EdgeMetrics; var _local31:Boolean; var _local32:Number; var _local33:Array; var _local34:uint; var _local35:Boolean; var _local36:Number; var _local3:String = getStyle("borderStyle"); var _local4:Array = getStyle("highlightAlphas"); var _local21:Boolean; var _local26:Graphics = graphics; _local26.clear(); if (_local3){ switch (_local3){ case "none": break; case "inset": _local7 = getStyle("borderColor"); _local22 = ColorUtil.adjustBrightness2(_local7, -40); _local23 = ColorUtil.adjustBrightness2(_local7, 25); _local24 = ColorUtil.adjustBrightness2(_local7, 40); _local25 = backgroundColor; if ((((_local25 === null)) || ((_local25 === "")))){ _local25 = _local7; }; draw3dBorder(_local23, _local22, _local24, Number(_local25), Number(_local25), Number(_local25)); break; case "outset": _local7 = getStyle("borderColor"); _local22 = ColorUtil.adjustBrightness2(_local7, -40); _local23 = ColorUtil.adjustBrightness2(_local7, -25); _local24 = ColorUtil.adjustBrightness2(_local7, 40); _local25 = backgroundColor; if ((((_local25 === null)) || ((_local25 === "")))){ _local25 = _local7; }; draw3dBorder(_local23, _local24, _local22, Number(_local25), Number(_local25), Number(_local25)); break; case "alert": case "default": if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ _local27 = getStyle("backgroundAlpha"); _local5 = getStyle("borderAlpha"); backgroundAlphaName = "borderAlpha"; radius = getStyle("cornerRadius"); bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true"); _local28 = (bRoundedCorners) ? radius : 0; drawDropShadow(0, 0, _arg1, _arg2, radius, radius, _local28, _local28); if (!bRoundedCorners){ radiusObj = {}; }; _local29 = (parent as IContainer); if (_local29){ _local30 = _local29.viewMetrics; backgroundHole = {x:_local30.left, y:_local30.top, w:Math.max(0, ((_arg1 - _local30.left) - _local30.right)), h:Math.max(0, ((_arg2 - _local30.top) - _local30.bottom)), r:0}; if ((((backgroundHole.w > 0)) && ((backgroundHole.h > 0)))){ if (_local27 != _local5){ drawDropShadow(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h, 0, 0, 0, 0); }; _local26.beginFill(Number(backgroundColor), _local27); _local26.drawRect(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h); _local26.endFill(); }; }; backgroundColor = getStyle("borderColor"); }; break; case "dropdown": _local12 = getStyle("dropdownBorderColor"); drawDropShadow(0, 0, _arg1, _arg2, 4, 0, 0, 4); drawRoundRect(0, 0, _arg1, _arg2, {tl:4, tr:0, br:0, bl:4}, 5068126, 1); drawRoundRect(0, 0, _arg1, _arg2, {tl:4, tr:0, br:0, bl:4}, [0xFFFFFF, 0xFFFFFF], [0.7, 0], verticalGradientMatrix(0, 0, _arg1, _arg2)); drawRoundRect(1, 1, (_arg1 - 1), (_arg2 - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1); drawRoundRect(1, 2, (_arg1 - 1), (_arg2 - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (_arg1 - 1), (_arg2 - 3))); if (!isNaN(_local12)){ drawRoundRect(0, 0, (_arg1 + 1), _arg2, {tl:4, tr:0, br:0, bl:4}, _local12, 0.5); drawRoundRect(1, 1, (_arg1 - 1), (_arg2 - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1); drawRoundRect(1, 2, (_arg1 - 1), (_arg2 - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (_arg1 - 1), (_arg2 - 3))); }; backgroundColor = null; break; case "menuBorder": _local7 = getStyle("borderColor"); drawRoundRect(0, 0, _arg1, _arg2, 0, _local7, 1); drawDropShadow(1, 1, (_arg1 - 2), (_arg2 - 2), 0, 0, 0, 0); break; case "comboNonEdit": break; case "controlBar": if ((((_arg1 == 0)) || ((_arg2 == 0)))){ backgroundColor = null; break; }; _local14 = getStyle("footerColors"); _local31 = !((_local14 == null)); _local32 = getStyle("borderAlpha"); if (_local31){ _local26.lineStyle(0, ((_local14.length > 0)) ? _local14[1] : _local14[0], _local32); _local26.moveTo(0, 0); _local26.lineTo(_arg1, 0); _local26.lineStyle(0, 0, 0); if (((((parent) && (parent.parent))) && ((parent.parent is IStyleClient)))){ radius = IStyleClient(parent.parent).getStyle("cornerRadius"); _local32 = IStyleClient(parent.parent).getStyle("borderAlpha"); }; if (isNaN(radius)){ radius = 0; }; if (IStyleClient(parent.parent).getStyle("roundedBottomCorners").toString().toLowerCase() != "true"){ radius = 0; }; drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:radius, br:radius}, _local14, _local32, verticalGradientMatrix(0, 0, _arg1, _arg2)); if ((((_local14.length > 1)) && (!((_local14[0] == _local14[1]))))){ drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:radius, br:radius}, [0xFFFFFF, 0xFFFFFF], _local4, verticalGradientMatrix(0, 0, _arg1, _arg2)); drawRoundRect(1, 2, (_arg1 - 2), (_arg2 - 3), {tl:0, tr:0, bl:(radius - 1), br:(radius - 1)}, _local14, _local32, verticalGradientMatrix(0, 0, _arg1, _arg2)); }; }; backgroundColor = null; break; case "applicationControlBar": _local13 = getStyle("fillColors"); _local5 = getStyle("backgroundAlpha"); _local4 = getStyle("highlightAlphas"); _local33 = getStyle("fillAlphas"); _local11 = getStyle("docked"); _local34 = uint(backgroundColor); radius = getStyle("cornerRadius"); if (!radius){ radius = 0; }; drawDropShadow(0, 1, _arg1, (_arg2 - 1), radius, radius, radius, radius); if (((!((backgroundColor === null))) && (StyleManager.isValidStyleValue(backgroundColor)))){ drawRoundRect(0, 1, _arg1, (_arg2 - 1), radius, _local34, _local5, verticalGradientMatrix(0, 0, _arg1, _arg2)); }; drawRoundRect(0, 1, _arg1, (_arg2 - 1), radius, _local13, _local33, verticalGradientMatrix(0, 0, _arg1, _arg2)); drawRoundRect(0, 1, _arg1, ((_arg2 / 2) - 1), {tl:radius, tr:radius, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local4, verticalGradientMatrix(0, 0, _arg1, ((_arg2 / 2) - 1))); drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, 0.3, null, GradientType.LINEAR, null, {x:0, y:2, w:_arg1, h:(_arg2 - 2), r:{tl:radius, tr:radius, bl:0, br:0}}); backgroundColor = null; break; default: _local7 = getStyle("borderColor"); _local9 = getStyle("borderThickness"); _local8 = getStyle("borderSides"); _local35 = true; radius = getStyle("cornerRadius"); bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true"); _local36 = Math.max((radius - _local9), 0); _local20 = {x:_local9, y:_local9, w:(_arg1 - (_local9 * 2)), h:(_arg2 - (_local9 * 2)), r:_local36}; if (!bRoundedCorners){ radiusObj = {tl:radius, tr:radius, bl:0, br:0}; _local20.r = {tl:_local36, tr:_local36, bl:0, br:0}; }; if (_local8 != "left top right bottom"){ _local20.r = {tl:_local36, tr:_local36, bl:(bRoundedCorners) ? _local36 : 0, br:(bRoundedCorners) ? _local36 : 0}; radiusObj = {tl:radius, tr:radius, bl:(bRoundedCorners) ? radius : 0, br:(bRoundedCorners) ? radius : 0}; _local8 = _local8.toLowerCase(); if (_local8.indexOf("left") == -1){ _local20.x = 0; _local20.w = (_local20.w + _local9); _local20.r.tl = 0; _local20.r.bl = 0; radiusObj.tl = 0; radiusObj.bl = 0; _local35 = false; }; if (_local8.indexOf("top") == -1){ _local20.y = 0; _local20.h = (_local20.h + _local9); _local20.r.tl = 0; _local20.r.tr = 0; radiusObj.tl = 0; radiusObj.tr = 0; _local35 = false; }; if (_local8.indexOf("right") == -1){ _local20.w = (_local20.w + _local9); _local20.r.tr = 0; _local20.r.br = 0; radiusObj.tr = 0; radiusObj.br = 0; _local35 = false; }; if (_local8.indexOf("bottom") == -1){ _local20.h = (_local20.h + _local9); _local20.r.bl = 0; _local20.r.br = 0; radiusObj.bl = 0; radiusObj.br = 0; _local35 = false; }; }; if ((((radius == 0)) && (_local35))){ drawDropShadow(0, 0, _arg1, _arg2, 0, 0, 0, 0); _local26.beginFill(_local7); _local26.drawRect(0, 0, _arg1, _arg2); _local26.drawRect(_local9, _local9, (_arg1 - (2 * _local9)), (_arg2 - (2 * _local9))); _local26.endFill(); } else { if (radiusObj){ drawDropShadow(0, 0, _arg1, _arg2, radiusObj.tl, radiusObj.tr, radiusObj.br, radiusObj.bl); drawRoundRect(0, 0, _arg1, _arg2, radiusObj, _local7, 1, null, null, null, _local20); radiusObj.tl = Math.max((radius - _local9), 0); radiusObj.tr = Math.max((radius - _local9), 0); radiusObj.bl = (bRoundedCorners) ? Math.max((radius - _local9), 0) : 0; radiusObj.br = (bRoundedCorners) ? Math.max((radius - _local9), 0) : 0; } else { drawDropShadow(0, 0, _arg1, _arg2, radius, radius, radius, radius); drawRoundRect(0, 0, _arg1, _arg2, radius, _local7, 1, null, null, null, _local20); radius = Math.max((getStyle("cornerRadius") - _local9), 0); }; }; }; }; } mx_internal function drawBackground(_arg1:Number, _arg2:Number):void{ var _local4:Number; var _local5:Number; var _local6:EdgeMetrics; var _local7:Graphics; var _local8:Number; var _local9:Number; var _local10:Array; var _local11:Number; if (((((((!((backgroundColor === null))) && (!((backgroundColor === ""))))) || (getStyle("mouseShield")))) || (getStyle("mouseShieldChildren")))){ _local4 = Number(backgroundColor); _local5 = 1; _local6 = getBackgroundColorMetrics(); _local7 = graphics; if (((((isNaN(_local4)) || ((backgroundColor === "")))) || ((backgroundColor === null)))){ _local5 = 0; _local4 = 0xFFFFFF; } else { _local5 = getStyle(backgroundAlphaName); }; if (((!((radius == 0))) || (backgroundHole))){ _local8 = _local6.bottom; if (radiusObj){ _local9 = (bRoundedCorners) ? radius : 0; radiusObj = {tl:radius, tr:radius, bl:_local9, br:_local9}; drawRoundRect(_local6.left, _local6.top, (width - (_local6.left + _local6.right)), (height - (_local6.top + _local8)), radiusObj, _local4, _local5, null, GradientType.LINEAR, null, backgroundHole); } else { drawRoundRect(_local6.left, _local6.top, (width - (_local6.left + _local6.right)), (height - (_local6.top + _local8)), radius, _local4, _local5, null, GradientType.LINEAR, null, backgroundHole); }; } else { _local7.beginFill(_local4, _local5); _local7.drawRect(_local6.left, _local6.top, ((_arg1 - _local6.right) - _local6.left), ((_arg2 - _local6.bottom) - _local6.top)); _local7.endFill(); }; }; var _local3:String = getStyle("borderStyle"); if ((((((FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)) && ((((_local3 == "alert")) || ((_local3 == "default")))))) && ((getStyle("headerColors") == null)))){ _local10 = getStyle("highlightAlphas"); _local11 = (_local10) ? _local10[0] : 0.3; drawRoundRect(0, 0, _arg1, _arg2, {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, _local11, null, GradientType.LINEAR, null, {x:0, y:1, w:_arg1, h:(_arg2 - 1), r:{tl:radius, tr:radius, bl:0, br:0}}); }; } mx_internal function drawDropShadow(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):void{ var _local11:Number; var _local12:Boolean; if ((((((((getStyle("dropShadowEnabled") == false)) || ((getStyle("dropShadowEnabled") == "false")))) || ((_arg3 == 0)))) || ((_arg4 == 0)))){ return; }; var _local9:Number = getStyle("shadowDistance"); var _local10:String = getStyle("shadowDirection"); if (getStyle("borderStyle") == "applicationControlBar"){ _local12 = getStyle("docked"); _local11 = (_local12) ? 90 : getDropShadowAngle(_local9, _local10); _local9 = Math.abs(_local9); } else { _local11 = getDropShadowAngle(_local9, _local10); _local9 = (Math.abs(_local9) + 2); }; if (!dropShadow){ dropShadow = new RectangularDropShadow(); }; dropShadow.distance = _local9; dropShadow.angle = _local11; dropShadow.color = getStyle("dropShadowColor"); dropShadow.alpha = 0.4; dropShadow.tlRadius = _arg5; dropShadow.trRadius = _arg6; dropShadow.blRadius = _arg8; dropShadow.brRadius = _arg7; dropShadow.drawShadow(graphics, _arg1, _arg2, _arg3, _arg4); } mx_internal function getBackgroundColor():Object{ var _local2:Object; var _local1:IUIComponent = (parent as IUIComponent); if (((_local1) && (!(_local1.enabled)))){ _local2 = getStyle("backgroundDisabledColor"); if (((!((_local2 === null))) && (StyleManager.isValidStyleValue(_local2)))){ return (_local2); }; }; return (getStyle("backgroundColor")); } mx_internal function draw3dBorder(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):void{ var _local7:Number = width; var _local8:Number = height; drawDropShadow(0, 0, width, height, 0, 0, 0, 0); var _local9:Graphics = graphics; _local9.beginFill(_arg1); _local9.drawRect(0, 0, _local7, _local8); _local9.drawRect(1, 0, (_local7 - 2), _local8); _local9.endFill(); _local9.beginFill(_arg2); _local9.drawRect(1, 0, (_local7 - 2), 1); _local9.endFill(); _local9.beginFill(_arg3); _local9.drawRect(1, (_local8 - 1), (_local7 - 2), 1); _local9.endFill(); _local9.beginFill(_arg4); _local9.drawRect(1, 1, (_local7 - 2), 1); _local9.endFill(); _local9.beginFill(_arg5); _local9.drawRect(1, (_local8 - 2), (_local7 - 2), 1); _local9.endFill(); _local9.beginFill(_arg6); _local9.drawRect(1, 2, (_local7 - 2), (_local8 - 4)); _local9.drawRect(2, 2, (_local7 - 4), (_local8 - 4)); _local9.endFill(); } mx_internal function getBackgroundColorMetrics():EdgeMetrics{ return (borderMetrics); } mx_internal function getDropShadowAngle(_arg1:Number, _arg2:String):Number{ if (_arg2 == "left"){ return (((_arg1 >= 0)) ? 135 : 225); //unresolved jump }; if (_arg2 == "right"){ return (((_arg1 >= 0)) ? 45 : 315); //unresolved jump }; return (((_arg1 >= 0)) ? 90 : 270); } override public function get borderMetrics():EdgeMetrics{ var _local1:Number; var _local3:String; if (_borderMetrics){ return (_borderMetrics); }; var _local2:String = getStyle("borderStyle"); if ((((_local2 == "default")) || ((_local2 == "alert")))){ if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ _borderMetrics = new EdgeMetrics(0, 0, 0, 0); } else { return (EdgeMetrics.EMPTY); }; } else { if ((((_local2 == "controlBar")) || ((_local2 == "applicationControlBar")))){ _borderMetrics = new EdgeMetrics(1, 1, 1, 1); } else { if (_local2 == "solid"){ _local1 = getStyle("borderThickness"); if (isNaN(_local1)){ _local1 = 0; }; _borderMetrics = new EdgeMetrics(_local1, _local1, _local1, _local1); _local3 = getStyle("borderSides"); if (_local3 != "left top right bottom"){ if (_local3.indexOf("left") == -1){ _borderMetrics.left = 0; }; if (_local3.indexOf("top") == -1){ _borderMetrics.top = 0; }; if (_local3.indexOf("right") == -1){ _borderMetrics.right = 0; }; if (_local3.indexOf("bottom") == -1){ _borderMetrics.bottom = 0; }; }; } else { _local1 = BORDER_WIDTHS[_local2]; if (isNaN(_local1)){ _local1 = 0; }; _borderMetrics = new EdgeMetrics(_local1, _local1, _local1, _local1); }; }; }; return (_borderMetrics); } } }//package mx.skins.halo
Section 319
//HaloColors (mx.skins.halo.HaloColors) package mx.skins.halo { import mx.utils.*; public class HaloColors { mx_internal static const VERSION:String = "3.0.0.0"; private static var cache:Object = {}; public static function getCacheKey(... _args):String{ return (_args.join(",")); } public static function addHaloColors(_arg1:Object, _arg2:uint, _arg3:uint, _arg4:uint):void{ var _local5:String = getCacheKey(_arg2, _arg3, _arg4); var _local6:Object = cache[_local5]; if (!_local6){ _local6 = (cache[_local5] = {}); _local6.themeColLgt = ColorUtil.adjustBrightness(_arg2, 100); _local6.themeColDrk1 = ColorUtil.adjustBrightness(_arg2, -75); _local6.themeColDrk2 = ColorUtil.adjustBrightness(_arg2, -25); _local6.fillColorBright1 = ColorUtil.adjustBrightness2(_arg3, 15); _local6.fillColorBright2 = ColorUtil.adjustBrightness2(_arg4, 15); _local6.fillColorPress1 = ColorUtil.adjustBrightness2(_arg2, 85); _local6.fillColorPress2 = ColorUtil.adjustBrightness2(_arg2, 60); _local6.bevelHighlight1 = ColorUtil.adjustBrightness2(_arg3, 40); _local6.bevelHighlight2 = ColorUtil.adjustBrightness2(_arg4, 40); }; _arg1.themeColLgt = _local6.themeColLgt; _arg1.themeColDrk1 = _local6.themeColDrk1; _arg1.themeColDrk2 = _local6.themeColDrk2; _arg1.fillColorBright1 = _local6.fillColorBright1; _arg1.fillColorBright2 = _local6.fillColorBright2; _arg1.fillColorPress1 = _local6.fillColorPress1; _arg1.fillColorPress2 = _local6.fillColorPress2; _arg1.bevelHighlight1 = _local6.bevelHighlight1; _arg1.bevelHighlight2 = _local6.bevelHighlight2; } } }//package mx.skins.halo
Section 320
//HaloFocusRect (mx.skins.halo.HaloFocusRect) package mx.skins.halo { import flash.display.*; import mx.styles.*; import mx.utils.*; import mx.skins.*; public class HaloFocusRect extends ProgrammaticSkin implements IStyleClient { private var _focusColor:Number; mx_internal static const VERSION:String = "3.0.0.0"; public function get inheritingStyles():Object{ return (styleName.inheritingStyles); } public function set inheritingStyles(_arg1:Object):void{ } public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{ } public function registerEffects(_arg1:Array):void{ } public function regenerateStyleCache(_arg1:Boolean):void{ } public function get styleDeclaration():CSSStyleDeclaration{ return (CSSStyleDeclaration(styleName)); } public function getClassStyleDeclarations():Array{ return ([]); } public function get className():String{ return ("HaloFocusRect"); } public function clearStyle(_arg1:String):void{ if (_arg1 == "focusColor"){ _focusColor = NaN; }; } public function setStyle(_arg1:String, _arg2):void{ if (_arg1 == "focusColor"){ _focusColor = _arg2; }; } public function set nonInheritingStyles(_arg1:Object):void{ } public function get nonInheritingStyles():Object{ return (styleName.nonInheritingStyles); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; super.updateDisplayList(_arg1, _arg2); var _local3:String = getStyle("focusBlendMode"); var _local4:Number = getStyle("focusAlpha"); var _local5:Number = getStyle("focusColor"); var _local6:Number = getStyle("cornerRadius"); var _local7:Number = getStyle("focusThickness"); var _local8:String = getStyle("focusRoundedCorners"); var _local9:Number = getStyle("themeColor"); var _local10:Number = _local5; if (isNaN(_local10)){ _local10 = _local9; }; var _local11:Graphics = graphics; _local11.clear(); blendMode = _local3; if (((!((_local8 == "tl tr bl br"))) && ((_local6 > 0)))){ _local12 = 0; _local13 = 0; _local14 = 0; _local15 = 0; _local16 = (_local6 + _local7); if (_local8.indexOf("tl") >= 0){ _local12 = _local16; }; if (_local8.indexOf("tr") >= 0){ _local14 = _local16; }; if (_local8.indexOf("bl") >= 0){ _local13 = _local16; }; if (_local8.indexOf("br") >= 0){ _local15 = _local16; }; _local11.beginFill(_local10, _local4); GraphicsUtil.drawRoundRectComplex(_local11, 0, 0, _arg1, _arg2, _local12, _local14, _local13, _local15); _local12 = (_local12) ? _local6 : 0; _local14 = (_local14) ? _local6 : 0; _local13 = (_local13) ? _local6 : 0; _local15 = (_local15) ? _local6 : 0; GraphicsUtil.drawRoundRectComplex(_local11, _local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local12, _local14, _local13, _local15); _local11.endFill(); _local16 = (_local6 + (_local7 / 2)); _local12 = (_local12) ? _local16 : 0; _local14 = (_local14) ? _local16 : 0; _local13 = (_local13) ? _local16 : 0; _local15 = (_local15) ? _local16 : 0; _local11.beginFill(_local10, _local4); GraphicsUtil.drawRoundRectComplex(_local11, (_local7 / 2), (_local7 / 2), (_arg1 - _local7), (_arg2 - _local7), _local12, _local14, _local13, _local15); _local12 = (_local12) ? _local6 : 0; _local14 = (_local14) ? _local6 : 0; _local13 = (_local13) ? _local6 : 0; _local15 = (_local15) ? _local6 : 0; GraphicsUtil.drawRoundRectComplex(_local11, _local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local12, _local14, _local13, _local15); _local11.endFill(); } else { _local11.beginFill(_local10, _local4); _local17 = (((_local6 > 0)) ? (_local6 + _local7) : 0 * 2); _local11.drawRoundRect(0, 0, _arg1, _arg2, _local17, _local17); _local17 = (_local6 * 2); _local11.drawRoundRect(_local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local17, _local17); _local11.endFill(); _local11.beginFill(_local10, _local4); _local17 = (((_local6 > 0)) ? (_local6 + (_local7 / 2)) : 0 * 2); _local11.drawRoundRect((_local7 / 2), (_local7 / 2), (_arg1 - _local7), (_arg2 - _local7), _local17, _local17); _local17 = (_local6 * 2); _local11.drawRoundRect(_local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local17, _local17); _local11.endFill(); }; } override public function getStyle(_arg1:String){ return (((_arg1 == "focusColor")) ? _focusColor : super.getStyle(_arg1)); } public function set styleDeclaration(_arg1:CSSStyleDeclaration):void{ } } }//package mx.skins.halo
Section 321
//PanelSkin (mx.skins.halo.PanelSkin) package mx.skins.halo { import flash.display.*; import mx.core.*; import flash.utils.*; public class PanelSkin extends HaloBorder { private var oldControlBarHeight:Number; protected var _panelBorderMetrics:EdgeMetrics; private var oldHeaderHeight:Number; mx_internal static const VERSION:String = "3.0.0.0"; private static var panels:Object = {}; override public function styleChanged(_arg1:String):void{ super.styleChanged(_arg1); if ((((((((((((((((((_arg1 == null)) || ((_arg1 == "styleName")))) || ((_arg1 == "borderStyle")))) || ((_arg1 == "borderThickness")))) || ((_arg1 == "borderThicknessTop")))) || ((_arg1 == "borderThicknessBottom")))) || ((_arg1 == "borderThicknessLeft")))) || ((_arg1 == "borderThicknessRight")))) || ((_arg1 == "borderSides")))){ _panelBorderMetrics = null; }; invalidateDisplayList(); } override mx_internal function drawBorder(_arg1:Number, _arg2:Number):void{ var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Graphics; var _local8:IContainer; var _local9:EdgeMetrics; super.drawBorder(_arg1, _arg2); if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ return; }; var _local3:String = getStyle("borderStyle"); if (_local3 == "default"){ _local4 = getStyle("backgroundAlpha"); _local5 = getStyle("borderAlpha"); backgroundAlphaName = "borderAlpha"; radiusObj = null; radius = getStyle("cornerRadius"); bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true"); _local6 = (bRoundedCorners) ? radius : 0; _local7 = graphics; drawDropShadow(0, 0, _arg1, _arg2, radius, radius, _local6, _local6); if (!bRoundedCorners){ radiusObj = {}; }; _local8 = (parent as IContainer); if (_local8){ _local9 = _local8.viewMetrics; backgroundHole = {x:_local9.left, y:_local9.top, w:Math.max(0, ((_arg1 - _local9.left) - _local9.right)), h:Math.max(0, ((_arg2 - _local9.top) - _local9.bottom)), r:0}; if ((((backgroundHole.w > 0)) && ((backgroundHole.h > 0)))){ if (_local4 != _local5){ drawDropShadow(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h, 0, 0, 0, 0); }; _local7.beginFill(Number(backgroundColor), _local4); _local7.drawRect(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h); _local7.endFill(); }; }; backgroundColor = getStyle("borderColor"); }; } override public function get borderMetrics():EdgeMetrics{ var _local4:Number; if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ return (super.borderMetrics); }; var _local1:Boolean = isPanel(parent); var _local2:IUIComponent = (_local1) ? Object(parent)._controlBar : null; var _local3:Number = (_local1) ? Object(parent).getHeaderHeightProxy() : NaN; if (((_local2) && (_local2.includeInLayout))){ _local4 = _local2.getExplicitOrMeasuredHeight(); }; if (((!((_local4 == oldControlBarHeight))) && (!(((isNaN(oldControlBarHeight)) && (isNaN(_local4))))))){ _panelBorderMetrics = null; }; if (((!((_local3 == oldHeaderHeight))) && (!(((isNaN(_local3)) && (isNaN(oldHeaderHeight))))))){ _panelBorderMetrics = null; }; if (_panelBorderMetrics){ return (_panelBorderMetrics); }; var _local5:EdgeMetrics = super.borderMetrics; var _local6:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0); var _local7:Number = getStyle("borderThickness"); var _local8:Number = getStyle("borderThicknessLeft"); var _local9:Number = getStyle("borderThicknessTop"); var _local10:Number = getStyle("borderThicknessRight"); var _local11:Number = getStyle("borderThicknessBottom"); _local6.left = (_local5.left + (isNaN(_local8)) ? _local7 : _local8); _local6.top = (_local5.top + (isNaN(_local9)) ? _local7 : _local9); _local6.right = (_local5.bottom + (isNaN(_local10)) ? _local7 : _local10); _local6.bottom = (_local5.bottom + (isNaN(_local11)) ? (((_local2) && (!(isNaN(_local9))))) ? _local9 : (isNaN(_local8)) ? _local7 : _local8 : _local11); oldHeaderHeight = _local3; if (!isNaN(_local3)){ _local6.top = (_local6.top + _local3); }; oldControlBarHeight = _local4; if (!isNaN(_local4)){ _local6.bottom = (_local6.bottom + _local4); }; _panelBorderMetrics = _local6; return (_panelBorderMetrics); } override mx_internal function drawBackground(_arg1:Number, _arg2:Number):void{ var _local3:Array; var _local4:Number; super.drawBackground(_arg1, _arg2); if ((((getStyle("headerColors") == null)) && ((getStyle("borderStyle") == "default")))){ _local3 = getStyle("highlightAlphas"); _local4 = (_local3) ? _local3[0] : 0.3; drawRoundRect(0, 0, _arg1, _arg2, {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, _local4, null, GradientType.LINEAR, null, {x:0, y:1, w:_arg1, h:(_arg2 - 1), r:{tl:radius, tr:radius, bl:0, br:0}}); }; } override mx_internal function getBackgroundColorMetrics():EdgeMetrics{ if (getStyle("borderStyle") == "default"){ return (EdgeMetrics.EMPTY); }; return (super.borderMetrics); } private static function isPanel(_arg1:Object):Boolean{ var s:String; var x:XML; var parent = _arg1; s = getQualifiedClassName(parent); if (panels[s] == 1){ return (true); }; if (panels[s] == 0){ return (false); }; if (s == "mx.containers::Panel"){ (panels[s] == 1); return (true); }; x = describeType(parent); var xmllist:XMLList = x.extendsClass.(@type == "mx.containers::Panel"); if (xmllist.length() == 0){ panels[s] = 0; return (false); }; panels[s] = 1; return (true); } } }//package mx.skins.halo
Section 322
//ScrollArrowSkin (mx.skins.halo.ScrollArrowSkin) package mx.skins.halo { import flash.display.*; import mx.core.*; import mx.styles.*; import mx.controls.scrollClasses.*; import mx.utils.*; import mx.skins.*; public class ScrollArrowSkin extends Border { mx_internal static const VERSION:String = "3.0.0.0"; private static var cache:Object = {}; override public function get measuredWidth():Number{ return (ScrollBar.THICKNESS); } override public function get measuredHeight():Number{ return (ScrollBar.THICKNESS); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local13:Array; var _local15:Array; var _local16:Array; var _local17:Array; var _local18:Array; var _local19:Array; var _local20:Array; super.updateDisplayList(_arg1, _arg2); var _local3:Number = getStyle("backgroundColor"); var _local4:uint = getStyle("borderColor"); var _local5:Array = getStyle("fillAlphas"); var _local6:Array = getStyle("fillColors"); StyleManager.getColorNames(_local6); var _local7:Array = getStyle("highlightAlphas"); var _local8:uint = getStyle("themeColor"); var _local9 = (name.charAt(0) == "u"); var _local10:uint = getStyle("iconColor"); var _local11:Object = calcDerivedStyles(_local8, _local4, _local6[0], _local6[1]); var _local12:Boolean = ((((parent) && (parent.parent))) && (!((parent.parent.rotation == 0)))); if (((_local9) && (!(_local12)))){ _local13 = [_local4, _local11.borderColorDrk1]; } else { _local13 = [_local11.borderColorDrk1, _local11.borderColorDrk2]; }; var _local14:Graphics = graphics; _local14.clear(); if (isNaN(_local3)){ _local3 = 0xFFFFFF; }; if ((((FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0)) || ((name.indexOf("Disabled") == -1)))){ drawRoundRect(0, 0, _arg1, _arg2, 0, _local3, 1); }; switch (name){ case "upArrowUpSkin": if (!_local12){ drawRoundRect(1, (_arg2 - 4), (_arg1 - 2), 8, 0, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], verticalGradientMatrix(1, (_arg2 - 4), (_arg1 - 2), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - 4), w:(_arg1 - 2), h:4, r:0}); }; case "downArrowUpSkin": _local15 = [_local6[0], _local6[1]]; _local16 = [_local5[0], _local5[1]]; drawRoundRect(0, 0, _arg1, _arg2, 0, _local13, 1, (_local12) ? horizontalGradientMatrix(0, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:0}); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, _local15, _local16, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - (2 / 2)))); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - (2 / 2)), 0, [0xFFFFFF, 0xFFFFFF], _local7, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - (2 / 2)))); break; case "upArrowOverSkin": if (!_local12){ drawRoundRect(1, (_arg2 - 4), (_arg1 - 2), 8, 0, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], verticalGradientMatrix(1, (_arg2 - 4), (_arg1 - 2), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - 4), w:(_arg1 - 2), h:4, r:0}); }; case "downArrowOverSkin": if (_local6.length > 2){ _local17 = [_local6[2], _local6[3]]; } else { _local17 = [_local6[0], _local6[1]]; }; if (_local5.length > 2){ _local18 = [_local5[2], _local5[3]]; } else { _local18 = [_local5[0], _local5[1]]; }; drawRoundRect(0, 0, _arg1, _arg2, 0, 0xFFFFFF, 1); drawRoundRect(0, 0, _arg1, _arg2, 0, [_local8, _local11.themeColDrk1], 1, (_local12) ? horizontalGradientMatrix(0, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:0}); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, _local17, _local18, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2))); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - (2 / 2)), 0, [0xFFFFFF, 0xFFFFFF], _local7, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - (2 / 2)))); break; case "upArrowDownSkin": if (!_local12){ drawRoundRect(1, (_arg2 - 4), (_arg1 - 2), 8, 0, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], (_local12) ? horizontalGradientMatrix(1, (_arg2 - 4), (_arg1 - 2), 8) : verticalGradientMatrix(1, (_arg2 - 4), (_arg1 - 2), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - 4), w:(_arg1 - 2), h:4, r:0}); }; case "downArrowDownSkin": drawRoundRect(0, 0, _arg1, _arg2, 0, [_local8, _local11.themeColDrk1], 1, (_local12) ? horizontalGradientMatrix(0, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:0}); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, [_local11.fillColorPress1, _local11.fillColorPress2], 1, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2))); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - (2 / 2)), 0, [0xFFFFFF, 0xFFFFFF], _local7, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - (2 / 2)))); break; case "upArrowDisabledSkin": if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0){ if (!_local12){ drawRoundRect(1, (_arg2 - 4), (_arg1 - 2), 8, 0, [_local11.borderColorDrk1, _local11.borderColorDrk1], [0.5, 0], verticalGradientMatrix(1, (_arg2 - 4), (_arg1 - 2), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - 4), w:(_arg1 - 2), h:4, r:0}); }; }; case "downArrowDisabledSkin": if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0){ _local19 = [_local6[0], _local6[1]]; _local20 = [(_local5[0] - 0.15), (_local5[1] - 0.15)]; drawRoundRect(0, 0, _arg1, _arg2, 0, _local13, 0.5, (_local12) ? horizontalGradientMatrix(0, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:0}); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, _local19, _local20, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - (2 / 2)))); _local10 = getStyle("disabledIconColor"); } else { drawRoundRect(0, 0, _arg1, _arg2, 0, 0xFFFFFF, 0); return; }; break; default: drawRoundRect(0, 0, _arg1, _arg2, 0, 0xFFFFFF, 0); return; }; _local14.beginFill(_local10); if (_local9){ _local14.moveTo((_arg1 / 2), 6); _local14.lineTo((_arg1 - 5), (_arg2 - 6)); _local14.lineTo(5, (_arg2 - 6)); _local14.lineTo((_arg1 / 2), 6); } else { _local14.moveTo((_arg1 / 2), (_arg2 - 6)); _local14.lineTo((_arg1 - 5), 6); _local14.lineTo(5, 6); _local14.lineTo((_arg1 / 2), (_arg2 - 6)); }; _local14.endFill(); } private static function calcDerivedStyles(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:uint):Object{ var _local6:Object; var _local5:String = HaloColors.getCacheKey(_arg1, _arg2, _arg3, _arg4); if (!cache[_local5]){ _local6 = (cache[_local5] = {}); HaloColors.addHaloColors(_local6, _arg1, _arg3, _arg4); _local6.borderColorDrk1 = ColorUtil.adjustBrightness2(_arg2, -25); _local6.borderColorDrk2 = ColorUtil.adjustBrightness2(_arg2, -50); }; return (cache[_local5]); } } }//package mx.skins.halo
Section 323
//ScrollThumbSkin (mx.skins.halo.ScrollThumbSkin) package mx.skins.halo { import flash.display.*; import mx.styles.*; import mx.utils.*; import mx.skins.*; public class ScrollThumbSkin extends Border { mx_internal static const VERSION:String = "3.0.0.0"; private static var cache:Object = {}; override public function get measuredWidth():Number{ return (16); } override public function get measuredHeight():Number{ return (10); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local17:Array; var _local18:Array; var _local19:Array; var _local20:Array; super.updateDisplayList(_arg1, _arg2); var _local3:Number = getStyle("backgroundColor"); var _local4:uint = getStyle("borderColor"); var _local5:Number = getStyle("cornerRadius"); var _local6:Array = getStyle("fillAlphas"); var _local7:Array = getStyle("fillColors"); StyleManager.getColorNames(_local7); var _local8:Array = getStyle("highlightAlphas"); var _local9:uint = getStyle("themeColor"); var _local10:uint = 7305079; var _local11:Object = calcDerivedStyles(_local9, _local4, _local7[0], _local7[1]); var _local12:Number = Math.max((_local5 - 1), 0); var _local13:Object = {tl:0, tr:_local12, bl:0, br:_local12}; _local12 = Math.max((_local12 - 1), 0); var _local14:Object = {tl:0, tr:_local12, bl:0, br:_local12}; var _local15:Boolean = ((((parent) && (parent.parent))) && (!((parent.parent.rotation == 0)))); if (isNaN(_local3)){ _local3 = 0xFFFFFF; }; graphics.clear(); drawRoundRect(1, 0, (_arg1 - 3), _arg2, _local13, _local3, 1); switch (name){ case "thumbUpSkin": default: _local17 = [_local7[0], _local7[1]]; _local18 = [_local6[0], _local6[1]]; drawRoundRect(0, 0, _arg1, _arg2, 0, 0xFFFFFF, 0); if (_local15){ drawRoundRect(1, 0, (_arg1 - 2), _arg2, _local5, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], horizontalGradientMatrix(2, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 4), h:(_arg2 - 2), r:_local14}); } else { drawRoundRect(1, (_arg2 - _local12), (_arg1 - 3), (_local12 + 4), {tl:0, tr:0, bl:0, br:_local12}, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], (_local15) ? horizontalGradientMatrix(0, (_arg2 - 4), (_arg1 - 3), 8) : verticalGradientMatrix(0, (_arg2 - 4), (_arg1 - 3), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - _local12), w:(_arg1 - 4), h:_local12, r:{tl:0, tr:0, bl:0, br:(_local12 - 1)}}); }; drawRoundRect(1, 0, (_arg1 - 3), _arg2, _local13, [_local4, _local11.borderColorDrk1], 1, (_local15) ? horizontalGradientMatrix(0, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 4), h:(_arg2 - 2), r:_local14}); drawRoundRect(1, 1, (_arg1 - 4), (_arg2 - 2), _local14, _local17, _local18, (_local15) ? horizontalGradientMatrix(1, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(1, 0, (_arg1 - 2), (_arg2 - 2))); if (_local15){ drawRoundRect(1, 0, ((_arg1 - 4) / 2), (_arg2 - 2), 0, [0xFFFFFF, 0xFFFFFF], _local8, horizontalGradientMatrix(1, 1, (_arg1 - 4), ((_arg2 - 2) / 2))); } else { drawRoundRect(1, 1, (_arg1 - 4), ((_arg2 - 2) / 2), _local14, [0xFFFFFF, 0xFFFFFF], _local8, (_local15) ? horizontalGradientMatrix(1, 0, ((_arg1 - 4) / 2), (_arg2 - 2)) : verticalGradientMatrix(1, 1, (_arg1 - 4), ((_arg2 - 2) / 2))); }; break; case "thumbOverSkin": if (_local7.length > 2){ _local19 = [_local7[2], _local7[3]]; } else { _local19 = [_local7[0], _local7[1]]; }; if (_local6.length > 2){ _local20 = [_local6[2], _local6[3]]; } else { _local20 = [_local6[0], _local6[1]]; }; drawRoundRect(0, 0, _arg1, _arg2, 0, 0xFFFFFF, 0); if (_local15){ drawRoundRect(1, 0, (_arg1 - 2), _arg2, _local5, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], horizontalGradientMatrix(2, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 4), h:(_arg2 - 2), r:_local14}); } else { drawRoundRect(1, (_arg2 - _local12), (_arg1 - 3), (_local12 + 4), {tl:0, tr:0, bl:0, br:_local12}, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], (_local15) ? horizontalGradientMatrix(0, (_arg2 - 4), (_arg1 - 3), 8) : verticalGradientMatrix(0, (_arg2 - 4), (_arg1 - 3), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - _local12), w:(_arg1 - 4), h:_local12, r:{tl:0, tr:0, bl:0, br:(_local12 - 1)}}); }; drawRoundRect(1, 0, (_arg1 - 3), _arg2, _local13, [_local9, _local11.themeColDrk1], 1, (_local15) ? horizontalGradientMatrix(1, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 4), h:(_arg2 - 2), r:_local14}); drawRoundRect(1, 1, (_arg1 - 4), (_arg2 - 2), _local14, _local19, _local20, (_local15) ? horizontalGradientMatrix(1, 0, _arg1, _arg2) : verticalGradientMatrix(1, 0, _arg1, _arg2)); break; case "thumbDownSkin": if (_local15){ drawRoundRect(1, 0, (_arg1 - 2), _arg2, _local13, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], horizontalGradientMatrix(2, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 4), h:(_arg2 - 2), r:_local14}); } else { drawRoundRect(1, (_arg2 - _local12), (_arg1 - 3), (_local12 + 4), {tl:0, tr:0, bl:0, br:_local12}, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], (_local15) ? horizontalGradientMatrix(0, (_arg2 - 4), (_arg1 - 3), 8) : verticalGradientMatrix(0, (_arg2 - 4), (_arg1 - 3), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - _local12), w:(_arg1 - 4), h:_local12, r:{tl:0, tr:0, bl:0, br:(_local12 - 1)}}); }; drawRoundRect(1, 0, (_arg1 - 3), _arg2, _local13, [_local9, _local11.themeColDrk2], 1, (_local15) ? horizontalGradientMatrix(1, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 4), h:(_arg2 - 2), r:_local14}); drawRoundRect(1, 1, (_arg1 - 4), (_arg2 - 2), _local14, [_local11.fillColorPress1, _local11.fillColorPress2], 1, (_local15) ? horizontalGradientMatrix(1, 0, _arg1, _arg2) : verticalGradientMatrix(1, 0, _arg1, _arg2)); break; case "thumbDisabledSkin": drawRoundRect(0, 0, _arg1, _arg2, 0, 0xFFFFFF, 0); drawRoundRect(1, 0, (_arg1 - 3), _arg2, _local13, 0x999999, 0.5); drawRoundRect(1, 1, (_arg1 - 4), (_arg2 - 2), _local14, 0xFFFFFF, 0.5); break; }; var _local16:Number = Math.floor(((_arg1 / 2) - 4)); drawRoundRect(_local16, Math.floor(((_arg2 / 2) - 4)), 5, 1, 0, 0, 0.4); drawRoundRect(_local16, Math.floor(((_arg2 / 2) - 2)), 5, 1, 0, 0, 0.4); drawRoundRect(_local16, Math.floor((_arg2 / 2)), 5, 1, 0, 0, 0.4); drawRoundRect(_local16, Math.floor(((_arg2 / 2) + 2)), 5, 1, 0, 0, 0.4); drawRoundRect(_local16, Math.floor(((_arg2 / 2) + 4)), 5, 1, 0, 0, 0.4); } private static function calcDerivedStyles(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:uint):Object{ var _local6:Object; var _local5:String = HaloColors.getCacheKey(_arg1, _arg2, _arg3, _arg4); if (!cache[_local5]){ _local6 = (cache[_local5] = {}); HaloColors.addHaloColors(_local6, _arg1, _arg3, _arg4); _local6.borderColorDrk1 = ColorUtil.adjustBrightness2(_arg2, -50); }; return (cache[_local5]); } } }//package mx.skins.halo
Section 324
//ScrollTrackSkin (mx.skins.halo.ScrollTrackSkin) package mx.skins.halo { import flash.display.*; import mx.core.*; import mx.styles.*; import mx.utils.*; import mx.skins.*; public class ScrollTrackSkin extends Border { mx_internal static const VERSION:String = "3.0.0.0"; override public function get measuredWidth():Number{ return (16); } override public function get measuredHeight():Number{ return (1); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ super.updateDisplayList(_arg1, _arg2); var _local3:Array = getStyle("trackColors"); StyleManager.getColorNames(_local3); var _local4:uint = ColorUtil.adjustBrightness2(getStyle("borderColor"), -20); var _local5:uint = ColorUtil.adjustBrightness2(_local4, -30); graphics.clear(); var _local6:Number = 1; if ((((name == "trackDisabledSkin")) && ((FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0)))){ _local6 = 0.2; }; drawRoundRect(0, 0, _arg1, _arg2, 0, [_local4, _local5], _local6, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:0}); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, _local3, _local6, horizontalGradientMatrix(1, 1, ((_arg1 / 3) * 2), (_arg2 - 2))); } } }//package mx.skins.halo
Section 325
//SliderHighlightSkin (mx.skins.halo.SliderHighlightSkin) package mx.skins.halo { import mx.skins.*; public class SliderHighlightSkin extends Border { mx_internal static const VERSION:String = "3.0.0.0"; override public function get measuredWidth():Number{ return (1); } override public function get measuredHeight():Number{ return (2); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ super.updateDisplayList(_arg1, _arg2); var _local3:int = getStyle("themeColor"); graphics.clear(); drawRoundRect(0, 0, _arg1, 1, 0, _local3, 0.7); drawRoundRect(0, (_arg2 - 1), _arg1, 1, 0, _local3, 1); drawRoundRect(0, (_arg2 - 2), _arg1, 1, 0, _local3, 0.4); } } }//package mx.skins.halo
Section 326
//SliderThumbSkin (mx.skins.halo.SliderThumbSkin) package mx.skins.halo { import flash.display.*; import mx.styles.*; import mx.utils.*; import mx.skins.*; public class SliderThumbSkin extends Border { mx_internal static const VERSION:String = "3.0.0.0"; private static var cache:Object = {}; override public function get measuredWidth():Number{ return (12); } override public function get measuredHeight():Number{ return (12); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local9:Array; var _local10:Array; super.updateDisplayList(_arg1, _arg2); var _local3:uint = getStyle("borderColor"); var _local4:Array = getStyle("fillAlphas"); var _local5:Array = getStyle("fillColors"); StyleManager.getColorNames(_local5); var _local6:uint = getStyle("themeColor"); var _local7:Object = calcDerivedStyles(_local6, _local3, _local5[0], _local5[1]); var _local8:Graphics = graphics; _local8.clear(); switch (name){ case "thumbUpSkin": drawThumbState(_arg1, _arg2, [_local3, _local7.borderColorDrk1], [_local5[0], _local5[1]], [_local4[0], _local4[1]], true, true); break; case "thumbOverSkin": if (_local5.length > 2){ _local9 = [_local5[2], _local5[3]]; } else { _local9 = [_local5[0], _local5[1]]; }; if (_local4.length > 2){ _local10 = [_local4[2], _local4[3]]; } else { _local10 = [_local4[0], _local4[1]]; }; drawThumbState(_arg1, _arg2, [_local7.themeColDrk2, _local7.themeColDrk1], _local9, _local10, true, true); break; case "thumbDownSkin": drawThumbState(_arg1, _arg2, [_local7.themeColDrk2, _local7.themeColDrk1], [_local7.fillColorPress1, _local7.fillColorPress2], [1, 1], true, false); break; case "thumbDisabledSkin": drawThumbState(_arg1, _arg2, [_local3, _local7.borderColorDrk1], [_local5[0], _local5[1]], [Math.max(0, (_local4[0] - 0.15)), Math.max(0, (_local4[1] - 0.15))], false, false); break; }; } protected function drawThumbState(_arg1:Number, _arg2:Number, _arg3:Array, _arg4:Array, _arg5:Array, _arg6:Boolean, _arg7:Boolean):void{ var _local8:Graphics = graphics; var _local9:Boolean = getStyle("invertThumbDirection"); var _local10:Number = (_local9) ? _arg2 : 0; var _local11:Number = (_local9) ? (_arg2 - 1) : 1; var _local12:Number = (_local9) ? (_arg2 - 2) : 2; var _local13:Number = (_local9) ? 2 : (_arg2 - 2); var _local14:Number = (_local9) ? 1 : (_arg2 - 1); var _local15:Number = (_local9) ? 0 : _arg2; if (_local9){ _arg3 = [_arg3[1], _arg3[0]]; _arg4 = [_arg4[1], _arg4[0]]; _arg5 = [_arg5[1], _arg5[0]]; }; if (_arg6){ _local8.beginGradientFill(GradientType.LINEAR, [0xFFFFFF, 0xFFFFFF], [0.6, 0.6], [0, 0xFF], verticalGradientMatrix(0, 0, _arg1, _arg2)); _local8.moveTo((_arg1 / 2), _local10); _local8.curveTo((_arg1 / 2), _local10, ((_arg1 / 2) - 2), _local12); _local8.lineTo(0, _local13); _local8.curveTo(0, _local13, 2, _local15); _local8.lineTo((_arg1 - 2), _local15); _local8.curveTo((_arg1 - 2), _local15, _arg1, _local13); _local8.lineTo(((_arg1 / 2) + 2), _local12); _local8.curveTo(((_arg1 / 2) + 2), _local12, (_arg1 / 2), _local10); _local8.endFill(); }; _local8.beginGradientFill(GradientType.LINEAR, _arg3, [1, 1], [0, 0xFF], verticalGradientMatrix(0, 0, _arg1, _arg2)); _local8.moveTo((_arg1 / 2), _local10); _local8.curveTo((_arg1 / 2), _local10, ((_arg1 / 2) - 2), _local12); _local8.lineTo(0, _local13); _local8.curveTo(0, _local13, 2, _local15); _local8.lineTo((_arg1 - 2), _local15); _local8.curveTo((_arg1 - 2), _local15, _arg1, _local13); _local8.lineTo(((_arg1 / 2) + 2), _local12); _local8.curveTo(((_arg1 / 2) + 2), _local12, (_arg1 / 2), _local10); if (_arg7){ _local8.moveTo((_arg1 / 2), _local11); _local8.curveTo((_arg1 / 2), _local10, ((_arg1 / 2) - 1), _local12); _local8.lineTo(1, _local14); _local8.curveTo(1, _local14, 1, _local14); _local8.lineTo((_arg1 - 1), _local14); _local8.curveTo((_arg1 - 1), _local14, (_arg1 - 1), _local13); _local8.lineTo(((_arg1 / 2) + 1), _local12); _local8.curveTo(((_arg1 / 2) + 1), _local12, (_arg1 / 2), _local11); _local8.endFill(); }; _local8.beginGradientFill(GradientType.LINEAR, _arg4, _arg5, [0, 0xFF], verticalGradientMatrix(0, 0, _arg1, _arg2)); _local8.moveTo((_arg1 / 2), _local11); _local8.curveTo((_arg1 / 2), _local10, ((_arg1 / 2) - 1), _local12); _local8.lineTo(1, _local14); _local8.curveTo(1, _local14, 1, _local14); _local8.lineTo((_arg1 - 1), _local14); _local8.curveTo((_arg1 - 1), _local14, (_arg1 - 1), _local13); _local8.lineTo(((_arg1 / 2) + 1), _local12); _local8.curveTo(((_arg1 / 2) + 1), _local12, (_arg1 / 2), _local11); _local8.endFill(); } private static function calcDerivedStyles(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:uint):Object{ var _local6:Object; var _local5:String = HaloColors.getCacheKey(_arg1, _arg2, _arg3, _arg4); if (!cache[_local5]){ _local6 = (cache[_local5] = {}); HaloColors.addHaloColors(_local6, _arg1, _arg3, _arg4); _local6.borderColorDrk1 = ColorUtil.adjustBrightness2(_arg2, -50); }; return (cache[_local5]); } } }//package mx.skins.halo
Section 327
//SliderTrackSkin (mx.skins.halo.SliderTrackSkin) package mx.skins.halo { import flash.display.*; import mx.styles.*; import mx.utils.*; import mx.skins.*; public class SliderTrackSkin extends Border { mx_internal static const VERSION:String = "3.0.0.0"; override public function get measuredWidth():Number{ return (200); } override public function get measuredHeight():Number{ return (4); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ super.updateDisplayList(_arg1, _arg2); var _local3:Number = getStyle("borderColor"); var _local4:Array = getStyle("fillAlphas"); var _local5:Array = (getStyle("trackColors") as Array); StyleManager.getColorNames(_local5); var _local6:Number = ColorUtil.adjustBrightness2(_local3, -50); graphics.clear(); drawRoundRect(0, 0, _arg1, _arg2, 0, 0, 0); drawRoundRect(1, 0, _arg1, (_arg2 - 1), 1.5, _local6, 1, null, GradientType.LINEAR, null, {x:2, y:1, w:(_arg1 - 2), h:1, r:0}); drawRoundRect(2, 1, (_arg1 - 2), (_arg2 - 2), 1, _local3, 1, null, GradientType.LINEAR, null, {x:2, y:1, w:(_arg1 - 2), h:1, r:0}); drawRoundRect(2, 1, (_arg1 - 2), 1, 0, _local5, Math.max((_local4[1] - 0.3), 0), horizontalGradientMatrix(2, 1, (_arg1 - 2), 1)); } } }//package mx.skins.halo
Section 328
//TitleBackground (mx.skins.halo.TitleBackground) package mx.skins.halo { import flash.display.*; import mx.styles.*; import mx.utils.*; import mx.skins.*; public class TitleBackground extends ProgrammaticSkin { mx_internal static const VERSION:String = "3.0.0.0"; override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ super.updateDisplayList(_arg1, _arg2); var _local3:Number = getStyle("borderAlpha"); var _local4:Number = getStyle("cornerRadius"); var _local5:Array = getStyle("highlightAlphas"); var _local6:Array = getStyle("headerColors"); var _local7 = !((_local6 == null)); StyleManager.getColorNames(_local6); var _local8:Number = ColorUtil.adjustBrightness2((_local6) ? _local6[1] : 0xFFFFFF, -20); var _local9:Graphics = graphics; _local9.clear(); if (_arg2 < 3){ return; }; if (_local7){ _local9.lineStyle(0, _local8, _local3); _local9.moveTo(0, _arg2); _local9.lineTo(_arg1, _arg2); _local9.lineStyle(0, 0, 0); drawRoundRect(0, 0, _arg1, _arg2, {tl:_local4, tr:_local4, bl:0, br:0}, _local6, _local3, verticalGradientMatrix(0, 0, _arg1, _arg2)); drawRoundRect(0, 0, _arg1, (_arg2 / 2), {tl:_local4, tr:_local4, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local5, verticalGradientMatrix(0, 0, _arg1, (_arg2 / 2))); drawRoundRect(0, 0, _arg1, _arg2, {tl:_local4, tr:_local4, bl:0, br:0}, 0xFFFFFF, _local5[0], null, GradientType.LINEAR, null, {x:0, y:1, w:_arg1, h:(_arg2 - 1), r:{tl:_local4, tr:_local4, bl:0, br:0}}); }; } } }//package mx.skins.halo
Section 329
//ToolTipBorder (mx.skins.halo.ToolTipBorder) package mx.skins.halo { import flash.display.*; import mx.core.*; import mx.graphics.*; import flash.filters.*; import mx.skins.*; public class ToolTipBorder extends RectangularBorder { private var _borderMetrics:EdgeMetrics; private var dropShadow:RectangularDropShadow; mx_internal static const VERSION:String = "3.0.0.0"; override public function get borderMetrics():EdgeMetrics{ if (_borderMetrics){ return (_borderMetrics); }; var _local1:String = getStyle("borderStyle"); switch (_local1){ case "errorTipRight": _borderMetrics = new EdgeMetrics(15, 1, 3, 3); break; case "errorTipAbove": _borderMetrics = new EdgeMetrics(3, 1, 3, 15); break; case "errorTipBelow": _borderMetrics = new EdgeMetrics(3, 13, 3, 3); break; default: _borderMetrics = new EdgeMetrics(3, 1, 3, 3); break; }; return (_borderMetrics); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ super.updateDisplayList(_arg1, _arg2); var _local3:String = getStyle("borderStyle"); var _local4:uint = getStyle("backgroundColor"); var _local5:Number = getStyle("backgroundAlpha"); var _local6:uint = getStyle("borderColor"); var _local7:Number = getStyle("cornerRadius"); var _local8:uint = getStyle("shadowColor"); var _local9:Number = 0.1; var _local10:Graphics = graphics; _local10.clear(); filters = []; switch (_local3){ case "toolTip": drawRoundRect(3, 1, (_arg1 - 6), (_arg2 - 4), _local7, _local4, _local5); if (!dropShadow){ dropShadow = new RectangularDropShadow(); }; dropShadow.distance = 3; dropShadow.angle = 90; dropShadow.color = 0; dropShadow.alpha = 0.4; dropShadow.tlRadius = (_local7 + 2); dropShadow.trRadius = (_local7 + 2); dropShadow.blRadius = (_local7 + 2); dropShadow.brRadius = (_local7 + 2); dropShadow.drawShadow(graphics, 3, 0, (_arg1 - 6), (_arg2 - 4)); break; case "errorTipRight": drawRoundRect(11, 0, (_arg1 - 11), (_arg2 - 2), 3, _local6, _local5); _local10.beginFill(_local6, _local5); _local10.moveTo(11, 7); _local10.lineTo(0, 13); _local10.lineTo(11, 19); _local10.moveTo(11, 7); _local10.endFill(); filters = [new DropShadowFilter(2, 90, 0, 0.4)]; break; case "errorTipAbove": drawRoundRect(0, 0, _arg1, (_arg2 - 13), 3, _local6, _local5); _local10.beginFill(_local6, _local5); _local10.moveTo(9, (_arg2 - 13)); _local10.lineTo(15, (_arg2 - 2)); _local10.lineTo(21, (_arg2 - 13)); _local10.moveTo(9, (_arg2 - 13)); _local10.endFill(); filters = [new DropShadowFilter(2, 90, 0, 0.4)]; break; case "errorTipBelow": drawRoundRect(0, 11, _arg1, (_arg2 - 13), 3, _local6, _local5); _local10.beginFill(_local6, _local5); _local10.moveTo(9, 11); _local10.lineTo(15, 0); _local10.lineTo(21, 11); _local10.moveTo(10, 11); _local10.endFill(); filters = [new DropShadowFilter(2, 90, 0, 0.4)]; break; }; } override public function styleChanged(_arg1:String):void{ if ((((((_arg1 == "borderStyle")) || ((_arg1 == "styleName")))) || ((_arg1 == null)))){ _borderMetrics = null; }; invalidateDisplayList(); } } }//package mx.skins.halo
Section 330
//Border (mx.skins.Border) package mx.skins { import mx.core.*; public class Border extends ProgrammaticSkin implements IBorder { mx_internal static const VERSION:String = "3.0.0.0"; public function get borderMetrics():EdgeMetrics{ return (EdgeMetrics.EMPTY); } } }//package mx.skins
Section 331
//ProgrammaticSkin (mx.skins.ProgrammaticSkin) package mx.skins { import flash.display.*; import flash.geom.*; import mx.core.*; import mx.managers.*; import mx.styles.*; import mx.utils.*; public class ProgrammaticSkin extends FlexShape implements IFlexDisplayObject, IInvalidating, ILayoutManagerClient, ISimpleStyleClient, IProgrammaticSkin { private var _initialized:Boolean;// = false private var _height:Number; private var invalidateDisplayListFlag:Boolean;// = false private var _styleName:IStyleClient; private var _nestLevel:int;// = 0 private var _processedDescriptors:Boolean;// = false private var _updateCompletePendingFlag:Boolean;// = true private var _width:Number; mx_internal static const VERSION:String = "3.0.0.0"; private static var tempMatrix:Matrix = new Matrix(); public function ProgrammaticSkin(){ _width = measuredWidth; _height = measuredHeight; } public function getStyle(_arg1:String){ return (_styleName.getStyle(_arg1)); } protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ } public function get nestLevel():int{ return (_nestLevel); } public function set nestLevel(_arg1:int):void{ _nestLevel = _arg1; invalidateDisplayList(); } override public function get height():Number{ return (_height); } public function get updateCompletePendingFlag():Boolean{ return (_updateCompletePendingFlag); } protected function verticalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{ return (rotatedGradientMatrix(_arg1, _arg2, _arg3, _arg4, 90)); } public function validateSize(_arg1:Boolean=false):void{ } public function invalidateDisplayList():void{ if (((!(invalidateDisplayListFlag)) && ((nestLevel > 0)))){ invalidateDisplayListFlag = true; UIComponentGlobals.layoutManager.invalidateDisplayList(this); }; } public function set updateCompletePendingFlag(_arg1:Boolean):void{ _updateCompletePendingFlag = _arg1; } protected function horizontalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{ return (rotatedGradientMatrix(_arg1, _arg2, _arg3, _arg4, 0)); } override public function set height(_arg1:Number):void{ _height = _arg1; invalidateDisplayList(); } public function set processedDescriptors(_arg1:Boolean):void{ _processedDescriptors = _arg1; } public function validateDisplayList():void{ invalidateDisplayListFlag = false; updateDisplayList(width, height); } public function get measuredWidth():Number{ return (0); } override public function set width(_arg1:Number):void{ _width = _arg1; invalidateDisplayList(); } public function get measuredHeight():Number{ return (0); } public function set initialized(_arg1:Boolean):void{ _initialized = _arg1; } protected function drawRoundRect(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:Matrix=null, _arg9:String="linear", _arg10:Array=null, _arg11:Object=null):void{ var _local13:Number; var _local14:Array; var _local15:Object; var _local12:Graphics = graphics; if ((((_arg3 == 0)) || ((_arg4 == 0)))){ return; }; if (_arg6 !== null){ if ((_arg6 is uint)){ _local12.beginFill(uint(_arg6), Number(_arg7)); } else { if ((_arg6 is Array)){ _local14 = ((_arg7 is Array)) ? (_arg7 as Array) : [_arg7, _arg7]; if (!_arg10){ _arg10 = [0, 0xFF]; }; _local12.beginGradientFill(_arg9, (_arg6 as Array), _local14, _arg10, _arg8); }; }; }; if (!_arg5){ _local12.drawRect(_arg1, _arg2, _arg3, _arg4); } else { if ((_arg5 is Number)){ _local13 = (Number(_arg5) * 2); _local12.drawRoundRect(_arg1, _arg2, _arg3, _arg4, _local13, _local13); } else { GraphicsUtil.drawRoundRectComplex(_local12, _arg1, _arg2, _arg3, _arg4, _arg5.tl, _arg5.tr, _arg5.bl, _arg5.br); }; }; if (_arg11){ _local15 = _arg11.r; if ((_local15 is Number)){ _local13 = (Number(_local15) * 2); _local12.drawRoundRect(_arg11.x, _arg11.y, _arg11.w, _arg11.h, _local13, _local13); } else { GraphicsUtil.drawRoundRectComplex(_local12, _arg11.x, _arg11.y, _arg11.w, _arg11.h, _local15.tl, _local15.tr, _local15.bl, _local15.br); }; }; if (_arg6 !== null){ _local12.endFill(); }; } public function get processedDescriptors():Boolean{ return (_processedDescriptors); } public function set styleName(_arg1:Object):void{ if (_styleName != _arg1){ _styleName = (_arg1 as IStyleClient); invalidateDisplayList(); }; } public function setActualSize(_arg1:Number, _arg2:Number):void{ var _local3:Boolean; if (_width != _arg1){ _width = _arg1; _local3 = true; }; if (_height != _arg2){ _height = _arg2; _local3 = true; }; if (_local3){ invalidateDisplayList(); }; } public function styleChanged(_arg1:String):void{ invalidateDisplayList(); } override public function get width():Number{ return (_width); } public function invalidateProperties():void{ } public function get initialized():Boolean{ return (_initialized); } protected function rotatedGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Matrix{ tempMatrix.createGradientBox(_arg3, _arg4, ((_arg5 * Math.PI) / 180), _arg1, _arg2); return (tempMatrix); } public function move(_arg1:Number, _arg2:Number):void{ this.x = _arg1; this.y = _arg2; } public function get styleName():Object{ return (_styleName); } public function validateNow():void{ if (invalidateDisplayListFlag){ validateDisplayList(); }; } public function invalidateSize():void{ } public function validateProperties():void{ } } }//package mx.skins
Section 332
//RectangularBorder (mx.skins.RectangularBorder) package mx.skins { import flash.display.*; import flash.geom.*; import mx.core.*; import flash.events.*; import mx.resources.*; import mx.styles.*; import flash.system.*; import flash.utils.*; import flash.net.*; public class RectangularBorder extends Border implements IRectangularBorder { private var backgroundImage:DisplayObject; private var backgroundImageHeight:Number; private var _backgroundImageBounds:Rectangle; private var backgroundImageStyle:Object; private var backgroundImageWidth:Number; private var resourceManager:IResourceManager; mx_internal static const VERSION:String = "3.0.0.0"; public function RectangularBorder(){ resourceManager = ResourceManager.getInstance(); super(); addEventListener(Event.REMOVED, removedHandler); } public function layoutBackgroundImage():void{ var _local4:Number; var _local5:Number; var _local7:Number; var _local8:Number; var _local14:Number; var _local15:Graphics; var _local1:DisplayObject = parent; var _local2:EdgeMetrics = ((_local1 is IContainer)) ? IContainer(_local1).viewMetrics : borderMetrics; var _local3 = !((getStyle("backgroundAttachment") == "fixed")); if (_backgroundImageBounds){ _local4 = _backgroundImageBounds.width; _local5 = _backgroundImageBounds.height; } else { _local4 = ((width - _local2.left) - _local2.right); _local5 = ((height - _local2.top) - _local2.bottom); }; var _local6:Number = getBackgroundSize(); if (isNaN(_local6)){ _local7 = 1; _local8 = 1; } else { _local14 = (_local6 * 0.01); _local7 = ((_local14 * _local4) / backgroundImageWidth); _local8 = ((_local14 * _local5) / backgroundImageHeight); }; backgroundImage.scaleX = _local7; backgroundImage.scaleY = _local8; var _local9:Number = Math.round((0.5 * (_local4 - (backgroundImageWidth * _local7)))); var _local10:Number = Math.round((0.5 * (_local5 - (backgroundImageHeight * _local8)))); backgroundImage.x = _local2.left; backgroundImage.y = _local2.top; var _local11:Shape = Shape(backgroundImage.mask); _local11.x = _local2.left; _local11.y = _local2.top; if (((_local3) && ((_local1 is IContainer)))){ _local9 = (_local9 - IContainer(_local1).horizontalScrollPosition); _local10 = (_local10 - IContainer(_local1).verticalScrollPosition); }; backgroundImage.alpha = getStyle("backgroundAlpha"); backgroundImage.x = (backgroundImage.x + _local9); backgroundImage.y = (backgroundImage.y + _local10); var _local12:Number = ((width - _local2.left) - _local2.right); var _local13:Number = ((height - _local2.top) - _local2.bottom); if (((!((_local11.width == _local12))) || (!((_local11.height == _local13))))){ _local15 = _local11.graphics; _local15.clear(); _local15.beginFill(0xFFFFFF); _local15.drawRect(0, 0, _local12, _local13); _local15.endFill(); }; } public function set backgroundImageBounds(_arg1:Rectangle):void{ _backgroundImageBounds = _arg1; invalidateDisplayList(); } private function getBackgroundSize():Number{ var _local3:int; var _local1:Number = NaN; var _local2:Object = getStyle("backgroundSize"); if (((_local2) && ((_local2 is String)))){ _local3 = _local2.indexOf("%"); if (_local3 != -1){ _local1 = Number(_local2.substr(0, _local3)); }; }; return (_local1); } private function removedHandler(_arg1:Event):void{ var _local2:IChildList; if (backgroundImage){ _local2 = ((parent is IRawChildrenContainer)) ? IRawChildrenContainer(parent).rawChildren : IChildList(parent); _local2.removeChild(backgroundImage.mask); _local2.removeChild(backgroundImage); backgroundImage = null; }; } private function initBackgroundImage(_arg1:DisplayObject):void{ backgroundImage = _arg1; if ((_arg1 is Loader)){ backgroundImageWidth = Loader(_arg1).contentLoaderInfo.width; backgroundImageHeight = Loader(_arg1).contentLoaderInfo.height; } else { backgroundImageWidth = backgroundImage.width; backgroundImageHeight = backgroundImage.height; if ((_arg1 is ISimpleStyleClient)){ ISimpleStyleClient(_arg1).styleName = styleName; }; }; var _local2:IChildList = ((parent is IRawChildrenContainer)) ? IRawChildrenContainer(parent).rawChildren : IChildList(parent); var _local3:Shape = new FlexShape(); _local3.name = "backgroundMask"; _local3.x = 0; _local3.y = 0; _local2.addChild(_local3); var _local4:int = _local2.getChildIndex(this); _local2.addChildAt(backgroundImage, (_local4 + 1)); backgroundImage.mask = _local3; } public function get backgroundImageBounds():Rectangle{ return (_backgroundImageBounds); } public function get hasBackgroundImage():Boolean{ return (!((backgroundImage == null))); } private function completeEventHandler(_arg1:Event):void{ if (!parent){ return; }; var _local2:DisplayObject = DisplayObject(LoaderInfo(_arg1.target).loader); initBackgroundImage(_local2); layoutBackgroundImage(); dispatchEvent(_arg1.clone()); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var cls:Class; var newStyleObj:DisplayObject; var loader:Loader; var loaderContext:LoaderContext; var message:String; var unscaledWidth = _arg1; var unscaledHeight = _arg2; if (!parent){ return; }; var newStyle:Object = getStyle("backgroundImage"); if (newStyle != backgroundImageStyle){ removedHandler(null); backgroundImageStyle = newStyle; if (((newStyle) && ((newStyle as Class)))){ cls = Class(newStyle); initBackgroundImage(new (cls)); } else { if (((newStyle) && ((newStyle is String)))){ try { cls = Class(getDefinitionByName(String(newStyle))); } catch(e:Error) { }; if (cls){ newStyleObj = new (cls); initBackgroundImage(newStyleObj); } else { loader = new FlexLoader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeEventHandler); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorEventHandler); loader.contentLoaderInfo.addEventListener(ErrorEvent.ERROR, errorEventHandler); loaderContext = new LoaderContext(); loaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain); loader.load(new URLRequest(String(newStyle)), loaderContext); }; } else { if (newStyle){ message = resourceManager.getString("skins", "notLoaded", [newStyle]); throw (new Error(message)); }; }; }; }; if (backgroundImage){ layoutBackgroundImage(); }; } private function errorEventHandler(_arg1:Event):void{ } } }//package mx.skins
Section 333
//AddChild (mx.states.AddChild) package mx.states { import flash.display.*; import mx.core.*; import mx.resources.*; import mx.containers.*; public class AddChild implements IOverride { mx_internal var added:Boolean;// = false mx_internal var instanceCreated:Boolean;// = false private var _creationPolicy:String;// = "auto" public var relativeTo:UIComponent; public var position:String; private var _target:DisplayObject; private var _targetFactory:IDeferredInstance; private var resourceManager:IResourceManager; mx_internal static const VERSION:String = "3.0.0.0"; public function AddChild(_arg1:UIComponent=null, _arg2:DisplayObject=null, _arg3:String="lastChild"){ resourceManager = ResourceManager.getInstance(); super(); this.relativeTo = _arg1; this.target = _arg2; this.position = _arg3; } public function remove(_arg1:UIComponent):void{ var _local2:UIComponent = (relativeTo) ? relativeTo : _arg1; if (!added){ return; }; switch (position){ case "before": case "after": _local2.parent.removeChild(target); break; case "firstChild": case "lastChild": default: if ((((target is ControlBar)) && ((_local2 is Panel)))){ Panel(_local2).rawChildren.removeChild(target); Panel(_local2).createComponentsFromDescriptors(); } else { if ((((target is ApplicationControlBar)) && (ApplicationControlBar(target).dock))){ Application(_local2).dockControlBar(ApplicationControlBar(target), false); Application(_local2).removeChild(target); } else { if (_local2 == target.parent){ _local2.removeChild(target); }; }; }; break; }; added = false; } public function initialize():void{ if (creationPolicy == ContainerCreationPolicy.AUTO){ createInstance(); }; } public function get target():DisplayObject{ if (((!(_target)) && (!((creationPolicy == ContainerCreationPolicy.NONE))))){ createInstance(); }; return (_target); } public function set creationPolicy(_arg1:String):void{ _creationPolicy = _arg1; if (_creationPolicy == ContainerCreationPolicy.ALL){ createInstance(); }; } public function set target(_arg1:DisplayObject):void{ _target = _arg1; } public function apply(_arg1:UIComponent):void{ var _local3:String; var _local2:UIComponent = (relativeTo) ? relativeTo : _arg1; added = false; if (!target){ return; }; if (target.parent){ _local3 = resourceManager.getString("states", "alreadyParented"); throw (new Error(_local3)); }; switch (position){ case "before": _local2.parent.addChildAt(target, _local2.parent.getChildIndex(_local2)); break; case "after": _local2.parent.addChildAt(target, (_local2.parent.getChildIndex(_local2) + 1)); break; case "firstChild": _local2.addChildAt(target, 0); break; case "lastChild": default: _local2.addChild(target); if ((((target is ControlBar)) && ((_local2 is Panel)))){ Panel(_local2).createComponentsFromDescriptors(); } else { if ((((((target is ApplicationControlBar)) && (ApplicationControlBar(target).dock))) && ((_local2 is Application)))){ ApplicationControlBar(target).resetDock(true); }; }; break; }; added = true; } public function createInstance():void{ var _local1:Object; if (((((!(instanceCreated)) && (!(_target)))) && (targetFactory))){ instanceCreated = true; _local1 = targetFactory.getInstance(); if ((_local1 is DisplayObject)){ _target = DisplayObject(_local1); }; }; } public function set targetFactory(_arg1:IDeferredInstance):void{ _targetFactory = _arg1; if (creationPolicy == ContainerCreationPolicy.ALL){ createInstance(); }; } public function get creationPolicy():String{ return (_creationPolicy); } public function get targetFactory():IDeferredInstance{ return (_targetFactory); } } }//package mx.states
Section 334
//IOverride (mx.states.IOverride) package mx.states { import mx.core.*; public interface IOverride { function initialize():void; function remove(_arg1:UIComponent):void; function apply(_arg1:UIComponent):void; } }//package mx.states
Section 335
//SetProperty (mx.states.SetProperty) package mx.states { import mx.core.*; public class SetProperty implements IOverride { private var oldRelatedValues:Array; private var oldValue:Object; public var name:String; public var target:Object; public var value; private static const RELATED_PROPERTIES:Object = {explicitWidth:["percentWidth"], explicitHeight:["percentHeight"]}; mx_internal static const VERSION:String = "3.0.0.0"; private static const PSEUDONYMS:Object = {width:"explicitWidth", height:"explicitHeight"}; public function SetProperty(_arg1:Object=null, _arg2:String=null, _arg3=undefined){ this.target = _arg1; this.name = _arg2; this.value = _arg3; } public function remove(_arg1:UIComponent):void{ var _local5:int; var _local2:Object = (target) ? target : _arg1; var _local3:String = (PSEUDONYMS[name]) ? PSEUDONYMS[name] : name; var _local4:Array = (RELATED_PROPERTIES[_local3]) ? RELATED_PROPERTIES[_local3] : null; if ((((((name == "width")) || ((name == "height")))) && (!(isNaN(Number(oldValue)))))){ _local3 = name; }; setPropertyValue(_local2, _local3, oldValue, oldValue); if (_local4){ _local5 = 0; while (_local5 < _local4.length) { setPropertyValue(_local2, _local4[_local5], oldRelatedValues[_local5], oldRelatedValues[_local5]); _local5++; }; }; } private function toBoolean(_arg1:Object):Boolean{ if ((_arg1 is String)){ return ((_arg1.toLowerCase() == "true")); }; return (!((_arg1 == false))); } public function apply(_arg1:UIComponent):void{ var _local6:int; var _local2:Object = (target) ? target : _arg1; var _local3:String = (PSEUDONYMS[name]) ? PSEUDONYMS[name] : name; var _local4:Array = (RELATED_PROPERTIES[_local3]) ? RELATED_PROPERTIES[_local3] : null; var _local5:* = value; oldValue = _local2[_local3]; if (_local4){ oldRelatedValues = []; _local6 = 0; while (_local6 < _local4.length) { oldRelatedValues[_local6] = _local2[_local4[_local6]]; _local6++; }; }; if ((((name == "width")) || ((name == "height")))){ if ((((_local5 is String)) && ((_local5.indexOf("%") >= 0)))){ _local3 = ((name == "width")) ? "percentWidth" : "percentHeight"; _local5 = _local5.slice(0, _local5.indexOf("%")); } else { _local3 = name; }; }; setPropertyValue(_local2, _local3, _local5, oldValue); } public function initialize():void{ } private function setPropertyValue(_arg1:Object, _arg2:String, _arg3, _arg4:Object):void{ if ((_arg4 is Number)){ _arg1[_arg2] = Number(_arg3); } else { if ((_arg4 is Boolean)){ _arg1[_arg2] = toBoolean(_arg3); } else { _arg1[_arg2] = _arg3; }; }; } } }//package mx.states
Section 336
//State (mx.states.State) package mx.states { import flash.events.*; import mx.events.*; public class State extends EventDispatcher { public var basedOn:String; private var initialized:Boolean;// = false public var overrides:Array; public var name:String; mx_internal static const VERSION:String = "3.0.0.0"; public function State(){ overrides = []; super(); } mx_internal function initialize():void{ var _local1:int; if (!initialized){ initialized = true; _local1 = 0; while (_local1 < overrides.length) { IOverride(overrides[_local1]).initialize(); _local1++; }; }; } mx_internal function dispatchExitState():void{ dispatchEvent(new FlexEvent(FlexEvent.EXIT_STATE)); } mx_internal function dispatchEnterState():void{ dispatchEvent(new FlexEvent(FlexEvent.ENTER_STATE)); } } }//package mx.states
Section 337
//Transition (mx.states.Transition) package mx.states { import mx.effects.*; public class Transition { public var effect:IEffect; public var toState:String;// = "*" public var fromState:String;// = "*" mx_internal static const VERSION:String = "3.0.0.0"; } }//package mx.states
Section 338
//CSSStyleDeclaration (mx.styles.CSSStyleDeclaration) package mx.styles { import flash.display.*; import mx.core.*; import mx.managers.*; import flash.events.*; import flash.utils.*; public class CSSStyleDeclaration extends EventDispatcher { mx_internal var effects:Array; protected var overrides:Object; public var defaultFactory:Function; public var factory:Function; mx_internal var selectorRefCount:int;// = 0 private var styleManager:IStyleManager2; private var clones:Dictionary; mx_internal static const VERSION:String = "3.0.0.0"; private static const NOT_A_COLOR:uint = 4294967295; private static const FILTERMAP_PROP:String = "__reserved__filterMap"; public function CSSStyleDeclaration(_arg1:String=null){ clones = new Dictionary(true); super(); if (_arg1){ styleManager = (Singleton.getInstance("mx.styles::IStyleManager2") as IStyleManager2); styleManager.setStyleDeclaration(_arg1, this, false); }; } mx_internal function addStyleToProtoChain(_arg1:Object, _arg2:DisplayObject, _arg3:Object=null):Object{ var p:String; var emptyObjectFactory:Function; var filteredChain:Object; var filterObjectFactory:Function; var i:String; var chain = _arg1; var target = _arg2; var filterMap = _arg3; var nodeAddedToChain:Boolean; var originalChain:Object = chain; if (filterMap){ chain = {}; }; if (defaultFactory != null){ defaultFactory.prototype = chain; chain = new defaultFactory(); nodeAddedToChain = true; }; if (factory != null){ factory.prototype = chain; chain = new factory(); nodeAddedToChain = true; }; if (overrides){ if ((((defaultFactory == null)) && ((factory == null)))){ emptyObjectFactory = function ():void{ }; emptyObjectFactory.prototype = chain; chain = new (emptyObjectFactory); nodeAddedToChain = true; }; for (p in overrides) { if (overrides[p] === undefined){ delete chain[p]; } else { chain[p] = overrides[p]; }; }; }; if (filterMap){ if (nodeAddedToChain){ filteredChain = {}; filterObjectFactory = function ():void{ }; filterObjectFactory.prototype = originalChain; filteredChain = new (filterObjectFactory); for (i in chain) { if (filterMap[i] != null){ filteredChain[filterMap[i]] = chain[i]; }; }; chain = filteredChain; chain[FILTERMAP_PROP] = filterMap; } else { chain = originalChain; }; }; if (nodeAddedToChain){ clones[chain] = 1; }; return (chain); } public function getStyle(_arg1:String){ var _local2:*; var _local3:*; if (overrides){ if ((((_arg1 in overrides)) && ((overrides[_arg1] === undefined)))){ return (undefined); }; _local3 = overrides[_arg1]; if (_local3 !== undefined){ return (_local3); }; }; if (factory != null){ factory.prototype = {}; _local2 = new factory(); _local3 = _local2[_arg1]; if (_local3 !== undefined){ return (_local3); }; }; if (defaultFactory != null){ defaultFactory.prototype = {}; _local2 = new defaultFactory(); _local3 = _local2[_arg1]; if (_local3 !== undefined){ return (_local3); }; }; return (undefined); } public function clearStyle(_arg1:String):void{ setStyle(_arg1, undefined); } public function setStyle(_arg1:String, _arg2):void{ var _local7:int; var _local8:Object; var _local3:Object = getStyle(_arg1); var _local4:Boolean; if ((((((((((selectorRefCount > 0)) && ((factory == null)))) && ((defaultFactory == null)))) && (!(overrides)))) && (!((_local3 === _arg2))))){ _local4 = true; }; if (_arg2 !== undefined){ setStyle(_arg1, _arg2); } else { if (_arg2 == _local3){ return; }; setStyle(_arg1, _arg2); }; var _local5:Array = SystemManagerGlobals.topLevelSystemManagers; var _local6:int = _local5.length; if (_local4){ _local7 = 0; while (_local7 < _local6) { _local8 = _local5[_local7]; _local8.regenerateStyleCache(true); _local7++; }; }; _local7 = 0; while (_local7 < _local6) { _local8 = _local5[_local7]; _local8.notifyStyleChangeInChildren(_arg1, true); _local7++; }; } private function clearStyleAttr(_arg1:String):void{ var _local2:*; if (!overrides){ overrides = {}; }; overrides[_arg1] = undefined; for (_local2 in clones) { delete _local2[_arg1]; }; } mx_internal function createProtoChainRoot():Object{ var _local1:Object = {}; if (defaultFactory != null){ defaultFactory.prototype = _local1; _local1 = new defaultFactory(); }; if (factory != null){ factory.prototype = _local1; _local1 = new factory(); }; clones[_local1] = 1; return (_local1); } mx_internal function clearOverride(_arg1:String):void{ if (((overrides) && (overrides[_arg1]))){ delete overrides[_arg1]; }; } mx_internal function setStyle(_arg1:String, _arg2):void{ var _local3:Object; var _local4:*; var _local5:Number; var _local6:Object; if (_arg2 === undefined){ clearStyleAttr(_arg1); return; }; if ((_arg2 is String)){ if (!styleManager){ styleManager = (Singleton.getInstance("mx.styles::IStyleManager2") as IStyleManager2); }; _local5 = styleManager.getColorName(_arg2); if (_local5 != NOT_A_COLOR){ _arg2 = _local5; }; }; if (defaultFactory != null){ _local3 = new defaultFactory(); if (_local3[_arg1] !== _arg2){ if (!overrides){ overrides = {}; }; overrides[_arg1] = _arg2; } else { if (overrides){ delete overrides[_arg1]; }; }; }; if (factory != null){ _local3 = new factory(); if (_local3[_arg1] !== _arg2){ if (!overrides){ overrides = {}; }; overrides[_arg1] = _arg2; } else { if (overrides){ delete overrides[_arg1]; }; }; }; if ((((defaultFactory == null)) && ((factory == null)))){ if (!overrides){ overrides = {}; }; overrides[_arg1] = _arg2; }; for (_local4 in clones) { _local6 = _local4[FILTERMAP_PROP]; if (_local6){ if (_local6[_arg1] != null){ _local4[_local6[_arg1]] = _arg2; }; } else { _local4[_arg1] = _arg2; }; }; } } }//package mx.styles
Section 339
//ISimpleStyleClient (mx.styles.ISimpleStyleClient) package mx.styles { public interface ISimpleStyleClient { function set styleName(_arg1:Object):void; function styleChanged(_arg1:String):void; function get styleName():Object; } }//package mx.styles
Section 340
//IStyleClient (mx.styles.IStyleClient) package mx.styles { public interface IStyleClient extends ISimpleStyleClient { function regenerateStyleCache(_arg1:Boolean):void; function get className():String; function clearStyle(_arg1:String):void; function getClassStyleDeclarations():Array; function get inheritingStyles():Object; function set nonInheritingStyles(_arg1:Object):void; function setStyle(_arg1:String, _arg2):void; function get styleDeclaration():CSSStyleDeclaration; function set styleDeclaration(_arg1:CSSStyleDeclaration):void; function get nonInheritingStyles():Object; function set inheritingStyles(_arg1:Object):void; function getStyle(_arg1:String); function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void; function registerEffects(_arg1:Array):void; } }//package mx.styles
Section 341
//IStyleManager (mx.styles.IStyleManager) package mx.styles { import flash.events.*; public interface IStyleManager { function isColorName(_arg1:String):Boolean; function registerParentDisplayListInvalidatingStyle(_arg1:String):void; function registerInheritingStyle(_arg1:String):void; function set stylesRoot(_arg1:Object):void; function get typeSelectorCache():Object; function styleDeclarationsChanged():void; function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void; function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean; function isSizeInvalidatingStyle(_arg1:String):Boolean; function get inheritingStyles():Object; function isValidStyleValue(_arg1):Boolean; function isParentSizeInvalidatingStyle(_arg1:String):Boolean; function getColorName(_arg1:Object):uint; function set typeSelectorCache(_arg1:Object):void; function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void; function getColorNames(_arg1:Array):void; function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher; function isInheritingStyle(_arg1:String):Boolean; function set inheritingStyles(_arg1:Object):void; function get stylesRoot():Object; function initProtoChainRoots():void; function registerColorName(_arg1:String, _arg2:uint):void; function registerParentSizeInvalidatingStyle(_arg1:String):void; function registerSizeInvalidatingStyle(_arg1:String):void; function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void; function isInheritingTextFormatStyle(_arg1:String):Boolean; function getStyleDeclaration(_arg1:String):CSSStyleDeclaration; } }//package mx.styles
Section 342
//IStyleManager2 (mx.styles.IStyleManager2) package mx.styles { import flash.events.*; import flash.system.*; public interface IStyleManager2 extends IStyleManager { function get selectors():Array; function loadStyleDeclarations2(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher; } }//package mx.styles
Section 343
//IStyleModule (mx.styles.IStyleModule) package mx.styles { public interface IStyleModule { function unload():void; } }//package mx.styles
Section 344
//StyleManager (mx.styles.StyleManager) package mx.styles { import mx.core.*; import flash.events.*; import flash.system.*; public class StyleManager { mx_internal static const VERSION:String = "3.0.0.0"; public static const NOT_A_COLOR:uint = 4294967295; private static var _impl:IStyleManager2; private static var implClassDependency:StyleManagerImpl; public static function isParentSizeInvalidatingStyle(_arg1:String):Boolean{ return (impl.isParentSizeInvalidatingStyle(_arg1)); } public static function registerInheritingStyle(_arg1:String):void{ impl.registerInheritingStyle(_arg1); } mx_internal static function set stylesRoot(_arg1:Object):void{ impl.stylesRoot = _arg1; } mx_internal static function get inheritingStyles():Object{ return (impl.inheritingStyles); } mx_internal static function styleDeclarationsChanged():void{ impl.styleDeclarationsChanged(); } public static function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void{ impl.setStyleDeclaration(_arg1, _arg2, _arg3); } public static function registerParentDisplayListInvalidatingStyle(_arg1:String):void{ impl.registerParentDisplayListInvalidatingStyle(_arg1); } mx_internal static function get typeSelectorCache():Object{ return (impl.typeSelectorCache); } mx_internal static function set inheritingStyles(_arg1:Object):void{ impl.inheritingStyles = _arg1; } public static function isColorName(_arg1:String):Boolean{ return (impl.isColorName(_arg1)); } public static function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean{ return (impl.isParentDisplayListInvalidatingStyle(_arg1)); } public static function isSizeInvalidatingStyle(_arg1:String):Boolean{ return (impl.isSizeInvalidatingStyle(_arg1)); } public static function getColorName(_arg1:Object):uint{ return (impl.getColorName(_arg1)); } mx_internal static function set typeSelectorCache(_arg1:Object):void{ impl.typeSelectorCache = _arg1; } public static function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void{ impl.unloadStyleDeclarations(_arg1, _arg2); } public static function getColorNames(_arg1:Array):void{ impl.getColorNames(_arg1); } public static function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false, _arg4:ApplicationDomain=null, _arg5:SecurityDomain=null):IEventDispatcher{ return (impl.loadStyleDeclarations2(_arg1, _arg2, _arg4, _arg5)); } private static function get impl():IStyleManager2{ if (!_impl){ _impl = IStyleManager2(Singleton.getInstance("mx.styles::IStyleManager2")); }; return (_impl); } public static function isValidStyleValue(_arg1):Boolean{ return (impl.isValidStyleValue(_arg1)); } mx_internal static function get stylesRoot():Object{ return (impl.stylesRoot); } public static function isInheritingStyle(_arg1:String):Boolean{ return (impl.isInheritingStyle(_arg1)); } mx_internal static function initProtoChainRoots():void{ impl.initProtoChainRoots(); } public static function registerParentSizeInvalidatingStyle(_arg1:String):void{ impl.registerParentSizeInvalidatingStyle(_arg1); } public static function get selectors():Array{ return (impl.selectors); } public static function registerSizeInvalidatingStyle(_arg1:String):void{ impl.registerSizeInvalidatingStyle(_arg1); } public static function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void{ impl.clearStyleDeclaration(_arg1, _arg2); } public static function registerColorName(_arg1:String, _arg2:uint):void{ impl.registerColorName(_arg1, _arg2); } public static function isInheritingTextFormatStyle(_arg1:String):Boolean{ return (impl.isInheritingTextFormatStyle(_arg1)); } public static function getStyleDeclaration(_arg1:String):CSSStyleDeclaration{ return (impl.getStyleDeclaration(_arg1)); } } }//package mx.styles
Section 345
//StyleManagerImpl (mx.styles.StyleManagerImpl) package mx.styles { import mx.core.*; import mx.managers.*; import flash.events.*; import mx.events.*; import mx.resources.*; import flash.system.*; import mx.modules.*; import flash.utils.*; public class StyleManagerImpl implements IStyleManager2 { private var _stylesRoot:Object; private var _selectors:Object; private var styleModules:Object; private var _inheritingStyles:Object; private var resourceManager:IResourceManager; private var _typeSelectorCache:Object; mx_internal static const VERSION:String = "3.0.0.0"; private static var parentSizeInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true, baseline:true}; private static var colorNames:Object = {transparent:"transparent", black:0, blue:0xFF, green:0x8000, gray:0x808080, silver:0xC0C0C0, lime:0xFF00, olive:0x808000, white:0xFFFFFF, yellow:0xFFFF00, maroon:0x800000, navy:128, red:0xFF0000, purple:0x800080, teal:0x8080, fuchsia:0xFF00FF, aqua:0xFFFF, magenta:0xFF00FF, cyan:0xFFFF, halogreen:8453965, haloblue:40447, haloorange:0xFFB600, halosilver:11455193}; private static var inheritingTextFormatStyles:Object = {align:true, bold:true, color:true, font:true, indent:true, italic:true, size:true}; private static var instance:IStyleManager2; private static var parentDisplayListInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true, baseline:true}; private static var sizeInvalidatingStyles:Object = {borderStyle:true, borderThickness:true, fontAntiAliasType:true, fontFamily:true, fontGridFitType:true, fontSharpness:true, fontSize:true, fontStyle:true, fontThickness:true, fontWeight:true, headerHeight:true, horizontalAlign:true, horizontalGap:true, kerning:true, leading:true, letterSpacing:true, paddingBottom:true, paddingLeft:true, paddingRight:true, paddingTop:true, strokeWidth:true, tabHeight:true, tabWidth:true, verticalAlign:true, verticalGap:true}; public function StyleManagerImpl(){ _selectors = {}; styleModules = {}; resourceManager = ResourceManager.getInstance(); _inheritingStyles = {}; _typeSelectorCache = {}; super(); } public function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void{ _arg2.selectorRefCount++; _selectors[_arg1] = _arg2; typeSelectorCache = {}; if (_arg3){ styleDeclarationsChanged(); }; } public function registerParentDisplayListInvalidatingStyle(_arg1:String):void{ parentDisplayListInvalidatingStyles[_arg1] = true; } public function getStyleDeclaration(_arg1:String):CSSStyleDeclaration{ var _local2:int; if (_arg1.charAt(0) != "."){ _local2 = _arg1.lastIndexOf("."); if (_local2 != -1){ _arg1 = _arg1.substr((_local2 + 1)); }; }; return (_selectors[_arg1]); } public function set typeSelectorCache(_arg1:Object):void{ _typeSelectorCache = _arg1; } public function isColorName(_arg1:String):Boolean{ return (!((colorNames[_arg1.toLowerCase()] === undefined))); } public function set inheritingStyles(_arg1:Object):void{ _inheritingStyles = _arg1; } public function getColorNames(_arg1:Array):void{ var _local4:uint; if (!_arg1){ return; }; var _local2:int = _arg1.length; var _local3:int; while (_local3 < _local2) { if (((!((_arg1[_local3] == null))) && (isNaN(_arg1[_local3])))){ _local4 = getColorName(_arg1[_local3]); if (_local4 != StyleManager.NOT_A_COLOR){ _arg1[_local3] = _local4; }; }; _local3++; }; } public function isInheritingTextFormatStyle(_arg1:String):Boolean{ return ((inheritingTextFormatStyles[_arg1] == true)); } public function registerParentSizeInvalidatingStyle(_arg1:String):void{ parentSizeInvalidatingStyles[_arg1] = true; } public function registerColorName(_arg1:String, _arg2:uint):void{ colorNames[_arg1.toLowerCase()] = _arg2; } public function isParentSizeInvalidatingStyle(_arg1:String):Boolean{ return ((parentSizeInvalidatingStyles[_arg1] == true)); } public function registerInheritingStyle(_arg1:String):void{ inheritingStyles[_arg1] = true; } public function set stylesRoot(_arg1:Object):void{ _stylesRoot = _arg1; } public function get typeSelectorCache():Object{ return (_typeSelectorCache); } public function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean{ return ((parentDisplayListInvalidatingStyles[_arg1] == true)); } public function isSizeInvalidatingStyle(_arg1:String):Boolean{ return ((sizeInvalidatingStyles[_arg1] == true)); } public function styleDeclarationsChanged():void{ var _local4:Object; var _local1:Array = SystemManagerGlobals.topLevelSystemManagers; var _local2:int = _local1.length; var _local3:int; while (_local3 < _local2) { _local4 = _local1[_local3]; _local4.regenerateStyleCache(true); _local4.notifyStyleChangeInChildren(null, true); _local3++; }; } public function isValidStyleValue(_arg1):Boolean{ return (!((_arg1 === undefined))); } public function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher{ return (loadStyleDeclarations2(_arg1, _arg2)); } public function get inheritingStyles():Object{ return (_inheritingStyles); } public function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void{ var _local4:IModuleInfo; var _local3:StyleModuleInfo = styleModules[_arg1]; if (_local3){ _local3.styleModule.unload(); _local4 = _local3.module; _local4.unload(); _local4.removeEventListener(ModuleEvent.READY, _local3.readyHandler); _local4.removeEventListener(ModuleEvent.ERROR, _local3.errorHandler); styleModules[_arg1] = null; }; if (_arg2){ styleDeclarationsChanged(); }; } public function getColorName(_arg1:Object):uint{ var _local2:Number; var _local3:*; if ((_arg1 is String)){ if (_arg1.charAt(0) == "#"){ _local2 = Number(("0x" + _arg1.slice(1))); return ((isNaN(_local2)) ? StyleManager.NOT_A_COLOR : uint(_local2)); }; if ((((_arg1.charAt(1) == "x")) && ((_arg1.charAt(0) == "0")))){ _local2 = Number(_arg1); return ((isNaN(_local2)) ? StyleManager.NOT_A_COLOR : uint(_local2)); }; _local3 = colorNames[_arg1.toLowerCase()]; if (_local3 === undefined){ return (StyleManager.NOT_A_COLOR); }; return (uint(_local3)); }; return (uint(_arg1)); } public function isInheritingStyle(_arg1:String):Boolean{ return ((inheritingStyles[_arg1] == true)); } public function get stylesRoot():Object{ return (_stylesRoot); } public function initProtoChainRoots():void{ if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ delete _inheritingStyles["textDecoration"]; delete _inheritingStyles["leading"]; }; if (!stylesRoot){ stylesRoot = _selectors["global"].addStyleToProtoChain({}, null); }; } public function loadStyleDeclarations2(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher{ var module:IModuleInfo; var styleEventDispatcher:StyleEventDispatcher; var timer:Timer; var timerHandler:Function; var url = _arg1; var update = _arg2; var applicationDomain = _arg3; var securityDomain = _arg4; module = ModuleManager.getModule(url); var readyHandler:Function = function (_arg1:ModuleEvent):void{ var _local2:IStyleModule = IStyleModule(_arg1.module.factory.create()); styleModules[_arg1.module.url].styleModule = _local2; if (update){ styleDeclarationsChanged(); }; }; module.addEventListener(ModuleEvent.READY, readyHandler, false, 0, true); styleEventDispatcher = new StyleEventDispatcher(module); var errorHandler:Function = function (_arg1:ModuleEvent):void{ var _local3:StyleEvent; var _local2:String = resourceManager.getString("styles", "unableToLoad", [_arg1.errorText, url]); if (styleEventDispatcher.willTrigger(StyleEvent.ERROR)){ _local3 = new StyleEvent(StyleEvent.ERROR, _arg1.bubbles, _arg1.cancelable); _local3.bytesLoaded = 0; _local3.bytesTotal = 0; _local3.errorText = _local2; styleEventDispatcher.dispatchEvent(_local3); } else { throw (new Error(_local2)); }; }; module.addEventListener(ModuleEvent.ERROR, errorHandler, false, 0, true); styleModules[url] = new StyleModuleInfo(module, readyHandler, errorHandler); timer = new Timer(0); timerHandler = function (_arg1:TimerEvent):void{ timer.removeEventListener(TimerEvent.TIMER, timerHandler); timer.stop(); module.load(applicationDomain, securityDomain); }; timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true); timer.start(); return (styleEventDispatcher); } public function registerSizeInvalidatingStyle(_arg1:String):void{ sizeInvalidatingStyles[_arg1] = true; } public function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void{ var _local3:CSSStyleDeclaration = getStyleDeclaration(_arg1); if (((_local3) && ((_local3.selectorRefCount > 0)))){ _local3.selectorRefCount--; }; delete _selectors[_arg1]; if (_arg2){ styleDeclarationsChanged(); }; } public function get selectors():Array{ var _local2:String; var _local1:Array = []; for (_local2 in _selectors) { _local1.push(_local2); }; return (_local1); } public static function getInstance():IStyleManager2{ if (!instance){ instance = new (StyleManagerImpl); }; return (instance); } } }//package mx.styles import flash.events.*; import mx.events.*; import mx.modules.*; class StyleEventDispatcher extends EventDispatcher { private function StyleEventDispatcher(_arg1:IModuleInfo){ _arg1.addEventListener(ModuleEvent.ERROR, moduleInfo_errorHandler, false, 0, true); _arg1.addEventListener(ModuleEvent.PROGRESS, moduleInfo_progressHandler, false, 0, true); _arg1.addEventListener(ModuleEvent.READY, moduleInfo_readyHandler, false, 0, true); } private function moduleInfo_progressHandler(_arg1:ModuleEvent):void{ var _local2:StyleEvent = new StyleEvent(StyleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable); _local2.bytesLoaded = _arg1.bytesLoaded; _local2.bytesTotal = _arg1.bytesTotal; dispatchEvent(_local2); } private function moduleInfo_readyHandler(_arg1:ModuleEvent):void{ var _local2:StyleEvent = new StyleEvent(StyleEvent.COMPLETE); dispatchEvent(_local2); } private function moduleInfo_errorHandler(_arg1:ModuleEvent):void{ var _local2:StyleEvent = new StyleEvent(StyleEvent.ERROR, _arg1.bubbles, _arg1.cancelable); _local2.bytesLoaded = _arg1.bytesLoaded; _local2.bytesTotal = _arg1.bytesTotal; _local2.errorText = _arg1.errorText; dispatchEvent(_local2); } } class StyleModuleInfo { public var errorHandler:Function; public var readyHandler:Function; public var module:IModuleInfo; public var styleModule:IStyleModule; private function StyleModuleInfo(_arg1:IModuleInfo, _arg2:Function, _arg3:Function){ this.module = _arg1; this.readyHandler = _arg2; this.errorHandler = _arg3; } }
Section 346
//StyleProtoChain (mx.styles.StyleProtoChain) package mx.styles { import flash.display.*; import mx.core.*; public class StyleProtoChain { mx_internal static const VERSION:String = "3.0.0.0"; public static function initProtoChainForUIComponentStyleName(_arg1:IStyleClient):void{ var _local9:CSSStyleDeclaration; var _local2:IStyleClient = IStyleClient(_arg1.styleName); var _local3:DisplayObject = (_arg1 as DisplayObject); var _local4:Object = _local2.nonInheritingStyles; if (((!(_local4)) || ((_local4 == UIComponent.STYLE_UNINITIALIZED)))){ _local4 = StyleManager.stylesRoot; if (_local4.effects){ _arg1.registerEffects(_local4.effects); }; }; var _local5:Object = _local2.inheritingStyles; if (((!(_local5)) || ((_local5 == UIComponent.STYLE_UNINITIALIZED)))){ _local5 = StyleManager.stylesRoot; }; var _local6:Array = _arg1.getClassStyleDeclarations(); var _local7:int = _local6.length; if ((_local2 is StyleProxy)){ if (_local7 == 0){ _local4 = addProperties(_local4, _local2, false); }; _local3 = (StyleProxy(_local2).source as DisplayObject); }; var _local8:int; while (_local8 < _local7) { _local9 = _local6[_local8]; _local5 = _local9.addStyleToProtoChain(_local5, _local3); _local5 = addProperties(_local5, _local2, true); _local4 = _local9.addStyleToProtoChain(_local4, _local3); _local4 = addProperties(_local4, _local2, false); if (_local9.effects){ _arg1.registerEffects(_local9.effects); }; _local8++; }; _arg1.inheritingStyles = (_arg1.styleDeclaration) ? _arg1.styleDeclaration.addStyleToProtoChain(_local5, _local3) : _local5; _arg1.nonInheritingStyles = (_arg1.styleDeclaration) ? _arg1.styleDeclaration.addStyleToProtoChain(_local4, _local3) : _local4; } private static function addProperties(_arg1:Object, _arg2:IStyleClient, _arg3:Boolean):Object{ var _local11:CSSStyleDeclaration; var _local12:CSSStyleDeclaration; var _local4:Object = ((((_arg2 is StyleProxy)) && (!(_arg3)))) ? StyleProxy(_arg2).filterMap : null; var _local5:IStyleClient = _arg2; while ((_local5 is StyleProxy)) { _local5 = StyleProxy(_local5).source; }; var _local6:DisplayObject = (_local5 as DisplayObject); var _local7:Array = _arg2.getClassStyleDeclarations(); var _local8:int = _local7.length; var _local9:int; while (_local9 < _local8) { _local11 = _local7[_local9]; _arg1 = _local11.addStyleToProtoChain(_arg1, _local6, _local4); if (_local11.effects){ _arg2.registerEffects(_local11.effects); }; _local9++; }; var _local10:Object = _arg2.styleName; if (_local10){ if (typeof(_local10) == "object"){ if ((_local10 is CSSStyleDeclaration)){ _local12 = CSSStyleDeclaration(_local10); } else { _arg1 = addProperties(_arg1, IStyleClient(_local10), _arg3); }; } else { _local12 = StyleManager.getStyleDeclaration(("." + _local10)); }; if (_local12){ _arg1 = _local12.addStyleToProtoChain(_arg1, _local6, _local4); if (_local12.effects){ _arg2.registerEffects(_local12.effects); }; }; }; if (_arg2.styleDeclaration){ _arg1 = _arg2.styleDeclaration.addStyleToProtoChain(_arg1, _local6, _local4); }; return (_arg1); } public static function initTextField(_arg1:IUITextField):void{ var _local3:CSSStyleDeclaration; var _local2:Object = _arg1.styleName; if (_local2){ if (typeof(_local2) == "object"){ if ((_local2 is CSSStyleDeclaration)){ _local3 = CSSStyleDeclaration(_local2); } else { if ((_local2 is StyleProxy)){ _arg1.inheritingStyles = IStyleClient(_local2).inheritingStyles; _arg1.nonInheritingStyles = addProperties(StyleManager.stylesRoot, IStyleClient(_local2), false); return; }; _arg1.inheritingStyles = IStyleClient(_local2).inheritingStyles; _arg1.nonInheritingStyles = IStyleClient(_local2).nonInheritingStyles; return; }; } else { _local3 = StyleManager.getStyleDeclaration(("." + _local2)); }; }; var _local4:Object = IStyleClient(_arg1.parent).inheritingStyles; var _local5:Object = StyleManager.stylesRoot; if (!_local4){ _local4 = StyleManager.stylesRoot; }; if (_local3){ _local4 = _local3.addStyleToProtoChain(_local4, DisplayObject(_arg1)); _local5 = _local3.addStyleToProtoChain(_local5, DisplayObject(_arg1)); }; _arg1.inheritingStyles = _local4; _arg1.nonInheritingStyles = _local5; } } }//package mx.styles
Section 347
//StyleProxy (mx.styles.StyleProxy) package mx.styles { import mx.core.*; public class StyleProxy implements IStyleClient { private var _source:IStyleClient; private var _filterMap:Object; mx_internal static const VERSION:String = "3.0.0.0"; public function StyleProxy(_arg1:IStyleClient, _arg2:Object){ this.filterMap = _arg2; this.source = _arg1; } public function styleChanged(_arg1:String):void{ return (_source.styleChanged(_arg1)); } public function get filterMap():Object{ return (((FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)) ? null : _filterMap); } public function set filterMap(_arg1:Object):void{ _filterMap = _arg1; } public function get styleDeclaration():CSSStyleDeclaration{ return (_source.styleDeclaration); } public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{ return (_source.notifyStyleChangeInChildren(_arg1, _arg2)); } public function set inheritingStyles(_arg1:Object):void{ } public function get source():IStyleClient{ return (_source); } public function get styleName():Object{ if ((_source.styleName is IStyleClient)){ return (new StyleProxy(IStyleClient(_source.styleName), filterMap)); }; return (_source.styleName); } public function registerEffects(_arg1:Array):void{ return (_source.registerEffects(_arg1)); } public function regenerateStyleCache(_arg1:Boolean):void{ _source.regenerateStyleCache(_arg1); } public function get inheritingStyles():Object{ return (_source.inheritingStyles); } public function get className():String{ return (_source.className); } public function clearStyle(_arg1:String):void{ _source.clearStyle(_arg1); } public function getClassStyleDeclarations():Array{ return (_source.getClassStyleDeclarations()); } public function set nonInheritingStyles(_arg1:Object):void{ } public function setStyle(_arg1:String, _arg2):void{ _source.setStyle(_arg1, _arg2); } public function get nonInheritingStyles():Object{ return (((FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)) ? _source.nonInheritingStyles : null); } public function set styleName(_arg1:Object):void{ _source.styleName = _arg1; } public function getStyle(_arg1:String){ return (_source.getStyle(_arg1)); } public function set source(_arg1:IStyleClient):void{ _source = _arg1; } public function set styleDeclaration(_arg1:CSSStyleDeclaration):void{ _source.styleDeclaration = styleDeclaration; } } }//package mx.styles
Section 348
//ArrayUtil (mx.utils.ArrayUtil) package mx.utils { public class ArrayUtil { mx_internal static const VERSION:String = "3.0.0.0"; public static function getItemIndex(_arg1:Object, _arg2:Array):int{ var _local3:int = _arg2.length; var _local4:int; while (_local4 < _local3) { if (_arg2[_local4] === _arg1){ return (_local4); }; _local4++; }; return (-1); } public static function toArray(_arg1:Object):Array{ if (!_arg1){ return ([]); }; if ((_arg1 is Array)){ return ((_arg1 as Array)); }; return ([_arg1]); } } }//package mx.utils
Section 349
//ColorUtil (mx.utils.ColorUtil) package mx.utils { public class ColorUtil { mx_internal static const VERSION:String = "3.0.0.0"; public static function adjustBrightness2(_arg1:uint, _arg2:Number):uint{ var _local3:Number; var _local4:Number; var _local5:Number; if (_arg2 == 0){ return (_arg1); }; if (_arg2 < 0){ _arg2 = ((100 + _arg2) / 100); _local3 = (((_arg1 >> 16) & 0xFF) * _arg2); _local4 = (((_arg1 >> 8) & 0xFF) * _arg2); _local5 = ((_arg1 & 0xFF) * _arg2); } else { _arg2 = (_arg2 / 100); _local3 = ((_arg1 >> 16) & 0xFF); _local4 = ((_arg1 >> 8) & 0xFF); _local5 = (_arg1 & 0xFF); _local3 = (_local3 + ((0xFF - _local3) * _arg2)); _local4 = (_local4 + ((0xFF - _local4) * _arg2)); _local5 = (_local5 + ((0xFF - _local5) * _arg2)); _local3 = Math.min(_local3, 0xFF); _local4 = Math.min(_local4, 0xFF); _local5 = Math.min(_local5, 0xFF); }; return ((((_local3 << 16) | (_local4 << 8)) | _local5)); } public static function rgbMultiply(_arg1:uint, _arg2:uint):uint{ var _local3:Number = ((_arg1 >> 16) & 0xFF); var _local4:Number = ((_arg1 >> 8) & 0xFF); var _local5:Number = (_arg1 & 0xFF); var _local6:Number = ((_arg2 >> 16) & 0xFF); var _local7:Number = ((_arg2 >> 8) & 0xFF); var _local8:Number = (_arg2 & 0xFF); return ((((((_local3 * _local6) / 0xFF) << 16) | (((_local4 * _local7) / 0xFF) << 8)) | ((_local5 * _local8) / 0xFF))); } public static function adjustBrightness(_arg1:uint, _arg2:Number):uint{ var _local3:Number = Math.max(Math.min((((_arg1 >> 16) & 0xFF) + _arg2), 0xFF), 0); var _local4:Number = Math.max(Math.min((((_arg1 >> 8) & 0xFF) + _arg2), 0xFF), 0); var _local5:Number = Math.max(Math.min(((_arg1 & 0xFF) + _arg2), 0xFF), 0); return ((((_local3 << 16) | (_local4 << 8)) | _local5)); } } }//package mx.utils
Section 350
//DescribeTypeCache (mx.utils.DescribeTypeCache) package mx.utils { import mx.binding.*; import flash.utils.*; public class DescribeTypeCache { mx_internal static const VERSION:String = "3.0.0.0"; private static var cacheHandlers:Object = {}; private static var typeCache:Object = {}; public static function describeType(_arg1):DescribeTypeCacheRecord{ var _local2:String; var _local3:XML; var _local4:DescribeTypeCacheRecord; if ((_arg1 is String)){ _local2 = _arg1; } else { _local2 = getQualifiedClassName(_arg1); }; if ((_local2 in typeCache)){ return (typeCache[_local2]); }; if ((_arg1 is String)){ _arg1 = getDefinitionByName(_arg1); }; _local3 = describeType(_arg1); _local4 = new DescribeTypeCacheRecord(); _local4.typeDescription = _local3; _local4.typeName = _local2; typeCache[_local2] = _local4; return (_local4); } public static function registerCacheHandler(_arg1:String, _arg2:Function):void{ cacheHandlers[_arg1] = _arg2; } static function extractValue(_arg1:String, _arg2:DescribeTypeCacheRecord){ if ((_arg1 in cacheHandlers)){ return (cacheHandlers[_arg1](_arg2)); }; return (undefined); } private static function bindabilityInfoHandler(_arg1:DescribeTypeCacheRecord){ return (new BindabilityInfo(_arg1.typeDescription)); } registerCacheHandler("bindabilityInfo", bindabilityInfoHandler); } }//package mx.utils
Section 351
//DescribeTypeCacheRecord (mx.utils.DescribeTypeCacheRecord) package mx.utils { import flash.utils.*; public dynamic class DescribeTypeCacheRecord extends Proxy { public var typeDescription:XML; public var typeName:String; private var cache:Object; public function DescribeTypeCacheRecord(){ cache = {}; super(); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){ var _local2:* = cache[_arg1]; if (_local2 === undefined){ _local2 = DescribeTypeCache.extractValue(_arg1, this); cache[_arg1] = _local2; }; return (_local2); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function hasProperty(_arg1):Boolean{ if ((_arg1 in cache)){ return (true); }; var _local2:* = DescribeTypeCache.extractValue(_arg1, this); if (_local2 === undefined){ return (false); }; cache[_arg1] = _local2; return (true); } } }//package mx.utils
Section 352
//GraphicsUtil (mx.utils.GraphicsUtil) package mx.utils { import flash.display.*; import mx.core.*; public class GraphicsUtil { mx_internal static const VERSION:String = "3.0.0.0"; public static function drawRoundRectComplex(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number):void{ var _local10:Number = (_arg2 + _arg4); var _local11:Number = (_arg3 + _arg5); var _local12:Number = ((_arg4 < _arg5)) ? (_arg4 * 2) : (_arg5 * 2); _arg6 = ((_arg6 < _local12)) ? _arg6 : _local12; _arg7 = ((_arg7 < _local12)) ? _arg7 : _local12; _arg8 = ((_arg8 < _local12)) ? _arg8 : _local12; _arg9 = ((_arg9 < _local12)) ? _arg9 : _local12; var _local13:Number = (_arg9 * 0.292893218813453); var _local14:Number = (_arg9 * 0.585786437626905); _arg1.moveTo(_local10, (_local11 - _arg9)); _arg1.curveTo(_local10, (_local11 - _local14), (_local10 - _local13), (_local11 - _local13)); _arg1.curveTo((_local10 - _local14), _local11, (_local10 - _arg9), _local11); _local13 = (_arg8 * 0.292893218813453); _local14 = (_arg8 * 0.585786437626905); _arg1.lineTo((_arg2 + _arg8), _local11); _arg1.curveTo((_arg2 + _local14), _local11, (_arg2 + _local13), (_local11 - _local13)); _arg1.curveTo(_arg2, (_local11 - _local14), _arg2, (_local11 - _arg8)); _local13 = (_arg6 * 0.292893218813453); _local14 = (_arg6 * 0.585786437626905); _arg1.lineTo(_arg2, (_arg3 + _arg6)); _arg1.curveTo(_arg2, (_arg3 + _local14), (_arg2 + _local13), (_arg3 + _local13)); _arg1.curveTo((_arg2 + _local14), _arg3, (_arg2 + _arg6), _arg3); _local13 = (_arg7 * 0.292893218813453); _local14 = (_arg7 * 0.585786437626905); _arg1.lineTo((_local10 - _arg7), _arg3); _arg1.curveTo((_local10 - _local14), _arg3, (_local10 - _local13), (_arg3 + _local13)); _arg1.curveTo(_local10, (_arg3 + _local14), _local10, (_arg3 + _arg7)); _arg1.lineTo(_local10, (_local11 - _arg9)); } } }//package mx.utils
Section 353
//IXMLNotifiable (mx.utils.IXMLNotifiable) package mx.utils { public interface IXMLNotifiable { function xmlNotification(_arg1:Object, _arg2:String, _arg3:Object, _arg4:Object, _arg5:Object):void; } }//package mx.utils
Section 354
//LoaderUtil (mx.utils.LoaderUtil) package mx.utils { import flash.display.*; public class LoaderUtil { public static function normalizeURL(_arg1:LoaderInfo):String{ var _local2:String = _arg1.url; var _local3:Array = _local2.split("/[[DYNAMIC]]/"); return (_local3[0]); } } }//package mx.utils
Section 355
//NameUtil (mx.utils.NameUtil) package mx.utils { import flash.display.*; import mx.core.*; import flash.utils.*; public class NameUtil { mx_internal static const VERSION:String = "3.0.0.0"; private static var counter:int = 0; public static function displayObjectToString(_arg1:DisplayObject):String{ var _local2:String; var _local4:String; var _local5:Array; var _local3:DisplayObject = _arg1; while (_local3 != null) { if (((((_local3.parent) && (_local3.stage))) && ((_local3.parent == _local3.stage)))){ break; }; _local4 = _local3.name; if ((_local3 is IRepeaterClient)){ _local5 = IRepeaterClient(_local3).instanceIndices; if (_local5){ _local4 = (_local4 + (("[" + _local5.join("][")) + "]")); }; }; _local2 = ((_local2 == null)) ? _local4 : ((_local4 + ".") + _local2); _local3 = _local3.parent; }; return (_local2); } public static function createUniqueName(_arg1:Object):String{ if (!_arg1){ return (null); }; var _local2:String = getQualifiedClassName(_arg1); var _local3:int = _local2.indexOf("::"); if (_local3 != -1){ _local2 = _local2.substr((_local3 + 2)); }; var _local4:int = _local2.charCodeAt((_local2.length - 1)); if ((((_local4 >= 48)) && ((_local4 <= 57)))){ _local2 = (_local2 + "_"); }; return ((_local2 + counter++)); } } }//package mx.utils
Section 356
//object_proxy (mx.utils.object_proxy) package mx.utils { public namespace object_proxy = "http://www.adobe.com/2006/actionscript/flash/objectproxy"; }//package mx.utils
Section 357
//ObjectProxy (mx.utils.ObjectProxy) package mx.utils { import mx.core.*; import flash.events.*; import mx.events.*; import flash.utils.*; public dynamic class ObjectProxy extends Proxy implements IExternalizable, IPropertyChangeNotifier { private var _id:String; protected var notifiers:Object; protected var propertyList:Array; private var _proxyLevel:int; private var _type:QName; protected var dispatcher:EventDispatcher; protected var proxyClass:Class; private var _item:Object; public function ObjectProxy(_arg1:Object=null, _arg2:String=null, _arg3:int=-1){ proxyClass = ObjectProxy; super(); if (!_arg1){ _arg1 = {}; }; _item = _arg1; _proxyLevel = _arg3; notifiers = {}; dispatcher = new EventDispatcher(this); if (_arg2){ _id = _arg2; }; } public function dispatchEvent(_arg1:Event):Boolean{ return (dispatcher.dispatchEvent(_arg1)); } public function hasEventListener(_arg1:String):Boolean{ return (dispatcher.hasEventListener(_arg1)); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{ var _local4:IPropertyChangeNotifier; var _local5:PropertyChangeEvent; var _local3:* = _item[_arg1]; if (_local3 !== _arg2){ _item[_arg1] = _arg2; _local4 = IPropertyChangeNotifier(notifiers[_arg1]); if (_local4){ _local4.removeEventListener(PropertyChangeEvent.PROPERTY_CHANGE, propertyChangeHandler); delete notifiers[_arg1]; }; if (dispatcher.hasEventListener(PropertyChangeEvent.PROPERTY_CHANGE)){ if ((_arg1 is QName)){ _arg1 = QName(_arg1).localName; }; _local5 = PropertyChangeEvent.createUpdateEvent(this, _arg1.toString(), _local3, _arg2); dispatcher.dispatchEvent(_local5); }; }; } public function willTrigger(_arg1:String):Boolean{ return (dispatcher.willTrigger(_arg1)); } public function readExternal(_arg1:IDataInput):void{ var _local2:Object = _arg1.readObject(); _item = _local2; } public function writeExternal(_arg1:IDataOutput):void{ _arg1.writeObject(_item); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){ var _local2:*; if (notifiers[_arg1.toString()]){ return (notifiers[_arg1]); }; _local2 = _item[_arg1]; if (_local2){ if ((((_proxyLevel == 0)) || (ObjectUtil.isSimple(_local2)))){ return (_local2); }; _local2 = getComplexProperty(_arg1, _local2); }; return (_local2); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function hasProperty(_arg1):Boolean{ return ((_arg1 in _item)); } public function get uid():String{ if (_id === null){ _id = UIDUtil.createUID(); }; return (_id); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextNameIndex(_arg1:int):int{ if (_arg1 == 0){ setupPropertyList(); }; if (_arg1 < propertyList.length){ return ((_arg1 + 1)); }; return (0); } public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ dispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextName(_arg1:int):String{ return (propertyList[(_arg1 - 1)]); } public function set uid(_arg1:String):void{ _id = _arg1; } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function callProperty(_arg1, ... _args){ return (_item[_arg1].apply(_item, _args)); } public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ dispatcher.removeEventListener(_arg1, _arg2, _arg3); } protected function setupPropertyList():void{ var _local1:String; if (getQualifiedClassName(_item) == "Object"){ propertyList = []; for (_local1 in _item) { propertyList.push(_local1); }; } else { propertyList = ObjectUtil.getClassInfo(_item, null, {includeReadOnly:true, uris:["*"]}).properties; }; } object_proxy function getComplexProperty(_arg1, _arg2){ if ((_arg2 is IPropertyChangeNotifier)){ _arg2.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, propertyChangeHandler); notifiers[_arg1] = _arg2; return (_arg2); }; if (getQualifiedClassName(_arg2) == "Object"){ _arg2 = new proxyClass(_item[_arg1], null, ((_proxyLevel > 0)) ? (_proxyLevel - 1) : _proxyLevel); _arg2.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, propertyChangeHandler); notifiers[_arg1] = _arg2; return (_arg2); }; return (_arg2); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function deleteProperty(_arg1):Boolean{ var _local5:PropertyChangeEvent; var _local2:IPropertyChangeNotifier = IPropertyChangeNotifier(notifiers[_arg1]); if (_local2){ _local2.removeEventListener(PropertyChangeEvent.PROPERTY_CHANGE, propertyChangeHandler); delete notifiers[_arg1]; }; var _local3:* = _item[_arg1]; var _local4 = delete _item[_arg1]; if (dispatcher.hasEventListener(PropertyChangeEvent.PROPERTY_CHANGE)){ _local5 = new PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE); _local5.kind = PropertyChangeEventKind.DELETE; _local5.property = _arg1; _local5.oldValue = _local3; _local5.source = this; dispatcher.dispatchEvent(_local5); }; return (_local4); } object_proxy function get type():QName{ return (_type); } object_proxy function set type(_arg1:QName):void{ _type = _arg1; } public function propertyChangeHandler(_arg1:PropertyChangeEvent):void{ dispatcher.dispatchEvent(_arg1); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextValue(_arg1:int){ return (_item[propertyList[(_arg1 - 1)]]); } object_proxy function get object():Object{ return (_item); } } }//package mx.utils
Section 358
//ObjectUtil (mx.utils.ObjectUtil) package mx.utils { import flash.utils.*; import mx.collections.*; import flash.xml.*; public class ObjectUtil { mx_internal static const VERSION:String = "3.0.0.0"; private static var defaultToStringExcludes:Array = ["password", "credentials"]; private static var CLASS_INFO_CACHE:Object = {}; private static var refCount:int = 0; public static function isSimple(_arg1:Object):Boolean{ var _local2 = typeof(_arg1); switch (_local2){ case "number": case "string": case "boolean": return (true); case "object": return ((((_arg1 is Date)) || ((_arg1 is Array)))); }; return (false); } private static function internalToString(_arg1:Object, _arg2:int=0, _arg3:Dictionary=null, _arg4:Array=null, _arg5:Array=null):String{ var str:String; var classInfo:Object; var properties:Array; var id:Object; var isArray:Boolean; var prop:*; var j:int; var value = _arg1; var indent = _arg2; var refs = _arg3; var namespaceURIs = _arg4; var exclude = _arg5; var type:String = ((value == null)) ? "null" : typeof(value); switch (type){ case "boolean": case "number": return (value.toString()); case "string": return ((("\"" + value.toString()) + "\"")); case "object": if ((value is Date)){ return (value.toString()); }; if ((value is XMLNode)){ return (value.toString()); }; if ((value is Class)){ return ((("(" + getQualifiedClassName(value)) + ")")); }; classInfo = getClassInfo(value, exclude, {includeReadOnly:true, uris:namespaceURIs}); properties = classInfo.properties; str = (("(" + classInfo.name) + ")"); if (refs == null){ refs = new Dictionary(true); }; id = refs[value]; if (id != null){ str = (str + ("#" + int(id))); return (str); }; if (value != null){ str = (str + ("#" + refCount.toString())); refs[value] = refCount; refCount++; }; isArray = (value is Array); indent = (indent + 2); j = 0; while (j < properties.length) { str = newline(str, indent); prop = properties[j]; if (isArray){ str = (str + "["); }; str = (str + prop.toString()); if (isArray){ str = (str + "] "); } else { str = (str + " = "); }; try { str = (str + internalToString(value[prop], indent, refs, namespaceURIs, exclude)); } catch(e:Error) { str = (str + "?"); }; j = (j + 1); }; indent = (indent - 2); return (str); case "xml": return (value.toString()); default: return ((("(" + type) + ")")); }; } public static function getClassInfo(_arg1:Object, _arg2:Array=null, _arg3:Object=null):Object{ var n:int; var i:int; var result:Object; var cacheKey:String; var className:String; var classAlias:String; var properties:XMLList; var prop:XML; var metadataInfo:Object; var classInfo:XML; var numericIndex:Boolean; var p:String; var pi:Number; var uris:Array; var uri:String; var qName:QName; var j:int; var obj = _arg1; var excludes = _arg2; var options = _arg3; if ((obj is ObjectProxy)){ obj = ObjectProxy(obj).object_proxy::object; }; if (options == null){ options = {includeReadOnly:true, uris:null, includeTransient:true}; }; var propertyNames:Array = []; var dynamic:Boolean; if (typeof(obj) == "xml"){ className = "XML"; properties = obj.text(); if (properties.length()){ propertyNames.push("*"); }; properties = obj.attributes(); } else { classInfo = DescribeTypeCache.describeType(obj).typeDescription; className = classInfo.@name.toString(); classAlias = classInfo.@alias.toString(); dynamic = (classInfo.@isDynamic.toString() == "true"); if (options.includeReadOnly){ properties = (classInfo..accessor.(@access != "writeonly") + classInfo..variable); } else { properties = (classInfo..accessor.(@access == "readwrite") + classInfo..variable); }; numericIndex = false; }; if (!dynamic){ cacheKey = getCacheKey(obj, excludes, options); result = CLASS_INFO_CACHE[cacheKey]; if (result != null){ return (result); }; }; result = {}; result["name"] = className; result["alias"] = classAlias; result["properties"] = propertyNames; result["dynamic"] = dynamic; var _local5 = recordMetadata(properties); metadataInfo = _local5; result["metadata"] = _local5; var excludeObject:Object = {}; if (excludes){ n = excludes.length; i = 0; while (i < n) { excludeObject[excludes[i]] = 1; i = (i + 1); }; }; var isArray = (className == "Array"); if (dynamic){ for (p in obj) { if (excludeObject[p] != 1){ if (isArray){ pi = parseInt(p); if (isNaN(pi)){ propertyNames.push(new QName("", p)); } else { propertyNames.push(pi); }; } else { propertyNames.push(new QName("", p)); }; }; }; numericIndex = ((isArray) && (!(isNaN(Number(p))))); }; if ((((className == "Object")) || (isArray))){ } else { if (className == "XML"){ n = properties.length(); i = 0; while (i < n) { p = properties[i].name(); if (excludeObject[p] != 1){ propertyNames.push(new QName("", ("@" + p))); }; i = (i + 1); }; } else { n = properties.length(); uris = options.uris; i = 0; while (i < n) { prop = properties[i]; p = prop.@name.toString(); uri = prop.@uri.toString(); if (excludeObject[p] == 1){ } else { if (((!(options.includeTransient)) && (internalHasMetadata(metadataInfo, p, "Transient")))){ } else { if (uris != null){ if ((((uris.length == 1)) && ((uris[0] == "*")))){ qName = new QName(uri, p); try { obj[qName]; propertyNames.push(); } catch(e:Error) { }; } else { j = 0; while (j < uris.length) { uri = uris[j]; if (prop.@uri.toString() == uri){ qName = new QName(uri, p); try { obj[qName]; propertyNames.push(qName); } catch(e:Error) { }; }; j = (j + 1); }; }; } else { if (uri.length == 0){ qName = new QName(uri, p); try { obj[qName]; propertyNames.push(qName); } catch(e:Error) { }; }; }; }; }; i = (i + 1); }; }; }; propertyNames.sort((Array.CASEINSENSITIVE | (numericIndex) ? Array.NUMERIC : 0)); i = 0; while (i < (propertyNames.length - 1)) { if (propertyNames[i].toString() == propertyNames[(i + 1)].toString()){ propertyNames.splice(i, 1); i = (i - 1); }; i = (i + 1); }; if (!dynamic){ cacheKey = getCacheKey(obj, excludes, options); CLASS_INFO_CACHE[cacheKey] = result; }; return (result); } private static function arrayCompare(_arg1:Array, _arg2:Array, _arg3:int, _arg4:int, _arg5:Dictionary):int{ var _local7:Object; var _local6:int; if (_arg1.length != _arg2.length){ if (_arg1.length < _arg2.length){ _local6 = -1; } else { _local6 = 1; }; } else { for (_local7 in _arg1) { if (_arg2.hasOwnProperty(_local7)){ _local6 = internalCompare(_arg1[_local7], _arg2[_local7], _arg3, _arg4, _arg5); if (_local6 != 0){ return (_local6); }; } else { return (-1); }; }; for (_local7 in _arg2) { if (!_arg1.hasOwnProperty(_local7)){ return (1); }; }; }; return (_local6); } public static function stringCompare(_arg1:String, _arg2:String, _arg3:Boolean=false):int{ if ((((_arg1 == null)) && ((_arg2 == null)))){ return (0); }; if (_arg1 == null){ return (1); }; if (_arg2 == null){ return (-1); }; if (_arg3){ _arg1 = _arg1.toLocaleLowerCase(); _arg2 = _arg2.toLocaleLowerCase(); }; var _local4:int = _arg1.localeCompare(_arg2); if (_local4 < -1){ _local4 = -1; } else { if (_local4 > 1){ _local4 = 1; }; }; return (_local4); } public static function dateCompare(_arg1:Date, _arg2:Date):int{ if ((((_arg1 == null)) && ((_arg2 == null)))){ return (0); }; if (_arg1 == null){ return (1); }; if (_arg2 == null){ return (-1); }; var _local3:Number = _arg1.getTime(); var _local4:Number = _arg2.getTime(); if (_local3 < _local4){ return (-1); }; if (_local3 > _local4){ return (1); }; return (0); } public static function numericCompare(_arg1:Number, _arg2:Number):int{ if (((isNaN(_arg1)) && (isNaN(_arg2)))){ return (0); }; if (isNaN(_arg1)){ return (1); }; if (isNaN(_arg2)){ return (-1); }; if (_arg1 < _arg2){ return (-1); }; if (_arg1 > _arg2){ return (1); }; return (0); } private static function newline(_arg1:String, _arg2:int=0):String{ var _local3:String = _arg1; _local3 = (_local3 + "\n"); var _local4:int; while (_local4 < _arg2) { _local3 = (_local3 + " "); _local4++; }; return (_local3); } private static function recordMetadata(_arg1:XMLList):Object{ var prop:XML; var propName:String; var metadataList:XMLList; var metadata:Object; var md:XML; var mdName:String; var argsList:XMLList; var value:Object; var arg:XML; var existing:Object; var argKey:String; var argValue:String; var existingArray:Array; var properties = _arg1; var result:Object; try { for each (prop in properties) { propName = prop.attribute("name").toString(); metadataList = prop.metadata; if (metadataList.length() > 0){ if (result == null){ result = {}; }; metadata = {}; result[propName] = metadata; for each (md in metadataList) { mdName = md.attribute("name").toString(); argsList = md.arg; value = {}; for each (arg in argsList) { argKey = arg.attribute("key").toString(); if (argKey != null){ argValue = arg.attribute("value").toString(); value[argKey] = argValue; }; }; existing = metadata[mdName]; if (existing != null){ if ((existing is Array)){ existingArray = (existing as Array); } else { existingArray = []; }; existingArray.push(value); existing = existingArray; } else { existing = value; }; metadata[mdName] = existing; }; }; }; } catch(e:Error) { }; return (result); } public static function compare(_arg1:Object, _arg2:Object, _arg3:int=-1):int{ return (internalCompare(_arg1, _arg2, 0, _arg3, new Dictionary(true))); } private static function listCompare(_arg1:IList, _arg2:IList, _arg3:int, _arg4:int, _arg5:Dictionary):int{ var _local7:int; var _local6:int; if (_arg1.length != _arg2.length){ if (_arg1.length < _arg2.length){ _local6 = -1; } else { _local6 = 1; }; } else { _local7 = 0; while (_local7 < _arg1.length) { _local6 = internalCompare(_arg1.getItemAt(_local7), _arg2.getItemAt(_local7), (_arg3 + 1), _arg4, _arg5); if (_local6 != 0){ _local7 = _arg1.length; }; _local7++; }; }; return (_local6); } private static function internalCompare(_arg1:Object, _arg2:Object, _arg3:int, _arg4:int, _arg5:Dictionary):int{ var _local9:int; var _local10:Boolean; var _local11:Boolean; var _local12:Array; var _local13:Array; var _local14:QName; var _local15:Object; var _local16:Object; var _local17:int; if ((((_arg1 == null)) && ((_arg2 == null)))){ return (0); }; if (_arg1 == null){ return (1); }; if (_arg2 == null){ return (-1); }; if ((_arg1 is ObjectProxy)){ _arg1 = ObjectProxy(_arg1).object_proxy::object; }; if ((_arg2 is ObjectProxy)){ _arg2 = ObjectProxy(_arg2).object_proxy::object; }; var _local6 = typeof(_arg1); var _local7 = typeof(_arg2); var _local8:int; if (_local6 == _local7){ switch (_local6){ case "boolean": _local8 = numericCompare(Number(_arg1), Number(_arg2)); break; case "number": _local8 = numericCompare((_arg1 as Number), (_arg2 as Number)); break; case "string": _local8 = stringCompare((_arg1 as String), (_arg2 as String)); break; case "object": _local9 = ((_arg4 > 0)) ? (_arg4 - 1) : _arg4; _local10 = _arg5[_arg1]; _local11 = _arg5[_arg2]; if (((_local10) && (!(_local11)))){ return (1); }; if (((_local11) && (!(_local10)))){ return (-1); }; if (((_local11) && (_local10))){ return (0); }; _arg5[_arg1] = true; _arg5[_arg2] = true; if (((!((_arg4 == -1))) && ((_arg3 > _arg4)))){ _local8 = stringCompare(_arg1.toString(), _arg2.toString()); } else { if ((((_arg1 is Array)) && ((_arg2 is Array)))){ _local8 = arrayCompare((_arg1 as Array), (_arg2 as Array), _arg3, _arg4, _arg5); } else { if ((((_arg1 is Date)) && ((_arg2 is Date)))){ _local8 = dateCompare((_arg1 as Date), (_arg2 as Date)); } else { if ((((_arg1 is IList)) && ((_arg2 is IList)))){ _local8 = listCompare((_arg1 as IList), (_arg2 as IList), _arg3, _arg4, _arg5); } else { if ((((_arg1 is ByteArray)) && ((_arg2 is ByteArray)))){ _local8 = byteArrayCompare((_arg1 as ByteArray), (_arg2 as ByteArray)); } else { if (getQualifiedClassName(_arg1) == getQualifiedClassName(_arg2)){ _local12 = getClassInfo(_arg1).properties; if (getQualifiedClassName(_arg1) == "Object"){ _local13 = getClassInfo(_arg2).properties; _local8 = arrayCompare(_local12, _local13, _arg3, _local9, _arg5); }; if (_local8 != 0){ return (_local8); }; _local17 = 0; while (_local17 < _local12.length) { _local14 = _local12[_local17]; _local15 = _arg1[_local14]; _local16 = _arg2[_local14]; _local8 = internalCompare(_local15, _local16, (_arg3 + 1), _local9, _arg5); if (_local8 != 0){ _local17 = _local12.length; }; _local17++; }; } else { return (1); }; }; }; }; }; }; break; }; } else { return (stringCompare(_local6, _local7)); }; return (_local8); } public static function hasMetadata(_arg1:Object, _arg2:String, _arg3:String, _arg4:Array=null, _arg5:Object=null):Boolean{ var _local6:Object = getClassInfo(_arg1, _arg4, _arg5); var _local7:Object = _local6["metadata"]; return (internalHasMetadata(_local7, _arg2, _arg3)); } private static function internalHasMetadata(_arg1:Object, _arg2:String, _arg3:String):Boolean{ var _local4:Object; if (_arg1 != null){ _local4 = _arg1[_arg2]; if (_local4 != null){ if (_local4[_arg3] != null){ return (true); }; }; }; return (false); } public static function toString(_arg1:Object, _arg2:Array=null, _arg3:Array=null):String{ if (_arg3 == null){ _arg3 = defaultToStringExcludes; }; refCount = 0; return (internalToString(_arg1, 0, null, _arg2, _arg3)); } private static function byteArrayCompare(_arg1:ByteArray, _arg2:ByteArray):int{ var _local4:int; var _local3:int; if (_arg1.length != _arg2.length){ if (_arg1.length < _arg2.length){ _local3 = -1; } else { _local3 = 1; }; } else { _arg1.position = 0; _arg2.position = 0; _local4 = 0; while (_local4 < _arg1.length) { _local3 = numericCompare(_arg1.readByte(), _arg2.readByte()); if (_local3 != 0){ _local4 = _arg1.length; }; _local4++; }; }; return (_local3); } public static function copy(_arg1:Object):Object{ var _local2:ByteArray = new ByteArray(); _local2.writeObject(_arg1); _local2.position = 0; var _local3:Object = _local2.readObject(); return (_local3); } private static function getCacheKey(_arg1:Object, _arg2:Array=null, _arg3:Object=null):String{ var _local5:uint; var _local6:String; var _local7:String; var _local8:String; var _local4:String = getQualifiedClassName(_arg1); if (_arg2 != null){ _local5 = 0; while (_local5 < _arg2.length) { _local6 = (_arg2[_local5] as String); if (_local6 != null){ _local4 = (_local4 + _local6); }; _local5++; }; }; if (_arg3 != null){ for (_local7 in _arg3) { _local4 = (_local4 + _local7); _local8 = (_arg3[_local7] as String); if (_local8 != null){ _local4 = (_local4 + _local8); }; }; }; return (_local4); } } }//package mx.utils
Section 359
//StringUtil (mx.utils.StringUtil) package mx.utils { import mx.core.*; public class StringUtil { mx_internal static const VERSION:String = "3.0.0.0"; public static function trim(_arg1:String):String{ if (_arg1 == null){ return (""); }; var _local2:int; while (isWhitespace(_arg1.charAt(_local2))) { _local2++; }; var _local3:int = (_arg1.length - 1); while (isWhitespace(_arg1.charAt(_local3))) { _local3--; }; if (_local3 >= _local2){ return (_arg1.slice(_local2, (_local3 + 1))); }; return (""); } public static function isWhitespace(_arg1:String):Boolean{ switch (_arg1){ case " ": case "\t": case "\r": case "\n": case "\f": return (true); default: return (false); }; } public static function substitute(_arg1:String, ... _args):String{ var _local4:Array; if (_arg1 == null){ return (""); }; var _local3:uint = _args.length; if ((((_local3 == 1)) && ((_args[0] is Array)))){ _local4 = (_args[0] as Array); _local3 = _local4.length; } else { _local4 = _args; }; var _local5:int; while (_local5 < _local3) { _arg1 = _arg1.replace(new RegExp((("\\{" + _local5) + "\\}"), "g"), _local4[_local5]); _local5++; }; return (_arg1); } public static function trimArrayElements(_arg1:String, _arg2:String):String{ var _local3:Array; var _local4:int; var _local5:int; if (((!((_arg1 == ""))) && (!((_arg1 == null))))){ _local3 = _arg1.split(_arg2); _local4 = _local3.length; _local5 = 0; while (_local5 < _local4) { _local3[_local5] = StringUtil.trim(_local3[_local5]); _local5++; }; if (_local4 > 0){ _arg1 = _local3.join(_arg2); }; }; return (_arg1); } } }//package mx.utils
Section 360
//UIDUtil (mx.utils.UIDUtil) package mx.utils { import mx.core.*; import flash.utils.*; public class UIDUtil { mx_internal static const VERSION:String = "3.0.0.0"; private static const ALPHA_CHAR_CODES:Array = [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70]; private static var uidDictionary:Dictionary = new Dictionary(true); public static function fromByteArray(_arg1:ByteArray):String{ var _local2:Array; var _local3:uint; var _local4:uint; var _local5:int; if (((((!((_arg1 == null))) && ((_arg1.length >= 16)))) && ((_arg1.bytesAvailable >= 16)))){ _local2 = new Array(36); _local3 = 0; _local4 = 0; while (_local4 < 16) { if ((((((((_local4 == 4)) || ((_local4 == 6)))) || ((_local4 == 8)))) || ((_local4 == 10)))){ var _temp1 = _local3; _local3 = (_local3 + 1); var _local6 = _temp1; _local2[_local6] = 45; }; _local5 = _arg1.readByte(); var _temp2 = _local3; _local3 = (_local3 + 1); _local6 = _temp2; _local2[_local6] = ALPHA_CHAR_CODES[((_local5 & 240) >>> 4)]; var _temp3 = _local3; _local3 = (_local3 + 1); var _local7 = _temp3; _local2[_local7] = ALPHA_CHAR_CODES[(_local5 & 15)]; _local4++; }; return (String.fromCharCode.apply(null, _local2)); }; return (null); } public static function isUID(_arg1:String):Boolean{ var _local2:uint; var _local3:Number; if (((!((_arg1 == null))) && ((_arg1.length == 36)))){ _local2 = 0; while (_local2 < 36) { _local3 = _arg1.charCodeAt(_local2); if ((((((((_local2 == 8)) || ((_local2 == 13)))) || ((_local2 == 18)))) || ((_local2 == 23)))){ if (_local3 != 45){ return (false); }; } else { if ((((((_local3 < 48)) || ((_local3 > 70)))) || ((((_local3 > 57)) && ((_local3 < 65)))))){ return (false); }; }; _local2++; }; return (true); }; return (false); } public static function createUID():String{ var _local3:int; var _local4:int; var _local1:Array = new Array(36); var _local2:int; _local3 = 0; while (_local3 < 8) { var _temp1 = _local2; _local2 = (_local2 + 1); var _local7 = _temp1; _local1[_local7] = ALPHA_CHAR_CODES[Math.floor((Math.random() * 16))]; _local3++; }; _local3 = 0; while (_local3 < 3) { var _temp2 = _local2; _local2 = (_local2 + 1); _local7 = _temp2; _local1[_local7] = 45; _local4 = 0; while (_local4 < 4) { var _temp3 = _local2; _local2 = (_local2 + 1); var _local8 = _temp3; _local1[_local8] = ALPHA_CHAR_CODES[Math.floor((Math.random() * 16))]; _local4++; }; _local3++; }; var _temp4 = _local2; _local2 = (_local2 + 1); _local7 = _temp4; _local1[_local7] = 45; var _local5:Number = new Date().getTime(); var _local6:String = ("0000000" + _local5.toString(16).toUpperCase()).substr(-8); _local3 = 0; while (_local3 < 8) { var _temp5 = _local2; _local2 = (_local2 + 1); _local8 = _temp5; _local1[_local8] = _local6.charCodeAt(_local3); _local3++; }; _local3 = 0; while (_local3 < 4) { var _temp6 = _local2; _local2 = (_local2 + 1); _local8 = _temp6; _local1[_local8] = ALPHA_CHAR_CODES[Math.floor((Math.random() * 16))]; _local3++; }; return (String.fromCharCode.apply(null, _local1)); } public static function toByteArray(_arg1:String):ByteArray{ var _local2:ByteArray; var _local3:uint; var _local4:String; var _local5:uint; var _local6:uint; if (isUID(_arg1)){ _local2 = new ByteArray(); _local3 = 0; while (_local3 < _arg1.length) { _local4 = _arg1.charAt(_local3); if (_local4 == "-"){ } else { _local5 = getDigit(_local4); _local3++; _local6 = getDigit(_arg1.charAt(_local3)); _local2.writeByte((((_local5 << 4) | _local6) & 0xFF)); }; _local3++; }; _local2.position = 0; return (_local2); }; return (null); } private static function getDigit(_arg1:String):uint{ switch (_arg1){ case "A": case "a": return (10); case "B": case "b": return (11); case "C": case "c": return (12); case "D": case "d": return (13); case "E": case "e": return (14); case "F": case "f": return (15); default: return (new uint(_arg1)); }; } public static function getUID(_arg1:Object):String{ var result:String; var xitem:XML; var nodeKind:String; var notificationFunction:Function; var item = _arg1; result = null; if (item == null){ return (result); }; if ((item is IUID)){ result = IUID(item).uid; if ((((result == null)) || ((result.length == 0)))){ result = createUID(); IUID(item).uid = result; }; } else { if ((((item is IPropertyChangeNotifier)) && (!((item is IUIComponent))))){ result = IPropertyChangeNotifier(item).uid; if ((((result == null)) || ((result.length == 0)))){ result = createUID(); IPropertyChangeNotifier(item).uid = result; }; } else { if ((item is String)){ return ((item as String)); }; try { if ((((item is XMLList)) && ((item.length == 1)))){ item = item[0]; }; if ((item is XML)){ xitem = XML(item); nodeKind = xitem.nodeKind(); if ((((nodeKind == "text")) || ((nodeKind == "attribute")))){ return (xitem.toString()); }; notificationFunction = xitem.notification(); if (!(notificationFunction is Function)){ notificationFunction = XMLNotifier.initializeXMLForNotification(); xitem.setNotification(notificationFunction); }; if (notificationFunction["uid"] == undefined){ result = (notificationFunction["uid"] = createUID()); }; result = notificationFunction["uid"]; } else { if (("mx_internal_uid" in item)){ return (item.mx_internal_uid); }; if (("uid" in item)){ return (item.uid); }; result = uidDictionary[item]; if (!result){ result = createUID(); try { item.mx_internal_uid = result; } catch(e:Error) { uidDictionary[item] = result; }; }; }; } catch(e:Error) { result = item.toString(); }; }; }; return (result); } } }//package mx.utils
Section 361
//XMLNotifier (mx.utils.XMLNotifier) package mx.utils { import flash.utils.*; public class XMLNotifier { mx_internal static const VERSION:String = "3.0.0.0"; private static var instance:XMLNotifier; public function XMLNotifier(_arg1:XMLNotifierSingleton){ } public function watchXML(_arg1:Object, _arg2:IXMLNotifiable, _arg3:String=null):void{ var _local6:Dictionary; var _local4:XML = XML(_arg1); var _local5:Object = _local4.notification(); if (!(_local5 is Function)){ _local5 = initializeXMLForNotification(); _local4.setNotification((_local5 as Function)); if (((_arg3) && ((_local5["uid"] == null)))){ _local5["uid"] = _arg3; }; }; if (_local5["watched"] == undefined){ _local6 = new Dictionary(true); _local5["watched"] = _local6; } else { _local6 = _local5["watched"]; }; _local6[_arg2] = true; } public function unwatchXML(_arg1:Object, _arg2:IXMLNotifiable):void{ var _local5:Dictionary; var _local3:XML = XML(_arg1); var _local4:Object = _local3.notification(); if (!(_local4 is Function)){ return; }; if (_local4["watched"] != undefined){ _local5 = _local4["watched"]; delete _local5[_arg2]; }; } public static function getInstance():XMLNotifier{ if (!instance){ instance = new XMLNotifier(new XMLNotifierSingleton()); }; return (instance); } mx_internal static function initializeXMLForNotification():Function{ var notificationFunction:Function = function (_arg1:Object, _arg2:String, _arg3:Object, _arg4:Object, _arg5:Object):void{ var _local8:Object; var _local7:Dictionary = arguments.callee.watched; if (_local7 != null){ for (_local8 in _local7) { IXMLNotifiable(_local8).xmlNotification(_arg1, _arg2, _arg3, _arg4, _arg5); }; }; }; return (notificationFunction); } } }//package mx.utils class XMLNotifierSingleton { private function XMLNotifierSingleton(){ } }
Section 362
//IValidatorListener (mx.validators.IValidatorListener) package mx.validators { import mx.events.*; public interface IValidatorListener { function set errorString(_arg1:String):void; function get validationSubField():String; function validationResultHandler(_arg1:ValidationResultEvent):void; function set validationSubField(_arg1:String):void; function get errorString():String; } }//package mx.validators
Section 363
//ValidationResult (mx.validators.ValidationResult) package mx.validators { public class ValidationResult { public var subField:String; public var errorCode:String; public var isError:Boolean; public var errorMessage:String; mx_internal static const VERSION:String = "3.0.0.0"; public function ValidationResult(_arg1:Boolean, _arg2:String="", _arg3:String="", _arg4:String=""){ this.isError = _arg1; this.subField = _arg2; this.errorMessage = _arg4; this.errorCode = _arg3; } } }//package mx.validators
Section 364
//_activeButtonStyleStyle (_activeButtonStyleStyle) package { import mx.core.*; import mx.styles.*; public class _activeButtonStyleStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".activeButtonStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".activeButtonStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ }; }; } } }//package
Section 365
//_activeTabStyleStyle (_activeTabStyleStyle) package { import mx.core.*; import mx.styles.*; public class _activeTabStyleStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".activeTabStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".activeTabStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; }; }; } } }//package
Section 366
//_alertButtonStyleStyle (_alertButtonStyleStyle) package { import mx.core.*; import mx.styles.*; public class _alertButtonStyleStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".alertButtonStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".alertButtonStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.color = 734012; }; }; } } }//package
Section 367
//_ApplicationControlBarStyle (_ApplicationControlBarStyle) package { import mx.core.*; import mx.styles.*; public class _ApplicationControlBarStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("ApplicationControlBar"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("ApplicationControlBar", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.paddingTop = 5; this.paddingLeft = 8; this.fillAlphas = [0, 0]; this.cornerRadius = 5; this.paddingRight = 8; this.fillColors = [0xFFFFFF, 0xFFFFFF]; this.dropShadowEnabled = true; this.docked = false; this.paddingBottom = 4; this.borderStyle = "applicationControlBar"; this.shadowDistance = 5; }; }; } } }//package
Section 368
//_ApplicationStyle (_ApplicationStyle) package { import mx.core.*; import mx.styles.*; import mx.skins.halo.*; public class _ApplicationStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("Application"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("Application", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.paddingTop = 24; this.paddingLeft = 24; this.backgroundGradientAlphas = [1, 1]; this.horizontalAlign = "center"; this.paddingRight = 24; this.backgroundImage = ApplicationBackground; this.paddingBottom = 24; this.backgroundSize = "100%"; this.backgroundColor = 8821927; }; }; } } }//package
Section 369
//_ButtonStyle (_ButtonStyle) package { import mx.core.*; import mx.styles.*; import mx.skins.halo.*; public class _ButtonStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("Button"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("Button", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.paddingTop = 2; this.textAlign = "center"; this.skin = ButtonSkin; this.paddingLeft = 10; this.fontWeight = "bold"; this.cornerRadius = 4; this.paddingRight = 10; this.verticalGap = 2; this.horizontalGap = 2; this.paddingBottom = 2; }; }; } } }//package
Section 370
//_comboDropdownStyle (_comboDropdownStyle) package { import mx.core.*; import mx.styles.*; public class _comboDropdownStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".comboDropdown"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".comboDropdown", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.paddingLeft = 5; this.fontWeight = "normal"; this.cornerRadius = 0; this.paddingRight = 5; this.dropShadowEnabled = true; this.shadowDirection = "center"; this.leading = 0; this.borderThickness = 0; this.shadowDistance = 1; this.backgroundColor = 0xFFFFFF; }; }; } } }//package
Section 371
//_ContainerStyle (_ContainerStyle) package { import mx.core.*; import mx.styles.*; public class _ContainerStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("Container"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("Container", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.borderStyle = "none"; }; }; } } }//package
Section 372
//_ControlBarStyle (_ControlBarStyle) package { import mx.core.*; import mx.styles.*; public class _ControlBarStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("ControlBar"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("ControlBar", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.paddingTop = 10; this.disabledOverlayAlpha = 0; this.paddingLeft = 10; this.paddingRight = 10; this.verticalAlign = "middle"; this.paddingBottom = 10; this.borderStyle = "controlBar"; }; }; } } }//package
Section 373
//_CursorManagerStyle (_CursorManagerStyle) package { import mx.core.*; import mx.styles.*; import mx.skins.halo.*; public class _CursorManagerStyle { private static var _embed_css_Assets_swf_mx_skins_cursor_BusyCursor_1310759048:Class = _CursorManagerStyle__embed_css_Assets_swf_mx_skins_cursor_BusyCursor_1310759048; public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("CursorManager"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("CursorManager", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.busyCursor = BusyCursor; this.busyCursorBackground = _embed_css_Assets_swf_mx_skins_cursor_BusyCursor_1310759048; }; }; } } }//package
Section 374
//_CursorManagerStyle__embed_css_Assets_swf_mx_skins_cursor_BusyCursor_1310759048 (_CursorManagerStyle__embed_css_Assets_swf_mx_skins_cursor_BusyCursor_1310759048) package { import mx.core.*; public class _CursorManagerStyle__embed_css_Assets_swf_mx_skins_cursor_BusyCursor_1310759048 extends SpriteAsset { } }//package
Section 375
//_dataGridStylesStyle (_dataGridStylesStyle) package { import mx.core.*; import mx.styles.*; public class _dataGridStylesStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".dataGridStyles"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".dataGridStyles", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; }; }; } } }//package
Section 376
//_dateFieldPopupStyle (_dateFieldPopupStyle) package { import mx.core.*; import mx.styles.*; public class _dateFieldPopupStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".dateFieldPopup"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".dateFieldPopup", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.dropShadowEnabled = true; this.borderThickness = 0; this.backgroundColor = 0xFFFFFF; }; }; } } }//package
Section 377
//_errorTipStyle (_errorTipStyle) package { import mx.core.*; import mx.styles.*; public class _errorTipStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".errorTip"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".errorTip", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.paddingTop = 4; this.borderColor = 13510953; this.paddingLeft = 4; this.color = 0xFFFFFF; this.fontWeight = "bold"; this.paddingRight = 4; this.shadowColor = 0; this.fontSize = 9; this.paddingBottom = 4; this.borderStyle = "errorTipRight"; }; }; } } }//package
Section 378
//_Game_FlexInit (_Game_FlexInit) package { import mx.core.*; import mx.styles.*; import mx.effects.*; import mx.collections.*; import mx.utils.*; import flash.net.*; public class _Game_FlexInit { public static function init(_arg1:IFlexModuleFactory):void{ var _local4 = EffectManager; _local4.mx_internal::registerEffectTrigger("addedEffect", "added"); _local4 = EffectManager; _local4.mx_internal::registerEffectTrigger("completeEffect", "complete"); _local4 = EffectManager; _local4.mx_internal::registerEffectTrigger("creationCompleteEffect", "creationComplete"); _local4 = EffectManager; _local4.mx_internal::registerEffectTrigger("focusInEffect", "focusIn"); _local4 = EffectManager; _local4.mx_internal::registerEffectTrigger("focusOutEffect", "focusOut"); _local4 = EffectManager; _local4.mx_internal::registerEffectTrigger("hideEffect", "hide"); _local4 = EffectManager; _local4.mx_internal::registerEffectTrigger("mouseDownEffect", "mouseDown"); _local4 = EffectManager; _local4.mx_internal::registerEffectTrigger("mouseUpEffect", "mouseUp"); _local4 = EffectManager; _local4.mx_internal::registerEffectTrigger("moveEffect", "move"); _local4 = EffectManager; _local4.mx_internal::registerEffectTrigger("removedEffect", "removed"); _local4 = EffectManager; _local4.mx_internal::registerEffectTrigger("resizeEffect", "resize"); _local4 = EffectManager; _local4.mx_internal::registerEffectTrigger("resizeEndEffect", "resizeEnd"); _local4 = EffectManager; _local4.mx_internal::registerEffectTrigger("resizeStartEffect", "resizeStart"); _local4 = EffectManager; _local4.mx_internal::registerEffectTrigger("rollOutEffect", "rollOut"); _local4 = EffectManager; _local4.mx_internal::registerEffectTrigger("rollOverEffect", "rollOver"); _local4 = EffectManager; _local4.mx_internal::registerEffectTrigger("showEffect", "show"); registerClassAlias("flex.messaging.io.ArrayCollection", ArrayCollection); registerClassAlias("flex.messaging.io.ArrayList", ArrayList); registerClassAlias("flex.messaging.io.ObjectProxy", ObjectProxy); var _local2:Array = ["fontWeight", "modalTransparencyBlur", "textRollOverColor", "backgroundDisabledColor", "textIndent", "barColor", "fontSize", "kerning", "footerColors", "textAlign", "fontStyle", "modalTransparencyDuration", "textSelectedColor", "modalTransparency", "fontGridFitType", "disabledColor", "fontAntiAliasType", "modalTransparencyColor", "leading", "dropShadowColor", "themeColor", "letterSpacing", "fontFamily", "color", "fontThickness", "errorColor", "headerColors", "fontSharpness", "textDecoration"]; var _local3:int; while (_local3 < _local2.length) { StyleManager.registerInheritingStyle(_local2[_local3]); _local3++; }; } } }//package
Section 379
//_Game_mx_managers_SystemManager (_Game_mx_managers_SystemManager) package { import mx.core.*; import mx.managers.*; import flash.system.*; public class _Game_mx_managers_SystemManager extends SystemManager implements IFlexModuleFactory { override public function create(... _args):Object{ if ((((_args.length > 0)) && (!((_args[0] is String))))){ return (super.create.apply(this, _args)); }; var _local2:String = ((_args.length == 0)) ? "Game" : String(_args[0]); var _local3:Class = Class(getDefinitionByName(_local2)); if (!_local3){ return (null); }; var _local4:Object = new (_local3); if ((_local4 is IFlexModule)){ IFlexModule(_local4).moduleFactory = this; }; return (_local4); } override public function info():Object{ return ({applicationComplete:"init()", backgroundColor:"0x006595", backgroundGradientAlphas:"[0, 0]", compiledLocales:["en_US"], compiledResourceBundleNames:["SharedResources", "collections", "containers", "controls", "core", "effects", "formatters", "skins", "states", "styles"], currentDomain:ApplicationDomain.currentDomain, currentState:"title2", frameRate:"120", layout:"absolute", mainClassName:"Game", mixins:["_Game_FlexInit", "_alertButtonStyleStyle", "_ControlBarStyle", "_ScrollBarStyle", "_activeTabStyleStyle", "_textAreaHScrollBarStyleStyle", "_ToolTipStyle", "_comboDropdownStyle", "_textAreaVScrollBarStyleStyle", "_ContainerStyle", "_linkButtonStyleStyle", "_globalStyle", "_windowStatusStyle", "_windowStylesStyle", "_PanelStyle", "_activeButtonStyleStyle", "_ApplicationControlBarStyle", "_errorTipStyle", "_richTextEditorTextAreaStyleStyle", "_CursorManagerStyle", "_todayStyleStyle", "_dateFieldPopupStyle", "_plainStyle", "_dataGridStylesStyle", "_ApplicationStyle", "_SWFLoaderStyle", "_headerDateTextStyle", "_ButtonStyle", "_popUpMenuStyle", "_VSliderStyle", "_swatchPanelTextFieldStyle", "_opaquePanelStyle", "_weekDayStyleStyle", "_headerDragProxyStyleStyle", "_GameWatcherSetupUtil", "_LevelButtonWatcherSetupUtil"], resize:"onResize()"}); } } }//package
Section 380
//_GameWatcherSetupUtil (_GameWatcherSetupUtil) package { import flash.display.*; import mx.core.*; import mx.binding.*; public class _GameWatcherSetupUtil extends Sprite implements IWatcherSetupUtil { public function setup(_arg1:Object, _arg2:Function, _arg3:Array, _arg4:Array):void{ _arg4[8] = new PropertyWatcher("timer", {propertyChange:true}, [_arg3[19], _arg3[16], _arg3[12]], _arg2); _arg4[10] = new PropertyWatcher("camera", {propertyChange:true}, [_arg3[17], _arg3[13], _arg3[22]], _arg2); _arg4[3] = new PropertyWatcher("myGlow", {propertyChange:true}, [_arg3[4], _arg3[6], _arg3[3], _arg3[5]], _arg2); _arg4[7] = new PropertyWatcher("canvas1", {propertyChange:true}, [_arg3[14], _arg3[10]], _arg2); _arg4[13] = new PropertyWatcher("menuButtonAlpha", {propertyChange:true}, [_arg3[20]], _arg2); _arg4[5] = new PropertyWatcher("levelRepeater", {propertyChange:true}, [_arg3[9]], _arg2); _arg4[6] = new PropertyWatcher("dataProvider", {collectionChange:true}, [_arg3[9]], null); _arg4[14] = new PropertyWatcher("retryButtonAlpha", {propertyChange:true}, [_arg3[21]], _arg2); _arg4[2] = new PropertyWatcher("canvas2", {propertyChange:true}, [_arg3[15], _arg3[2], _arg3[11], _arg3[18], _arg3[7]], _arg2); _arg4[4] = new StaticPropertyWatcher("levels", {propertyChange:true}, [_arg3[8]], null); _arg4[8].updateParent(_arg1); _arg4[10].updateParent(_arg1); _arg4[3].updateParent(_arg1); _arg4[7].updateParent(_arg1); _arg4[13].updateParent(_arg1); _arg4[5].updateParent(_arg1); _arg4[5].addChild(_arg4[6]); _arg4[14].updateParent(_arg1); _arg4[2].updateParent(_arg1); _arg4[4].updateParent(Level); } public static function init(_arg1:IFlexModuleFactory):void{ Game.watcherSetupUtil = new (_GameWatcherSetupUtil); } } }//package
Section 381
//_globalStyle (_globalStyle) package { import mx.core.*; import mx.styles.*; import mx.skins.halo.*; public class _globalStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("global"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("global", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "normal"; this.modalTransparencyBlur = 3; this.verticalGridLineColor = 14015965; this.borderStyle = "inset"; this.buttonColor = 7305079; this.borderCapColor = 9542041; this.textAlign = "left"; this.disabledIconColor = 0x999999; this.stroked = false; this.fillColors = [0xFFFFFF, 0xCCCCCC, 0xFFFFFF, 0xEEEEEE]; this.fontStyle = "normal"; this.borderSides = "left top right bottom"; this.borderThickness = 1; this.modalTransparencyDuration = 100; this.useRollOver = true; this.strokeWidth = 1; this.filled = true; this.borderColor = 12040892; this.horizontalGridLines = false; this.horizontalGridLineColor = 0xF7F7F7; this.shadowCapColor = 14015965; this.fontGridFitType = "pixel"; this.horizontalAlign = "left"; this.modalTransparencyColor = 0xDDDDDD; this.disabledColor = 11187123; this.borderSkin = HaloBorder; this.dropShadowColor = 0; this.paddingBottom = 0; this.indentation = 17; this.version = "3.0.0"; this.fontThickness = 0; this.verticalGridLines = true; this.embedFonts = false; this.fontSharpness = 0; this.shadowDirection = "center"; this.textDecoration = "none"; this.selectionDuration = 250; this.bevel = true; this.fillColor = 0xFFFFFF; this.focusBlendMode = "normal"; this.dropShadowEnabled = false; this.textRollOverColor = 2831164; this.textIndent = 0; this.fontSize = 10; this.openDuration = 250; this.closeDuration = 250; this.kerning = false; this.paddingTop = 0; this.highlightAlphas = [0.3, 0]; this.cornerRadius = 0; this.horizontalGap = 8; this.textSelectedColor = 2831164; this.paddingLeft = 0; this.modalTransparency = 0.5; this.roundedBottomCorners = true; this.repeatDelay = 500; this.selectionDisabledColor = 0xDDDDDD; this.fontAntiAliasType = "advanced"; this.focusSkin = HaloFocusRect; this.verticalGap = 6; this.leading = 2; this.shadowColor = 0xEEEEEE; this.backgroundAlpha = 1; this.iconColor = 0x111111; this.focusAlpha = 0.4; this.borderAlpha = 1; this.focusThickness = 2; this.themeColor = 40447; this.backgroundSize = "auto"; this.indicatorGap = 14; this.letterSpacing = 0; this.fontFamily = "Verdana"; this.fillAlphas = [0.6, 0.4, 0.75, 0.65]; this.color = 734012; this.paddingRight = 0; this.errorColor = 0xFF0000; this.verticalAlign = "top"; this.focusRoundedCorners = "tl tr bl br"; this.shadowDistance = 2; this.repeatInterval = 35; }; }; } } }//package
Section 382
//_headerDateTextStyle (_headerDateTextStyle) package { import mx.core.*; import mx.styles.*; public class _headerDateTextStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".headerDateText"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".headerDateText", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.textAlign = "center"; this.fontWeight = "bold"; }; }; } } }//package
Section 383
//_headerDragProxyStyleStyle (_headerDragProxyStyleStyle) package { import mx.core.*; import mx.styles.*; public class _headerDragProxyStyleStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".headerDragProxyStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".headerDragProxyStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; }; }; } } }//package
Section 384
//_LevelButtonWatcherSetupUtil (_LevelButtonWatcherSetupUtil) package { import flash.display.*; import mx.core.*; import mx.binding.*; public class _LevelButtonWatcherSetupUtil extends Sprite implements IWatcherSetupUtil { public function setup(_arg1:Object, _arg2:Function, _arg3:Array, _arg4:Array):void{ _arg4[1] = new PropertyWatcher("string", {propertyChange:true}, [_arg3[1]], _arg2); _arg4[0] = new PropertyWatcher("myAlpha", {propertyChange:true}, [_arg3[0]], _arg2); _arg4[1].updateParent(_arg1); _arg4[0].updateParent(_arg1); } public static function init(_arg1:IFlexModuleFactory):void{ LevelButton.watcherSetupUtil = new (_LevelButtonWatcherSetupUtil); } } }//package
Section 385
//_linkButtonStyleStyle (_linkButtonStyleStyle) package { import mx.core.*; import mx.styles.*; public class _linkButtonStyleStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".linkButtonStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".linkButtonStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.paddingTop = 2; this.paddingLeft = 2; this.paddingRight = 2; this.paddingBottom = 2; }; }; } } }//package
Section 386
//_opaquePanelStyle (_opaquePanelStyle) package { import mx.core.*; import mx.styles.*; public class _opaquePanelStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".opaquePanel"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".opaquePanel", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.footerColors = [0xE7E7E7, 0xC7C7C7]; this.borderColor = 0xFFFFFF; this.headerColors = [0xE7E7E7, 0xD9D9D9]; this.borderAlpha = 1; this.backgroundColor = 0xFFFFFF; }; }; } } }//package
Section 387
//_PanelStyle (_PanelStyle) package { import mx.core.*; import mx.styles.*; import mx.skins.halo.*; public class _PanelStyle { public static function init(_arg1:IFlexModuleFactory):void{ var effects:Array; var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("Panel"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("Panel", style, false); effects = style.mx_internal::effects; if (!effects){ effects = (style.mx_internal::effects = new Array()); }; effects.push("resizeEndEffect"); effects.push("resizeStartEffect"); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.borderColor = 0xE2E2E2; this.paddingLeft = 0; this.roundedBottomCorners = false; this.dropShadowEnabled = true; this.resizeStartEffect = "Dissolve"; this.borderSkin = PanelSkin; this.statusStyleName = "windowStatus"; this.borderAlpha = 0.4; this.borderStyle = "default"; this.paddingBottom = 0; this.resizeEndEffect = "Dissolve"; this.paddingTop = 0; this.borderThicknessRight = 10; this.titleStyleName = "windowStyles"; this.cornerRadius = 4; this.paddingRight = 0; this.borderThicknessLeft = 10; this.titleBackgroundSkin = TitleBackground; this.borderThickness = 0; this.borderThicknessTop = 2; this.backgroundColor = 0xFFFFFF; }; }; } } }//package
Section 388
//_plainStyle (_plainStyle) package { import mx.core.*; import mx.styles.*; public class _plainStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".plain"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".plain", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.paddingTop = 0; this.paddingLeft = 0; this.horizontalAlign = "left"; this.paddingRight = 0; this.backgroundImage = ""; this.paddingBottom = 0; this.backgroundColor = 0xFFFFFF; }; }; } } }//package
Section 389
//_popUpMenuStyle (_popUpMenuStyle) package { import mx.core.*; import mx.styles.*; public class _popUpMenuStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".popUpMenu"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".popUpMenu", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.textAlign = "left"; this.fontWeight = "normal"; }; }; } } }//package
Section 390
//_richTextEditorTextAreaStyleStyle (_richTextEditorTextAreaStyleStyle) package { import mx.core.*; import mx.styles.*; public class _richTextEditorTextAreaStyleStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".richTextEditorTextAreaStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".richTextEditorTextAreaStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ }; }; } } }//package
Section 391
//_ScrollBarStyle (_ScrollBarStyle) package { import mx.core.*; import mx.styles.*; import mx.skins.halo.*; public class _ScrollBarStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("ScrollBar"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("ScrollBar", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.trackColors = [9738651, 0xE7E7E7]; this.thumbOffset = 0; this.paddingTop = 0; this.downArrowSkin = ScrollArrowSkin; this.borderColor = 12040892; this.paddingLeft = 0; this.cornerRadius = 4; this.paddingRight = 0; this.trackSkin = ScrollTrackSkin; this.thumbSkin = ScrollThumbSkin; this.paddingBottom = 0; this.upArrowSkin = ScrollArrowSkin; }; }; } } }//package
Section 392
//_swatchPanelTextFieldStyle (_swatchPanelTextFieldStyle) package { import mx.core.*; import mx.styles.*; public class _swatchPanelTextFieldStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".swatchPanelTextField"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".swatchPanelTextField", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.highlightColor = 12897484; this.borderColor = 14015965; this.paddingLeft = 5; this.shadowCapColor = 14015965; this.paddingRight = 5; this.shadowColor = 14015965; this.borderStyle = "inset"; this.buttonColor = 7305079; this.backgroundColor = 0xFFFFFF; this.borderCapColor = 9542041; }; }; } } }//package
Section 393
//_SWFLoaderStyle (_SWFLoaderStyle) package { import mx.core.*; import mx.styles.*; import mx.skins.halo.*; public class _SWFLoaderStyle { private static var _embed_css_Assets_swf___brokenImage_1963977306:Class = _SWFLoaderStyle__embed_css_Assets_swf___brokenImage_1963977306; public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("SWFLoader"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("SWFLoader", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.brokenImageSkin = _embed_css_Assets_swf___brokenImage_1963977306; this.borderStyle = "none"; this.brokenImageBorderSkin = BrokenImageBorderSkin; }; }; } } }//package
Section 394
//_SWFLoaderStyle__embed_css_Assets_swf___brokenImage_1963977306 (_SWFLoaderStyle__embed_css_Assets_swf___brokenImage_1963977306) package { import mx.core.*; public class _SWFLoaderStyle__embed_css_Assets_swf___brokenImage_1963977306 extends SpriteAsset { } }//package
Section 395
//_textAreaHScrollBarStyleStyle (_textAreaHScrollBarStyleStyle) package { import mx.core.*; import mx.styles.*; public class _textAreaHScrollBarStyleStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".textAreaHScrollBarStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".textAreaHScrollBarStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ }; }; } } }//package
Section 396
//_textAreaVScrollBarStyleStyle (_textAreaVScrollBarStyleStyle) package { import mx.core.*; import mx.styles.*; public class _textAreaVScrollBarStyleStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".textAreaVScrollBarStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".textAreaVScrollBarStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ }; }; } } }//package
Section 397
//_todayStyleStyle (_todayStyleStyle) package { import mx.core.*; import mx.styles.*; public class _todayStyleStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".todayStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".todayStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.textAlign = "center"; this.color = 0xFFFFFF; }; }; } } }//package
Section 398
//_ToolTipStyle (_ToolTipStyle) package { import mx.core.*; import mx.styles.*; import mx.skins.halo.*; public class _ToolTipStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("ToolTip"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("ToolTip", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.paddingTop = 2; this.borderColor = 9542041; this.paddingLeft = 4; this.cornerRadius = 2; this.paddingRight = 4; this.shadowColor = 0; this.fontSize = 9; this.borderSkin = ToolTipBorder; this.backgroundAlpha = 0.95; this.paddingBottom = 2; this.borderStyle = "toolTip"; this.backgroundColor = 16777164; }; }; } } }//package
Section 399
//_weekDayStyleStyle (_weekDayStyleStyle) package { import mx.core.*; import mx.styles.*; public class _weekDayStyleStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".weekDayStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".weekDayStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.textAlign = "center"; this.fontWeight = "bold"; }; }; } } }//package
Section 400
//_windowStatusStyle (_windowStatusStyle) package { import mx.core.*; import mx.styles.*; public class _windowStatusStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".windowStatus"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".windowStatus", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.color = 0x666666; }; }; } } }//package
Section 401
//_windowStylesStyle (_windowStylesStyle) package { import mx.core.*; import mx.styles.*; public class _windowStylesStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".windowStyles"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".windowStyles", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; }; }; } } }//package
Section 402
//_VSliderStyle (_VSliderStyle) package { import mx.core.*; import mx.styles.*; import mx.skins.halo.*; public class _VSliderStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("VSlider"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("VSlider", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.thumbOffset = 0; this.borderColor = 9542041; this.trackHighlightSkin = SliderHighlightSkin; this.tickColor = 7305079; this.thumbDownSkin = null; this.tickOffset = -6; this.labelOffset = -10; this.thumbOverSkin = null; this.tickLength = 3; this.thumbDisabledSkin = null; this.trackColors = [0xE7E7E7, 0xE7E7E7]; this.thumbUpSkin = null; this.dataTipPlacement = "left"; this.dataTipOffset = 16; this.trackSkin = SliderTrackSkin; this.tickThickness = 1; this.showTrackHighlight = false; this.thumbSkin = SliderThumbSkin; this.dataTipPrecision = 2; this.slideDuration = 300; }; }; } } }//package
Section 403
//Ball (Ball) package { import flash.display.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.Shapes.*; public class Ball extends SteppingThing { public var body:b2Body; private var graphic:Sprite; private static const maskBits:int = 0xFFFF; private static const categoryBits:int = 128; private static var maxImpact:Number = 0; private static var impactThreshold:Number = 0; public function Ball(_arg1:XML){ super(_arg1); var _local2:Number = Math.random(); if (_local2 < (1 / 6)){ graphic = new Ball0Sprite(); } else { if (_local2 < (2 / 6)){ graphic = new Ball1Sprite(); } else { if (_local2 < (3 / 6)){ graphic = new Ball2Sprite(); } else { if (_local2 < (4 / 6)){ graphic = new Ball3Sprite(); } else { if (_local2 < (5 / 6)){ graphic = new Ball4Sprite(); } else { graphic = new Ball5Sprite(); }; }; }; }; }; var _local3:b2BodyDef = new b2BodyDef(); var _local4:b2CircleDef = new b2CircleDef(); _local4.radius = 1.23; _local4.density = 0.3; _local4.friction = 0.9; _local4.restitution = 0.5; _local4.categoryBits = categoryBits; _local4.maskBits = maskBits; _local4.userData = this; _local4.localPosition.Set(((1.25 * direction) + svgWidth), 1.25); _local3.AddShape(_local4); _local3.position = svgPos; _local3.rotation = svgAngle; body = Game.me.world.CreateBody(_local3); graphic.scaleX = (0.05 * direction); graphic.scaleY = 0.05; Game.me.things.push(this); Game.me.steppingThings.push(this); Game.me.solidLayer.addChild(graphic); repaint(); } override public function getCollisionSound(_arg1:b2Vec2, _arg2:Number, _arg3:b2Shape, _arg4:b2Shape, _arg5:Thing):CollisionSound{ if ((((_arg2 > impactThreshold)) && ((_arg2 > 200)))){ impactThreshold = (_arg2 * 2); maxImpact = _arg2; return (new CollisionSound(SFX.ball, 1)); }; maxImpact = Math.max(_arg2, maxImpact); return (null); } override public function destroy():void{ Game.me.solidLayer.removeChild(graphic); Game.me.things.splice(Game.me.things.indexOf(this), 1); Game.me.steppingThings.splice(Game.me.steppingThings.indexOf(this), 1); Game.me.world.DestroyBody(body); } override public function repaint():void{ graphic.x = body.m_position.x; graphic.y = body.m_position.y; maxImpact = 0; } override public function step():void{ var _local1:Number = body.m_linearVelocity.Length(); var _local2:Number = _local1; _local2 = (_local2 - 0.1); _local2 = Math.min(30, _local2); body.m_linearVelocity.Multiply((_local2 / _local1)); if (body.m_angularVelocity > 0.1){ body.m_angularVelocity = (body.m_angularVelocity - 0.1); } else { if (body.m_angularVelocity < -0.1){ body.m_angularVelocity = (body.m_angularVelocity + 0.1); } else { body.m_angularVelocity = 0; }; }; impactThreshold = Math.min(impactThreshold, (maxImpact * 10)); } } }//package
Section 404
//Ball0Sprite (Ball0Sprite) package { import flash.display.*; public dynamic class Ball0Sprite extends MovieClip { } }//package
Section 405
//Ball1Sprite (Ball1Sprite) package { import flash.display.*; public dynamic class Ball1Sprite extends MovieClip { } }//package
Section 406
//Ball2Sprite (Ball2Sprite) package { import flash.display.*; public dynamic class Ball2Sprite extends MovieClip { } }//package
Section 407
//Ball3Sprite (Ball3Sprite) package { import flash.display.*; public dynamic class Ball3Sprite extends MovieClip { } }//package
Section 408
//Ball4Sprite (Ball4Sprite) package { import flash.display.*; public dynamic class Ball4Sprite extends MovieClip { } }//package
Section 409
//Ball5Sprite (Ball5Sprite) package { import flash.display.*; public dynamic class Ball5Sprite extends MovieClip { } }//package
Section 410
//Box (Box) package { import flash.display.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.Shapes.*; public class Box extends SteppingThing { public var body:b2Body; private var graphic:Sprite; private static const coreCategoryBits:int = 1; private static const slopMaskBits:int = 65519; private static const coreMaskBits:int = 16; private static const slopCategoryBits:int = 64; private static var impactThreshold:Number = 0; private static var maxImpact:Number = 0; public function Box(_arg1:XML){ var _local2:b2BodyDef; var _local3:b2BoxDef; graphic = new BoxSprite(); super(_arg1); _local2 = new b2BodyDef(); _local3 = new b2BoxDef(); _local3.density = 0.6; _local3.friction = 0.5; _local3.restitution = 0.1; _local3.categoryBits = slopCategoryBits; _local3.maskBits = slopMaskBits; _local3.userData = this; _local2.AddShape(_local3); var _local4:b2BoxDef = new b2BoxDef(); _local4.density = 0; _local4.friction = 2; _local4.restitution = 0; _local4.categoryBits = coreCategoryBits; _local4.maskBits = coreMaskBits; _local4.userData = this; _local2.AddShape(_local4); _local2.position = svgPos; _local2.rotation = svgAngle; if (_arg1.@type == "smallBox"){ _local3.localPosition.Set(((2.5 * direction) + svgWidth), 2.5); _local4.localPosition.Set(((2.5 * direction) + svgWidth), 2.5); _local3.extents.Set(2.5, 2.5); _local4.extents.Set(1.3, 1.3); graphic.scaleX = (0.025 * direction); graphic.scaleY = 0.025; } else { if (_arg1.@type == "box"){ _local3.localPosition.Set(((5 * direction) + svgWidth), 5); _local4.localPosition.Set(((5 * direction) + svgWidth), 5); _local3.extents.Set(5, 5); _local4.extents.Set(3.6, 3.6); graphic.scaleX = (0.05 * direction); graphic.scaleY = 0.05; } else { _local3.localPosition.Set(((7.5 * direction) + svgWidth), 7.5); _local4.localPosition.Set(((7.5 * direction) + svgWidth), 7.5); _local3.extents.Set(7.5, 7.5); _local4.extents.Set(6.1, 6.1); graphic.scaleX = (0.075 * direction); graphic.scaleY = 0.075; }; }; body = Game.me.world.CreateBody(_local2); Game.me.things.push(this); Game.me.steppingThings.push(this); Game.me.solidLayer.addChild(graphic); repaint(); } override public function getCollisionSound(_arg1:b2Vec2, _arg2:Number, _arg3:b2Shape, _arg4:b2Shape, _arg5:Thing):CollisionSound{ if ((((_arg2 > impactThreshold)) && ((_arg2 > 500)))){ impactThreshold = (_arg2 * 2); maxImpact = _arg2; return (new CollisionSound(SFX.heavyBox, ((_arg2 - 480) / 4000))); }; maxImpact = Math.max(_arg2, maxImpact); return (null); } override public function destroy():void{ Game.me.solidLayer.removeChild(graphic); Game.me.things.splice(Game.me.things.indexOf(this), 1); Game.me.steppingThings.splice(Game.me.steppingThings.indexOf(this), 1); Game.me.world.DestroyBody(body); } override public function repaint():void{ graphic.x = body.m_position.x; graphic.y = body.m_position.y; graphic.rotation = ((body.m_rotation * 180) / Math.PI); maxImpact = 0; } override public function step():void{ impactThreshold = Math.min(impactThreshold, (maxImpact * 10)); } } }//package
Section 411
//BoxSprite (BoxSprite) package { import flash.display.*; public dynamic class BoxSprite extends MovieClip { } }//package
Section 412
//ButtonRimSprite (ButtonRimSprite) package { import flash.display.*; public dynamic class ButtonRimSprite extends MovieClip { } }//package
Section 413
//ButtonSprite (ButtonSprite) package { import flash.display.*; public dynamic class ButtonSprite extends MovieClip { } }//package
Section 414
//CollisionSound (CollisionSound) package { import flash.media.*; public class CollisionSound { public var volume:Number; public var sound:Sound; public function CollisionSound(_arg1:Sound, _arg2:Number=1){ sound = _arg1; volume = Math.min(1, Math.max(0, _arg2)); } public function play():void{ sound.play(0, 0, new SoundTransform(volume)); } } }//package
Section 415
//Decoration (Decoration) package { import flash.display.*; public class Decoration extends Thing { private var graphic:MovieClip; public function Decoration(_arg1:XML){ super(_arg1); Game.me.things.push(this); if (_arg1.@type == "hintArrowKey"){ graphic = new HintArrowKeySprite(); Game.me.panelLayer.addChild(graphic); } else { if (_arg1.@type == "hintSpaceKey"){ graphic = new HintSpaceKeySprite(); Game.me.panelLayer.addChild(graphic); } else { if (_arg1.@type == "entrance"){ graphic = new EntranceSprite(); Game.me.panelLayer.addChild(graphic); } else { throw (new Error(("Decoration constructor: unknown type: " + _arg1.localName()))); }; }; }; graphic.scaleX = (0.05 * direction); graphic.scaleY = 0.05; graphic.x = ((svgPos.x - (2.5 * Math.sin(svgAngle))) + (2.5 * Math.cos(svgAngle))); graphic.y = ((svgPos.y + (2.5 * Math.cos(svgAngle))) + (2.5 * Math.sin(svgAngle))); graphic.rotation = ((svgAngle * 180) / Math.PI); } override public function destroy():void{ Game.me.panelLayer.removeChild(graphic); Game.me.things.splice(Game.me.things.indexOf(this), 1); } } }//package
Section 416
//Elevator (Elevator) package { import flash.display.*; import flash.events.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Dynamics.Joints.*; import Box2D.Collision.Shapes.*; public class Elevator extends SteppingThing { public var halfHeight:Number; public var vector:b2Vec2; public var joint:b2PrismaticJoint; public var goingUp:Boolean; public var activated:Boolean; public var liftHeight:Number; public var body:b2Body; private var graphic:MovieClip; public var startPosition:b2Vec2; private var followPlayer:Boolean; public var aSwitch:Switch; private static const maskBits:int = 65534; private static const speed:Number = 25; private static const categoryBits:int = 1; public function Elevator(_arg1:XML){ var _local2:b2BodyDef; graphic = new ElevatorSprite(); vector = new b2Vec2(); super(_arg1); followPlayer = !((_arg1.@followPlayer == "false")); vector.Set(Math.sin(svgAngle), -(Math.cos(svgAngle))); aSwitch = (Game.me.switches[_arg1.@switchID] as Switch); aSwitch.addEventListener(Event.CHANGE, onFlipped, false, 0, false); liftHeight = _arg1.@liftHeight; halfHeight = (liftHeight * 0.75); _local2 = new b2BodyDef(); var _local3:b2BoxDef = new b2BoxDef(); _local3.extents.Set(15, 2.5); _local3.density = 2; _local3.categoryBits = categoryBits; _local3.maskBits = maskBits; _local3.userData = this; _local3.localPosition.Set(((15 * direction) + svgWidth), 2.5); _local2.AddShape(_local3); _local2.position = svgPos; _local2.rotation = svgAngle; body = Game.me.world.CreateBody(_local2); startPosition = body.m_position.Copy(); var _local4:b2PrismaticJointDef = new b2PrismaticJointDef(); _local4.body1 = Game.me.world.GetGroundBody(); _local4.body2 = body; _local4.anchorPoint = body.m_position; _local4.axis = vector; _local4.enableLimit = true; _local4.enableMotor = true; _local4.motorForce = 250000; _local4.lowerTranslation = 0; _local4.upperTranslation = liftHeight; joint = (Game.me.world.CreateJoint(_local4) as b2PrismaticJoint); Game.me.things.push(this); Game.me.steppingThings.push(this); graphic.scaleX = (0.05 * direction); graphic.scaleY = 0.05; Game.me.frontLayer.addChild(graphic); repaint(); } override public function repaint():void{ graphic.x = body.m_position.x; graphic.y = body.m_position.y; graphic.rotation = ((body.m_rotation * 180) / Math.PI); } override public function step():void{ var _local1:Number; var _local2:b2Vec2; var _local3:Number; if (activated){ if (goingUp){ _local1 = (8 * (liftHeight - joint.GetJointTranslation())); _local1 = Math.min(speed, _local1); joint.m_motorSpeed = _local1; if (_local1 < 1){ activated = false; aSwitch.state = false; SFX.elevatorStop.play(); }; } else { _local1 = (8 * (0 - joint.GetJointTranslation())); _local1 = Math.max(-(speed), _local1); joint.m_motorSpeed = _local1; if (_local1 > -1){ activated = false; aSwitch.state = false; SFX.elevatorStop.play(); }; }; } else { if (followPlayer){ _local2 = Game.me.player.feet.m_position.Copy(); _local2.Subtract(startPosition); _local3 = b2Math.b2Dot(_local2, vector); if (_local3 > halfHeight){ _local1 = (8 * (liftHeight - joint.GetJointTranslation())); _local1 = Math.min(speed, _local1); joint.m_motorSpeed = _local1; } else { _local1 = (8 * (0 - joint.GetJointTranslation())); _local1 = Math.max(-(speed), _local1); joint.m_motorSpeed = _local1; }; } else { if (goingUp){ _local1 = (8 * (liftHeight - joint.GetJointTranslation())); _local1 = Math.min(speed, _local1); joint.m_motorSpeed = _local1; } else { _local1 = (8 * (0 - joint.GetJointTranslation())); _local1 = Math.max(-(speed), _local1); joint.m_motorSpeed = _local1; }; }; }; } public function onFlipped(_arg1:Event):void{ if (aSwitch.state){ SFX.elevatorStart.play(); if (activated){ goingUp = !(goingUp); } else { if (joint.GetJointTranslation() > halfHeight){ goingUp = false; } else { goingUp = true; }; }; activated = true; }; } override public function destroy():void{ Game.me.frontLayer.removeChild(graphic); Game.me.things.splice(Game.me.things.indexOf(this), 1); Game.me.steppingThings.splice(Game.me.steppingThings.indexOf(this), 1); Game.me.world.DestroyBody(body); } } }//package
Section 417
//ElevatorSprite (ElevatorSprite) package { import flash.display.*; public dynamic class ElevatorSprite extends MovieClip { } }//package
Section 418
//en_US$collections_properties (en_US$collections_properties) package { import mx.resources.*; public class en_US$collections_properties extends ResourceBundle { public function en_US$collections_properties(){ super("en_US", "collections"); } override protected function getContent():Object{ var _local1:Object = {findCondition:"Find criteria must contain all sort fields leading up to '{0}'.", noComparatorSortField:"Cannot determine comparator for SortField with name '{0}'.", outOfBounds:"Index '{0}' specified is out of bounds.", nonUnique:"Non-unique values in items.", incorrectAddition:"Attempt to add an item already in the view.", findRestriction:"Find criteria must contain at least one sort field value.", invalidType:"Incorrect type. Must be of type XML or a XMLList that contains one XML object. ", unknownMode:"Unknown find mode.", invalidIndex:"Invalid index: '{0}'.", invalidRemove:"Cannot remove when current is beforeFirst or afterLast.", unknownProperty:"Unknown Property: '{0}'.", invalidInsert:"Cannot insert when current is beforeFirst.", itemNotFound:"Cannot find when view is not sorted.", bookmarkInvalid:"Bookmark no longer valid.", noComparator:"Cannot determine comparator for '{0}'.", invalidCursor:"Cursor no longer valid.", noItems:"No items to search.", bookmarkNotFound:"Bookmark is not from this view."}; return (_local1); } } }//package
Section 419
//en_US$containers_properties (en_US$containers_properties) package { import mx.resources.*; public class en_US$containers_properties extends ResourceBundle { public function en_US$containers_properties(){ super("en_US", "containers"); } override protected function getContent():Object{ var _local1:Object = {noColumnsFound:"No ConstraintColumns found.", noRowsFound:"No ConstraintRows found.", rowNotFound:"ConstraintRow '{0}' not found.", columnNotFound:"ConstraintColumn '{0}' not found."}; return (_local1); } } }//package
Section 420
//en_US$controls_properties (en_US$controls_properties) package { import mx.resources.*; public class en_US$controls_properties extends ResourceBundle { public function en_US$controls_properties(){ super("en_US", "controls"); } override protected function getContent():Object{ var _local1:Object = {undefinedParameter:"CuePoint parameter undefined.", nullURL:"Null URL sent to VideoPlayer.load.", incorrectType:"Type must be 0, 1 or 2.", okLabel:"OK", noLabel:"No", wrongNumParams:"Num params must be number.", wrongDisabled:"Disabled must be number.", wrongTime:"Time must be number.", dayNamesShortest:"S,M,T,W,T,F,S", wrongType:"Type must be number.", firstDayOfWeek:"0", rootNotSMIL:"URL: '{0}' Root node not smil: '{1}'.", errorMessages:"Unable to make connection to server or to find FLV on server.,No matching cue point found.,Illegal cue point.,Invalid seek.,Invalid contentPath.,Invalid XML.,No bitrate match; must be no default FLV.,Cannot delete default VideoPlayer.", unexpectedEnd:"Unexpected end of cuePoint param string.", rootNotFound:"URL: '{0}' No root node found; if file is an flv, it must have a .flv extension.", errWrongContainer:"ERROR: The dataProvider of '{0}' must not contain objects of type flash.display.DisplayObject.", invalidCall:"Cannot call reconnect on an http connection.", cancelLabel:"Cancel", errWrongType:"ERROR: The dataProvider of '{0}' must be String, ViewStack, Array, or IList.", badArgs:"Bad args to _play.", missingRoot:"URL: '{0}' No root node found; if URL is for an FLV, it must have a .flv extension and take no parameters.", notLoadable:"Unable to load '{0}'.", wrongName:"Name cannot be undefined or null.", wrongTimeName:"Time must be number and/or name must not be undefined or null.", yesLabel:"Yes", undefinedArray:"CuePoint.array undefined.", missingProxy:"URL: '{0}' fpad xml requires proxy tag.", unknownInput:"Unknown inputType '{0}'.", missingAttributeSrc:"URL: '{0}' Attribute src is required in '{1}' tag.", yearSymbol:"", wrongIndex:"CuePoint.index must be number between -1 and cuePoint.array.length.", notImplemented:"'{0}' not implemented yet.", label:"LOADING %3%%", wrongFormat:"Unexpected cuePoint parameter format.", tagNotFound:"URL: '{0}' At least one video of ref tag is required.", unsupportedMode:"IMEMode '{0}' not supported.", cannotDisable:"Cannot disable actionscript cue points.", missingAttributes:"URL: '{0}' Tag '{1}' requires attributes id, width, and height. Width and height must be numbers greater than or equal to 0.", notfpad:"URL: '{0}' Root node not fpad."}; return (_local1); } } }//package
Section 421
//en_US$core_properties (en_US$core_properties) package { import mx.resources.*; public class en_US$core_properties extends ResourceBundle { public function en_US$core_properties(){ super("en_US", "core"); } override protected function getContent():Object{ var _local1:Object = {multipleChildSets_ClassAndInstance:"Multiple sets of visual children have been specified for this component (component definition and component instance).", truncationIndicator:"...", notExecuting:"Repeater is not executing.", versionAlreadyRead:"Compatibility version has already been read.", multipleChildSets_ClassAndSubclass:"Multiple sets of visual children have been specified for this component (base component definition and derived component definition).", viewSource:"View Source", badFile:"File does not exist.", stateUndefined:"Undefined state '{0}'.", versionAlreadySet:"Compatibility version has already been set."}; return (_local1); } } }//package
Section 422
//en_US$effects_properties (en_US$effects_properties) package { import mx.resources.*; public class en_US$effects_properties extends ResourceBundle { public function en_US$effects_properties(){ super("en_US", "effects"); } override protected function getContent():Object{ var _local1:Object = {incorrectTrigger:"The Zoom effect can not be triggered by a moveEffect trigger.", incorrectSource:"Source property must be a Class or String."}; return (_local1); } } }//package
Section 423
//en_US$formatters_properties (en_US$formatters_properties) package { import mx.resources.*; public class en_US$formatters_properties extends ResourceBundle { public function en_US$formatters_properties(){ super("en_US", "formatters"); } override protected function getContent():Object{ var _local1:Object = {zipCodeFormat:"#####", defaultInvalidFormatError:"Invalid format", pm:"PM", useThousandsSeparator:"true", useNegativeSign:"true", am:"AM", areaCode:"-1", validPatternChars:"+()#- .", phoneNumberFormat:"(###) ###-####", defaultInvalidValueError:"Invalid value", areaCodeFormat:"(###)", monthNamesShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec", numberFormatterPrecision:"-1", dayNamesShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat", rounding:"none", currencyFormatterPrecision:"-1"}; return (_local1); } } }//package
Section 424
//en_US$SharedResources_properties (en_US$SharedResources_properties) package { import mx.resources.*; public class en_US$SharedResources_properties extends ResourceBundle { public function en_US$SharedResources_properties(){ super("en_US", "SharedResources"); } override protected function getContent():Object{ var _local1:Object = {dateFormat:"MM/DD/YYYY", dayNames:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday", thousandsSeparatorFrom:",", monthNames:"January,February,March,April,May,June,July,August,September,October,November,December", decimalSeparatorFrom:".", currencySymbol:"$", decimalSeparatorTo:".", thousandsSeparatorTo:",", monthSymbol:"", alignSymbol:"left"}; return (_local1); } } }//package
Section 425
//en_US$skins_properties (en_US$skins_properties) package { import mx.resources.*; public class en_US$skins_properties extends ResourceBundle { public function en_US$skins_properties(){ super("en_US", "skins"); } override protected function getContent():Object{ var _local1:Object = {notLoaded:"Unable to load '{0}'."}; return (_local1); } } }//package
Section 426
//en_US$states_properties (en_US$states_properties) package { import mx.resources.*; public class en_US$states_properties extends ResourceBundle { public function en_US$states_properties(){ super("en_US", "states"); } override protected function getContent():Object{ var _local1:Object = {alreadyParented:"Cannot add a child that is already parented."}; return (_local1); } } }//package
Section 427
//en_US$styles_properties (en_US$styles_properties) package { import mx.resources.*; public class en_US$styles_properties extends ResourceBundle { public function en_US$styles_properties(){ super("en_US", "styles"); } override protected function getContent():Object{ var _local1:Object = {unableToLoad:"Unable to load style({0}): {1}."}; return (_local1); } } }//package
Section 428
//EntranceSprite (EntranceSprite) package { import flash.display.*; public dynamic class EntranceSprite extends MovieClip { } }//package
Section 429
//Forklift (Forklift) package { import flash.display.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Dynamics.Joints.*; import Box2D.Collision.Shapes.*; public class Forklift extends ThingAgent { public var fork:b2Body; public var beam:b2Body; private var forkHeight:Number;// = 0 public var panelShape:b2Shape; private var frameSprite:Sprite; private var wheel2Joint:b2RevoluteJoint; private var beamSprite:Sprite; private var wheel1Sprite:Sprite; private var wheel2Sprite:Sprite; public var upright:Boolean; private var beamJoint:b2PrismaticJoint; private var forkSprite:Sprite; public var frame:b2Body; private var wheel1Joint:b2RevoluteJoint; public var wheel1:b2Body; private var forkJoint:b2PrismaticJoint; public var wheel2:b2Body; private static const beamMaskBits:int = 65525; private static const forkSpeed:Number = 16; private static const forkCategoryBits:int = 16; private static const windowMaskBits:int = 65485; private static const rollSpeed:Number = 22; private static const floorCategoryBits:int = 1; private static const beamCategoryBits:int = 32; private static const windowCategoryBits:int = 8; private static const forkMaskBits:int = 65463; private static const floorMaskBits:int = 0xFFFF; private static var maxImpact:Number = 0; private static var impactThreshold:Number = 0; public function Forklift(_arg1:XML){ frameSprite = new ForkliftFrameSprite(); wheel1Sprite = new ForkliftWheelSprite(); wheel2Sprite = new ForkliftWheelSprite(); beamSprite = new ForkliftBeamSprite(); forkSprite = new ForkliftForkSprite(); super(_arg1); var _local2:b2BodyDef = new b2BodyDef(); var _local3:b2CircleDef = new b2CircleDef(); _local3.radius = 4.15; _local3.density = 0; _local3.friction = 0.4; _local3.restitution = 0; _local3.localPosition.Set(((6.85 * direction) + svgWidth), 4.15); _local3.userData = this; _local3.categoryBits = windowCategoryBits; _local3.maskBits = windowMaskBits; _local2.AddShape(_local3); var _local4:b2PolyDef = new b2PolyDef(); _local4.density = 0; _local4.friction = 0.4; _local4.restitution = 0; populatePolyDef(_local4, [2.7, 4.4, 10.8, 2.9, 13.85, 12, 0.4, 11.5]); _local4.userData = this; _local4.categoryBits = windowCategoryBits; _local4.maskBits = windowMaskBits; _local2.AddShape(_local4); var _local5:b2PolyDef = new b2PolyDef(); _local5.density = 20; _local5.friction = 1; _local5.restitution = 0; populatePolyDef(_local5, [1, 13.7, 4, 12, 12, 12, 12, 13.3]); _local5.userData = this; _local5.categoryBits = floorCategoryBits; _local5.maskBits = floorMaskBits; _local2.AddShape(_local5); var _local6:b2PolyDef = new b2PolyDef(); _local6.density = 0; _local6.friction = 0; _local6.restitution = 0; populatePolyDef(_local6, [10, 12.5, 10, 2, 13, 11]); _local6.userData = this; _local6.categoryBits = floorCategoryBits; _local6.maskBits = floorMaskBits; _local2.AddShape(_local6); var _local7:b2PolyDef = new b2PolyDef(); _local7.density = 0; _local7.friction = 1; _local7.restitution = 0; populatePolyDef(_local7, [4, 1, 10, 1, 10, 2]); _local7.userData = this; _local7.categoryBits = floorCategoryBits; _local7.maskBits = floorMaskBits; _local2.AddShape(_local7); _local2.position = svgPos; _local2.rotation = svgAngle; frame = Game.me.world.CreateBody(_local2); panelShape = frame.GetShapeList().m_next; _local2 = new b2BodyDef(); var _local8:b2CircleDef = new b2CircleDef(); _local8.density = 20; _local8.friction = 2; _local8.restitution = 0.1; _local8.radius = 2.4; _local8.userData = this; _local8.categoryBits = windowCategoryBits; _local8.maskBits = windowMaskBits; _local8.localPosition.Set(((3 * direction) + svgWidth), 12.6); _local2.AddShape(_local8); _local2.position = svgPos; _local2.rotation = svgAngle; wheel1 = Game.me.world.CreateBody(_local2); _local8.localPosition.Set(((11 * direction) + svgWidth), 12.6); _local8.localRotation = 42; wheel2 = Game.me.world.CreateBody(_local2); var _local9:b2RevoluteJointDef = new b2RevoluteJointDef(); _local9.body1 = frame; _local9.body2 = wheel1; _local9.anchorPoint = wheel1.m_position; _local9.motorSpeed = 0; _local9.motorTorque = 100000; _local9.enableMotor = true; wheel1Joint = (Game.me.world.CreateJoint(_local9) as b2RevoluteJoint); _local9.body2 = wheel2; _local9.anchorPoint = wheel2.m_position; wheel2Joint = (Game.me.world.CreateJoint(_local9) as b2RevoluteJoint); _local2 = new b2BodyDef(); var _local10:b2BoxDef = new b2BoxDef(); _local10.density = 0.1; _local10.friction = 0; _local10.restitution = 0; _local10.extents.Set(0.825, 7); _local10.categoryBits = beamCategoryBits; _local10.maskBits = beamMaskBits; _local10.userData = this; _local10.localPosition.Set(((13.2 * direction) + svgWidth), 7); _local2.AddShape(_local10); _local2.position = svgPos; _local2.rotation = svgAngle; beam = Game.me.world.CreateBody(_local2); _local2 = new b2BodyDef(); var _local11:b2BoxDef = new b2BoxDef(); _local11.density = 10; _local11.friction = 1; _local11.restitution = 0; _local11.extents.Set(4.875, 0.2); _local11.categoryBits = forkCategoryBits; _local11.maskBits = forkMaskBits; _local11.userData = this; _local11.localPosition.Set(((19 * direction) + svgWidth), 14); _local2.AddShape(_local11); _local2.position = svgPos; _local2.rotation = svgAngle; fork = Game.me.world.CreateBody(_local2); var _local12:b2PrismaticJointDef = new b2PrismaticJointDef(); _local12.body1 = frame; _local12.body2 = beam; _local12.anchorPoint = beam.m_position; _local12.axis.Set(Math.sin(svgAngle), -(Math.cos(svgAngle))); _local12.enableLimit = true; _local12.enableMotor = true; _local12.motorForce = Number.POSITIVE_INFINITY; _local12.lowerTranslation = -0.5; _local12.upperTranslation = 14.5; beamJoint = (Game.me.world.CreateJoint(_local12) as b2PrismaticJoint); _local12.body2 = fork; _local12.lowerTranslation = -1; _local12.upperTranslation = 29; _local12.anchorPoint = fork.m_position; forkJoint = (Game.me.world.CreateJoint(_local12) as b2PrismaticJoint); frameSprite.scaleX = (0.05 * direction); frameSprite.scaleY = 0.05; wheel1Sprite.scaleX = (0.05 * direction); wheel1Sprite.scaleY = 0.05; wheel2Sprite.scaleX = (0.05 * direction); wheel2Sprite.scaleY = 0.05; beamSprite.scaleX = (0.05 * direction); beamSprite.scaleY = 0.05; forkSprite.scaleX = (0.05 * direction); forkSprite.scaleY = 0.05; Game.me.forkliftLayer.addChild(beamSprite); Game.me.forkliftLayer.addChild(frameSprite); Game.me.forkliftLayer.addChild(wheel1Sprite); Game.me.forkliftLayer.addChild(wheel2Sprite); Game.me.forkliftLayer.addChild(forkSprite); repaint(); Game.me.things.push(this); Game.me.steppingThings.push(this); } override public function destroy():void{ Game.me.forkliftLayer.removeChild(frameSprite); Game.me.forkliftLayer.removeChild(wheel1Sprite); Game.me.forkliftLayer.removeChild(wheel2Sprite); Game.me.forkliftLayer.removeChild(beamSprite); Game.me.forkliftLayer.removeChild(forkSprite); Game.me.world.DestroyBody(frame); Game.me.world.DestroyBody(wheel1); Game.me.world.DestroyBody(wheel2); Game.me.world.DestroyBody(beam); Game.me.world.DestroyBody(fork); Game.me.things.splice(Game.me.things.indexOf(this), 1); Game.me.steppingThings.splice(Game.me.steppingThings.indexOf(this), 1); disableAgent(); } override public function repaint():void{ frameSprite.x = frame.m_position.x; frameSprite.y = frame.m_position.y; frameSprite.rotation = ((frame.m_rotation * 180) / Math.PI); wheel1Sprite.x = wheel1.m_position.x; wheel1Sprite.y = wheel1.m_position.y; wheel1Sprite.rotation = ((wheel1.m_rotation * 180) / Math.PI); wheel2Sprite.x = wheel2.m_position.x; wheel2Sprite.y = wheel2.m_position.y; wheel2Sprite.rotation = ((wheel2.m_rotation * 180) / Math.PI); forkSprite.x = fork.m_position.x; forkSprite.y = fork.m_position.y; forkSprite.rotation = ((fork.m_rotation * 180) / Math.PI); beamSprite.x = beam.m_position.x; beamSprite.y = beam.m_position.y; beamSprite.rotation = ((beam.m_rotation * 180) / Math.PI); maxImpact = 0; } override public function getCollisionSound(_arg1:b2Vec2, _arg2:Number, _arg3:b2Shape, _arg4:b2Shape, _arg5:Thing):CollisionSound{ if (((!(upright)) && ((_arg5 is Player)))){ if (Math.sin(frame.m_rotation) > 0){ frame.m_angularVelocity = -7; } else { frame.m_angularVelocity = 7; }; frame.m_linearVelocity.y = -2; }; if ((((_arg2 > impactThreshold)) && ((_arg2 > 7000)))){ impactThreshold = (_arg2 * 2); maxImpact = _arg2; return (new CollisionSound(SFX.forklift, ((_arg2 - 6800) / 50000))); }; maxImpact = Math.max(_arg2, maxImpact); return (null); } override public function step():void{ var _local1:Number; upright = (Math.cos(frame.m_rotation) > 0.7); if (left){ wheel1Joint.m_motorSpeed = -(rollSpeed); wheel2Joint.m_motorSpeed = -(rollSpeed); } else { if (right){ wheel1Joint.m_motorSpeed = rollSpeed; wheel2Joint.m_motorSpeed = rollSpeed; } else { wheel1Joint.m_motorSpeed = 0; wheel2Joint.m_motorSpeed = 0; }; }; if (down){ _local1 = (-3 * beamJoint.GetJointTranslation()); _local1 = Math.max((-(forkSpeed) / 2), _local1); beamJoint.m_motorSpeed = _local1; _local1 = (-6 * forkJoint.GetJointTranslation()); _local1 = Math.max(-(forkSpeed), _local1); forkJoint.m_motorSpeed = _local1; } else { if (up){ _local1 = (3 * (14 - beamJoint.GetJointTranslation())); _local1 = Math.min((forkSpeed / 2), _local1); beamJoint.m_motorSpeed = _local1; _local1 = (6 * (28 - forkJoint.GetJointTranslation())); _local1 = Math.min(forkSpeed, _local1); forkJoint.m_motorSpeed = _local1; } else { if (((up3) || (down3))){ forkHeight = forkJoint.GetJointTranslation(); _local1 = 0; beamJoint.m_motorSpeed = 0; forkJoint.m_motorSpeed = 0; } else { _local1 = ((forkHeight / 2) - beamJoint.GetJointTranslation()); (_local1 * 4); beamJoint.m_motorSpeed = _local1; _local1 = (forkHeight - forkJoint.GetJointTranslation()); (_local1 * 4); forkJoint.m_motorSpeed = _local1; }; }; }; up3 = false; down3 = false; impactThreshold = Math.min(impactThreshold, (maxImpact * 10)); } } }//package
Section 430
//ForkliftBeamSprite (ForkliftBeamSprite) package { import flash.display.*; public dynamic class ForkliftBeamSprite extends MovieClip { } }//package
Section 431
//ForkliftForkSprite (ForkliftForkSprite) package { import flash.display.*; public dynamic class ForkliftForkSprite extends MovieClip { } }//package
Section 432
//ForkliftFrameSprite (ForkliftFrameSprite) package { import flash.display.*; public dynamic class ForkliftFrameSprite extends MovieClip { } }//package
Section 433
//ForkliftWheelSprite (ForkliftWheelSprite) package { import flash.display.*; public dynamic class ForkliftWheelSprite extends MovieClip { } }//package
Section 434
//Game (Game) package { import flash.display.*; import flash.geom.*; import flash.media.*; import flash.text.*; import mx.core.*; import mx.managers.*; import flash.events.*; import mx.events.*; import mx.styles.*; import mx.controls.*; import mx.states.*; import mx.effects.*; import mx.binding.*; import flash.filters.*; import mx.containers.*; import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Dynamics.Contacts.*; import Box2D.Collision.Shapes.*; import flash.system.*; import com.kongregate.as3.client.*; import flash.utils.*; import flash.ui.*; import flash.net.*; import flash.external.*; import flash.accessibility.*; import flash.debugger.*; import flash.errors.*; import flash.printing.*; import flash.profiler.*; import flash.xml.*; public class Game extends Application implements IBindingClient { private var _1656203495levelVBox:VBox; public var agents:Array; public var kidLayer:Sprite; private var _745405433helpCanvas:Canvas; private var _550778330canvas2:Canvas; private var _1481316973menuButtonAlpha:Number;// = 0 private var _763223204rankCanvas:Spacer; mx_internal var _bindingsByDestination:Object; public var forkliftLayer:Sprite; public var cameraZoom:Sprite; private var _1698099045volumeSlider:VSlider; public var _Game_Sequence1:Sequence; public var _Game_Label10:Label; public var _Game_Label11:Label; public var _Game_AddChild1:AddChild; public var _Game_Label14:Label; public var _Game_AddChild3:AddChild; public var _Game_AddChild4:AddChild; public var _Game_AddChild5:AddChild; public var _Game_AddChild6:AddChild; public var _Game_AddChild7:AddChild; public var frontLayer:Sprite; public var _Game_AddChild2:AddChild; private var _1286799843helpText1:Label; public var goalReached:Boolean; public var uiComponent:UIComponent; private var _561085228levelRepeater:Repeater; public var cameraContainer:Sprite; private var _embed_mxml_title_png_1258686824:Class; public var player:Player; public var switches:Array; public var _Game_Label2:Label; public var _Game_Label3:Label; public var _Game_Label4:Label; public var _Game_Label5:Label; private var _110364485timer:Number; public var helpOn:Boolean;// = true private var _550778329canvas1:Canvas; private var _1367751899camera:Sprite; public var goal:Goal; public var steppingThings:Array; public var _Game_Canvas10:Canvas; public var _Game_Canvas11:Canvas; private var _1060421287myGlow:GlowFilter; public var wallLayerMask:Shape; public var things:Array; private var _897502174unpauseHelp:Label; public var wallLines:Shape; private var _951510359console:Label; public var solidLayer:Sprite; public var _Game_SetProperty1:SetProperty; public var _Game_SetProperty2:SetProperty; private var _1286799842helpText0:Label; public var currentLevel:Level; private var _256053113rankText:Label; mx_internal var _watchers:Array; public var world:b2World; public var wallLayer:Sprite; public var panelLayer:Sprite; private var _288757124retryButtonAlpha:Number;// = 0 private var _271042448_Game_VBox3:VBox; private var _1286799844helpText2:Label; public var _Game_LevelButton1:Array; mx_internal var _bindingsBeginWithWord:Object; public var wallTiles:Shape; private var _1645408545mochiContainer:UIComponent; private var _documentDescriptor_:UIComponentDescriptor; mx_internal var _bindings:Array; public static const tileSize:Number = 40; public static const secondsPerStep:Number = (Number(ticksPerStep) * 0.001); public static const ticksPerPaint:int = 30; public static const vRez:Number = 240; public static const pxPerUnit:Number = 3; public static const hRez:Number = 320; public static const stepIterations:int = 5; public static const ticksPerStep:int = 30; public static const maxStepTicksPerFrame:int = 120; public static var stepTicks:int; public static var prevTime:int; mx_internal static var _Game_StylesInit_done:Boolean = false; public static var me:Game; private static var problemDelta:Number = 47; public static var curTime:int; public static var paintTicks:int; private static var _watcherSetupUtil:IWatcherSetupUtil; public function Game(){ _documentDescriptor_ = new UIComponentDescriptor({type:Application, propertiesFactory:function ():Object{ return ({childDescriptors:[new UIComponentDescriptor({type:UIComponent, id:"mochiContainer"}), new UIComponentDescriptor({type:Canvas, id:"canvas1", propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100}); }}), new UIComponentDescriptor({type:Label, id:"console", stylesFactory:function ():void{ this.color = 0xFFFFFF; }, propertiesFactory:function ():Object{ return ({text:"", percentWidth:100, percentHeight:100, truncateToFit:false}); }}), new UIComponentDescriptor({type:Canvas, id:"canvas2", stylesFactory:function ():void{ this.horizontalCenter = "0"; this.verticalCenter = "0"; }})]}); }}); wallLayerMask = new Shape(); wallTiles = new Shape(); wallLines = new Shape(); _embed_mxml_title_png_1258686824 = Game__embed_mxml_title_png_1258686824; _bindings = []; _watchers = []; _bindingsByDestination = {}; _bindingsBeginWithWord = {}; super(); mx_internal::_document = this; if (!this.styleDeclaration){ this.styleDeclaration = new CSSStyleDeclaration(); }; this.styleDeclaration.defaultFactory = function ():void{ this.backgroundColor = 26005; this.backgroundGradientAlphas = [0, 0]; }; mx_internal::_Game_StylesInit(); this.layout = "absolute"; this.currentState = "title2"; this.states = [_Game_State1_c(), _Game_State2_c(), _Game_State3_c(), _Game_State4_c(), _Game_State5_c()]; this.transitions = [_Game_Transition1_c()]; _Game_GlowFilter1_i(); this.addEventListener("resize", ___Game_Application1_resize); this.addEventListener("applicationComplete", ___Game_Application1_applicationComplete); } public function set helpCanvas(_arg1:Canvas):void{ var _local2:Object = this._745405433helpCanvas; if (_local2 !== _arg1){ this._745405433helpCanvas = _arg1; this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "helpCanvas", _local2, _arg1)); }; } private function _Game_HBox6_c():HBox{ var _local1:HBox = new HBox(); _local1.setStyle("verticalAlign", "middle"); if (!_local1.document){ _local1.document = this; }; _local1.addChild(_Game_Label15_c()); _local1.addChild(_Game_VBox6_c()); return (_local1); } private function repaint():void{ camera.x = -(player.getCameraX()); camera.y = -(player.getCameraY()); var _local1:Number = (tileSize * Math.round((player.getCameraX() / tileSize))); var _local2:Number = (tileSize * Math.round((player.getCameraY() / tileSize))); if (((!((wallTiles.x == _local1))) || (!((wallTiles.y == _local2))))){ wallTiles.x = _local1; wallTiles.y = _local2; }; var _local3:Number = (goal.body.m_position.x - player.getCameraX()); _local3 = (_local3 * 0.1); GFX.planetBitmapAsset.x = ((-160 / pxPerUnit) + _local3); var _local4:Number = (goal.body.m_position.y - player.getCameraY()); _local4 = (_local4 * 0.1); GFX.planetBitmapAsset.y = ((-120 / pxPerUnit) + _local4); } public function get helpCanvas():Canvas{ return (this._745405433helpCanvas); } private function _Game_Sequence1_i():Sequence{ var _local1:Sequence = new Sequence(); _Game_Sequence1 = _local1; _local1.children = [_Game_AnimateProperty1_c(), _Game_RemoveChildAction1_c(), _Game_AddChildAction1_c()]; BindingManager.executeBindings(this, "_Game_Sequence1", _Game_Sequence1); return (_local1); } private function _Game_AddChild3_i():AddChild{ var _local1:AddChild = new AddChild(); _Game_AddChild3 = _local1; _local1.targetFactory = new DeferredInstanceFromFunction(_Game_Canvas5_i); BindingManager.executeBindings(this, "_Game_AddChild3", _Game_AddChild3); return (_local1); } private function _Game_VBox4_c():VBox{ var _local1:VBox = new VBox(); _local1.setStyle("right", "0"); _local1.setStyle("bottom", "0"); _local1.setStyle("verticalGap", 1); _local1.setStyle("horizontalAlign", "right"); if (!_local1.document){ _local1.document = this; }; _local1.addChild(_Game_VSlider1_i()); _local1.addChild(_Game_Label6_c()); return (_local1); } public function get unpauseHelp():Label{ return (this._897502174unpauseHelp); } private function _Game_Label9_i():Label{ var _local1:Label = new Label(); helpText2 = _local1; _local1.truncateToFit = false; _local1.setStyle("horizontalCenter", "0"); _local1.setStyle("bottom", "0"); _local1.setStyle("color", 0xFFFFFF); _local1.setStyle("fontSize", 10); _local1.id = "helpText2"; if (!_local1.document){ _local1.document = this; }; return (_local1); } private function onJohnClick():void{ gotoURL("http://johnnesky.com"); stage.focus = stage; } private function _Game_Canvas7_c():Canvas{ var _local1:Canvas = new Canvas(); _local1.percentWidth = 100; _local1.percentHeight = 100; _local1.setStyle("backgroundColor", 0); _local1.setStyle("backgroundAlpha", 0.4); if (!_local1.document){ _local1.document = this; }; return (_local1); } private function onMochiClick():void{ gotoURL("http://www.mochibot.com"); stage.focus = stage; } private function _Game_bindingExprs():void{ var _local1:*; _local1 = hRez; _local1 = vRez; _local1 = canvas2; _local1 = [myGlow]; _local1 = [myGlow]; _local1 = [myGlow]; _local1 = [myGlow]; _local1 = canvas2; _local1 = Level.levels; _local1 = levelRepeater.currentItem; _local1 = canvas1; _local1 = canvas2; _local1 = timer.toFixed(2); _local1 = camera; _local1 = canvas1; _local1 = canvas2; _local1 = timer.toFixed(2); _local1 = camera; _local1 = canvas2; _local1 = ("Clear Time: " + timer.toFixed(2)); _local1 = menuButtonAlpha; _local1 = retryButtonAlpha; _local1 = [camera]; } private function _Game_Label15_c():Label{ var _local1:Label = new Label(); _local1.text = "Rank:"; _local1.truncateToFit = false; _local1.setStyle("color", 0xFFFFFF); _local1.setStyle("verticalCenter", "0"); if (!_local1.document){ _local1.document = this; }; return (_local1); } public function set levelVBox(_arg1:VBox):void{ var _local2:Object = this._1656203495levelVBox; if (_local2 !== _arg1){ this._1656203495levelVBox = _arg1; this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "levelVBox", _local2, _arg1)); }; } private function _Game_Button6_c():Button{ var _local1:Button = new Button(); _local1.label = "Menu"; _local1.setStyle("fillAlphas", [0.6, 0.6]); _local1.setStyle("fillColors", [0xFFFFFF, 0xFFFFFF]); _local1.setStyle("borderColor", 0); _local1.addEventListener("click", ___Game_Button6_click); _local1.addEventListener("focusIn", ___Game_Button6_focusIn); _local1.addEventListener("focusOut", ___Game_Button6_focusOut); if (!_local1.document){ _local1.document = this; }; return (_local1); } private function _Game_Spacer1_i():Spacer{ var _local1:Spacer = new Spacer(); rankCanvas = _local1; _local1.width = 50; _local1.height = 50; _local1.id = "rankCanvas"; if (!_local1.document){ _local1.document = this; }; return (_local1); } public function ___Game_Button3_click(_arg1:MouseEvent):void{ onKevinClick(); } private function _Game_Image1_c():Image{ var _local1:Image = new Image(); _local1.scaleX = 0.5; _local1.scaleY = 0.5; _local1.source = _embed_mxml_title_png_1258686824; if (!_local1.document){ _local1.document = this; }; return (_local1); } private function _Game_HBox5_c():HBox{ var _local1:HBox = new HBox(); _local1.setStyle("horizontalGap", 0); if (!_local1.document){ _local1.document = this; }; _local1.addChild(_Game_Label5_i()); _local1.addChild(_Game_Button5_c()); return (_local1); } private function _Game_AddChild2_i():AddChild{ var _local1:AddChild = new AddChild(); _Game_AddChild2 = _local1; _local1.targetFactory = new DeferredInstanceFromFunction(_Game_Canvas4_c); BindingManager.executeBindings(this, "_Game_AddChild2", _Game_AddChild2); return (_local1); } private function _Game_Canvas6_c():Canvas{ var _local1:Canvas = new Canvas(); _local1.percentWidth = 100; _local1.percentHeight = 100; if (!_local1.document){ _local1.document = this; }; _local1.addChild(_Game_Label10_i()); return (_local1); } public function set levelRepeater(_arg1:Repeater):void{ var _local2:Object = this._561085228levelRepeater; if (_local2 !== _arg1){ this._561085228levelRepeater = _arg1; this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "levelRepeater", _local2, _arg1)); }; } public function set camera(_arg1:Sprite):void{ var _local2:Object = this._1367751899camera; if (_local2 !== _arg1){ this._1367751899camera = _arg1; this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "camera", _local2, _arg1)); }; } private function _Game_Label8_i():Label{ var _local1:Label = new Label(); helpText1 = _local1; _local1.truncateToFit = false; _local1.setStyle("horizontalCenter", "0"); _local1.setStyle("verticalCenter", "0"); _local1.setStyle("color", 0xFFFFFF); _local1.setStyle("fontSize", 10); _local1.id = "helpText1"; if (!_local1.document){ _local1.document = this; }; return (_local1); } private function _Game_State5_c():State{ var _local1:State = new State(); _local1.name = "endGame"; _local1.overrides = [_Game_AddChild7_i()]; return (_local1); } private function onMenuFocusIn():void{ menuButtonAlpha = 1; } private function _Game_VBox3_i():VBox{ var _local1:VBox = new VBox(); levelVBox = _local1; _local1.setStyle("horizontalAlign", "center"); _local1.setStyle("horizontalCenter", "0"); _local1.setStyle("top", "7"); _local1.setStyle("verticalGap", 4); _local1.id = "levelVBox"; if (!_local1.document){ _local1.document = this; }; (_local1.mx_internal::childRepeaters) ? _local1.mx_internal::childRepeaters : _local1.mx_internal::childRepeaters = [].push(_Game_Repeater1_i()); return (_local1); } private function _Game_Label14_i():Label{ var _local1:Label = new Label(); _Game_Label14 = _local1; _local1.truncateToFit = false; _local1.setStyle("horizontalCenter", "0"); _local1.setStyle("verticalCenter", "0"); _local1.setStyle("color", 0xFFFFFF); _local1.id = "_Game_Label14"; BindingManager.executeBindings(this, "_Game_Label14", _Game_Label14); if (!_local1.document){ _local1.document = this; }; return (_local1); } private function doCollisions():void{ var _local2:b2Manifold; var _local3:Thing; var _local4:Thing; var _local5:Number; var _local6:int; var _local7:b2Vec2; var _local8:CollisionSound; var _local9:CollisionSound; var _local10:b2ContactPoint; var _local1:b2Contact = world.m_contactList; while (_local1 != null) { if (_local1.m_manifoldCount > 0){ _local2 = (_local1.GetManifolds()[0] as b2Manifold); if (_local2.pointCount > 0){ _local3 = (_local1.m_shape1.m_userData as Thing); _local4 = (_local1.m_shape2.m_userData as Thing); _local5 = 0; _local6 = 0; while (_local6 < _local2.pointCount) { _local10 = _local2.points[_local6]; _local5 = (_local5 + _local10.normalImpulse); _local6++; }; _local7 = _local2.normal.Copy(); _local8 = null; if (_local3 != null){ _local8 = _local3.getCollisionSound(_local7, _local5, _local1.m_shape1, _local1.m_shape2, _local4); }; _local7.Multiply(-1); _local9 = null; if (_local4 != null){ _local9 = _local4.getCollisionSound(_local7, _local5, _local1.m_shape2, _local1.m_shape1, _local3); }; if (((!((_local8 == null))) && (!((_local9 == null))))){ if (_local8.volume > _local9.volume){ _local8.play(); } else { if (_local9.volume > _local8.volume){ _local9.play(); } else { _local8.play(); _local9.play(); }; }; } else { if (_local8 != null){ _local8.play(); } else { if (_local9 != null){ _local9.play(); }; }; }; }; }; _local1 = _local1.m_next; }; } private function _Game_AnimateProperty1_c():AnimateProperty{ var _local1:AnimateProperty = new AnimateProperty(); _local1.property = "alpha"; _local1.fromValue = 1; _local1.toValue = 0; _local1.duration = 2000; return (_local1); } public function getLevelByNumber(_arg1:Number):Level{ return ((Level.levels[_arg1] as Level)); } public function get _Game_VBox3():VBox{ return (this._271042448_Game_VBox3); } private function get menuButtonAlpha():Number{ return (this._1481316973menuButtonAlpha); } private function _Game_RemoveChildAction1_c():RemoveChildAction{ var _local1:RemoveChildAction = new RemoveChildAction(); return (_local1); } private function _Game_Button5_c():Button{ var _local1:Button = new Button(); _local1.label = "MochiBot"; _local1.width = 115; _local1.setStyle("fillAlphas", [0.6, 0.6]); _local1.setStyle("fillColors", [0xFFFFFF, 0xFFFFFF]); _local1.setStyle("borderColor", 0); _local1.addEventListener("click", ___Game_Button5_click); if (!_local1.document){ _local1.document = this; }; return (_local1); } private function onRetryFocusOut():void{ retryButtonAlpha = 0; } private function _Game_HBox4_c():HBox{ var _local1:HBox = new HBox(); _local1.setStyle("horizontalGap", 0); if (!_local1.document){ _local1.document = this; }; _local1.addChild(_Game_Label4_i()); _local1.addChild(_Game_Button4_c()); return (_local1); } public function set timer(_arg1:Number):void{ var _local2:Object = this._110364485timer; if (_local2 !== _arg1){ this._110364485timer = _arg1; this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "timer", _local2, _arg1)); }; } private function _Game_AddChild1_i():AddChild{ var _local1:AddChild = new AddChild(); _Game_AddChild1 = _local1; _local1.targetFactory = new DeferredInstanceFromFunction(_Game_Canvas3_c); BindingManager.executeBindings(this, "_Game_AddChild1", _Game_AddChild1); return (_local1); } private function _Game_VBox2_c():VBox{ var _local1:VBox = new VBox(); _local1.setStyle("verticalGap", 1); _local1.setStyle("horizontalAlign", "right"); if (!_local1.document){ _local1.document = this; }; _local1.addChild(_Game_HBox2_c()); _local1.addChild(_Game_HBox3_c()); _local1.addChild(_Game_HBox4_c()); _local1.addChild(_Game_HBox5_c()); return (_local1); } private function _Game_State4_c():State{ var _local1:State = new State(); _local1.name = "pause"; _local1.overrides = [_Game_AddChild5_i(), _Game_AddChild6_i(), _Game_SetProperty2_i()]; return (_local1); } private function _Game_Canvas5_i():Canvas{ var _local1:Canvas = new Canvas(); helpCanvas = _local1; _local1.height = 51; _local1.width = 320; _local1.setStyle("bottom", "5"); _local1.setStyle("horizontalCenter", "0"); _local1.setStyle("backgroundColor", 0); _local1.setStyle("backgroundAlpha", 0.5); _local1.id = "helpCanvas"; if (!_local1.document){ _local1.document = this; }; _local1.addChild(_Game_Label7_i()); _local1.addChild(_Game_Label8_i()); _local1.addChild(_Game_Label9_i()); return (_local1); } private function _Game_Label7_i():Label{ var _local1:Label = new Label(); helpText0 = _local1; _local1.truncateToFit = false; _local1.setStyle("horizontalCenter", "0"); _local1.setStyle("top", "0"); _local1.setStyle("color", 0xFFFFFF); _local1.setStyle("fontSize", 10); _local1.id = "helpText0"; if (!_local1.document){ _local1.document = this; }; return (_local1); } private function setUpEndGameScreen():void{ var _local2:Object; currentState = "endGame"; while (rankCanvas.numChildren > 0) { rankCanvas.removeChildAt(0); }; var _local1:Sprite = currentLevel.getRankSpriteForTime(timer); _local1.x = 25; _local1.y = 25; _local1.scaleX = 0.15; _local1.scaleY = 0.15; rankCanvas.addChild(_local1); rankText.text = currentLevel.getRankTextForTime(timer); if (currentLevel.bestTime > timer){ currentLevel.bestTime = timer; currentLevel.cleared = true; _local2 = KongregateAPI.getInstance().stats; _local2.submitArray([{name:(("Level" + (currentLevel.num + 1)) + "Time"), value:Math.round((timer * 100))}, {name:(("Level" + (currentLevel.num + 1)) + "Rank"), value:currentLevel.getRankNumberForTime(timer)}, {name:"TotalTime", value:Level.getTotalTime()}, {name:"GoldMedalsEarned", value:Level.getNumberOfGolds()}, {name:"ElectricGuitarsEarned", value:Level.getNumberOfGuitars()}, {name:"InternetsEarned", value:Level.getNumberOfInternets()}, {name:"UnicornPowersEarned", value:Level.getNumberOfUnicornPowers()}]); }; } public function ___Game_Button7_focusOut(_arg1:FocusEvent):void{ onRetryFocusOut(); } private function drawTiles():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Matrix; if (currentLevel != null){ _local1 = (width / hRez); _local2 = (height / vRez); _local1 = Math.min(_local1, _local2); _local3 = ((width / _local1) / pxPerUnit); _local4 = ((height / _local1) / pxPerUnit); _local3 = (((tileSize * 2) * Math.ceil((_local3 / (tileSize * 2)))) + (tileSize * 2)); _local4 = (((tileSize * 2) * Math.ceil((_local4 / (tileSize * 2)))) + (tileSize * 2)); _local5 = new Matrix(); _local5.scale((0.005 * tileSize), (0.005 * tileSize)); wallTiles.graphics.clear(); wallTiles.graphics.beginBitmapFill((GFX.tiles[currentLevel.num] as BitmapData), _local5); wallTiles.graphics.drawRect((-(_local3) / 2), (-(_local4) / 2), _local3, _local4); wallTiles.graphics.endFill(); }; } private function loop(_arg1:Object):void{ var _local2:int; if (currentState != "game"){ return; }; curTime = getTimer(); var _local3:int = (curTime - prevTime); prevTime = curTime; stepTicks = (stepTicks + _local3); stepTicks = Math.min(maxStepTicksPerFrame, stepTicks); paintTicks = (paintTicks + _local3); while (stepTicks >= ticksPerStep) { world.Step(secondsPerStep, stepIterations); timer = (timer + secondsPerStep); doCollisions(); if (goalReached){ setUpEndGameScreen(); return; }; _local2 = 0; while (_local2 < steppingThings.length) { (steppingThings[_local2] as SteppingThing).step(); _local2++; }; stepTicks = (stepTicks - ticksPerStep); }; _local2 = 0; while (_local2 < steppingThings.length) { (steppingThings[_local2] as SteppingThing).repaint(); _local2++; }; repaint(); } public function set myGlow(_arg1:GlowFilter):void{ var _local2:Object = this._1060421287myGlow; if (_local2 !== _arg1){ this._1060421287myGlow = _arg1; this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "myGlow", _local2, _arg1)); }; } public function get rankCanvas():Spacer{ return (this._763223204rankCanvas); } public function set console(_arg1:Label):void{ var _local2:Object = this._951510359console; if (_local2 !== _arg1){ this._951510359console = _arg1; this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "console", _local2, _arg1)); }; } private function _Game_Button4_c():Button{ var _local1:Button = new Button(); _local1.label = "Box2D"; _local1.width = 115; _local1.setStyle("fillAlphas", [0.6, 0.6]); _local1.setStyle("fillColors", [0xFFFFFF, 0xFFFFFF]); _local1.setStyle("borderColor", 0); _local1.addEventListener("click", ___Game_Button4_click); if (!_local1.document){ _local1.document = this; }; return (_local1); } private function onKeyUp(_arg1:KeyboardEvent):void{ var _local2:ThingAgent; if (currentState == "game"){ for each (_local2 in agents) { switch (_arg1.keyCode){ case 87: case Keyboard.UP: _local2.onUpReleased(); break; case 83: case Keyboard.DOWN: _local2.onDownReleased(); break; case 65: case Keyboard.LEFT: _local2.onLeftReleased(); break; case 68: case Keyboard.RIGHT: _local2.onRightReleased(); break; case Keyboard.SPACE: _local2.onJumpReleased(); break; }; }; }; } public function get volumeSlider():VSlider{ return (this._1698099045volumeSlider); } public function ___Game_Button5_click(_arg1:MouseEvent):void{ onMochiClick(); } private function onKeyDown(_arg1:KeyboardEvent):void{ var _local2:ThingAgent; var _local3:IFocusManager; var _local4:Button; if (currentState == "game"){ for each (_local2 in agents) { switch (_arg1.keyCode){ case 87: case Keyboard.UP: _local2.onUpPressed(); break; case 83: case Keyboard.DOWN: _local2.onDownPressed(); break; case 65: case Keyboard.LEFT: _local2.onLeftPressed(); break; case 68: case Keyboard.RIGHT: _local2.onRightPressed(); break; case Keyboard.SPACE: _local2.onJumpPressed(); break; }; }; }; if ((((currentState == "game")) || ((currentState == "pause")))){ switch (_arg1.keyCode){ case 72: helpOn = !(helpOn); writeHelpText(); break; case 80: if (currentState == "game"){ pause(); unpauseHelp.text = "press P to unpause"; } else { unpause(); }; break; case 82: endLevel(); startCurrentLevel(); break; case Keyboard.ESCAPE: endLevel(); goToTitleScreen(); break; }; } else { if (currentState == "endGame"){ _local3 = focusManager; switch (_arg1.keyCode){ case 87: case 65: case Keyboard.UP: case Keyboard.LEFT: _local3.setFocus(_local3.getNextFocusManagerComponent(true)); break; case 83: case 68: case Keyboard.DOWN: case Keyboard.RIGHT: _local3.setFocus(_local3.getNextFocusManagerComponent(false)); break; case 82: endLevel(); startCurrentLevel(); stage.focus = stage; break; case Keyboard.ESCAPE: endLevel(); goToTitleScreen(); stage.focus = stage; break; case Keyboard.ENTER: _local4 = (stage.focus as Button); if (_local4 != null){ _local4.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); }; break; }; } else { if (currentState == "title"){ _local3 = focusManager; switch (_arg1.keyCode){ case 87: case 65: case Keyboard.UP: case Keyboard.LEFT: _local3.setFocus(_local3.getNextFocusManagerComponent(true)); break; case 83: case 68: case Keyboard.DOWN: case Keyboard.RIGHT: _local3.setFocus(_local3.getNextFocusManagerComponent(false)); break; case Keyboard.ESCAPE: currentState = "title2"; stage.focus = stage; break; case Keyboard.ENTER: _local4 = (stage.focus as Button); if (_local4 != null){ _local4.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); }; break; }; }; }; }; } public function print(_arg1:String):void{ console.text = ((console.text.slice((console.text.indexOf("\r") + 1)) + _arg1) + "\r"); } private function onKevinClick():void{ gotoURL("http://incompetech.com"); stage.focus = stage; } private function _Game_Label12_c():Label{ var _local1:Label = new Label(); _local1.text = "PAUSED"; _local1.truncateToFit = false; _local1.setStyle("horizontalCenter", "0"); _local1.setStyle("verticalCenter", "0"); _local1.setStyle("color", 0xFFFFFF); _local1.setStyle("fontSize", 30); if (!_local1.document){ _local1.document = this; }; return (_local1); } private function _Game_HBox3_c():HBox{ var _local1:HBox = new HBox(); _local1.setStyle("horizontalGap", 0); if (!_local1.document){ _local1.document = this; }; _local1.addChild(_Game_Label3_i()); _local1.addChild(_Game_Button3_c()); return (_local1); } private function _Game_Label6_c():Label{ var _local1:Label = new Label(); _local1.text = "volume"; _local1.setStyle("color", 0xFFFFFF); _local1.setStyle("fontSize", 9); if (!_local1.document){ _local1.document = this; }; return (_local1); } private function _Game_Label13_i():Label{ var _local1:Label = new Label(); unpauseHelp = _local1; _local1.truncateToFit = false; _local1.setStyle("horizontalCenter", "0"); _local1.setStyle("verticalCenter", "30"); _local1.setStyle("color", 0xFFFFFF); _local1.setStyle("fontSize", 10); _local1.id = "unpauseHelp"; if (!_local1.document){ _local1.document = this; }; return (_local1); } private function _Game_VBox1_c():VBox{ var _local1:VBox = new VBox(); _local1.setStyle("horizontalCenter", "0"); _local1.setStyle("horizontalAlign", "center"); _local1.setStyle("top", "2"); _local1.setStyle("verticalGap", 0); if (!_local1.document){ _local1.document = this; }; _local1.addChild(_Game_Image1_c()); _local1.addChild(_Game_HBox1_c()); return (_local1); } private function set menuButtonAlpha(_arg1:Number):void{ var _local2:Object = this._1481316973menuButtonAlpha; if (_local2 !== _arg1){ this._1481316973menuButtonAlpha = _arg1; this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "menuButtonAlpha", _local2, _arg1)); }; } private function _Game_State3_c():State{ var _local1:State = new State(); _local1.name = "game"; _local1.overrides = [_Game_AddChild3_i(), _Game_AddChild4_i(), _Game_SetProperty1_i()]; return (_local1); } public function get mochiContainer():UIComponent{ return (this._1645408545mochiContainer); } public function set _Game_VBox3(_arg1:VBox):void{ var _local2:Object = this._271042448_Game_VBox3; if (_local2 !== _arg1){ this._271042448_Game_VBox3 = _arg1; this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "_Game_VBox3", _local2, _arg1)); }; } public function ___Game_Button6_focusIn(_arg1:FocusEvent):void{ onMenuFocusIn(); } private function _Game_Repeater1_i():Repeater{ var _local1:Repeater = new Repeater(); levelRepeater = _local1; _local1.id = "levelRepeater"; BindingManager.executeBindings(this, "levelRepeater", levelRepeater); if (!_local1.document){ _local1.document = this; }; var _local2:Array = (_local1.childDescriptors = [new UIComponentDescriptor({type:LevelButton, id:"_Game_LevelButton1"})]); var _local3:int; while (_local3 < _local2.length) { _local2[_local3].document = this; _local3++; }; _local1.initializeRepeater(levelVBox, true); return (_local1); } private function _Game_Canvas4_c():Canvas{ var _local1:Canvas = new Canvas(); _local1.percentWidth = 100; _local1.percentHeight = 100; if (!_local1.document){ _local1.document = this; }; _local1.addChild(_Game_VBox3_i()); _local1.addChild(_Game_VBox4_c()); return (_local1); } public function set rankText(_arg1:Label):void{ var _local2:Object = this._256053113rankText; if (_local2 !== _arg1){ this._256053113rankText = _arg1; this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "rankText", _local2, _arg1)); }; } private function _Game_Button3_c():Button{ var _local1:Button = new Button(); _local1.label = "Kevin MacLeod"; _local1.width = 115; _local1.setStyle("fillAlphas", [0.6, 0.6]); _local1.setStyle("fillColors", [0xFFFFFF, 0xFFFFFF]); _local1.setStyle("borderColor", 0); _local1.addEventListener("click", ___Game_Button3_click); if (!_local1.document){ _local1.document = this; }; return (_local1); } public function ___Game_Button2_click(_arg1:MouseEvent):void{ onJohnClick(); } private function xmlLoaded(_arg1:Event):void{ var _local2:URLLoader = (_arg1.target as URLLoader); var _local3:XML = new XML(_local2.data); currentLevel = new Level(0, null, _local3); startCurrentLevel(); } private function unpause():void{ if (currentState == "pause"){ Music.unpause(); currentState = "game"; }; } private function _Game_HBox2_c():HBox{ var _local1:HBox = new HBox(); _local1.setStyle("horizontalGap", 0); if (!_local1.document){ _local1.document = this; }; _local1.addChild(_Game_Label2_i()); _local1.addChild(_Game_Button2_c()); return (_local1); } private function startCurrentLevel():void{ var _local1:int; things = new Array(); steppingThings = new Array(); player = null; agents = new Array(); switches = new Array(64); _local1 = 0; while (_local1 < 32) { switches[_local1] = new Switch(false); _local1++; }; while (_local1 < 64) { switches[_local1] = new Switch(true); _local1++; }; goalReached = false; panelLayer = new Sprite(); camera.addChild(panelLayer); kidLayer = new Sprite(); camera.addChild(kidLayer); forkliftLayer = new Sprite(); camera.addChild(forkliftLayer); solidLayer = new Sprite(); camera.addChild(solidLayer); wallLayer = new Sprite(); camera.addChild(wallLayer); frontLayer = new Sprite(); camera.addChild(frontLayer); camera.addChild(wallLayerMask); wallLayer.mask = wallLayerMask; wallLayer.addChild(wallTiles); wallLayer.addChild(wallLines); newWorld(); if (currentLevel == null){ throw (new Error("Game.startCurrentLevel(): currentLevel==null")); }; currentLevel.start(); Music.play((Music.songList[currentLevel.num] as Sound)); drawTiles(); currentState = "game"; writeHelpText(); stage.focus = stage; this.addEventListener(Event.ENTER_FRAME, loop); stepTicks = 0; prevTime = getTimer(); timer = 0; } private function set retryButtonAlpha(_arg1:Number):void{ var _local2:Object = this._288757124retryButtonAlpha; if (_local2 !== _arg1){ this._288757124retryButtonAlpha = _arg1; this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "retryButtonAlpha", _local2, _arg1)); }; } private function init():void{ me = this; MochiBot.track(mochiContainer, "36e02cc4"); var _local1:KongregateAPI = new KongregateAPI(); mochiContainer.addChild(_local1); stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); stage.addEventListener(KeyboardEvent.KEY_UP, onKeyUp); uiComponent = new UIComponent(); canvas1.addChild(uiComponent); cameraContainer = new Sprite(); cameraContainer.addChild(GFX.planetBitmapAsset); GFX.planetBitmapAsset.x = (-160 / pxPerUnit); GFX.planetBitmapAsset.y = (-120 / pxPerUnit); GFX.planetBitmapAsset.scaleX = (1 / pxPerUnit); GFX.planetBitmapAsset.scaleY = (1 / pxPerUnit); GFX.planetBitmapAsset.smoothing = true; uiComponent.addChild(cameraContainer); cameraZoom = new Sprite(); cameraContainer.addChild(cameraZoom); camera = new Sprite(); cameraZoom.addChild(camera); camera.x = -1000; camera.y = -1000; onResize(); Level.init(); Music.play(Music.FrozenStar); stage.addEventListener(Event.DEACTIVATE, onDeactivate); stage.addEventListener(Event.ACTIVATE, onActivate); console.text = "\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r"; } private function _Game_Canvas3_c():Canvas{ var _local1:Canvas = new Canvas(); _local1.percentWidth = 100; _local1.percentHeight = 100; if (!_local1.document){ _local1.document = this; }; _local1.addChild(_Game_VBox1_c()); return (_local1); } private function writeHelpText():void{ if (helpOn){ helpText0.text = "Find the Exit"; helpText1.text = "Arrow Keys: Move & Manipulate, Space: Jump & Exit"; helpText2.text = "P: Pause, R: Restart, Escape: Menu, H: Toggle Help"; helpCanvas.height = 51; helpCanvas.width = 320; } else { helpText0.text = "H: Help"; helpText1.text = ""; helpText2.text = ""; helpCanvas.height = 17; helpCanvas.width = 75; }; } private function _Game_Label11_i():Label{ var _local1:Label = new Label(); _Game_Label11 = _local1; _local1.truncateToFit = false; _local1.setStyle("horizontalCenter", "0"); _local1.setStyle("top", "10"); _local1.setStyle("color", 0xFFFFFF); _local1.setStyle("fontSize", 12); _local1.id = "_Game_Label11"; BindingManager.executeBindings(this, "_Game_Label11", _Game_Label11); if (!_local1.document){ _local1.document = this; }; return (_local1); } private function _Game_AddChild7_i():AddChild{ var _local1:AddChild = new AddChild(); _Game_AddChild7 = _local1; _local1.targetFactory = new DeferredInstanceFromFunction(_Game_Canvas9_c); BindingManager.executeBindings(this, "_Game_AddChild7", _Game_AddChild7); return (_local1); } private function _Game_Label5_i():Label{ var _local1:Label = new Label(); _Game_Label5 = _local1; _local1.text = "Powered by"; _local1.truncateToFit = false; _local1.setStyle("color", 0xFFFFFF); _local1.id = "_Game_Label5"; BindingManager.executeBindings(this, "_Game_Label5", _Game_Label5); if (!_local1.document){ _local1.document = this; }; return (_local1); } private function _Game_State2_c():State{ var _local1:State = new State(); _local1.name = "title"; _local1.overrides = [_Game_AddChild2_i()]; return (_local1); } private function gotoURL(_arg1:String):void{ var url = _arg1; var request:URLRequest = new URLRequest(url); try { navigateToURL(request, "_blank"); } catch(e:Error) { }; } public function get levelVBox():VBox{ return (this._1656203495levelVBox); } private function _Game_SetProperty2_i():SetProperty{ var _local1:SetProperty = new SetProperty(); _Game_SetProperty2 = _local1; _local1.name = "alpha"; _local1.value = 1; BindingManager.executeBindings(this, "_Game_SetProperty2", _Game_SetProperty2); return (_local1); } public function get camera():Sprite{ return (this._1367751899camera); } private function _Game_Button2_c():Button{ var _local1:Button = new Button(); _local1.label = "John Nesky"; _local1.width = 115; _local1.setStyle("fillAlphas", [0.6, 0.6]); _local1.setStyle("fillColors", [0xFFFFFF, 0xFFFFFF]); _local1.setStyle("borderColor", 0); _local1.addEventListener("click", ___Game_Button2_click); if (!_local1.document){ _local1.document = this; }; return (_local1); } public function get levelRepeater():Repeater{ return (this._561085228levelRepeater); } private function _Game_AddChildAction1_c():AddChildAction{ var _local1:AddChildAction = new AddChildAction(); return (_local1); } public function ___Game_Button7_click(_arg1:MouseEvent):void{ endLevel(); startCurrentLevel(); } private function updateVolume():void{ SoundMixer.soundTransform = new SoundTransform((volumeSlider.value / 100)); } mx_internal function _Game_StylesInit():void{ var _local1:CSSStyleDeclaration; var _local2:Array; if (mx_internal::_Game_StylesInit_done){ return; }; mx_internal::_Game_StylesInit_done = true; var _local3 = StyleManager; _local3.mx_internal::initProtoChainRoots(); } public function set rankCanvas(_arg1:Spacer):void{ var _local2:Object = this._763223204rankCanvas; if (_local2 !== _arg1){ this._763223204rankCanvas = _arg1; this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "rankCanvas", _local2, _arg1)); }; } private function _Game_HBox1_c():HBox{ var _local1:HBox = new HBox(); _local1.setStyle("horizontalGap", 0); if (!_local1.document){ _local1.document = this; }; _local1.addChild(_Game_Button1_c()); _local1.addChild(_Game_VBox2_c()); return (_local1); } private function _Game_Label10_i():Label{ var _local1:Label = new Label(); _Game_Label10 = _local1; _local1.truncateToFit = false; _local1.setStyle("horizontalCenter", "0"); _local1.setStyle("top", "10"); _local1.setStyle("color", 0xFFFFFF); _local1.setStyle("fontSize", 12); _local1.id = "_Game_Label10"; BindingManager.executeBindings(this, "_Game_Label10", _Game_Label10); if (!_local1.document){ _local1.document = this; }; return (_local1); } private function onMenuFocusOut():void{ menuButtonAlpha = 0; } public function get timer():Number{ return (this._110364485timer); } public function get myGlow():GlowFilter{ return (this._1060421287myGlow); } private function _Game_State1_c():State{ var _local1:State = new State(); _local1.name = "title2"; _local1.overrides = [_Game_AddChild1_i()]; return (_local1); } public function set volumeSlider(_arg1:VSlider):void{ var _local2:Object = this._1698099045volumeSlider; if (_local2 !== _arg1){ this._1698099045volumeSlider = _arg1; this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "volumeSlider", _local2, _arg1)); }; } private function _Game_Label4_i():Label{ var _local1:Label = new Label(); _Game_Label4 = _local1; _local1.text = "Physics by"; _local1.truncateToFit = false; _local1.setStyle("color", 0xFFFFFF); _local1.id = "_Game_Label4"; BindingManager.executeBindings(this, "_Game_Label4", _Game_Label4); if (!_local1.document){ _local1.document = this; }; return (_local1); } private function onBox2DClick():void{ gotoURL("http://box2dflash.sourceforge.net"); stage.focus = stage; } private function _Game_GlowFilter1_i():GlowFilter{ var _local1:GlowFilter = new GlowFilter(); myGlow = _local1; _local1.alpha = 1; _local1.blurX = 12; _local1.blurY = 12; _local1.color = 0; _local1.inner = false; _local1.strength = 2; return (_local1); } public function endLevel():void{ SFX.killForklift(); this.removeEventListener(Event.ENTER_FRAME, loop); things = null; steppingThings = null; player = null; goal = null; agents = null; if (panelLayer != null){ camera.removeChild(panelLayer); panelLayer = null; }; if (kidLayer != null){ camera.removeChild(kidLayer); kidLayer = null; }; if (forkliftLayer != null){ camera.removeChild(forkliftLayer); forkliftLayer = null; }; if (solidLayer != null){ camera.removeChild(solidLayer); solidLayer = null; }; if (wallLayer != null){ camera.removeChild(wallLayer); wallLayer = null; }; if (frontLayer != null){ camera.removeChild(frontLayer); frontLayer = null; }; if (camera.contains(wallLayerMask)){ camera.removeChild(wallLayerMask); }; } private function onResize():void{ var _local1:Number; var _local2:Number; if (cameraContainer != null){ _local1 = (width / hRez); _local2 = (height / vRez); _local1 = Math.min(_local1, _local2); cameraContainer.scaleX = (_local1 * pxPerUnit); cameraContainer.scaleY = (_local1 * pxPerUnit); cameraContainer.x = (width / 2); cameraContainer.y = (height / 2); canvas2.scaleX = _local1; canvas2.scaleY = _local1; drawTiles(); }; } private function _Game_SetProperty1_i():SetProperty{ var _local1:SetProperty = new SetProperty(); _Game_SetProperty1 = _local1; _local1.name = "alpha"; _local1.value = 1; BindingManager.executeBindings(this, "_Game_SetProperty1", _Game_SetProperty1); return (_local1); } private function _Game_Button1_c():Button{ var _local1:Button = new Button(); _local1.label = "Play!"; _local1.scaleX = 2.3; _local1.scaleY = 2.3; _local1.setStyle("fillAlphas", [0.6, 0.6]); _local1.setStyle("fillColors", [0xFFFFFF, 0xFFFFFF]); _local1.setStyle("borderColor", 0); _local1.addEventListener("click", ___Game_Button1_click); if (!_local1.document){ _local1.document = this; }; return (_local1); } private function goToTitleScreen():void{ currentState = "title"; stage.focus = stage; Music.play(Music.FrozenStar); } public function ___Game_Button4_click(_arg1:MouseEvent):void{ onBox2DClick(); } public function ___Game_Button6_focusOut(_arg1:FocusEvent):void{ onMenuFocusOut(); } public function get rankText():Label{ return (this._256053113rankText); } private function _Game_Transition1_c():Transition{ var _local1:Transition = new Transition(); _local1.fromState = "game"; _local1.toState = "endGame"; _local1.effect = _Game_Sequence1_i(); return (_local1); } private function _Game_AddChild6_i():AddChild{ var _local1:AddChild = new AddChild(); _Game_AddChild6 = _local1; _local1.targetFactory = new DeferredInstanceFromFunction(_Game_Canvas8_c); BindingManager.executeBindings(this, "_Game_AddChild6", _Game_AddChild6); return (_local1); } override public function initialize():void{ var target:Game; var watcherSetupUtilClass:Object; mx_internal::setDocumentDescriptor(_documentDescriptor_); var bindings:Array = _Game_bindingsSetup(); var watchers:Array = []; target = this; if (_watcherSetupUtil == null){ watcherSetupUtilClass = getDefinitionByName("_GameWatcherSetupUtil"); var _local2 = watcherSetupUtilClass; _local2["init"](null); }; _watcherSetupUtil.setup(this, function (_arg1:String){ return (target[_arg1]); }, bindings, watchers); var i:uint; while (i < bindings.length) { Binding(bindings[i]).execute(); i = (i + 1); }; mx_internal::_bindings = mx_internal::_bindings.concat(bindings); mx_internal::_watchers = mx_internal::_watchers.concat(watchers); super.initialize(); } public function ___Game_Application1_resize(_arg1:ResizeEvent):void{ onResize(); } private function _Game_AddChild5_i():AddChild{ var _local1:AddChild = new AddChild(); _Game_AddChild5 = _local1; _local1.targetFactory = new DeferredInstanceFromFunction(_Game_Canvas7_c); BindingManager.executeBindings(this, "_Game_AddChild5", _Game_AddChild5); return (_local1); } private function get retryButtonAlpha():Number{ return (this._288757124retryButtonAlpha); } private function _Game_Label3_i():Label{ var _local1:Label = new Label(); _Game_Label3 = _local1; _local1.text = "Music by"; _local1.truncateToFit = false; _local1.setStyle("color", 0xFFFFFF); _local1.id = "_Game_Label3"; BindingManager.executeBindings(this, "_Game_Label3", _Game_Label3); if (!_local1.document){ _local1.document = this; }; return (_local1); } private function _Game_Canvas11_i():Canvas{ var _local1:Canvas = new Canvas(); _Game_Canvas11 = _local1; _local1.setStyle("backgroundColor", 0xFFFFFF); _local1.setStyle("horizontalCenter", "0"); _local1.setStyle("bottom", "20"); _local1.id = "_Game_Canvas11"; BindingManager.executeBindings(this, "_Game_Canvas11", _Game_Canvas11); if (!_local1.document){ _local1.document = this; }; _local1.addChild(_Game_Button7_c()); return (_local1); } private function _Game_Canvas9_c():Canvas{ var _local1:Canvas = new Canvas(); _local1.percentWidth = 100; _local1.percentHeight = 100; if (!_local1.document){ _local1.document = this; }; _local1.addChild(_Game_VBox5_c()); _local1.addChild(_Game_Canvas10_i()); _local1.addChild(_Game_Canvas11_i()); return (_local1); } public function get console():Label{ return (this._951510359console); } private function _Game_VBox6_c():VBox{ var _local1:VBox = new VBox(); _local1.setStyle("horizontalAlign", "center"); if (!_local1.document){ _local1.document = this; }; _local1.addChild(_Game_Spacer1_i()); _local1.addChild(_Game_Label16_i()); return (_local1); } public function onLevelButtonClicked(_arg1:Level):void{ if (currentState == "title"){ currentLevel = _arg1; startCurrentLevel(); }; } private function _Game_VSlider1_i():VSlider{ var _local1:VSlider = new VSlider(); volumeSlider = _local1; _local1.minimum = 0; _local1.maximum = 100; _local1.value = 100; _local1.tickInterval = 20; _local1.labels = ["", ""]; _local1.height = 50; _local1.allowTrackClick = true; _local1.liveDragging = true; _local1.setStyle("tickColor", 0xFFFFFF); _local1.addEventListener("change", __volumeSlider_change); _local1.id = "volumeSlider"; if (!_local1.document){ _local1.document = this; }; return (_local1); } private function onDeactivate(_arg1:Event):void{ pause(); if (unpauseHelp != null){ unpauseHelp.text = "click to unpause"; }; } public function set canvas2(_arg1:Canvas):void{ var _local2:Object = this._550778330canvas2; if (_local2 !== _arg1){ this._550778330canvas2 = _arg1; this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "canvas2", _local2, _arg1)); }; } public function ___Game_Button1_click(_arg1:MouseEvent):void{ goToTitleScreen(); } private function onLoadLevelButtonClicked():void{ var _local1:URLLoader; if (currentState == "title"){ _local1 = new URLLoader(); _local1.addEventListener(Event.COMPLETE, xmlLoaded); _local1.load(new URLRequest("/Users/johnnesky/Forklift_kongregate/src/Levels/currentLevel.svg")); }; } public function set mochiContainer(_arg1:UIComponent):void{ var _local2:Object = this._1645408545mochiContainer; if (_local2 !== _arg1){ this._1645408545mochiContainer = _arg1; this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "mochiContainer", _local2, _arg1)); }; } private function _Game_bindingsSetup():Array{ var binding:Binding; var result:Array = []; binding = new Binding(this, function ():Number{ return (hRez); }, function (_arg1:Number):void{ canvas2.width = _arg1; }, "canvas2.width"); result[0] = binding; binding = new Binding(this, function ():Number{ return (vRez); }, function (_arg1:Number):void{ canvas2.height = _arg1; }, "canvas2.height"); result[1] = binding; binding = new Binding(this, function ():UIComponent{ return (canvas2); }, function (_arg1:UIComponent):void{ _Game_AddChild1.relativeTo = _arg1; }, "_Game_AddChild1.relativeTo"); result[2] = binding; binding = new Binding(this, function ():Array{ return ([myGlow]); }, function (_arg1:Array):void{ _Game_Label2.filters = _arg1; }, "_Game_Label2.filters"); result[3] = binding; binding = new Binding(this, function ():Array{ return ([myGlow]); }, function (_arg1:Array):void{ _Game_Label3.filters = _arg1; }, "_Game_Label3.filters"); result[4] = binding; binding = new Binding(this, function ():Array{ return ([myGlow]); }, function (_arg1:Array):void{ _Game_Label4.filters = _arg1; }, "_Game_Label4.filters"); result[5] = binding; binding = new Binding(this, function ():Array{ return ([myGlow]); }, function (_arg1:Array):void{ _Game_Label5.filters = _arg1; }, "_Game_Label5.filters"); result[6] = binding; binding = new Binding(this, function ():UIComponent{ return (canvas2); }, function (_arg1:UIComponent):void{ _Game_AddChild2.relativeTo = _arg1; }, "_Game_AddChild2.relativeTo"); result[7] = binding; binding = new Binding(this, function ():Object{ return (Level.levels); }, function (_arg1:Object):void{ levelRepeater.dataProvider = _arg1; }, "levelRepeater.dataProvider"); result[8] = binding; binding = new RepeatableBinding(this, function (_arg1:Array, _arg2:Array):Object{ return (levelRepeater.mx_internal::getItemAt(_arg2[0])); }, function (_arg1:Object, _arg2:Array):void{ _Game_LevelButton1[_arg2[0]].level = _arg1; }, "_Game_LevelButton1.level"); result[9] = binding; binding = new Binding(this, function ():UIComponent{ return (canvas1); }, function (_arg1:UIComponent):void{ _Game_AddChild3.relativeTo = _arg1; }, "_Game_AddChild3.relativeTo"); result[10] = binding; binding = new Binding(this, function ():UIComponent{ return (canvas2); }, function (_arg1:UIComponent):void{ _Game_AddChild4.relativeTo = _arg1; }, "_Game_AddChild4.relativeTo"); result[11] = binding; binding = new Binding(this, function ():String{ var _local1:* = timer.toFixed(2); var _local2:* = ((_local1 == undefined)) ? null : String(_local1); return (_local2); }, function (_arg1:String):void{ _Game_Label10.text = _arg1; }, "_Game_Label10.text"); result[12] = binding; binding = new Binding(this, function ():Object{ return (camera); }, function (_arg1:Object):void{ _Game_SetProperty1.target = _arg1; }, "_Game_SetProperty1.target"); result[13] = binding; binding = new Binding(this, function ():UIComponent{ return (canvas1); }, function (_arg1:UIComponent):void{ _Game_AddChild5.relativeTo = _arg1; }, "_Game_AddChild5.relativeTo"); result[14] = binding; binding = new Binding(this, function ():UIComponent{ return (canvas2); }, function (_arg1:UIComponent):void{ _Game_AddChild6.relativeTo = _arg1; }, "_Game_AddChild6.relativeTo"); result[15] = binding; binding = new Binding(this, function ():String{ var _local1:* = timer.toFixed(2); var _local2:* = ((_local1 == undefined)) ? null : String(_local1); return (_local2); }, function (_arg1:String):void{ _Game_Label11.text = _arg1; }, "_Game_Label11.text"); result[16] = binding; binding = new Binding(this, function ():Object{ return (camera); }, function (_arg1:Object):void{ _Game_SetProperty2.target = _arg1; }, "_Game_SetProperty2.target"); result[17] = binding; binding = new Binding(this, function ():UIComponent{ return (canvas2); }, function (_arg1:UIComponent):void{ _Game_AddChild7.relativeTo = _arg1; }, "_Game_AddChild7.relativeTo"); result[18] = binding; binding = new Binding(this, function ():String{ var _local1:* = ("Clear Time: " + timer.toFixed(2)); var _local2:* = ((_local1 == undefined)) ? null : String(_local1); return (_local2); }, function (_arg1:String):void{ _Game_Label14.text = _arg1; }, "_Game_Label14.text"); result[19] = binding; binding = new Binding(this, function ():Number{ return (menuButtonAlpha); }, function (_arg1:Number):void{ _Game_Canvas10.setStyle("backgroundAlpha", _arg1); }, "_Game_Canvas10.backgroundAlpha"); result[20] = binding; binding = new Binding(this, function ():Number{ return (retryButtonAlpha); }, function (_arg1:Number):void{ _Game_Canvas11.setStyle("backgroundAlpha", _arg1); }, "_Game_Canvas11.backgroundAlpha"); result[21] = binding; binding = new Binding(this, function ():Array{ return ([camera]); }, function (_arg1:Array):void{ _Game_Sequence1.targets = _arg1; }, "_Game_Sequence1.targets"); result[22] = binding; return (result); } public function set unpauseHelp(_arg1:Label):void{ var _local2:Object = this._897502174unpauseHelp; if (_local2 !== _arg1){ this._897502174unpauseHelp = _arg1; this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "unpauseHelp", _local2, _arg1)); }; } public function set helpText1(_arg1:Label):void{ var _local2:Object = this._1286799843helpText1; if (_local2 !== _arg1){ this._1286799843helpText1 = _arg1; this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "helpText1", _local2, _arg1)); }; } public function set helpText2(_arg1:Label):void{ var _local2:Object = this._1286799844helpText2; if (_local2 !== _arg1){ this._1286799844helpText2 = _arg1; this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "helpText2", _local2, _arg1)); }; } public function set canvas1(_arg1:Canvas):void{ var _local2:Object = this._550778329canvas1; if (_local2 !== _arg1){ this._550778329canvas1 = _arg1; this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "canvas1", _local2, _arg1)); }; } public function set helpText0(_arg1:Label):void{ var _local2:Object = this._1286799842helpText0; if (_local2 !== _arg1){ this._1286799842helpText0 = _arg1; this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "helpText0", _local2, _arg1)); }; } private function _Game_Canvas10_i():Canvas{ var _local1:Canvas = new Canvas(); _Game_Canvas10 = _local1; _local1.setStyle("backgroundColor", 0xFFFFFF); _local1.setStyle("horizontalCenter", "0"); _local1.setStyle("bottom", "50"); _local1.id = "_Game_Canvas10"; BindingManager.executeBindings(this, "_Game_Canvas10", _Game_Canvas10); if (!_local1.document){ _local1.document = this; }; _local1.addChild(_Game_Button6_c()); return (_local1); } private function newWorld():void{ var _local1:b2AABB = new b2AABB(); _local1.minVertex.Set(0, 0); _local1.maxVertex.Set(2000, 2000); var _local2:b2Vec2 = new b2Vec2(); _local2.Set(0, 85); world = new b2World(_local1, _local2, false); } private function onRetryFocusIn():void{ retryButtonAlpha = 1; } private function _Game_AddChild4_i():AddChild{ var _local1:AddChild = new AddChild(); _Game_AddChild4 = _local1; _local1.targetFactory = new DeferredInstanceFromFunction(_Game_Canvas6_c); BindingManager.executeBindings(this, "_Game_AddChild4", _Game_AddChild4); return (_local1); } private function _Game_Label2_i():Label{ var _local1:Label = new Label(); _Game_Label2 = _local1; _local1.text = "Game by"; _local1.truncateToFit = false; _local1.setStyle("color", 0xFFFFFF); _local1.id = "_Game_Label2"; BindingManager.executeBindings(this, "_Game_Label2", _Game_Label2); if (!_local1.document){ _local1.document = this; }; return (_local1); } public function ___Game_Application1_applicationComplete(_arg1:FlexEvent):void{ init(); } private function _Game_Canvas8_c():Canvas{ var _local1:Canvas = new Canvas(); _local1.percentWidth = 100; _local1.percentHeight = 100; if (!_local1.document){ _local1.document = this; }; _local1.addChild(_Game_Label11_i()); _local1.addChild(_Game_Label12_c()); _local1.addChild(_Game_Label13_i()); return (_local1); } public function get canvas1():Canvas{ return (this._550778329canvas1); } public function get helpText0():Label{ return (this._1286799842helpText0); } public function get helpText1():Label{ return (this._1286799843helpText1); } private function _Game_Label16_i():Label{ var _local1:Label = new Label(); rankText = _local1; _local1.truncateToFit = false; _local1.setStyle("color", 0xFFFFFF); _local1.id = "rankText"; if (!_local1.document){ _local1.document = this; }; return (_local1); } public function get canvas2():Canvas{ return (this._550778330canvas2); } public function get helpText2():Label{ return (this._1286799844helpText2); } public function ___Game_Button7_focusIn(_arg1:FocusEvent):void{ onRetryFocusIn(); } private function _Game_VBox5_c():VBox{ var _local1:VBox = new VBox(); _local1.setStyle("horizontalCenter", "0"); _local1.setStyle("top", "40"); _local1.setStyle("horizontalAlign", "center"); _local1.setStyle("backgroundColor", 0); _local1.setStyle("backgroundAlpha", 0.4); if (!_local1.document){ _local1.document = this; }; _local1.addChild(_Game_Label14_i()); _local1.addChild(_Game_HBox6_c()); return (_local1); } private function onActivate(_arg1:Event):void{ unpause(); } public function __volumeSlider_change(_arg1:SliderEvent):void{ updateVolume(); } private function _Game_Button7_c():Button{ var _local1:Button = new Button(); _local1.label = "Retry"; _local1.setStyle("fillAlphas", [0.6, 0.6]); _local1.setStyle("fillColors", [0xFFFFFF, 0xFFFFFF]); _local1.setStyle("borderColor", 0); _local1.addEventListener("click", ___Game_Button7_click); _local1.addEventListener("focusIn", ___Game_Button7_focusIn); _local1.addEventListener("focusOut", ___Game_Button7_focusOut); if (!_local1.document){ _local1.document = this; }; return (_local1); } private function pause():void{ var _local1:ThingAgent; if (currentState == "game"){ for each (_local1 in agents) { _local1.onUpReleased(); _local1.onDownReleased(); _local1.onLeftReleased(); _local1.onRightReleased(); _local1.onJumpReleased(); }; SFX.killForklift(); Music.pause(); currentState = "pause"; }; } public function ___Game_Button6_click(_arg1:MouseEvent):void{ endLevel(); goToTitleScreen(); } public static function set watcherSetupUtil(_arg1:IWatcherSetupUtil):void{ Game._watcherSetupUtil = _arg1; } } }//package
Section 435
//Game__embed_mxml_title_png_1258686824 (Game__embed_mxml_title_png_1258686824) package { import mx.core.*; public class Game__embed_mxml_title_png_1258686824 extends BitmapAsset { } }//package
Section 436
//Gate (Gate) package { import flash.display.*; import flash.events.*; import Box2D.Dynamics.*; import Box2D.Dynamics.Joints.*; import Box2D.Collision.Shapes.*; public class Gate extends SteppingThing { public var body:b2Body; private var graphic:MovieClip; public var bottom:Number; public var aSwitch:Switch; public var joint:b2PrismaticJoint; public var top:Number; private static const maskBits:int = 65534; private static const speed:Number = 60; private static const categoryBits:int = 1; public function Gate(_arg1:XML){ graphic = new GateSprite(); super(_arg1); aSwitch = (Game.me.switches[_arg1.@switchID] as Switch); aSwitch.addEventListener(Event.CHANGE, onFlipped, false, 0, false); var _local2:b2BodyDef = new b2BodyDef(); var _local3:b2BoxDef = new b2BoxDef(); _local3.extents.Set(2.5, 15); _local3.density = 2; _local3.friction = 1; _local3.categoryBits = categoryBits; _local3.maskBits = maskBits; _local3.userData = this; if (aSwitch.state){ _local3.localPosition.Set(((2.5 * direction) + svgWidth), -10); top = 0; bottom = -25; } else { _local3.localPosition.Set(((2.5 * direction) + svgWidth), 15); top = 25; bottom = 0; }; _local2.AddShape(_local3); _local2.position = svgPos; _local2.rotation = svgAngle; body = Game.me.world.CreateBody(_local2); var _local4:b2PrismaticJointDef = new b2PrismaticJointDef(); _local4.body1 = Game.me.world.GetGroundBody(); _local4.body2 = body; _local4.anchorPoint = body.m_position; _local4.axis.Set(Math.sin(svgAngle), -(Math.cos(svgAngle))); _local4.enableLimit = true; _local4.enableMotor = true; _local4.motorForce = 150000; _local4.lowerTranslation = bottom; _local4.upperTranslation = top; joint = (Game.me.world.CreateJoint(_local4) as b2PrismaticJoint); Game.me.things.push(this); Game.me.steppingThings.push(this); graphic.scaleX = (0.05 * direction); graphic.scaleY = 0.05; Game.me.solidLayer.addChild(graphic); repaint(); } public function onFlipped(_arg1:Event):void{ SFX.doorSlide.play(); } override public function step():void{ var _local1:Number; if (aSwitch.state){ _local1 = (8 * (top - joint.GetJointTranslation())); _local1 = Math.min(speed, _local1); joint.m_motorSpeed = _local1; } else { _local1 = (8 * (bottom - joint.GetJointTranslation())); _local1 = Math.max(-(speed), _local1); joint.m_motorSpeed = _local1; }; } override public function repaint():void{ graphic.x = body.m_position.x; graphic.y = body.m_position.y; graphic.rotation = ((body.m_rotation * 180) / Math.PI); } override public function destroy():void{ Game.me.solidLayer.removeChild(graphic); Game.me.things.splice(Game.me.things.indexOf(this), 1); Game.me.steppingThings.splice(Game.me.steppingThings.indexOf(this), 1); Game.me.world.DestroyBody(body); } } }//package
Section 437
//GateSprite (GateSprite) package { import flash.display.*; public dynamic class GateSprite extends MovieClip { } }//package
Section 438
//GFX (GFX) package { import flash.display.*; import mx.core.*; public class GFX { private static var tile3BitmapClass:Class = GFX_tile3BitmapClass; private static var tile1BitmapAsset:BitmapAsset = (new tile1BitmapClass() as BitmapAsset); private static var tile1BitmapClass:Class = GFX_tile1BitmapClass; public static var planetBitmapAsset:BitmapAsset = (new planetBitmapClass() as BitmapAsset); public static var tiles:Array = [tile0BitmapData, tile1BitmapData, tile2BitmapData, tile3BitmapData, tile0BitmapData, tile1BitmapData, tile2BitmapData, tile3BitmapData]; private static var planetBitmapClass:Class = GFX_planetBitmapClass; private static var tile0BitmapData:BitmapData = tile0BitmapAsset.bitmapData; private static var tile1BitmapData:BitmapData = tile1BitmapAsset.bitmapData; private static var tile2BitmapData:BitmapData = tile2BitmapAsset.bitmapData; private static var tile3BitmapData:BitmapData = tile3BitmapAsset.bitmapData; private static var tile0BitmapAsset:BitmapAsset = (new tile0BitmapClass() as BitmapAsset); private static var tile4BitmapClass:Class = GFX_tile4BitmapClass; private static var tile2BitmapAsset:BitmapAsset = (new tile2BitmapClass() as BitmapAsset); private static var tile2BitmapClass:Class = GFX_tile2BitmapClass; private static var tile4BitmapData:BitmapData = tile4BitmapAsset.bitmapData; private static var tile0BitmapClass:Class = GFX_tile0BitmapClass; private static var tile4BitmapAsset:BitmapAsset = (new tile4BitmapClass() as BitmapAsset); private static var tile3BitmapAsset:BitmapAsset = (new tile3BitmapClass() as BitmapAsset); } }//package
Section 439
//GFX_planetBitmapClass (GFX_planetBitmapClass) package { import mx.core.*; public class GFX_planetBitmapClass extends BitmapAsset { } }//package
Section 440
//GFX_tile0BitmapClass (GFX_tile0BitmapClass) package { import mx.core.*; public class GFX_tile0BitmapClass extends BitmapAsset { } }//package
Section 441
//GFX_tile1BitmapClass (GFX_tile1BitmapClass) package { import mx.core.*; public class GFX_tile1BitmapClass extends BitmapAsset { } }//package
Section 442
//GFX_tile2BitmapClass (GFX_tile2BitmapClass) package { import mx.core.*; public class GFX_tile2BitmapClass extends BitmapAsset { } }//package
Section 443
//GFX_tile3BitmapClass (GFX_tile3BitmapClass) package { import mx.core.*; public class GFX_tile3BitmapClass extends BitmapAsset { } }//package
Section 444
//GFX_tile4BitmapClass (GFX_tile4BitmapClass) package { import mx.core.*; public class GFX_tile4BitmapClass extends BitmapAsset { } }//package
Section 445
//Goal (Goal) package { import flash.display.*; import flash.media.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.Shapes.*; public class Goal extends Thing { public var body:b2Body; private var graphic:MovieClip; private static const maskBits:int = 2; private static const categoryBits:int = 1; public function Goal(_arg1:XML){ graphic = new GoalSprite(); super(_arg1); if (Game.me.goal == null){ Game.me.goal = this; } else { throw (new Error("Goal constructor: Game still has a reference to an old Goal.")); }; var _local2:b2BodyDef = new b2BodyDef(); var _local3:b2BoxDef = new b2BoxDef(); _local3.extents.Set(7.5, 7.5); _local3.density = 0; _local3.categoryBits = categoryBits; _local3.maskBits = maskBits; _local3.userData = this; _local2.AddShape(_local3); _local2.position.Set((Number(_arg1.@x) + 7.5), (Number(_arg1.@y) + 7.5)); _local2.solid = false; body = Game.me.world.CreateBody(_local2); Game.me.things.push(this); graphic.scaleX = 0.05; graphic.scaleY = 0.05; Game.me.panelLayer.addChild(graphic); graphic.x = body.m_position.x; graphic.y = body.m_position.y; graphic.rotation = ((body.m_rotation * 180) / Math.PI); } override public function destroy():void{ Game.me.panelLayer.removeChild(graphic); Game.me.things.splice(Game.me.things.indexOf(this), 1); Game.me.world.DestroyBody(body); } override public function getCollisionSound(_arg1:b2Vec2, _arg2:Number, _arg3:b2Shape, _arg4:b2Shape, _arg5:Thing):CollisionSound{ Game.me.goalReached = true; SFX.endLevel.play(0, 0, new SoundTransform(0.5)); return (null); } } }//package
Section 446
//GoalSprite (GoalSprite) package { import flash.display.*; public dynamic class GoalSprite extends MovieClip { } }//package
Section 447
//GoldMedalSprite (GoldMedalSprite) package { import flash.display.*; public dynamic class GoldMedalSprite extends MovieClip { } }//package
Section 448
//GuitarSprite (GuitarSprite) package { import flash.display.*; public dynamic class GuitarSprite extends MovieClip { } }//package
Section 449
//HintArrowKeySprite (HintArrowKeySprite) package { import flash.display.*; public dynamic class HintArrowKeySprite extends MovieClip { } }//package
Section 450
//HintSpaceKeySprite (HintSpaceKeySprite) package { import flash.display.*; public dynamic class HintSpaceKeySprite extends MovieClip { } }//package
Section 451
//InternetSprite (InternetSprite) package { import flash.display.*; public dynamic class InternetSprite extends MovieClip { } }//package
Section 452
//KidSprite (KidSprite) package { import flash.display.*; public dynamic class KidSprite extends MovieClip { public function KidSprite(){ addFrameScript(59, frame60, 72, frame73, 123, frame124); } function frame73(){ gotoAndPlay("running"); } function frame124(){ gotoAndPlay("falling"); } function frame60(){ gotoAndPlay("idle"); } } }//package
Section 453
//Level (Level) package { import flash.display.*; import flash.events.*; import mx.events.*; import Box2D.Dynamics.*; import Box2D.Collision.Shapes.*; import flash.utils.*; import flash.net.*; public class Level implements IEventDispatcher { private var _data:Object; private var _109446num:Number; private var rects:Array; private var converted:Boolean;// = false private var _xml:XML; public var cleared:Boolean; private var allLines:Array; private var internetTime:Number; private var _bestTime:Number;// = INF private var unicornPowerTime:Number; private var _bindingEventDispatcher:EventDispatcher; private var guitarTime:Number; public static var localSO:SharedObject = SharedObject.getLocal("ForkliftKidSaveData"); private static var _staticBindingEventDispatcher:EventDispatcher = new EventDispatcher(); private static var levelOrder:Array = [level1, level2, level3, level4, level5, level6, level7, level8]; private static var level1:Class = Level_level1; private static var level2:Class = Level_level2; private static var level3:Class = Level_level3; private static var level4:Class = Level_level4; private static var level5:Class = Level_level5; private static var level6:Class = Level_level6; private static var level7:Class = Level_level7; private static var level8:Class = Level_level8; private static var _1106127505levels:Array; public function Level(_arg1:Number, _arg2:Object=null, _arg3:XML=null):void{ var _local4:Class; var _local5:ByteArray; allLines = new Array(); rects = new Array(); _bindingEventDispatcher = new EventDispatcher(IEventDispatcher(this)); super(); num = _arg1; if (_arg2 != null){ _data = _arg2; if (_data.time != undefined){ bestTime = (_data.time as Number); cleared = true; }; }; if (_arg3 != null){ _xml = _arg3; } else { _local4 = (levelOrder[num] as Class); _local5 = (new (_local4) as ByteArray); _xml = new XML(_local5.readUTFBytes(_local5.length)); }; guitarTime = _xml.@guitar; internetTime = _xml.@internet; unicornPowerTime = _xml.@unicornPower; } public function dispatchEvent(_arg1:Event):Boolean{ return (_bindingEventDispatcher.dispatchEvent(_arg1)); } private function convert():void{ var _local2:XML; var _local3:XML; var _local4:String; var _local5:RegExp; var _local6:Array; if (converted){ return; }; var _local1:Namespace = _xml.namespace(""); for each (_local2 in _xml.._local1::path) { _local4 = _local2.@d; _local5 = / |,/; _local6 = _local4.split(_local5); allLines.push(_local6); }; for each (_local3 in _xml.._local1::rect) { rects.push(_local3); }; converted = true; } public function hasEventListener(_arg1:String):Boolean{ return (_bindingEventDispatcher.hasEventListener(_arg1)); } public function get num():Number{ return (this._109446num); } public function getRankTextForTime(_arg1:Number):String{ if (_arg1 <= unicornPowerTime){ return ("Unicorn Power!"); }; if (_arg1 <= internetTime){ return ("The Internet"); }; if (_arg1 <= guitarTime){ return ("Electric Guitar"); }; return ("Gold Medal"); } public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ _bindingEventDispatcher.removeEventListener(_arg1, _arg2, _arg3); } public function set num(_arg1:Number):void{ var _local2:Object = this._109446num; if (_local2 !== _arg1){ this._109446num = _arg1; this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "num", _local2, _arg1)); }; } public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ _bindingEventDispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); } public function get bestTime():Number{ return (_bestTime); } public function willTrigger(_arg1:String):Boolean{ return (_bindingEventDispatcher.willTrigger(_arg1)); } public function start():void{ var _local7:Array; var _local8:XML; convert(); var _local1:Number = 0; var _local2:b2BodyDef = new b2BodyDef(); var _local3:LineDef = new LineDef(); var _local4:b2World = Game.me.world; var _local5:Graphics = Game.me.wallLayerMask.graphics; var _local6:Graphics = Game.me.wallLines.graphics; _local5.clear(); _local6.clear(); _local2.AddShape(_local3); _local3.density = 0; _local3.friction = 1; _local6.lineStyle(1, 0); _local5.beginFill(0, 1); _local5.moveTo(0, 0); _local5.lineTo(2000, 0); _local5.lineTo(2000, 2000); _local5.lineTo(0, 2000); _local5.lineTo(0, 0); for each (_local7 in allLines) { _local1 = _local7.indexOf("L"); _local5.lineTo(_local7[(_local1 - 2)], _local7[(_local1 - 1)]); while (_local1 != -1) { _local3.setStart(_local7[(_local1 - 2)], _local7[(_local1 - 1)]); _local3.setEnd(_local7[(_local1 + 1)], _local7[(_local1 + 2)]); _local4.CreateBody(_local2); _local5.lineTo(_local7[(_local1 + 1)], _local7[(_local1 + 2)]); _local6.moveTo(_local7[(_local1 - 2)], _local7[(_local1 - 1)]); _local6.lineTo(_local7[(_local1 + 1)], _local7[(_local1 + 2)]); _local1 = _local7.indexOf("L", (_local1 + 1)); }; _local5.lineTo(0, 0); }; _local5.endFill(); for each (_local8 in rects) { ThingFactory.makeThing(_local8); }; } private function set _1842367185bestTime(_arg1:Number):void{ _bestTime = _arg1; if (_data != null){ _data.time = _bestTime; }; } public function set bestTime(_arg1:Number):void{ var _local2:Object = this.bestTime; if (_local2 !== _arg1){ this._1842367185bestTime = _arg1; this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "bestTime", _local2, _arg1)); }; } public function getRankNumberForTime(_arg1:Number):Number{ if (!cleared){ return (0); }; if (_arg1 <= unicornPowerTime){ return (4); }; if (_arg1 <= internetTime){ return (3); }; if (_arg1 <= guitarTime){ return (2); }; return (1); } public function getRankSpriteForTime(_arg1:Number):Sprite{ if (_arg1 <= unicornPowerTime){ return (new UnicornPowerSprite()); }; if (_arg1 <= internetTime){ return (new InternetSprite()); }; if (_arg1 <= guitarTime){ return (new GuitarSprite()); }; return (new GoldMedalSprite()); } public static function clear():void{ var _local1:Object; for each (_local1 in localSO.data.levels) { if (_local1.time != undefined){ delete _local1.time; }; }; } public static function init():void{ var _local2:int; var _local3:Array; var _local4:Object; var _local1:Array = new Array(); if (localSO.data.levels != undefined){ _local3 = (localSO.data.levels as Array); } else { _local3 = new Array(); localSO.data.levels = _local3; }; _local2 = 0; while (_local2 < levelOrder.length) { if (_local3[_local2] != undefined){ _local4 = _local3[_local2]; } else { _local4 = new Object(); _local3[_local2] = _local4; }; _local1.push(new Level(_local2, _local4)); _local2++; }; levels = _local1; } public static function getNumberOfGuitars():uint{ var _local2:Level; var _local1:uint; for each (_local2 in levels) { if (_local2.getRankNumberForTime(_local2.bestTime) >= 2){ _local1++; }; }; return (_local1); } public static function set levels(_arg1:Array):void{ var _local3:IEventDispatcher; var _local2:Object = Level._1106127505levels; if (_local2 !== _arg1){ Level._1106127505levels = _arg1; _local3 = Level.staticEventDispatcher; if (_local3 != null){ _local3.dispatchEvent(PropertyChangeEvent.createUpdateEvent(Level, "levels", _local2, _arg1)); }; }; } public static function get staticEventDispatcher():IEventDispatcher{ return (_staticBindingEventDispatcher); } public static function get levels():Array{ return (Level._1106127505levels); } public static function getTotalTime():uint{ var _local2:Level; var _local1:uint; for each (_local2 in levels) { if (!_local2.cleared){ return (10000000); }; _local1 = (_local1 + (_local2.bestTime * 100)); }; return (Math.min(_local1, 10000000)); } public static function getNumberOfInternets():uint{ var _local2:Level; var _local1:uint; for each (_local2 in levels) { if (_local2.getRankNumberForTime(_local2.bestTime) >= 3){ _local1++; }; }; return (_local1); } public static function getNumberOfGolds():uint{ var _local2:Level; var _local1:uint; for each (_local2 in levels) { if (_local2.getRankNumberForTime(_local2.bestTime) >= 1){ _local1++; }; }; return (_local1); } public static function getNumberOfUnicornPowers():uint{ var _local2:Level; var _local1:uint; for each (_local2 in levels) { if (_local2.getRankNumberForTime(_local2.bestTime) >= 4){ _local1++; }; }; return (_local1); } } }//package
Section 454
//Level_level1 (Level_level1) package { import mx.core.*; public class Level_level1 extends ByteArrayAsset { } }//package
Section 455
//Level_level2 (Level_level2) package { import mx.core.*; public class Level_level2 extends ByteArrayAsset { } }//package
Section 456
//Level_level3 (Level_level3) package { import mx.core.*; public class Level_level3 extends ByteArrayAsset { } }//package
Section 457
//Level_level4 (Level_level4) package { import mx.core.*; public class Level_level4 extends ByteArrayAsset { } }//package
Section 458
//Level_level5 (Level_level5) package { import mx.core.*; public class Level_level5 extends ByteArrayAsset { } }//package
Section 459
//Level_level6 (Level_level6) package { import mx.core.*; public class Level_level6 extends ByteArrayAsset { } }//package
Section 460
//Level_level7 (Level_level7) package { import mx.core.*; public class Level_level7 extends ByteArrayAsset { } }//package
Section 461
//Level_level8 (Level_level8) package { import mx.core.*; public class Level_level8 extends ByteArrayAsset { } }//package
Section 462
//LevelButton (LevelButton) package { import flash.display.*; import flash.geom.*; import flash.media.*; import flash.text.*; import mx.core.*; import flash.events.*; import mx.events.*; import mx.styles.*; import mx.controls.*; import mx.binding.*; import flash.filters.*; import mx.containers.*; import flash.system.*; import flash.utils.*; import flash.ui.*; import flash.net.*; import flash.external.*; import flash.accessibility.*; import flash.debugger.*; import flash.errors.*; import flash.printing.*; import flash.profiler.*; import flash.xml.*; public class LevelButton extends Canvas implements IBindingClient { mx_internal var _bindingsByDestination:Object; mx_internal var _bindingsBeginWithWord:Object; private var _1391778726clearTimeLabel:Label; private var _1377687758button:Button; mx_internal var _watchers:Array; private var _1472332155_level:Level; private var _891985903string:String; mx_internal var _bindings:Array; private var _1481137938myAlpha:Number;// = 0 private var _1234737016rankSpacer:Spacer; private var _documentDescriptor_:UIComponentDescriptor; private static var _watcherSetupUtil:IWatcherSetupUtil; public function LevelButton(){ _documentDescriptor_ = new UIComponentDescriptor({type:Canvas, propertiesFactory:function ():Object{ return ({width:225, height:25, childDescriptors:[new UIComponentDescriptor({type:Button, id:"button", events:{click:"__button_click", focusIn:"__button_focusIn", focusOut:"__button_focusOut"}, stylesFactory:function ():void{ this.fillAlphas = [0.6, 0.6]; this.fillColors = [0xFFFFFF, 0xFFFFFF]; this.borderColor = 0; }, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100}); }}), new UIComponentDescriptor({type:HBox, events:{click:"___LevelButton_HBox1_click"}, stylesFactory:function ():void{ this.verticalAlign = "middle"; }, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:Spacer, propertiesFactory:function ():Object{ return ({width:2}); }}), new UIComponentDescriptor({type:Label, id:"clearTimeLabel", stylesFactory:function ():void{ this.color = 0; }, propertiesFactory:function ():Object{ return ({truncateToFit:false, mouseEnabled:false, mouseChildren:false}); }}), new UIComponentDescriptor({type:Spacer, propertiesFactory:function ():Object{ return ({percentWidth:100}); }}), new UIComponentDescriptor({type:Spacer, id:"rankSpacer", propertiesFactory:function ():Object{ return ({width:25, height:25, mouseEnabled:false, mouseChildren:false}); }}), new UIComponentDescriptor({type:Spacer, propertiesFactory:function ():Object{ return ({width:2}); }})]}); }})]}); }}); _bindings = []; _watchers = []; _bindingsByDestination = {}; _bindingsBeginWithWord = {}; super(); mx_internal::_document = this; if (!this.styleDeclaration){ this.styleDeclaration = new CSSStyleDeclaration(); }; this.styleDeclaration.defaultFactory = function ():void{ this.backgroundColor = 0xFFFFFF; }; this.width = 225; this.height = 25; } private function get _level():Level{ return (this._1472332155_level); } private function _LevelButton_bindingsSetup():Array{ var binding:Binding; var result:Array = []; binding = new Binding(this, function ():Number{ return (myAlpha); }, function (_arg1:Number):void{ this.setStyle("backgroundAlpha", _arg1); }, "this.backgroundAlpha"); result[0] = binding; binding = new Binding(this, function ():String{ var _local1:* = string; var _local2:* = ((_local1 == undefined)) ? null : String(_local1); return (_local2); }, function (_arg1:String):void{ clearTimeLabel.text = _arg1; }, "clearTimeLabel.text"); result[1] = binding; return (result); } public function set level(_arg1:Object):void{ var _local2:Sprite; if (!(_arg1 is Level)){ throw (new Error("LevelButton.set level(): Argument isn't a Level.")); }; _level = (_arg1 as Level); if (_level.cleared){ string = ((("Level " + (_level.num + 1)) + " Clear Time: ") + _level.bestTime.toFixed(2)); _local2 = _level.getRankSpriteForTime(_level.bestTime); _local2.x = 12.5; _local2.y = 12.5; _local2.scaleX = 0.08; _local2.scaleY = 0.08; while (rankSpacer.numChildren > 0) { rankSpacer.removeChildAt(0); }; rankSpacer.addChild(_local2); } else { string = ("Level " + (_level.num + 1)); }; } public function ___LevelButton_HBox1_click(_arg1:MouseEvent):void{ onClick(); } private function set _level(_arg1:Level):void{ var _local2:Object = this._1472332155_level; if (_local2 !== _arg1){ this._1472332155_level = _arg1; this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "_level", _local2, _arg1)); }; } private function get myAlpha():Number{ return (this._1481137938myAlpha); } private function onFocusOut():void{ myAlpha = 0; } override public function initialize():void{ var target:LevelButton; var watcherSetupUtilClass:Object; mx_internal::setDocumentDescriptor(_documentDescriptor_); var bindings:Array = _LevelButton_bindingsSetup(); var watchers:Array = []; target = this; if (_watcherSetupUtil == null){ watcherSetupUtilClass = getDefinitionByName("_LevelButtonWatcherSetupUtil"); var _local2 = watcherSetupUtilClass; _local2["init"](null); }; _watcherSetupUtil.setup(this, function (_arg1:String){ return (target[_arg1]); }, bindings, watchers); var i:uint; while (i < bindings.length) { Binding(bindings[i]).execute(); i = (i + 1); }; mx_internal::_bindings = mx_internal::_bindings.concat(bindings); mx_internal::_watchers = mx_internal::_watchers.concat(watchers); super.initialize(); } public function __button_click(_arg1:MouseEvent):void{ onClick(); } private function get string():String{ return (this._891985903string); } private function set string(_arg1:String):void{ var _local2:Object = this._891985903string; if (_local2 !== _arg1){ this._891985903string = _arg1; this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "string", _local2, _arg1)); }; } public function __button_focusOut(_arg1:FocusEvent):void{ onFocusOut(); } public function set button(_arg1:Button):void{ var _local2:Object = this._1377687758button; if (_local2 !== _arg1){ this._1377687758button = _arg1; this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "button", _local2, _arg1)); }; } private function onClick():void{ Game.me.onLevelButtonClicked(_level); } private function set myAlpha(_arg1:Number):void{ var _local2:Object = this._1481137938myAlpha; if (_local2 !== _arg1){ this._1481137938myAlpha = _arg1; this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "myAlpha", _local2, _arg1)); }; } public function __button_focusIn(_arg1:FocusEvent):void{ onFocusIn(); } public function get button():Button{ return (this._1377687758button); } public function set clearTimeLabel(_arg1:Label):void{ var _local2:Object = this._1391778726clearTimeLabel; if (_local2 !== _arg1){ this._1391778726clearTimeLabel = _arg1; this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "clearTimeLabel", _local2, _arg1)); }; } public function get rankSpacer():Spacer{ return (this._1234737016rankSpacer); } private function _LevelButton_bindingExprs():void{ var _local1:*; _local1 = myAlpha; _local1 = string; } public function get clearTimeLabel():Label{ return (this._1391778726clearTimeLabel); } private function onFocusIn():void{ myAlpha = 1; } public function set rankSpacer(_arg1:Spacer):void{ var _local2:Object = this._1234737016rankSpacer; if (_local2 !== _arg1){ this._1234737016rankSpacer = _arg1; this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "rankSpacer", _local2, _arg1)); }; } public static function set watcherSetupUtil(_arg1:IWatcherSetupUtil):void{ LevelButton._watcherSetupUtil = _arg1; } } }//package
Section 463
//MochiBot (MochiBot) package { import flash.display.*; import flash.system.*; import flash.net.*; 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("core.mochibot.com"); Security.allowInsecureDomain("core.mochibot.com"); 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 464
//Music (Music) package { import flash.media.*; import flash.events.*; public class Music { public static const Aitrack:Sound = (new AitrackClass() as Sound); public static const AhDah:Sound = (new AhDahClass() as Sound); public static const CoolBlast:Sound = (new CoolBlastClass() as Sound); public static const songList:Array = [AhDah, CoolBlast, Smoother, Aitrack, CoolBlast, Smoother, Aitrack, AhDah]; private static const AhDahClass:Class = Music_AhDahClass; private static const FrozenStarClass:Class = Music_FrozenStarClass; private static const CoolBlastClass:Class = Music_CoolBlastClass; public static const FrozenStar:Sound = (new FrozenStarClass() as Sound); private static const AitrackClass:Class = Music_AitrackClass; public static const Smoother:Sound = (new SmootherClass() as Sound); private static const SmootherClass:Class = Music_SmootherClass; private static var pausedAt:Number; private static var channel:SoundChannel; private static var paused:Boolean; private static var currentSong:Sound; public static function pause():void{ if ((((((channel == null)) || ((currentSong == null)))) || (paused))){ return; }; paused = true; pausedAt = channel.position; channel.stop(); channel.removeEventListener(Event.SOUND_COMPLETE, onSoundComplete); channel = null; } public static function stop():void{ if (channel != null){ channel.stop(); channel.removeEventListener(Event.SOUND_COMPLETE, onSoundComplete); channel = null; }; currentSong = null; paused = false; pausedAt = 0; } public static function unpause():void{ if (((!(paused)) || ((currentSong == null)))){ return; }; channel = currentSong.play(pausedAt); channel.addEventListener(Event.SOUND_COMPLETE, onSoundComplete); paused = false; pausedAt = 0; } private static function onSoundComplete(_arg1:Event):void{ channel.stop(); channel.removeEventListener(Event.SOUND_COMPLETE, onSoundComplete); channel = null; channel = currentSong.play(); channel.addEventListener(Event.SOUND_COMPLETE, onSoundComplete); paused = false; pausedAt = 0; } public static function play(_arg1:Sound):void{ if (currentSong == _arg1){ if (paused){ unpause(); }; return; }; if (channel != null){ stop(); }; currentSong = _arg1; channel = _arg1.play(); channel.addEventListener(Event.SOUND_COMPLETE, onSoundComplete); paused = false; pausedAt = 0; } } }//package
Section 465
//Music_AhDahClass (Music_AhDahClass) package { import mx.core.*; public class Music_AhDahClass extends SoundAsset { } }//package
Section 466
//Music_AitrackClass (Music_AitrackClass) package { import mx.core.*; public class Music_AitrackClass extends SoundAsset { } }//package
Section 467
//Music_CoolBlastClass (Music_CoolBlastClass) package { import mx.core.*; public class Music_CoolBlastClass extends SoundAsset { } }//package
Section 468
//Music_FrozenStarClass (Music_FrozenStarClass) package { import mx.core.*; public class Music_FrozenStarClass extends SoundAsset { } }//package
Section 469
//Music_SmootherClass (Music_SmootherClass) package { import mx.core.*; public class Music_SmootherClass extends SoundAsset { } }//package
Section 470
//Panel (Panel) package { import flash.display.*; import flash.media.*; import flash.events.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.Shapes.*; public class Panel extends Thing { public var body:b2Body; public var offSound:Sound; private var graphic:MovieClip; public var aSwitch:Switch; public var onSound:Sound; private static const maskBits:int = 2; private static const categoryBits:int = 1; public function Panel(_arg1:XML){ var _local2:b2BodyDef; super(_arg1); _local2 = new b2BodyDef(); var _local3:b2BoxDef = new b2BoxDef(); _local3.extents.Set(3, 3); _local3.density = 0; _local3.categoryBits = categoryBits; _local3.maskBits = maskBits; _local3.userData = this; _local2.AddShape(_local3); _local2.position.Set((Number(_arg1.@x) + 3), (Number(_arg1.@y) + 3)); _local2.solid = false; body = Game.me.world.CreateBody(_local2); Game.me.things.push(this); if (_arg1.@type == "togglePanel"){ graphic = new TogglePanelSprite(); onSound = SFX.panelToggle; offSound = SFX.panelToggle; } else { if (_arg1.@type == "powerPanel"){ graphic = new PowerPanelSprite(); onSound = SFX.panelOn; offSound = SFX.panelOff; } else { throw (new Error(("Panel constructor: unknown type: " + _arg1.localName()))); }; }; aSwitch = (Game.me.switches[_arg1.@switchID] as Switch); aSwitch.addEventListener(Event.CHANGE, onFlipped, false, 0, false); if (aSwitch.state){ graphic.gotoAndStop("on"); } else { graphic.gotoAndStop("off"); }; graphic.scaleX = (0.05 * direction); graphic.scaleY = 0.05; Game.me.panelLayer.addChild(graphic); graphic.x = body.m_position.x; graphic.y = body.m_position.y; graphic.rotation = ((body.m_rotation * 180) / Math.PI); } public function onFlipped(_arg1:Event):void{ if (aSwitch.state){ graphic.gotoAndStop("on"); } else { graphic.gotoAndStop("off"); }; } public function flip():void{ if (aSwitch.state){ aSwitch.state = false; offSound.play(); } else { aSwitch.state = true; onSound.play(); }; } override public function destroy():void{ Game.me.panelLayer.removeChild(graphic); Game.me.things.splice(Game.me.things.indexOf(this), 1); Game.me.world.DestroyBody(body); } } }//package
Section 471
//Player (Player) package { import flash.display.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Dynamics.Joints.*; import Box2D.Collision.Shapes.*; public class Player extends ThingAgent { private var panel:Panel; private var joint:b2RevoluteJoint; private var forklift:Forklift; private var state:String;// = "falling state" private var feetShape:b2Shape; private var panelDistance:Number;// = INF private var prevState:String;// = "falling state" private var head:b2Body; private var grounded:Boolean;// = false private var graphic:MovieClip; public var feet:b2Body; private var airTime:int;// = 0 private var forkliftJoint:b2DistanceJoint; private static const categoryBits:int = 2; private static const RISING:String = "rising state"; private static const FALLING:String = "falling state"; private static const FORKLIFT:String = "forklift state"; private static const maskBits:int = 65489; private static const IDLE:String = "idle state"; private static const ejectSpeed:Number = -55; private static const jumpSpeed:Number = -58; private static const runSpeed:Number = 12.5663706143592; private static const airSpeed:Number = 36; private static const RUNNING:String = "running state"; public function Player(_arg1:XML){ graphic = new KidSprite(); super(_arg1); if (Game.me.player == null){ Game.me.player = this; } else { throw (new Error("Player constructor: Game still has a reference to an old Player.")); }; var _local2:b2PolyDef = new b2PolyDef(); var _local3:b2BodyDef = new b2BodyDef(); _local3.AddShape(_local2); _local2.density = 0.5; _local2.friction = 0; _local2.vertexCount = 5; _local2.vertices[0].Set(-2.5, -2.5); _local2.vertices[1].Set(2.5, -2.5); _local2.vertices[2].Set(2.75, 5); _local2.vertices[3].Set(0, 7); _local2.vertices[4].Set(-2.75, 5); _local2.userData = this; _local2.categoryBits = categoryBits; _local2.maskBits = maskBits; _local3.position.Set((Number(_arg1.@x) + 5), (Number(_arg1.@y) + 2.5)); head = Game.me.world.CreateBody(_local3); head.m_invI = 0; var _local4:b2CircleDef = new b2CircleDef(); _local3 = new b2BodyDef(); _local3.AddShape(_local4); _local4.density = 0.5; _local4.friction = 5; _local4.radius = 2.5; _local4.userData = this; _local4.categoryBits = categoryBits; _local4.maskBits = maskBits; _local3.position.Set((Number(_arg1.@x) + 5), (Number(_arg1.@y) + 7.5)); feet = Game.me.world.CreateBody(_local3); var _local5:b2RevoluteJointDef = new b2RevoluteJointDef(); _local5.body1 = head; _local5.body2 = feet; _local5.anchorPoint = feet.m_position; _local5.motorSpeed = 0; _local5.motorTorque = Number.POSITIVE_INFINITY; _local5.enableMotor = true; joint = (Game.me.world.CreateJoint(_local5) as b2RevoluteJoint); Game.me.things.push(this); Game.me.steppingThings.push(this); enableAgent(); graphic.scaleX = 0.1; graphic.scaleY = 0.1; Game.me.kidLayer.addChild(graphic); repaint(); } override public function destroy():void{ Game.me.kidLayer.removeChild(graphic); Game.me.things.splice(Game.me.things.indexOf(this), 1); Game.me.steppingThings.splice(Game.me.steppingThings.indexOf(this), 1); Game.me.world.DestroyBody(head); Game.me.world.DestroyBody(feet); Game.me.player = null; disableAgent(); } override public function getCollisionSound(_arg1:b2Vec2, _arg2:Number, _arg3:b2Shape, _arg4:b2Shape, _arg5:Thing):CollisionSound{ var _local6:Forklift; var _local7:b2Vec2; var _local8:b2DistanceJointDef; var _local9:Panel; var _local10:Number; if (state == FORKLIFT){ return (null); }; if ((_arg5 is Forklift)){ _local6 = (_arg5 as Forklift); if (((_local6.upright) && ((_arg4 == _local6.panelShape)))){ _local7 = _local6.wheel1.m_position.Copy(); _local7.Subtract(feet.m_position); if (_local7.Length() < 7){ SFX.enterForklift.play(); SFX.startForklift(); forklift = _local6; forklift.enableAgent(); if (up){ forklift.onUpPressed(); } else { if (down){ forklift.onDownPressed(); }; }; if (left){ forklift.onLeftPressed(); } else { if (right){ forklift.onRightPressed(); }; }; state = FORKLIFT; _local8 = new b2DistanceJointDef(); _local8.body1 = head; _local8.body2 = forklift.frame; _local8.anchorPoint1 = head.m_position; _local8.anchorPoint2 = head.m_position; forkliftJoint = (Game.me.world.CreateJoint(_local8) as b2DistanceJoint); }; }; } else { if ((_arg5 is Panel)){ _local9 = (_arg5 as Panel); _local10 = (Math.pow((_local9.body.m_position.x - head.m_position.x), 2) + Math.pow((_local9.body.m_position.y - head.m_position.y), 2)); _local10 = Math.sqrt(_local10); if (_local10 < panelDistance){ panelDistance = _local10; panel = _local9; }; }; }; if (_arg3.m_body == feet){ if ((((_arg4.m_body.m_flags & b2Body.solid)) && ((_arg1.y > 0.1)))){ grounded = true; }; }; return (null); } override public function repaint():void{ graphic.x = feet.m_position.x; graphic.y = (feet.m_position.y - 2.5); graphic.scaleX = (direction * 0.1); } override public function step():void{ if (((left) && (!((state == FORKLIFT))))){ direction = -1; joint.m_motorSpeed = -(runSpeed); } else { if (((right) && (!((state == FORKLIFT))))){ direction = 1; joint.m_motorSpeed = runSpeed; } else { joint.m_motorSpeed = 0; }; }; if (panel != null){ if (((down2) || (up2))){ panel.flip(); }; }; switch (state){ case IDLE: airTime = 0; if (!grounded){ state = FALLING; } else { if (((jump2) && (grounded))){ state = RISING; feet.m_linearVelocity.y = jumpSpeed; head.m_linearVelocity.y = jumpSpeed; grounded = false; } else { if (((left) || (right))){ state = RUNNING; }; }; }; break; case RUNNING: airTime = 0; if (!grounded){ state = FALLING; } else { if (((jump2) && (grounded))){ state = RISING; feet.m_linearVelocity.y = jumpSpeed; head.m_linearVelocity.y = jumpSpeed; grounded = false; } else { if (((!(left)) && (!(right)))){ state = IDLE; }; }; }; break; case RISING: airTime = 100; if (jump3){ feet.m_linearVelocity.y = (feet.m_linearVelocity.y * 0.5); head.m_linearVelocity.y = (head.m_linearVelocity.y * 0.5); state = FALLING; } else { if (feet.m_linearVelocity.y > 0){ state = FALLING; }; }; case FALLING: if (((jump2) && ((airTime < 8)))){ state = RISING; feet.m_linearVelocity.y = jumpSpeed; head.m_linearVelocity.y = jumpSpeed; grounded = false; } else { if (grounded){ if (((left) || (right))){ state = RUNNING; } else { state = IDLE; }; } else { if (left){ head.m_linearVelocity.x = ((head.m_linearVelocity.x * 0.85) - (airSpeed * 0.15)); feet.m_linearVelocity.x = ((feet.m_linearVelocity.x * 0.85) - (airSpeed * 0.15)); } else { if (right){ head.m_linearVelocity.x = ((head.m_linearVelocity.x * 0.85) + (airSpeed * 0.15)); feet.m_linearVelocity.x = ((feet.m_linearVelocity.x * 0.85) + (airSpeed * 0.15)); } else { head.m_linearVelocity.x = (head.m_linearVelocity.x * 0.95); feet.m_linearVelocity.x = (feet.m_linearVelocity.x * 0.95); }; }; }; }; airTime++; break; case FORKLIFT: if (((jump2) || (!(forklift.upright)))){ state = FALLING; head.m_linearVelocity.x = (forklift.direction * ejectSpeed); feet.m_linearVelocity.x = (forklift.direction * ejectSpeed); forklift.disableAgent(); Game.me.world.DestroyJoint(forkliftJoint); forklift = null; SFX.killForklift(); }; }; if (state != prevState){ switch (state){ case IDLE: graphic.gotoAndPlay("idle"); break; case RUNNING: graphic.gotoAndPlay("running"); break; case RISING: graphic.gotoAndPlay("rising"); break; case FALLING: if (prevState != RISING){ graphic.gotoAndPlay("falling"); }; break; case FORKLIFT: graphic.gotoAndPlay("idle"); break; }; }; prevState = state; up2 = false; down2 = false; jump2 = false; jump3 = false; panel = null; panelDistance = Number.POSITIVE_INFINITY; grounded = false; } public function getCameraX():Number{ return (head.m_position.x); } public function getCameraY():Number{ return (head.m_position.y); } } }//package
Section 472
//PowerPanelSprite (PowerPanelSprite) package { import flash.display.*; public dynamic class PowerPanelSprite extends MovieClip { public function PowerPanelSprite(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package
Section 473
//RedButton (RedButton) package { import flash.display.*; import flash.events.*; import Box2D.Dynamics.*; import Box2D.Dynamics.Joints.*; import Box2D.Collision.Shapes.*; public class RedButton extends SteppingThing { public var body:b2Body; public var joint:b2PrismaticJoint; private var rimGraphic:MovieClip; public var aSwitch:Switch; private var buttonGraphic:MovieClip; private static const maskBits:int = 65534; private static const categoryBits:int = 1; public function RedButton(_arg1:XML){ buttonGraphic = new ButtonSprite(); rimGraphic = new ButtonRimSprite(); super(_arg1); aSwitch = (Game.me.switches[_arg1.@switchID] as Switch); var _local2:b2BodyDef = new b2BodyDef(); var _local3:b2CircleDef = new b2CircleDef(); _local3.radius = 5; _local3.density = 0.05; _local3.categoryBits = categoryBits; _local3.maskBits = maskBits; _local3.userData = this; _local3.localPosition.Set(((5 * direction) + svgWidth), 5); _local2.AddShape(_local3); _local2.position = svgPos; _local2.rotation = svgAngle; body = Game.me.world.CreateBody(_local2); var _local4:b2PrismaticJointDef = new b2PrismaticJointDef(); _local4.body1 = Game.me.world.GetGroundBody(); _local4.body2 = body; _local4.anchorPoint = body.m_position; _local4.axis.Set(Math.sin(svgAngle), -(Math.cos(svgAngle))); _local4.enableLimit = true; _local4.enableMotor = true; _local4.motorForce = 1300; _local4.lowerTranslation = -3; _local4.upperTranslation = 0; joint = (Game.me.world.CreateJoint(_local4) as b2PrismaticJoint); Game.me.things.push(this); Game.me.steppingThings.push(this); buttonGraphic.scaleX = (0.05 * direction); buttonGraphic.scaleY = 0.05; Game.me.solidLayer.addChild(buttonGraphic); rimGraphic.scaleX = (0.05 * direction); rimGraphic.scaleY = 0.05; Game.me.solidLayer.addChild(rimGraphic); repaint(); rimGraphic.x = body.m_position.x; rimGraphic.y = body.m_position.y; rimGraphic.rotation = ((body.m_rotation * 180) / Math.PI); } override public function repaint():void{ buttonGraphic.x = body.m_position.x; buttonGraphic.y = body.m_position.y; buttonGraphic.rotation = ((body.m_rotation * 180) / Math.PI); } override public function destroy():void{ Game.me.solidLayer.removeChild(buttonGraphic); Game.me.solidLayer.removeChild(rimGraphic); Game.me.things.splice(Game.me.things.indexOf(this), 1); Game.me.steppingThings.splice(Game.me.steppingThings.indexOf(this), 1); Game.me.world.DestroyBody(body); } override public function step():void{ var _local1:Number; _local1 = (2 * -(joint.GetJointTranslation())); joint.m_motorSpeed = (_local1 * 2); if (aSwitch.state != (_local1 > 2)){ if (aSwitch.state){ aSwitch.state = false; SFX.buttonRelease.play(); } else { aSwitch.state = true; SFX.buttonPress.play(); }; }; } } }//package
Section 474
//SFX (SFX) package { import flash.media.*; public class SFX { private static const buttonReleaseClass:Class = SFX_buttonReleaseClass; public static const heavyBox:Sound = (new heavyBoxClass() as Sound); public static const panelOn:Sound = (new panelOnClass() as Sound); public static const elevatorStart:Sound = (new elevatorStartClass() as Sound); private static const doorSlideClass:Class = SFX_doorSlideClass; private static const endLevelClass:Class = SFX_endLevelClass; public static const elevatorStop:Sound = (new elevatorStopClass() as Sound); public static const doorSlide:Sound = (new doorSlideClass() as Sound); private static const forkliftClass:Class = SFX_forkliftClass; public static const buttonPress:Sound = (new buttonPressClass() as Sound); private static const enterForkliftClass:Class = SFX_enterForkliftClass; private static const panelOnClass:Class = SFX_panelOnClass; private static const ballClass:Class = SFX_ballClass; private static const elevatorStartClass:Class = SFX_elevatorStartClass; public static const enterForklift:Sound = (new enterForkliftClass() as Sound); private static const buttonPressClass:Class = SFX_buttonPressClass; private static const elevatorStopClass:Class = SFX_elevatorStopClass; private static const forkliftEngineClass:Class = SFX_forkliftEngineClass; public static const panelOff:Sound = (new panelOffClass() as Sound); public static const forklift:Sound = (new forkliftClass() as Sound); private static const heavyBoxClass:Class = SFX_heavyBoxClass; private static const panelToggleClass:Class = SFX_panelToggleClass; public static const endLevel:Sound = (new endLevelClass() as Sound); private static const panelOffClass:Class = SFX_panelOffClass; public static const forkliftEngine:Sound = (new forkliftEngineClass() as Sound); public static const buttonRelease:Sound = (new buttonReleaseClass() as Sound); public static const panelToggle:Sound = (new panelToggleClass() as Sound); public static const ball:Sound = (new ballClass() as Sound); private static var forkliftChannel:SoundChannel; public static function startForklift():void{ if (forkliftChannel == null){ forkliftChannel = forkliftEngine.play(0, 10000); }; } public static function killForklift():void{ if (forkliftChannel != null){ forkliftChannel.stop(); }; forkliftChannel = null; } } }//package
Section 475
//SFX_ballClass (SFX_ballClass) package { import mx.core.*; public class SFX_ballClass extends SoundAsset { } }//package
Section 476
//SFX_buttonPressClass (SFX_buttonPressClass) package { import mx.core.*; public class SFX_buttonPressClass extends SoundAsset { } }//package
Section 477
//SFX_buttonReleaseClass (SFX_buttonReleaseClass) package { import mx.core.*; public class SFX_buttonReleaseClass extends SoundAsset { } }//package
Section 478
//SFX_doorSlideClass (SFX_doorSlideClass) package { import mx.core.*; public class SFX_doorSlideClass extends SoundAsset { } }//package
Section 479
//SFX_elevatorStartClass (SFX_elevatorStartClass) package { import mx.core.*; public class SFX_elevatorStartClass extends SoundAsset { } }//package
Section 480
//SFX_elevatorStopClass (SFX_elevatorStopClass) package { import mx.core.*; public class SFX_elevatorStopClass extends SoundAsset { } }//package
Section 481
//SFX_endLevelClass (SFX_endLevelClass) package { import mx.core.*; public class SFX_endLevelClass extends SoundAsset { } }//package
Section 482
//SFX_enterForkliftClass (SFX_enterForkliftClass) package { import mx.core.*; public class SFX_enterForkliftClass extends SoundAsset { } }//package
Section 483
//SFX_forkliftClass (SFX_forkliftClass) package { import mx.core.*; public class SFX_forkliftClass extends SoundAsset { } }//package
Section 484
//SFX_forkliftEngineClass (SFX_forkliftEngineClass) package { import mx.core.*; public class SFX_forkliftEngineClass extends SoundAsset { } }//package
Section 485
//SFX_heavyBoxClass (SFX_heavyBoxClass) package { import mx.core.*; public class SFX_heavyBoxClass extends SoundAsset { } }//package
Section 486
//SFX_panelOffClass (SFX_panelOffClass) package { import mx.core.*; public class SFX_panelOffClass extends SoundAsset { } }//package
Section 487
//SFX_panelOnClass (SFX_panelOnClass) package { import mx.core.*; public class SFX_panelOnClass extends SoundAsset { } }//package
Section 488
//SFX_panelToggleClass (SFX_panelToggleClass) package { import mx.core.*; public class SFX_panelToggleClass extends SoundAsset { } }//package
Section 489
//SteppingThing (SteppingThing) package { public class SteppingThing extends Thing { public function SteppingThing(_arg1:XML){ super(_arg1); } public function repaint():void{ } public function step():void{ } } }//package
Section 490
//Switch (Switch) package { import flash.events.*; public class Switch extends EventDispatcher { private var _state:Boolean;// = false public function Switch(_arg1:Boolean){ _state = _arg1; } public function get state():Boolean{ return (_state); } public function set state(_arg1:Boolean):void{ var _local2:Event; if (_state != _arg1){ _state = _arg1; _local2 = new Event(Event.CHANGE); dispatchEvent(_local2); }; } } }//package
Section 491
//Thing (Thing) package { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Dynamics.Joints.*; import Box2D.Collision.Shapes.*; public class Thing { public var svgWidth:Number; public var svgAngle:Number; public var svgHeight:Number; public var svgPos:b2Vec2; public var direction:Number; public function Thing(_arg1:XML){ var _local2:String; var _local3:RegExp; var _local4:Array; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; svgPos = new b2Vec2(); super(); svgPos.Set(_arg1.@x, _arg1.@y); svgWidth = _arg1.@width; svgHeight = _arg1.@height; if (_arg1.@transform == undefined){ svgAngle = 0; } else { _local2 = _arg1.@transform; _local3 = /\(|,|\)/; _local4 = _local2.split(_local3); if (_local4[0] == "scale"){ svgAngle = Math.PI; svgPos.x = (svgPos.x * -1); svgPos.y = (svgPos.y * -1); } else { if (_local4[0] == "matrix"){ _local5 = _local4[1]; _local6 = _local4[3]; _local7 = _local4[2]; _local8 = _local4[4]; svgAngle = -(Math.atan2(_local6, _local5)); _local9 = ((svgPos.x * _local5) + (svgPos.y * _local6)); _local10 = ((svgPos.x * _local7) + (svgPos.y * _local8)); svgPos.x = _local9; svgPos.y = _local10; } else { throw (new Error(("Thing Super Constructor: Unknown transform type: " + _local4[0]))); }; }; }; if (_arg1.@direction == undefined){ direction = 1; svgWidth = 0; } else { direction = _arg1.@direction; if (direction != -1){ svgWidth = 0; }; }; } public function destroy():void{ } public function populatePolyDef(_arg1:b2PolyDef, _arg2:Array):void{ var _local3:int; var _local4:Number; var _local5:Number; _arg1.vertexCount = (_arg2.length >> 1); if (direction != -1){ _local3 = 0; while (_local3 < (_arg2.length >> 1)) { _local4 = (_arg2[(_local3 * 2)] as Number); _local5 = (_arg2[((_local3 * 2) + 1)] as Number); _arg1.vertices[_local3].Set(_local4, _local5); _local3++; }; } else { _local3 = 0; while (_local3 < (_arg2.length >> 1)) { _local4 = (_arg2[(_local3 * 2)] as Number); _local5 = (_arg2[((_local3 * 2) + 1)] as Number); _arg1.vertices[((_arg1.vertexCount - 1) - _local3)].Set(((_local4 * -1) + svgWidth), _local5); _local3++; }; }; } public function getCollisionSound(_arg1:b2Vec2, _arg2:Number, _arg3:b2Shape, _arg4:b2Shape, _arg5:Thing):CollisionSound{ return (null); } } }//package
Section 492
//ThingAgent (ThingAgent) package { public class ThingAgent extends SteppingThing { public var enabled:Boolean;// = false protected var jump3:Boolean;// = false protected var left:Boolean;// = false protected var left2:Boolean;// = false protected var left3:Boolean;// = false protected var down2:Boolean;// = false protected var down3:Boolean;// = false protected var jump2:Boolean;// = false protected var right3:Boolean;// = false protected var up:Boolean;// = false protected var right:Boolean;// = false protected var right2:Boolean;// = false protected var down:Boolean;// = false protected var up2:Boolean;// = false protected var up3:Boolean;// = false protected var jump:Boolean;// = false public function ThingAgent(_arg1:XML){ super(_arg1); } public function onJumpReleased():void{ if (!jump){ return; }; jump = false; jump3 = true; } public function enableAgent():void{ if (!enabled){ Game.me.agents.push(this); }; enabled = true; } public function onDownReleased():void{ if (!down){ return; }; down = false; down3 = true; } public function disableAgent():void{ if (enabled){ Game.me.agents.splice(Game.me.agents.indexOf(this), 1); }; left = false; left2 = false; left3 = true; right = false; right2 = false; right3 = true; up = false; up2 = false; up3 = true; down = false; down2 = false; down3 = true; jump = false; jump2 = false; jump3 = true; enabled = false; } public function onDownPressed():void{ if (down){ return; }; onUpReleased(); down = true; down2 = true; } public function onRightReleased():void{ if (!right){ return; }; right = false; right3 = true; } public function onRightPressed():void{ if (right){ return; }; onLeftReleased(); right = true; right2 = true; } public function onUpPressed():void{ if (up){ return; }; onDownReleased(); up = true; up2 = true; } public function onLeftReleased():void{ if (!left){ return; }; left = false; left3 = true; } public function onJumpPressed():void{ if (jump){ return; }; jump = true; jump2 = true; } public function onLeftPressed():void{ if (left){ return; }; onRightReleased(); left = true; left2 = true; } public function onUpReleased():void{ if (!up){ return; }; up = false; up3 = true; } } }//package
Section 493
//ThingFactory (ThingFactory) package { public class ThingFactory { public static function makeThing(_arg1:XML):void{ switch (String(_arg1.@type)){ case "hintArrowKey": case "hintSpaceKey": case "entrance": new Decoration(_arg1); break; case "player": new Player(_arg1); break; case "smallBox": case "largeBox": case "box": new Box(_arg1); break; case "forklift": new Forklift(_arg1); break; case "goal": new Goal(_arg1); break; case "gate": new Gate(_arg1); break; case "togglePanel": case "powerPanel": new Panel(_arg1); break; case "button": new RedButton(_arg1); break; case "elevator": new Elevator(_arg1); break; case "ball": new Ball(_arg1); break; default: throw (new Error(("ThingFactory.makeThing(): Unknown type: " + _arg1.@type))); }; } } }//package
Section 494
//TogglePanelSprite (TogglePanelSprite) package { import flash.display.*; public dynamic class TogglePanelSprite extends MovieClip { public function TogglePanelSprite(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package
Section 495
//UnicornPowerSprite (UnicornPowerSprite) package { import flash.display.*; public dynamic class UnicornPowerSprite extends MovieClip { } }//package

Library Items

Symbol 1 MovieClip {com.kongregate.as3.client.KongregateAPI} [com.kongregate.as3.client.KongregateAPI]
Symbol 2 GraphicUsed by:3
Symbol 3 MovieClip {_CursorManagerStyle__embed_css_Assets_swf_mx_skins_cursor_BusyCursor_1310759048} [mx.skins.cursor.BusyCursor]Uses:2
Symbol 4 BitmapUsed by:5
Symbol 5 GraphicUses:4Used by:6
Symbol 6 MovieClip {_SWFLoaderStyle__embed_css_Assets_swf___brokenImage_1963977306} [__brokenImage]Uses:5
Symbol 7 BitmapUsed by:8
Symbol 8 GraphicUses:7Used by:9
Symbol 9 MovieClip {GoalSprite} [GoalSprite]Uses:8
Symbol 10 BitmapUsed by:11
Symbol 11 GraphicUses:10Used by:12
Symbol 12 MovieClip {GuitarSprite} [GuitarSprite]Uses:11
Symbol 13 BitmapUsed by:14
Symbol 14 GraphicUses:13Used by:15
Symbol 15 MovieClip {UnicornPowerSprite} [UnicornPowerSprite]Uses:14
Symbol 16 BitmapUsed by:17
Symbol 17 GraphicUses:16Used by:18
Symbol 18 MovieClip {InternetSprite} [InternetSprite]Uses:17
Symbol 19 BitmapUsed by:20
Symbol 20 GraphicUses:19Used by:21
Symbol 21 MovieClip {GoldMedalSprite} [GoldMedalSprite]Uses:20
Symbol 22 Sound {Music_SmootherClass} [Music_SmootherClass]
Symbol 23 Sound {Music_AhDahClass} [Music_AhDahClass]
Symbol 24 Sound {Music_FrozenStarClass} [Music_FrozenStarClass]
Symbol 25 Sound {Music_AitrackClass} [Music_AitrackClass]
Symbol 26 Sound {Music_CoolBlastClass} [Music_CoolBlastClass]
Symbol 27 Sound {SFX_elevatorStopClass} [SFX_elevatorStopClass]
Symbol 28 Sound {SFX_ballClass} [SFX_ballClass]
Symbol 29 Sound {SFX_buttonPressClass} [SFX_buttonPressClass]
Symbol 30 Sound {SFX_forkliftEngineClass} [SFX_forkliftEngineClass]
Symbol 31 Sound {SFX_buttonReleaseClass} [SFX_buttonReleaseClass]
Symbol 32 Sound {SFX_panelToggleClass} [SFX_panelToggleClass]
Symbol 33 Sound {SFX_heavyBoxClass} [SFX_heavyBoxClass]
Symbol 34 Sound {SFX_endLevelClass} [SFX_endLevelClass]
Symbol 35 Sound {SFX_panelOnClass} [SFX_panelOnClass]
Symbol 36 Sound {SFX_forkliftClass} [SFX_forkliftClass]
Symbol 37 Sound {SFX_doorSlideClass} [SFX_doorSlideClass]
Symbol 38 Sound {SFX_panelOffClass} [SFX_panelOffClass]
Symbol 39 Sound {SFX_elevatorStartClass} [SFX_elevatorStartClass]
Symbol 40 Sound {SFX_enterForkliftClass} [SFX_enterForkliftClass]
Symbol 41 BitmapUsed by:42
Symbol 42 GraphicUses:41Used by:51
Symbol 43 BitmapUsed by:44
Symbol 44 GraphicUses:43Used by:51
Symbol 45 BitmapUsed by:46
Symbol 46 GraphicUses:45Used by:51
Symbol 47 BitmapUsed by:48
Symbol 48 GraphicUses:47Used by:51
Symbol 49 BitmapUsed by:50
Symbol 50 GraphicUses:49Used by:51
Symbol 51 MovieClip {KidSprite} [KidSprite]Uses:42 44 46 48 50
Symbol 52 BitmapUsed by:53
Symbol 53 GraphicUses:52Used by:54
Symbol 54 MovieClip {ForkliftForkSprite} [ForkliftForkSprite]Uses:53
Symbol 55 BitmapUsed by:56
Symbol 56 GraphicUses:55Used by:57
Symbol 57 MovieClip {ForkliftWheelSprite} [ForkliftWheelSprite]Uses:56
Symbol 58 BitmapUsed by:59
Symbol 59 GraphicUses:58Used by:60
Symbol 60 MovieClip {ForkliftBeamSprite} [ForkliftBeamSprite]Uses:59
Symbol 61 BitmapUsed by:62
Symbol 62 GraphicUses:61Used by:63
Symbol 63 MovieClip {ForkliftFrameSprite} [ForkliftFrameSprite]Uses:62
Symbol 64 BitmapUsed by:65
Symbol 65 GraphicUses:64Used by:68
Symbol 66 BitmapUsed by:67
Symbol 67 GraphicUses:66Used by:68
Symbol 68 MovieClip {PowerPanelSprite} [PowerPanelSprite]Uses:65 67
Symbol 69 BitmapUsed by:70
Symbol 70 GraphicUses:69Used by:73
Symbol 71 BitmapUsed by:72
Symbol 72 GraphicUses:71Used by:73
Symbol 73 MovieClip {TogglePanelSprite} [TogglePanelSprite]Uses:70 72
Symbol 74 BitmapUsed by:75
Symbol 75 GraphicUses:74Used by:76
Symbol 76 MovieClip {EntranceSprite} [EntranceSprite]Uses:75
Symbol 77 BitmapUsed by:78
Symbol 78 GraphicUses:77Used by:79
Symbol 79 MovieClip {HintArrowKeySprite} [HintArrowKeySprite]Uses:78
Symbol 80 BitmapUsed by:81
Symbol 81 GraphicUses:80Used by:82
Symbol 82 MovieClip {HintSpaceKeySprite} [HintSpaceKeySprite]Uses:81
Symbol 83 BitmapUsed by:84
Symbol 84 GraphicUses:83Used by:85
Symbol 85 MovieClip {ButtonRimSprite} [ButtonRimSprite]Uses:84
Symbol 86 BitmapUsed by:87
Symbol 87 GraphicUses:86Used by:88
Symbol 88 MovieClip {ButtonSprite} [ButtonSprite]Uses:87
Symbol 89 BitmapUsed by:90
Symbol 90 GraphicUses:89Used by:91
Symbol 91 MovieClip {GateSprite} [GateSprite]Uses:90
Symbol 92 BitmapUsed by:93
Symbol 93 GraphicUses:92Used by:94
Symbol 94 MovieClip {ElevatorSprite} [ElevatorSprite]Uses:93
Symbol 95 BitmapUsed by:96
Symbol 96 GraphicUses:95Used by:97
Symbol 97 MovieClip {BoxSprite} [BoxSprite]Uses:96
Symbol 98 BitmapUsed by:99
Symbol 99 GraphicUses:98Used by:100
Symbol 100 MovieClip {Ball2Sprite} [Ball2Sprite]Uses:99
Symbol 101 BitmapUsed by:102
Symbol 102 GraphicUses:101Used by:103
Symbol 103 MovieClip {Ball0Sprite} [Ball0Sprite]Uses:102
Symbol 104 BitmapUsed by:105
Symbol 105 GraphicUses:104Used by:106
Symbol 106 MovieClip {Ball4Sprite} [Ball4Sprite]Uses:105
Symbol 107 BitmapUsed by:108
Symbol 108 GraphicUses:107Used by:109
Symbol 109 MovieClip {Ball1Sprite} [Ball1Sprite]Uses:108
Symbol 110 BitmapUsed by:111
Symbol 111 GraphicUses:110Used by:112
Symbol 112 MovieClip {Ball5Sprite} [Ball5Sprite]Uses:111
Symbol 113 BitmapUsed by:114
Symbol 114 GraphicUses:113Used by:115
Symbol 115 MovieClip {Ball3Sprite} [Ball3Sprite]Uses:114
Symbol 116 Bitmap {GFX_tile3BitmapClass}
Symbol 117 BinaryData {Level_level5}
Symbol 118 BinaryData {Level_level8}
Symbol 119 Bitmap {Game__embed_mxml_title_png_1258686824}
Symbol 120 BinaryData {Level_level3}
Symbol 121 BinaryData {Level_level1}
Symbol 122 Bitmap {GFX_tile4BitmapClass}
Symbol 123 BinaryData {Level_level7}
Symbol 124 BinaryData {Level_level6}
Symbol 125 Bitmap {GFX_planetBitmapClass}
Symbol 126 Bitmap {GFX_tile0BitmapClass}
Symbol 127 Bitmap {GFX_tile2BitmapClass}
Symbol 128 BinaryData {Level_level2}
Symbol 129 Bitmap {GFX_tile1BitmapClass}
Symbol 130 BinaryData {Level_level4}

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata present, AS3.
SWFMetaData (77)Timeline Frame 1459 bytes "<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'><rdf:Description rdf:about='' xmlns ..."
ScriptLimits (65)Timeline Frame 1MaxRecursionDepth: 1000, ScriptTimeout: 60 seconds
ExportAssets (56)Timeline Frame 2Symbol 1 as "com.kongregate.as3.client.KongregateAPI"
ExportAssets (56)Timeline Frame 2Symbol 3 as "mx.skins.cursor.BusyCursor"
ExportAssets (56)Timeline Frame 2Symbol 6 as "__brokenImage"
ExportAssets (56)Timeline Frame 2Symbol 9 as "GoalSprite"
ExportAssets (56)Timeline Frame 2Symbol 12 as "GuitarSprite"
ExportAssets (56)Timeline Frame 2Symbol 15 as "UnicornPowerSprite"
ExportAssets (56)Timeline Frame 2Symbol 18 as "InternetSprite"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GoldMedalSprite"
ExportAssets (56)Timeline Frame 2Symbol 22 as "Music_SmootherClass"
ExportAssets (56)Timeline Frame 2Symbol 23 as "Music_AhDahClass"
ExportAssets (56)Timeline Frame 2Symbol 24 as "Music_FrozenStarClass"
ExportAssets (56)Timeline Frame 2Symbol 25 as "Music_AitrackClass"
ExportAssets (56)Timeline Frame 2Symbol 26 as "Music_CoolBlastClass"
ExportAssets (56)Timeline Frame 2Symbol 27 as "SFX_elevatorStopClass"
ExportAssets (56)Timeline Frame 2Symbol 28 as "SFX_ballClass"
ExportAssets (56)Timeline Frame 2Symbol 29 as "SFX_buttonPressClass"
ExportAssets (56)Timeline Frame 2Symbol 30 as "SFX_forkliftEngineClass"
ExportAssets (56)Timeline Frame 2Symbol 31 as "SFX_buttonReleaseClass"
ExportAssets (56)Timeline Frame 2Symbol 32 as "SFX_panelToggleClass"
ExportAssets (56)Timeline Frame 2Symbol 33 as "SFX_heavyBoxClass"
ExportAssets (56)Timeline Frame 2Symbol 34 as "SFX_endLevelClass"
ExportAssets (56)Timeline Frame 2Symbol 35 as "SFX_panelOnClass"
ExportAssets (56)Timeline Frame 2Symbol 36 as "SFX_forkliftClass"
ExportAssets (56)Timeline Frame 2Symbol 37 as "SFX_doorSlideClass"
ExportAssets (56)Timeline Frame 2Symbol 38 as "SFX_panelOffClass"
ExportAssets (56)Timeline Frame 2Symbol 39 as "SFX_elevatorStartClass"
ExportAssets (56)Timeline Frame 2Symbol 40 as "SFX_enterForkliftClass"
ExportAssets (56)Timeline Frame 2Symbol 51 as "KidSprite"
ExportAssets (56)Timeline Frame 2Symbol 54 as "ForkliftForkSprite"
ExportAssets (56)Timeline Frame 2Symbol 57 as "ForkliftWheelSprite"
ExportAssets (56)Timeline Frame 2Symbol 60 as "ForkliftBeamSprite"
ExportAssets (56)Timeline Frame 2Symbol 63 as "ForkliftFrameSprite"
ExportAssets (56)Timeline Frame 2Symbol 68 as "PowerPanelSprite"
ExportAssets (56)Timeline Frame 2Symbol 73 as "TogglePanelSprite"
ExportAssets (56)Timeline Frame 2Symbol 76 as "EntranceSprite"
ExportAssets (56)Timeline Frame 2Symbol 79 as "HintArrowKeySprite"
ExportAssets (56)Timeline Frame 2Symbol 82 as "HintSpaceKeySprite"
ExportAssets (56)Timeline Frame 2Symbol 85 as "ButtonRimSprite"
ExportAssets (56)Timeline Frame 2Symbol 88 as "ButtonSprite"
ExportAssets (56)Timeline Frame 2Symbol 91 as "GateSprite"
ExportAssets (56)Timeline Frame 2Symbol 94 as "ElevatorSprite"
ExportAssets (56)Timeline Frame 2Symbol 97 as "BoxSprite"
ExportAssets (56)Timeline Frame 2Symbol 100 as "Ball2Sprite"
ExportAssets (56)Timeline Frame 2Symbol 103 as "Ball0Sprite"
ExportAssets (56)Timeline Frame 2Symbol 106 as "Ball4Sprite"
ExportAssets (56)Timeline Frame 2Symbol 109 as "Ball1Sprite"
ExportAssets (56)Timeline Frame 2Symbol 112 as "Ball5Sprite"
ExportAssets (56)Timeline Frame 2Symbol 115 as "Ball3Sprite"
SerialNumber (41)Timeline Frame 1

Labels

"_Game_mx_managers_SystemManager"Frame 1
"Game"Frame 2
"idle"Symbol 51 MovieClip {KidSprite} [KidSprite] Frame 1
"running"Symbol 51 MovieClip {KidSprite} [KidSprite] Frame 61
"rising"Symbol 51 MovieClip {KidSprite} [KidSprite] Frame 74
"falling"Symbol 51 MovieClip {KidSprite} [KidSprite] Frame 101
"off"Symbol 68 MovieClip {PowerPanelSprite} [PowerPanelSprite] Frame 1
"on"Symbol 68 MovieClip {PowerPanelSprite} [PowerPanelSprite] Frame 2
"off"Symbol 73 MovieClip {TogglePanelSprite} [TogglePanelSprite] Frame 1
"on"Symbol 73 MovieClip {TogglePanelSprite} [TogglePanelSprite] Frame 2




http://swfchan.com/9/42311/info.shtml
Created: 10/5 -2019 00:25:32 Last modified: 10/5 -2019 00:25:32 Server time: 21/12 -2024 14:48:13