Section 1
//b2BoxDef (Engine.Collision.Shapes.b2BoxDef)
package Engine.Collision.Shapes {
import Engine.Common.Math.*;
public class b2BoxDef extends b2ShapeDef {
public var extents:b2Vec2;
public function b2BoxDef(){
type = b2Shape.e_boxShape;
extents = new b2Vec2(1, 1);
}
}
}//package Engine.Collision.Shapes
Section 2
//b2CircleDef (Engine.Collision.Shapes.b2CircleDef)
package Engine.Collision.Shapes {
public class b2CircleDef extends b2ShapeDef {
public var radius:Number;
public function b2CircleDef(){
type = b2Shape.e_circleShape;
radius = 1;
}
}
}//package Engine.Collision.Shapes
Section 3
//b2CircleShape (Engine.Collision.Shapes.b2CircleShape)
package Engine.Collision.Shapes {
import Engine.Common.Math.*;
import Engine.Dynamics.*;
import Engine.Collision.*;
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 _local4:b2CircleDef;
var _local5:b2AABB;
var _local6:b2BroadPhase;
m_localPosition = new b2Vec2();
super(_arg1, _arg2);
_local4 = (_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);
m_position.SetV(m_localPosition);
m_position.MulM(m_R);
m_position.Add(m_body.m_position);
_local5 = new b2AABB();
_local5.minVertex.Set((m_position.x - m_radius), (m_position.y - m_radius));
_local5.maxVertex.Set((m_position.x + m_radius), (m_position.y + m_radius));
_local6 = m_body.m_world.m_broadPhase;
if (_local6.InRange(_local5)){
m_proxyId = _local6.CreateProxy(_local5, _arg1.groupIndex, _arg1.categoryBits, _arg1.maskBits, this);
} else {
m_proxyId = b2Pair.b2_nullProxy;
};
if (m_proxyId == b2Pair.b2_nullProxy){
m_body.Freeze();
};
}
override public function ResetProxy(_arg1:b2BroadPhase){
var _local2:b2Proxy;
var _local3:int;
var _local4:uint;
var _local5:uint;
var _local6:b2AABB;
if (m_proxyId == b2Pair.b2_nullProxy){
return;
};
_local2 = _arg1.GetProxy(m_proxyId);
_local3 = _local2.groupIndex;
_local4 = _local2.categoryBits;
_local5 = _local2.maskBits;
_arg1.DestroyProxy(m_proxyId);
_local2 = null;
_local6 = new b2AABB();
_local6.minVertex.Set((m_position.x - m_radius), (m_position.y - m_radius));
_local6.maxVertex.Set((m_position.x + m_radius), (m_position.y + m_radius));
if (_arg1.InRange(_local6)){
m_proxyId = _arg1.CreateProxy(_local6, _local3, _local4, _local5, this);
} else {
m_proxyId = b2Pair.b2_nullProxy;
};
if (m_proxyId == b2Pair.b2_nullProxy){
m_body.Freeze();
};
}
override public function Support(_arg1:Number, _arg2:Number):b2Vec2{
var _local3:Number;
_local3 = Math.sqrt(((_arg1 * _arg1) + (_arg2 * _arg2)));
_arg1 = (_arg1 / _local3);
_arg2 = (_arg2 / _local3);
return (new b2Vec2((m_position.x + (m_radius * _arg1)), (m_position.y + (m_radius * _arg2))));
}
override public function Synchronize(_arg1:b2Vec2, _arg2:b2Mat22){
var _local3:b2AABB;
var _local4:b2BroadPhase;
m_R.SetM(_arg2);
m_position.SetV(m_localPosition);
m_position.MulM(_arg2);
m_position.Add(_arg1);
if (m_proxyId == b2Pair.b2_nullProxy){
return;
};
_local3 = 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));
_local4 = m_body.m_world.m_broadPhase;
if (_local4.InRange(_local3)){
_local4.MoveProxy(m_proxyId, _local3);
} else {
_local4.DestroyProxy(m_proxyId);
m_proxyId = b2Pair.b2_nullProxy;
m_body.Freeze();
};
}
override public function TestPoint(_arg1:b2Vec2):Boolean{
var _local2:b2Vec2;
_local2 = new b2Vec2();
_local2.SetV(_arg1);
_local2.Subtract(m_position);
return ((b2Math.b2Dot(_local2, _local2) <= (m_radius * m_radius)));
}
}
}//package Engine.Collision.Shapes
Section 4
//b2MassData (Engine.Collision.Shapes.b2MassData)
package Engine.Collision.Shapes {
import Engine.Common.Math.*;
public class b2MassData {
public var mass:Number;// = 0
public var center:b2Vec2;
public var I:Number;// = 0
public function b2MassData(){
mass = 0;
center = new b2Vec2(0, 0);
I = 0;
super();
}
}
}//package Engine.Collision.Shapes
Section 5
//b2PolyDef (Engine.Collision.Shapes.b2PolyDef)
package Engine.Collision.Shapes {
import Engine.Common.Math.*;
import Engine.Common.*;
public class b2PolyDef extends b2ShapeDef {
public var vertexCount:int;
public var vertices:Array;
public function b2PolyDef(){
var _local1:int;
vertices = new Array(b2Settings.b2_maxPolyVertices);
super();
type = b2Shape.e_polyShape;
vertexCount = 0;
_local1 = 0;
while (_local1 < b2Settings.b2_maxPolyVertices) {
vertices[_local1] = new b2Vec2();
_local1++;
};
}
}
}//package Engine.Collision.Shapes
Section 6
//b2PolyShape (Engine.Collision.Shapes.b2PolyShape)
package Engine.Collision.Shapes {
import Engine.Common.Math.*;
import Engine.Dynamics.*;
import Engine.Collision.*;
import Engine.Common.*;
public class b2PolyShape extends b2Shape {
public var m_vertices:Array;
public var m_normals:Array;
public var m_nextVert:Array;
public var m_localOBB:b2OBB;
public var m_vertexCount:int;
public function b2PolyShape(_arg1:b2ShapeDef, _arg2:b2Body, _arg3:b2Vec2){
var _local4:int;
var _local5:b2Vec2;
var _local6:b2Vec2;
var _local7:b2AABB;
var _local8:b2Mat22;
var _local9:Number;
var _local10:Number;
var _local11:b2Vec2;
var _local12:b2Vec2;
var _local13:b2Mat22;
var _local14:b2Mat22;
var _local15:b2Vec2;
var _local16:b2BroadPhase;
var _local17:b2BoxDef;
var _local18:b2PolyDef;
var _local19:b2Vec2;
m_localOBB = new b2OBB();
super(_arg1, _arg2);
_local7 = new b2AABB();
m_vertices = new Array(b2Settings.b2_maxPolyVertices);
m_nextVert = new Array();
m_normals = new Array(b2Settings.b2_maxPolyVertices);
m_type = b2Shape.e_polyShape;
_local8 = new b2Mat22(_arg1.localRotation);
_local9 = (_arg1.localPosition.x - _arg3.x);
_local10 = (_arg1.localPosition.y - _arg3.y);
if (_arg1.type == b2Shape.e_boxShape){
_local17 = (_arg1 as b2BoxDef);
m_vertexCount = 4;
_local5 = _local17.extents;
m_vertices[0] = new b2Vec2(_local5.x, _local5.y);
_local6 = m_vertices[0];
_local6.MulM(_local8);
_local6.x = (_local6.x + _local9);
_local6.y = (_local6.y + _local10);
m_vertices[1] = new b2Vec2(-(_local5.x), _local5.y);
_local6 = m_vertices[1];
_local6.MulM(_local8);
_local6.x = (_local6.x + _local9);
_local6.y = (_local6.y + _local10);
m_vertices[2] = new b2Vec2(-(_local5.x), -(_local5.y));
_local6 = m_vertices[2];
_local6.MulM(_local8);
_local6.x = (_local6.x + _local9);
_local6.y = (_local6.y + _local10);
m_vertices[3] = new b2Vec2(_local5.x, -(_local5.y));
_local6 = m_vertices[3];
_local6.MulM(_local8);
_local6.x = (_local6.x + _local9);
_local6.y = (_local6.y + _local10);
} else {
_local18 = (_arg1 as b2PolyDef);
m_vertexCount = _local18.vertexCount;
_local4 = 0;
while (_local4 < m_vertexCount) {
m_vertices[_local4] = _local18.vertices[_local4].Copy();
_local6 = m_vertices[_local4];
_local6.MulM(_local8);
_local6.x = (_local6.x + _local9);
_local6.y = (_local6.y + _local10);
_local4++;
};
};
_local11 = new b2Vec2(Number.MAX_VALUE, Number.MAX_VALUE);
_local12 = new b2Vec2(-(Number.MAX_VALUE), -(Number.MAX_VALUE));
_local4 = 0;
while (_local4 < m_vertexCount) {
_local11 = b2Math.b2MinV(_local11, m_vertices[_local4]);
_local12 = b2Math.b2MaxV(_local12, m_vertices[_local4]);
_local4++;
};
m_localOBB.R.SetIdentity();
m_localOBB.center.Set(((_local11.x + _local12.x) * 0.5), ((_local11.y + _local12.y) * 0.5));
m_localOBB.extents.Set(((_local12.x - _local11.x) * 0.5), ((_local12.y - _local11.y) * 0.5));
_local4 = 0;
while (_local4 < m_vertexCount) {
m_nextVert[_local4] = (((_local4 + 1) < m_vertexCount)) ? (_local4 + 1) : 0;
_local19 = m_vertices[m_nextVert[_local4]].Copy();
_local19.Subtract(m_vertices[_local4]);
m_normals[_local4] = new b2Vec2();
_local6 = m_normals[_local4];
_local6.SetV(_local19);
_local6.CrossVF(1);
_local6.Normalize();
_local4++;
};
_local4 = 0;
while (_local4 < m_vertexCount) {
_local4++;
};
m_R = m_body.m_R.Copy();
m_position.SetV(m_body.m_position);
_local13 = b2Math.b2MulMM(m_R, m_localOBB.R);
_local14 = b2Math.b2AbsM(_local13);
_local5 = b2Math.b2MulMV(_local14, m_localOBB.extents);
_local15 = b2Math.b2MulMV(m_R, m_localOBB.center);
_local15.Add(m_position);
_local7.minVertex.SetV(_local15);
_local7.minVertex.Subtract(_local5);
_local7.maxVertex.SetV(_local15);
_local7.maxVertex.Add(_local5);
_local16 = m_body.m_world.m_broadPhase;
if (_local16.InRange(_local7)){
m_proxyId = _local16.CreateProxy(_local7, _arg1.groupIndex, _arg1.categoryBits, _arg1.maskBits, this);
} else {
m_proxyId = b2Pair.b2_nullProxy;
};
if (m_proxyId == b2Pair.b2_nullProxy){
m_body.Freeze();
};
}
override public function ResetProxy(_arg1:b2BroadPhase){
var _local2:b2Proxy;
var _local3:int;
var _local4:uint;
var _local5:uint;
var _local6:b2Mat22;
var _local7:b2Mat22;
var _local8:b2Vec2;
var _local9:b2Vec2;
var _local10:b2AABB;
if (m_proxyId == b2Pair.b2_nullProxy){
return;
};
_local2 = _arg1.GetProxy(m_proxyId);
_local3 = _local2.groupIndex;
_local4 = _local2.categoryBits;
_local5 = _local2.maskBits;
_arg1.DestroyProxy(m_proxyId);
_local2 = null;
_local6 = b2Math.b2MulMM(m_R, m_localOBB.R);
_local7 = b2Math.b2AbsM(_local6);
_local8 = b2Math.b2MulMV(_local7, m_localOBB.extents);
_local9 = b2Math.b2MulMV(m_R, m_localOBB.center);
_local9.Add(m_position);
_local10 = new b2AABB();
_local10.minVertex.SetV(_local9);
_local10.minVertex.Subtract(_local8);
_local10.maxVertex.SetV(_local9);
_local10.maxVertex.Add(_local8);
if (_arg1.InRange(_local10)){
m_proxyId = _arg1.CreateProxy(_local10, _local3, _local4, _local5, this);
} else {
m_proxyId = b2Pair.b2_nullProxy;
};
if (m_proxyId == b2Pair.b2_nullProxy){
m_body.Freeze();
};
}
override public function Support(_arg1:Number, _arg2:Number):b2Vec2{
var _local3:Number;
var _local4:Number;
var _local5:int;
var _local6:Number;
var _local7:int;
var _local8:Number;
_local3 = ((_arg1 * m_R.col1.x) + (_arg2 * m_R.col1.y));
_local4 = ((_arg1 * m_R.col2.x) + (_arg2 * m_R.col2.y));
_local5 = 0;
_local6 = ((m_vertices[0].x * _local3) + (m_vertices[0].y * _local4));
_local7 = 1;
while (_local7 < m_vertexCount) {
_local8 = ((m_vertices[_local7].x * _local3) + (m_vertices[_local7].y * _local4));
if (_local8 > _local6){
_local5 = _local7;
_local6 = _local8;
};
_local7++;
};
return (new b2Vec2((m_position.x + ((m_R.col1.x * m_vertices[_local5].x) + (m_R.col2.x * m_vertices[_local5].y))), (m_position.y + ((m_R.col1.y * m_vertices[_local5].x) + (m_R.col2.y * m_vertices[_local5].y)))));
}
override public function Synchronize(_arg1:b2Vec2, _arg2:b2Mat22){
var _local3:b2Mat22;
var _local4:b2Mat22;
var _local5:b2Vec2;
var _local6:b2Vec2;
var _local7:b2AABB;
var _local8:b2BroadPhase;
m_R.SetM(_arg2);
m_position.SetV(_arg1);
if (m_proxyId == b2Pair.b2_nullProxy){
return;
};
_local3 = b2Math.b2MulMM(m_R, m_localOBB.R);
_local4 = b2Math.b2AbsM(_local3);
_local5 = b2Math.b2MulMV(_local4, m_localOBB.extents);
_local6 = b2Math.b2MulMV(m_R, m_localOBB.center);
_local6.Add(m_position);
_local7 = new b2AABB();
_local7.minVertex.SetV(_local6);
_local7.minVertex.Subtract(_local5);
_local7.maxVertex.SetV(_local6);
_local7.maxVertex.Add(_local5);
_local8 = m_body.m_world.m_broadPhase;
if (_local8.InRange(_local7)){
_local8.MoveProxy(m_proxyId, _local7);
} else {
_local8.DestroyProxy(m_proxyId);
m_proxyId = b2Pair.b2_nullProxy;
m_body.Freeze();
};
}
override public function TestPoint(_arg1:b2Vec2):Boolean{
var _local2:b2Vec2;
var _local3:int;
var _local4:b2Vec2;
var _local5:Number;
_local2 = new b2Vec2();
_local2.SetV(_arg1);
_local2.Subtract(m_position);
_local2.MulTM(m_R);
_local3 = 0;
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);
}
}
}//package Engine.Collision.Shapes
Section 7
//b2Shape (Engine.Collision.Shapes.b2Shape)
package Engine.Collision.Shapes {
import Engine.Common.Math.*;
import Engine.Dynamics.*;
import Engine.Collision.*;
public class b2Shape {
public var m_R:b2Mat22;
public var m_next:b2Shape;
public var m_type:int;
public var m_friction:Number;
public var m_proxyId:int;
public var m_userData;// = null
public var m_body:b2Body;
public var m_restitution:Number;
public var m_position:b2Vec2;
public static const e_boxShape:int = 1;
public static const e_unknownShape:int = -1;
public static const e_shapeTypeCount:int = 4;
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_userData = null;
m_position = new b2Vec2();
m_R = new b2Mat22();
super();
m_userData = _arg1.userData;
m_friction = _arg1.friction;
m_restitution = _arg1.restitution;
m_body = _arg2;
m_proxyId = b2Pair.b2_nullProxy;
}
public function GetPosition():b2Vec2{
return (m_position);
}
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):b2Vec2{
return (null);
}
public function Synchronize(_arg1:b2Vec2, _arg2:b2Mat22){
}
public function GetRotationMatrix():b2Mat22{
return (m_R);
}
public function GetBody():b2Body{
return (m_body);
}
public function TestPoint(_arg1:b2Vec2):Boolean{
return (false);
}
public function ResetProxy(_arg1:b2BroadPhase){
}
public static function Destroy(_arg1:b2Shape){
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){
var _local5:b2Vec2;
var _local6:Number;
var _local7:Number;
var _local8:b2Vec2;
var _local9:Number;
var _local10:int;
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;
_local5 = new b2Vec2();
_local5.SetZero();
_local6 = 0;
_local7 = 0;
_local8 = new b2Vec2(0, 0);
_local9 = (1 / 3);
_local10 = 0;
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 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));
};
return (null);
}
}
}//package Engine.Collision.Shapes
Section 8
//b2ShapeDef (Engine.Collision.Shapes.b2ShapeDef)
package Engine.Collision.Shapes {
import Engine.Common.Math.*;
import Engine.Common.*;
public class b2ShapeDef {
public var groupIndex:int;
public var categoryBits:int;
public var localRotation:Number;
public var restitution:Number;
public var userData;// = null
public var density:Number;
public var maskBits:int;
public var type:int;
public var localPosition:b2Vec2;
public var friction:Number;
public function b2ShapeDef(){
userData = null;
super();
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){
var _local2:b2CircleDef;
var _local3:b2BoxDef;
var _local4:b2PolyDef;
_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;
default:
_arg1.mass = 0;
_arg1.center.Set(0, 0);
_arg1.I = 0;
break;
};
}
}
}//package Engine.Collision.Shapes
Section 9
//b2AABB (Engine.Collision.b2AABB)
package Engine.Collision {
import Engine.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;
var _local2:Number;
var _local3:Boolean;
_local1 = maxVertex.x;
_local2 = maxVertex.y;
_local1 = maxVertex.x;
_local2 = maxVertex.y;
_local1 = (_local1 - minVertex.x);
_local2 = (_local2 - minVertex.y);
_local3 = (((_local1 >= 0)) && ((_local2 >= 0)));
_local3 = ((((_local3) && (minVertex.IsValid()))) && (maxVertex.IsValid()));
return (_local3);
}
}
}//package Engine.Collision
Section 10
//b2Bound (Engine.Collision.b2Bound)
package Engine.Collision {
public class b2Bound {
public var proxyId:uint;
public var stabbingCount:uint;
public var value:uint;
public function Swap(_arg1:b2Bound){
var _local2:uint;
var _local3:uint;
var _local4:uint;
_local2 = value;
_local3 = proxyId;
_local4 = stabbingCount;
value = _arg1.value;
proxyId = _arg1.proxyId;
stabbingCount = _arg1.stabbingCount;
_arg1.value = _local2;
_arg1.proxyId = _local3;
_arg1.stabbingCount = _local4;
}
public function IsLower():Boolean{
return (((value & 1) == 0));
}
public function IsUpper():Boolean{
return (((value & 1) == 1));
}
}
}//package Engine.Collision
Section 11
//b2BroadPhase (Engine.Collision.b2BroadPhase)
package Engine.Collision {
import Engine.Common.Math.*;
import Engine.Common.*;
public class b2BroadPhase {
public var m_quantizationFactor:b2Vec2;
public var m_pairBuffer:Array;
public var m_worldAABB:b2AABB;
public var m_bounds:Array;
public var m_freeProxy:uint;
public var m_pairCallback:b2PairCallback;
public var m_proxyCount:int;
public var m_proxyPool:Array;
public var m_queryResultCount:int;
public var m_pairManager:b2PairManager;
public var m_pairBufferCount:int;
public var m_timeStamp:uint;
public var m_queryResults:Array;
public static const b2_nullEdge:uint = b2Settings.USHRT_MAX;
public static const b2_invalid:uint = b2Settings.USHRT_MAX;
public static var s_validate:Boolean = false;
public function b2BroadPhase(_arg1:b2AABB, _arg2:b2PairCallback){
var _local3:int;
var _local4:Number;
var _local5:Number;
var _local6:b2Proxy;
var _local7:int;
m_pairManager = new b2PairManager();
m_proxyPool = new Array(b2Settings.b2_maxPairs);
m_pairBuffer = 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_worldAABB = _arg1;
m_pairCallback = _arg2;
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++;
};
_local3 = 0;
while (_local3 < b2Settings.b2_maxPairs) {
m_pairBuffer[_local3] = new b2BufferedPair();
_local3++;
};
_local4 = _arg1.maxVertex.x;
_local5 = _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_pairBufferCount = 0;
m_timeStamp = 1;
m_queryResultCount = 0;
}
public function ValidatePairs(){
var _local1:uint;
var _local2:int;
var _local3:b2Pair;
var _local4:b2Proxy;
var _local5:b2Proxy;
_local1 = m_pairManager.GetCount();
m_pairBuffer.sortOn(["proxyId1", "proxyId2"], Array.NUMERIC);
_local2 = 0;
while (_local2 < m_pairBufferCount) {
if (_local2 > 0){
};
_local3 = m_pairManager.Find(m_pairBuffer[_local2].proxyId1, m_pairBuffer[_local2].proxyId2);
_local4 = m_proxyPool[_local3.proxyId1];
_local5 = m_proxyPool[_local3.proxyId2];
_local2++;
};
}
public function QueryAABB(_arg1:b2AABB, _arg2, _arg3:int):int{
var _local4:Array;
var _local5:Array;
var _local6:uint;
var _local7:uint;
var _local8:Array;
var _local9:Array;
var _local10:int;
var _local11:int;
var _local12:b2Proxy;
_local4 = new Array();
_local5 = new Array();
ComputeBounds(_local4, _local5, _arg1);
_local8 = [_local6];
_local9 = [_local7];
Query(_local8, _local9, _local4[0], _local5[0], m_bounds[0], (2 * m_proxyCount), 0);
Query(_local8, _local9, _local4[1], _local5[1], m_bounds[1], (2 * m_proxyCount), 1);
_local10 = 0;
_local11 = 0;
while ((((_local11 < m_queryResultCount)) && ((_local10 < _arg3)))) {
_local12 = m_proxyPool[m_queryResults[_local11]];
_arg2[_local11] = _local12.userData;
_local11++;
_local10++;
};
m_queryResultCount = 0;
IncrementTimeStamp();
return (_local10);
}
private function RemoveBufferedPair(_arg1:uint, _arg2:uint){
var _local3:b2Pair;
_local3 = m_pairManager.Find(_arg1, _arg2);
if (_local3 == null){
return;
};
if (_local3.IsBuffered() == false){
if (m_pairBufferCount < b2Settings.b2_maxPairs){
_local3.SetBuffered();
m_pairBuffer[m_pairBufferCount].proxyId1 = _local3.proxyId1;
m_pairBuffer[m_pairBufferCount].proxyId2 = _local3.proxyId2;
m_pairBufferCount++;
};
};
_local3.SetRemoved();
}
public function GetProxy(_arg1:int):b2Proxy{
if ((((_arg1 == b2Pair.b2_nullProxy)) || ((m_proxyPool[_arg1].IsValid() == false)))){
return (null);
};
return (m_proxyPool[_arg1]);
}
public function Flush(){
var _local1:int;
var _local2:int;
var _local3:b2Pair;
var _local4:b2Proxy;
var _local5:b2Proxy;
_local2 = 0;
_local1 = 0;
while (_local1 < m_pairBufferCount) {
_local3 = m_pairManager.Find(m_pairBuffer[_local1].proxyId1, m_pairBuffer[_local1].proxyId2);
_local4 = m_proxyPool[_local3.proxyId1];
_local5 = m_proxyPool[_local3.proxyId2];
if (_local3.IsRemoved()){
if (_local3.IsReceived()){
m_pairCallback.PairRemoved(_local4.userData, _local5.userData, _local3.userData);
};
m_pairBuffer[_local2].proxyId1 = _local3.proxyId1;
m_pairBuffer[_local2].proxyId2 = _local3.proxyId2;
_local2++;
} else {
_local3.ClearBuffered();
if (_local3.IsReceived() == false){
_local3.userData = m_pairCallback.PairAdded(_local4.userData, _local5.userData);
_local3.SetReceived();
};
};
_local1++;
};
_local1 = 0;
while (_local1 < _local2) {
m_pairManager.Remove(m_pairBuffer[_local1].proxyId1, m_pairBuffer[_local1].proxyId2);
_local1++;
};
m_pairBufferCount = 0;
}
private function IncrementTimeStamp(){
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){
var _local8:uint;
var _local9:uint;
var _local10:uint;
var _local11:int;
var _local12:int;
var _local13:b2Proxy;
_local8 = BinarySearch(_arg5, _arg6, _arg3);
_local9 = BinarySearch(_arg5, _arg6, _arg4);
_local10 = _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 ComputeBounds(_arg1:Array, _arg2:Array, _arg3:b2AABB){
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local4 = _arg3.minVertex.x;
_local5 = _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);
_local6 = _arg3.maxVertex.x;
_local7 = _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 ShouldCollide(_arg1:int, _arg2:int):Boolean{
var _local3:b2Proxy;
var _local4:b2Proxy;
var _local5:Boolean;
_local3 = m_proxyPool[_arg1];
_local4 = m_proxyPool[_arg2];
if ((((_local3.groupIndex == _local4.groupIndex)) && (!((_local3.groupIndex == 0))))){
return ((_local3.groupIndex > 0));
};
_local5 = ((!(((_local3.maskBits & _local4.categoryBits) == 0))) && (!(((_local3.categoryBits & _local4.maskBits) == 0))));
return (_local5);
}
public function CreateProxy(_arg1:b2AABB, _arg2:int, _arg3:int, _arg4:int, _arg5):uint{
var _local6:uint;
var _local7:b2Proxy;
var _local8:uint;
var _local9:uint;
var _local10:Array;
var _local11:Array;
var _local12:int;
var _local13:int;
var _local14:Array;
var _local15:uint;
var _local16:uint;
var _local17:Array;
var _local18:Array;
var _local19:Array;
var _local20:int;
var _local21:int;
var _local22:b2Bound;
var _local23:b2Bound;
var _local24:int;
var _local25:b2Proxy;
var _local26:b2Pair;
if (m_freeProxy == b2Pair.b2_nullProxy){
return (b2Pair.b2_nullProxy);
};
Flush();
_local8 = m_freeProxy;
_local7 = m_proxyPool[_local8];
m_freeProxy = _local7.GetNext();
_local7.overlapCount = 0;
_local7.groupIndex = _arg2;
_local7.categoryBits = _arg3;
_local7.maskBits = _arg4;
_local7.userData = _arg5;
_local9 = (2 * m_proxyCount);
_local10 = new Array();
_local11 = new Array();
ComputeBounds(_local10, _local11, _arg1);
_local12 = 0;
while (_local12 < 2) {
_local14 = m_bounds[_local12];
_local17 = [_local15];
_local18 = [_local16];
Query(_local17, _local18, _local10[_local12], _local11[_local12], _local14, _local9, _local12);
_local15 = _local17[0];
_local16 = _local18[0];
_local19 = new Array();
_local21 = (_local9 - _local16);
_local20 = 0;
while (_local20 < _local21) {
_local19[_local20] = new b2Bound();
_local22 = _local19[_local20];
_local23 = _local14[(_local16 + _local20)];
_local22.value = _local23.value;
_local22.proxyId = _local23.proxyId;
_local22.stabbingCount = _local23.stabbingCount;
_local20++;
};
_local21 = _local19.length;
_local24 = (_local16 + 2);
_local20 = 0;
while (_local20 < _local21) {
_local23 = _local19[_local20];
_local22 = _local14[(_local24 + _local20)];
_local22.value = _local23.value;
_local22.proxyId = _local23.proxyId;
_local22.stabbingCount = _local23.stabbingCount;
_local20++;
};
_local19 = new Array();
_local21 = (_local16 - _local15);
_local20 = 0;
while (_local20 < _local21) {
_local19[_local20] = new b2Bound();
_local22 = _local19[_local20];
_local23 = _local14[(_local15 + _local20)];
_local22.value = _local23.value;
_local22.proxyId = _local23.proxyId;
_local22.stabbingCount = _local23.stabbingCount;
_local20++;
};
_local21 = _local19.length;
_local24 = (_local15 + 1);
_local20 = 0;
while (_local20 < _local21) {
_local23 = _local19[_local20];
_local22 = _local14[(_local24 + _local20)];
_local22.value = _local23.value;
_local22.proxyId = _local23.proxyId;
_local22.stabbingCount = _local23.stabbingCount;
_local20++;
};
_local16++;
_local14[_local15].value = _local10[_local12];
_local14[_local15].proxyId = _local8;
_local14[_local16].value = _local11[_local12];
_local14[_local16].proxyId = _local8;
_local14[_local15].stabbingCount = ((_local15 == 0)) ? 0 : _local14[(_local15 - 1)].stabbingCount;
_local14[_local16].stabbingCount = _local14[(_local16 - 1)].stabbingCount;
_local6 = _local15;
while (_local6 < _local16) {
_local14[_local6].stabbingCount++;
_local6++;
};
_local6 = _local15;
while (_local6 < (_local9 + 2)) {
_local25 = m_proxyPool[_local14[_local6].proxyId];
if (_local14[_local6].IsLower()){
_local25.lowerBounds[_local12] = _local6;
} else {
_local25.upperBounds[_local12] = _local6;
};
_local6++;
};
_local12++;
};
m_proxyCount++;
_local13 = 0;
while (_local13 < m_queryResultCount) {
if (ShouldCollide(_local8, m_queryResults[_local13]) == false){
} else {
_local26 = m_pairManager.Add(_local8, m_queryResults[_local13]);
if (_local26 == null){
} else {
_local26.userData = m_pairCallback.PairAdded(_local7.userData, m_proxyPool[m_queryResults[_local13]].userData);
_local26.SetReceived();
};
};
_local13++;
};
m_queryResultCount = 0;
IncrementTimeStamp();
return (_local8);
}
public function DestroyProxy(_arg1:uint){
var _local2:b2Proxy;
var _local3:uint;
var _local4:int;
var _local5:int;
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 _local20:b2Proxy;
var _local21:*;
if (_arg1 == b2Pair.b2_nullProxy){
return;
};
Flush();
_local2 = m_proxyPool[_arg1];
_local3 = (2 * m_proxyCount);
_local4 = 0;
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(new Array(), new Array(), _local9, _local10, _local6, (_local3 - 2), _local4);
_local4++;
};
_local5 = 0;
while (_local5 < m_queryResultCount) {
_local20 = m_proxyPool[m_queryResults[_local5]];
_local21 = m_pairManager.Remove(_arg1, m_queryResults[_local5]);
m_pairCallback.PairRemoved(_local2.userData, _local20.userData, _local21);
_local5++;
};
m_queryResultCount = 0;
IncrementTimeStamp();
_local2.userData = null;
_local2.overlapCount = b2_invalid;
_local2.SetNext(m_freeProxy);
m_freeProxy = _arg1;
m_proxyCount--;
}
private function TestOverlap(_arg1:b2Proxy, _arg2:b2Proxy):Boolean{
var _local3:int;
var _local4:Array;
_local3 = 0;
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);
}
public function Validate(){
var _local1:b2Pair;
var _local2:b2Proxy;
var _local3:b2Proxy;
var _local4:Boolean;
var _local5:int;
var _local6:Array;
var _local7:uint;
var _local8:int;
var _local9:int;
var _local10:b2Bound;
var _local11:uint;
var _local12:uint;
var _local13:uint;
var _local14:b2Bound;
var _local15:uint;
var _local16:b2Proxy;
var _local17:b2Bound;
_local5 = 0;
while (_local5 < 2) {
_local10 = m_bounds[_local5];
_local11 = (2 * m_proxyCount);
_local12 = 0;
_local13 = 0;
while (_local13 < _local11) {
_local14 = _local10[_local13];
if (_local13 > 0){
_local17 = _local10[(_local13 - 1)];
};
_local15 = _local14.proxyId;
_local16 = m_proxyPool[_local14.proxyId];
if (_local14.IsLower() == true){
_local12++;
} else {
_local12--;
};
_local13++;
};
_local5++;
};
_local6 = m_pairManager.GetPairs();
_local7 = m_pairManager.GetCount();
m_pairBuffer.sortOn(["proxyId1", "proxyId2"], Array.NUMERIC);
_local8 = 0;
while (_local8 < m_pairBufferCount) {
if (_local8 > 0){
};
_local1 = m_pairManager.Find(m_pairBuffer[_local8].proxyId1, m_pairBuffer[_local8].proxyId2);
_local2 = m_proxyPool[_local1.proxyId1];
_local3 = m_proxyPool[_local1.proxyId2];
_local4 = TestOverlap(_local2, _local3);
if (_local1.IsRemoved() == true){
};
_local8++;
};
_local9 = 0;
while (_local9 < _local7) {
_local1 = _local6[_local9];
_local2 = m_proxyPool[_local1.proxyId1];
_local3 = m_proxyPool[_local1.proxyId2];
_local4 = TestOverlap(_local2, _local3);
if (_local1.IsBuffered()){
if (_local1.IsRemoved() == true){
};
};
_local9++;
};
}
private function IncrementOverlapCount(_arg1:uint){
var _local2:b2Proxy;
_local2 = m_proxyPool[_arg1];
if (_local2.timeStamp < m_timeStamp){
_local2.timeStamp = m_timeStamp;
_local2.overlapCount = 1;
} else {
_local2.overlapCount = 2;
m_queryResults[m_queryResultCount] = _arg1;
m_queryResultCount++;
};
}
public function InRange(_arg1:b2AABB):Boolean{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local2 = _arg1.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));
}
private function AddBufferedPair(_arg1:uint, _arg2:uint){
var _local3:b2Pair;
if (ShouldCollide(_arg1, _arg2) == false){
return;
};
_local3 = m_pairManager.Add(_arg1, _arg2);
if (_local3 == null){
return;
};
if (_local3.IsBuffered() == false){
if (m_pairBufferCount < b2Settings.b2_maxPairs){
_local3.SetBuffered();
m_pairBuffer[m_pairBufferCount].proxyId1 = _local3.proxyId1;
m_pairBuffer[m_pairBufferCount].proxyId2 = _local3.proxyId2;
m_pairBufferCount++;
};
};
_local3.ClearRemoved();
}
public function MoveProxy(_arg1:uint, _arg2:b2AABB){
var _local3:uint;
var _local4:b2Bound;
var _local5:b2Bound;
var _local6:b2Bound;
var _local7:uint;
var _local8:b2Proxy;
var _local9:uint;
var _local10:b2Proxy;
var _local11:Array;
var _local12:Array;
var _local13:uint;
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;
};
_local9 = (2 * m_proxyCount);
_local10 = m_proxyPool[_arg1];
_local11 = new Array();
_local12 = new Array();
ComputeBounds(_local11, _local12, _arg2);
_local13 = 0;
while (_local13 < 2) {
_local14 = m_bounds[_local13];
_local15 = _local10.lowerBounds[_local13];
_local16 = _local10.upperBounds[_local13];
_local17 = _local11[_local13];
_local18 = _local12[_local13];
_local19 = (_local17 - _local14[_local15].value);
_local20 = (_local18 - _local14[_local16].value);
_local14[_local15].value = _local17;
_local14[_local16].value = _local18;
if (_local19 < 0){
_local3 = _local15;
while ((((_local3 > 0)) && ((_local17 < _local14[(_local3 - 1)].value)))) {
_local4 = _local14[_local3];
_local5 = _local14[(_local3 - 1)];
_local21 = _local5.proxyId;
_local22 = m_proxyPool[_local5.proxyId];
_local5.stabbingCount++;
if (_local5.IsUpper() == true){
if (TestOverlap(_local10, _local22)){
AddBufferedPair(_arg1, _local21);
};
var _local23 = _local22.upperBounds;
var _local24 = _local13;
var _local25 = (_local23[_local24] + 1);
_local23[_local24] = _local25;
_local4.stabbingCount++;
} else {
_local23 = _local22.lowerBounds;
_local24 = _local13;
_local25 = (_local23[_local24] + 1);
_local23[_local24] = _local25;
_local4.stabbingCount--;
};
_local23 = _local10.lowerBounds;
_local24 = _local13;
_local25 = (_local23[_local24] - 1);
_local23[_local24] = _local25;
_local4.Swap(_local5);
_local3--;
};
};
if (_local20 > 0){
_local3 = _local16;
while ((((_local3 < (_local9 - 1))) && ((_local14[(_local3 + 1)].value <= _local18)))) {
_local4 = _local14[_local3];
_local6 = _local14[(_local3 + 1)];
_local7 = _local6.proxyId;
_local8 = m_proxyPool[_local7];
_local6.stabbingCount++;
if (_local6.IsLower() == true){
if (TestOverlap(_local10, _local8)){
AddBufferedPair(_arg1, _local7);
};
_local23 = _local8.lowerBounds;
_local24 = _local13;
_local25 = (_local23[_local24] - 1);
_local23[_local24] = _local25;
_local4.stabbingCount++;
} else {
_local23 = _local8.upperBounds;
_local24 = _local13;
_local25 = (_local23[_local24] - 1);
_local23[_local24] = _local25;
_local4.stabbingCount--;
};
_local23 = _local10.upperBounds;
_local24 = _local13;
_local25 = (_local23[_local24] + 1);
_local23[_local24] = _local25;
_local4.Swap(_local6);
_local3++;
};
};
if (_local19 > 0){
_local3 = _local15;
while ((((_local3 < (_local9 - 1))) && ((_local14[(_local3 + 1)].value <= _local17)))) {
_local4 = _local14[_local3];
_local6 = _local14[(_local3 + 1)];
_local7 = _local6.proxyId;
_local8 = m_proxyPool[_local7];
_local6.stabbingCount--;
if (_local6.IsUpper()){
RemoveBufferedPair(_arg1, _local7);
_local23 = _local8.upperBounds;
_local24 = _local13;
_local25 = (_local23[_local24] - 1);
_local23[_local24] = _local25;
_local4.stabbingCount--;
} else {
_local23 = _local8.lowerBounds;
_local24 = _local13;
_local25 = (_local23[_local24] - 1);
_local23[_local24] = _local25;
_local4.stabbingCount++;
};
_local23 = _local10.lowerBounds;
_local24 = _local13;
_local25 = (_local23[_local24] + 1);
_local23[_local24] = _local25;
_local4.Swap(_local6);
_local3++;
};
};
if (_local20 < 0){
_local3 = _local16;
while ((((_local3 > 0)) && ((_local18 < _local14[(_local3 - 1)].value)))) {
_local4 = _local14[_local3];
_local5 = _local14[(_local3 - 1)];
_local21 = _local5.proxyId;
_local22 = m_proxyPool[_local21];
_local5.stabbingCount--;
if (_local5.IsLower() == true){
RemoveBufferedPair(_arg1, _local21);
_local23 = _local22.lowerBounds;
_local24 = _local13;
_local25 = (_local23[_local24] + 1);
_local23[_local24] = _local25;
_local4.stabbingCount--;
} else {
_local23 = _local22.upperBounds;
_local24 = _local13;
_local25 = (_local23[_local24] + 1);
_local23[_local24] = _local25;
_local4.stabbingCount++;
};
_local23 = _local10.upperBounds;
_local24 = _local13;
_local25 = (_local23[_local24] - 1);
_local23[_local24] = _local25;
_local4.Swap(_local5);
_local3--;
};
};
_local13++;
};
}
public static function BinarySearch(_arg1:Array, _arg2:int, _arg3:uint):uint{
var _local4:int;
var _local5:int;
var _local6:int;
_local4 = 0;
_local5 = (_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));
}
public static function Equals(_arg1:b2BufferedPair, _arg2:b2BufferedPair):Boolean{
if ((((_arg1.proxyId1 == _arg2.proxyId1)) && ((_arg1.proxyId2 == _arg2.proxyId2)))){
return (true);
};
return (false);
}
public static function LessThanBP(_arg1:b2BufferedPair, _arg2:b2BufferedPair):Boolean{
if (_arg1.proxyId1 < _arg2.proxyId1){
return (true);
};
if (_arg1.proxyId1 == _arg2.proxyId1){
return ((_arg1.proxyId2 < _arg2.proxyId2));
};
return (false);
}
}
}//package Engine.Collision
Section 12
//b2BufferedPair (Engine.Collision.b2BufferedPair)
package Engine.Collision {
public class b2BufferedPair {
public var proxyId1:uint;
public var proxyId2:uint;
}
}//package Engine.Collision
Section 13
//b2Collision (Engine.Collision.b2Collision)
package Engine.Collision {
import Engine.Common.Math.*;
import Engine.Collision.Shapes.*;
import Engine.Common.*;
public class b2Collision {
public static const b2_nullFeature:uint = 0xFF;
private static var b2CollidePolyTempVec:b2Vec2 = new b2Vec2();
public static function EdgeSeparation(_arg1:b2PolyShape, _arg2:int, _arg3:b2PolyShape):Number{
var _local4:int;
var _local5:Array;
var _local6:int;
var _local7:Array;
var _local8:int;
var _local9:int;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:b2Mat22;
var _local17:Number;
var _local18:Number;
var _local19:int;
var _local20:Number;
var _local21:int;
var _local22:b2Vec2;
var _local23:b2Vec2;
var _local24:Number;
var _local25:b2Vec2;
var _local26:Number;
_local4 = _arg1.m_vertexCount;
_local5 = _arg1.m_vertices;
_local6 = _arg3.m_vertexCount;
_local7 = _arg3.m_vertices;
_local8 = _arg2;
_local9 = (((_arg2 + 1) == _local4)) ? 0 : (_arg2 + 1);
_local10 = (_local5[_local9].x - _local5[_local8].x);
_local11 = (_local5[_local9].y - _local5[_local8].y);
_local12 = _local10;
_local10 = _local11;
_local11 = -(_local12);
_local13 = (1 / Math.sqrt(((_local10 * _local10) + (_local11 * _local11))));
_local10 = (_local10 * _local13);
_local11 = (_local11 * _local13);
_local14 = _local10;
_local15 = _local11;
_local12 = _local14;
_local16 = _arg1.m_R;
_local14 = ((_local16.col1.x * _local12) + (_local16.col2.x * _local15));
_local15 = ((_local16.col1.y * _local12) + (_local16.col2.y * _local15));
_local17 = _local14;
_local18 = _local15;
_local16 = _arg3.m_R;
_local12 = ((_local17 * _local16.col1.x) + (_local18 * _local16.col1.y));
_local18 = ((_local17 * _local16.col2.x) + (_local18 * _local16.col2.y));
_local17 = _local12;
_local19 = 0;
_local20 = Number.MAX_VALUE;
_local21 = 0;
while (_local21 < _local6) {
_local25 = _local7[_local21];
_local26 = ((_local25.x * _local17) + (_local25.y * _local18));
if (_local26 < _local20){
_local20 = _local26;
_local19 = _local21;
};
_local21++;
};
_local22 = new b2Vec2();
_local22.SetV(_local5[_local8]);
_local22.MulM(_arg1.m_R);
_local22.Add(_arg1.m_position);
_local23 = new b2Vec2();
_local23.SetV(_local7[_local19]);
_local23.MulM(_arg3.m_R);
_local23.Add(_arg3.m_position);
_local23.Subtract(_local22);
_local24 = ((_local23.x * _local14) + (_local23.y * _local15));
return (_local24);
}
public static function b2TestOverlap(_arg1:b2AABB, _arg2:b2AABB):Boolean{
var _local3:b2Vec2;
var _local4:b2Vec2;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local3 = _arg2.minVertex;
_local4 = _arg1.maxVertex;
_local5 = (_local3.x - _local4.x);
_local6 = (_local3.y - _local4.y);
_local3 = _arg1.minVertex;
_local4 = _arg2.maxVertex;
_local7 = (_local3.x - _local4.x);
_local8 = (_local3.y - _local4.y);
if ((((_local5 > 0)) || ((_local6 > 0)))){
return (false);
};
if ((((_local7 > 0)) || ((_local8 > 0)))){
return (false);
};
return (true);
}
public static function FindIncidentEdge(_arg1:Array, _arg2:b2PolyShape, _arg3:int, _arg4:b2PolyShape){
var _local5:int;
var _local6:Array;
var _local7:int;
var _local8:Array;
var _local9:int;
var _local10:int;
var _local11:b2Vec2;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:b2Mat22;
var _local19:Number;
var _local20:Number;
var _local21:int;
var _local22:int;
var _local23:Number;
var _local24:int;
var _local25:ClipVertex;
var _local26:int;
var _local27:int;
var _local28:Number;
var _local29:Number;
var _local30:Number;
_local5 = _arg2.m_vertexCount;
_local6 = _arg2.m_vertices;
_local7 = _arg4.m_vertexCount;
_local8 = _arg4.m_vertices;
_local9 = _arg3;
_local10 = (((_arg3 + 1) == _local5)) ? 0 : (_arg3 + 1);
_local11 = _local6[_local10];
_local12 = _local11.x;
_local13 = _local11.y;
_local11 = _local6[_local9];
_local12 = (_local12 - _local11.x);
_local13 = (_local13 - _local11.y);
_local14 = _local12;
_local12 = _local13;
_local13 = -(_local14);
_local15 = (1 / Math.sqrt(((_local12 * _local12) + (_local13 * _local13))));
_local12 = (_local12 * _local15);
_local13 = (_local13 * _local15);
_local16 = _local12;
_local17 = _local13;
_local14 = _local16;
_local18 = _arg2.m_R;
_local16 = ((_local18.col1.x * _local14) + (_local18.col2.x * _local17));
_local17 = ((_local18.col1.y * _local14) + (_local18.col2.y * _local17));
_local19 = _local16;
_local20 = _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;
_local23 = Number.MAX_VALUE;
_local24 = 0;
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){
var _local4:b2ContactPoint;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:b2Mat22;
var _local10:Number;
var _local11:Number;
var _local12:int;
var _local13:Number;
var _local14:Number;
var _local15:int;
var _local16:int;
var _local17:int;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:b2Vec2;
_arg1.pointCount = 0;
_local7 = (_arg3.m_position.x - _arg2.m_position.x);
_local8 = (_arg3.m_position.y - _arg2.m_position.y);
_local9 = _arg2.m_R;
_local10 = ((_local7 * _local9.col1.x) + (_local8 * _local9.col1.y));
_local8 = ((_local7 * _local9.col2.x) + (_local8 * _local9.col2.y));
_local7 = _local10;
_local12 = 0;
_local13 = -(Number.MAX_VALUE);
_local14 = _arg3.m_radius;
_local15 = 0;
while (_local15 < _arg2.m_vertexCount) {
_local24 = ((_arg2.m_normals[_local15].x * (_local7 - _arg2.m_vertices[_local15].x)) + (_arg2.m_normals[_local15].y * (_local8 - _arg2.m_vertices[_local15].y)));
if (_local24 > _local14){
return;
};
if (_local24 > _local13){
_local13 = _local24;
_local12 = _local15;
};
_local15++;
};
if (_local13 < Number.MIN_VALUE){
_arg1.pointCount = 1;
_local25 = _arg2.m_normals[_local12];
_arg1.normal.x = ((_local9.col1.x * _local25.x) + (_local9.col2.x * _local25.y));
_arg1.normal.y = ((_local9.col1.y * _local25.x) + (_local9.col2.y * _local25.y));
_local4 = _arg1.points[0];
_local4.id.features.incidentEdge = _local12;
_local4.id.features.incidentVertex = b2_nullFeature;
_local4.id.features.referenceFace = b2_nullFeature;
_local4.id.features.flip = 0;
_local4.position.x = (_arg3.m_position.x - (_local14 * _arg1.normal.x));
_local4.position.y = (_arg3.m_position.y - (_local14 * _arg1.normal.y));
_local4.separation = (_local13 - _local14);
return;
};
_local16 = _local12;
_local17 = _arg2.m_nextVert[_local16];
_local18 = (_arg2.m_vertices[_local17].x - _arg2.m_vertices[_local16].x);
_local19 = (_arg2.m_vertices[_local17].y - _arg2.m_vertices[_local16].y);
_local20 = Math.sqrt(((_local18 * _local18) + (_local19 * _local19)));
_local18 = (_local18 / _local20);
_local19 = (_local19 / _local20);
if (_local20 < Number.MIN_VALUE){
_local5 = (_local7 - _arg2.m_vertices[_local16].x);
_local6 = (_local8 - _arg2.m_vertices[_local16].y);
_local11 = Math.sqrt(((_local5 * _local5) + (_local6 * _local6)));
_local5 = (_local5 / _local11);
_local6 = (_local6 / _local11);
if (_local11 > _local14){
return;
};
_arg1.pointCount = 1;
_arg1.normal.Set(((_local9.col1.x * _local5) + (_local9.col2.x * _local6)), ((_local9.col1.y * _local5) + (_local9.col2.y * _local6)));
_local4 = _arg1.points[0];
_local4.id.features.incidentEdge = b2_nullFeature;
_local4.id.features.incidentVertex = _local16;
_local4.id.features.referenceFace = b2_nullFeature;
_local4.id.features.flip = 0;
_local4.position.x = (_arg3.m_position.x - (_local14 * _arg1.normal.x));
_local4.position.y = (_arg3.m_position.y - (_local14 * _arg1.normal.y));
_local4.separation = (_local11 - _local14);
return;
};
_local21 = (((_local7 - _arg2.m_vertices[_local16].x) * _local18) + ((_local8 - _arg2.m_vertices[_local16].y) * _local19));
_local4 = _arg1.points[0];
_local4.id.features.incidentEdge = b2_nullFeature;
_local4.id.features.incidentVertex = b2_nullFeature;
_local4.id.features.referenceFace = b2_nullFeature;
_local4.id.features.flip = 0;
if (_local21 <= 0){
_local22 = _arg2.m_vertices[_local16].x;
_local23 = _arg2.m_vertices[_local16].y;
_local4.id.features.incidentVertex = _local16;
} else {
if (_local21 >= _local20){
_local22 = _arg2.m_vertices[_local17].x;
_local23 = _arg2.m_vertices[_local17].y;
_local4.id.features.incidentVertex = _local17;
} else {
_local22 = ((_local18 * _local21) + _arg2.m_vertices[_local16].x);
_local23 = ((_local19 * _local21) + _arg2.m_vertices[_local16].y);
_local4.id.features.incidentEdge = _local16;
};
};
_local5 = (_local7 - _local22);
_local6 = (_local8 - _local23);
_local11 = Math.sqrt(((_local5 * _local5) + (_local6 * _local6)));
_local5 = (_local5 / _local11);
_local6 = (_local6 / _local11);
if (_local11 > _local14){
return;
};
_arg1.pointCount = 1;
_arg1.normal.Set(((_local9.col1.x * _local5) + (_local9.col2.x * _local6)), ((_local9.col1.y * _local5) + (_local9.col2.y * _local6)));
_local4.position.x = (_arg3.m_position.x - (_local14 * _arg1.normal.x));
_local4.position.y = (_arg3.m_position.y - (_local14 * _arg1.normal.y));
_local4.separation = (_local11 - _local14);
}
public static function FindMaxSeparation(_arg1:Array, _arg2:b2PolyShape, _arg3:b2PolyShape):Number{
var _local4:int;
var _local5:Array;
var _local6:b2Vec2;
var _local7:b2Vec2;
var _local8:int;
var _local9:Number;
var _local10:int;
var _local11:int;
var _local12:Number;
var _local13:int;
var _local14:Number;
var _local15:int;
var _local16:Number;
var _local17:int;
var _local18:Number;
var _local19:int;
var _local20:Number;
_local4 = _arg2.m_vertexCount;
_local5 = _arg2.m_vertices;
_local6 = new b2Vec2();
_local6.SetV(_arg3.m_position);
_local6.Subtract(_arg2.m_position);
_local7 = new b2Vec2();
_local7.SetV(_local6);
_local7.MulTM(_arg2.m_R);
_local8 = 0;
_local9 = -(Number.MAX_VALUE);
_local10 = 0;
while (_local10 < _local4) {
_local18 = b2Math.b2Dot(_local5[_local10], _local7);
if (_local18 > _local9){
_local9 = _local18;
_local8 = _local10;
};
_local10++;
};
_local11 = (((_local8 - 1) >= 0)) ? (_local8 - 1) : (_local4 - 1);
_local12 = EdgeSeparation(_arg2, _local11, _arg3);
if (_local12 > 0){
return (_local12);
};
_local13 = _local8;
_local14 = EdgeSeparation(_arg2, _local13, _arg3);
if (_local14 > 0){
return (_local14);
};
if (_local12 > _local14){
_local17 = -1;
_local15 = _local11;
_local16 = _local12;
} else {
_local17 = 1;
_local15 = _local13;
_local16 = _local14;
};
while (true) {
if (_local17 == -1){
_local19 = (((_local15 - 1) >= 0)) ? (_local15 - 1) : (_local4 - 1);
} else {
_local19 = (((_local15 + 1) < _local4)) ? (_local15 + 1) : 0;
};
_local20 = EdgeSeparation(_arg2, _local19, _arg3);
if (_local20 > 0){
return (_local20);
};
if (_local20 > _local16){
_local15 = _local19;
_local16 = _local20;
} else {
break;
};
};
_arg1[0] = _local15;
return (_local16);
}
public static function ClipSegmentToLine(_arg1:Array, _arg2:Array, _arg3:b2Vec2, _arg4:Number):int{
var _local5:int;
var _local6:b2Vec2;
var _local7:b2Vec2;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:b2Vec2;
_local5 = 0;
_local6 = _arg2[0].v;
_local7 = _arg2[1].v;
_local8 = (b2Math.b2Dot(_arg3, _arg2[0].v) - _arg4);
_local9 = (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 b2CollidePoly(_arg1:b2Manifold, _arg2:b2PolyShape, _arg3:b2PolyShape){
var _local4:int;
var _local5:Array;
var _local6:Number;
var _local7:int;
var _local8:Array;
var _local9:Number;
var _local10:b2PolyShape;
var _local11:b2PolyShape;
var _local12:int;
var _local13:int;
var _local14:Number;
var _local15:Number;
var _local16:Array;
var _local17:int;
var _local18:Array;
var _local19:b2Vec2;
var _local20:b2Vec2;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
var _local26:b2Mat22;
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:Array;
var _local38:Array;
var _local39:int;
var _local40:int;
var _local41:int;
var _local42:b2Vec2;
var _local43:Number;
var _local44:b2ContactPoint;
_arg1.pointCount = 0;
_local4 = 0;
_local5 = [_local4];
_local6 = FindMaxSeparation(_local5, _arg2, _arg3);
_local4 = _local5[0];
if (_local6 > 0){
return;
};
_local7 = 0;
_local8 = [_local7];
_local9 = FindMaxSeparation(_local8, _arg3, _arg2);
_local7 = _local8[0];
if (_local9 > 0){
return;
};
_local14 = 0.98;
_local15 = 0.001;
if (_local9 > ((_local14 * _local6) + _local15)){
_local10 = _arg3;
_local11 = _arg2;
_local12 = _local7;
_local13 = 1;
} else {
_local10 = _arg2;
_local11 = _arg3;
_local12 = _local4;
_local13 = 0;
};
_local16 = [new ClipVertex(), new ClipVertex()];
FindIncidentEdge(_local16, _local10, _local12, _local11);
_local17 = _local10.m_vertexCount;
_local18 = _local10.m_vertices;
_local19 = _local18[_local12];
_local20 = (((_local12 + 1) < _local17)) ? _local18[(_local12 + 1)] : _local18[0];
_local21 = (_local20.x - _local19.x);
_local22 = (_local20.y - _local19.y);
_local23 = (_local20.x - _local19.x);
_local24 = (_local20.y - _local19.y);
_local25 = _local23;
_local26 = _local10.m_R;
_local23 = ((_local26.col1.x * _local25) + (_local26.col2.x * _local24));
_local24 = ((_local26.col1.y * _local25) + (_local26.col2.y * _local24));
_local27 = (1 / Math.sqrt(((_local23 * _local23) + (_local24 * _local24))));
_local23 = (_local23 * _local27);
_local24 = (_local24 * _local27);
_local28 = _local23;
_local29 = _local24;
_local25 = _local28;
_local28 = _local29;
_local29 = -(_local25);
_local30 = _local19.x;
_local31 = _local19.y;
_local25 = _local30;
_local26 = _local10.m_R;
_local30 = ((_local26.col1.x * _local25) + (_local26.col2.x * _local31));
_local31 = ((_local26.col1.y * _local25) + (_local26.col2.y * _local31));
_local30 = (_local30 + _local10.m_position.x);
_local31 = (_local31 + _local10.m_position.y);
_local32 = _local20.x;
_local33 = _local20.y;
_local25 = _local32;
_local26 = _local10.m_R;
_local32 = ((_local26.col1.x * _local25) + (_local26.col2.x * _local33));
_local33 = ((_local26.col1.y * _local25) + (_local26.col2.y * _local33));
_local32 = (_local32 + _local10.m_position.x);
_local33 = (_local33 + _local10.m_position.y);
_local34 = ((_local28 * _local30) + (_local29 * _local31));
_local35 = -(((_local23 * _local30) + (_local24 * _local31)));
_local36 = ((_local23 * _local32) + (_local24 * _local33));
_local37 = [new ClipVertex(), new ClipVertex()];
_local38 = [new ClipVertex(), new ClipVertex()];
b2CollidePolyTempVec.Set(-(_local23), -(_local24));
_local39 = ClipSegmentToLine(_local37, _local16, b2CollidePolyTempVec, _local35);
if (_local39 < 2){
return;
};
b2CollidePolyTempVec.Set(_local23, _local24);
_local39 = ClipSegmentToLine(_local38, _local37, b2CollidePolyTempVec, _local36);
if (_local39 < 2){
return;
};
if (_local13){
_arg1.normal.Set(-(_local28), -(_local29));
} else {
_arg1.normal.Set(_local28, _local29);
};
_local40 = 0;
_local41 = 0;
while (_local41 < b2Settings.b2_maxManifoldPoints) {
_local42 = _local38[_local41].v;
_local43 = (((_local28 * _local42.x) + (_local29 * _local42.y)) - _local34);
if (_local43 <= 0){
_local44 = _arg1.points[_local40];
_local44.separation = _local43;
_local44.position.SetV(_local38[_local41].v);
_local44.id.Set(_local38[_local41].id);
_local44.id.features.flip = _local13;
_local40++;
};
_local41++;
};
_arg1.pointCount = _local40;
}
public static function b2CollideCircle(_arg1:b2Manifold, _arg2:b2CircleShape, _arg3:b2CircleShape){
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:b2ContactPoint;
var _local10:Number;
var _local11:Number;
_arg1.pointCount = 0;
_local4 = (_arg3.m_position.x - _arg2.m_position.x);
_local5 = (_arg3.m_position.y - _arg2.m_position.y);
_local6 = ((_local4 * _local4) + (_local5 * _local5));
_local7 = (_arg2.m_radius + _arg3.m_radius);
if (_local6 > (_local7 * _local7)){
return;
};
if (_local6 < Number.MIN_VALUE){
_local8 = -(_local7);
_arg1.normal.Set(0, 1);
} else {
_local10 = Math.sqrt(_local6);
_local8 = (_local10 - _local7);
_local11 = (1 / _local10);
_arg1.normal.x = (_local11 * _local4);
_arg1.normal.y = (_local11 * _local5);
};
_arg1.pointCount = 1;
_local9 = _arg1.points[0];
_local9.id.key = 0;
_local9.separation = _local8;
_local9.position.x = (_arg3.m_position.x - (_arg3.m_radius * _arg1.normal.x));
_local9.position.y = (_arg3.m_position.y - (_arg3.m_radius * _arg1.normal.y));
}
}
}//package Engine.Collision
Section 14
//b2ContactID (Engine.Collision.b2ContactID)
package Engine.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){
key = _arg1._key;
}
public function Copy():b2ContactID{
var _local1:b2ContactID;
_local1 = new b2ContactID();
_local1.key = key;
return (_local1);
}
public function get key():uint{
return (_key);
}
public function set key(_arg1:uint){
_key = _arg1;
features._referenceFace = (_key & 0xFF);
features._incidentEdge = (((_key & 0xFF00) >> 8) & 0xFF);
features._incidentVertex = (((_key & 0xFF0000) >> 16) & 0xFF);
features._flip = (((_key & 4278190080) >> 24) & 0xFF);
}
}
}//package Engine.Collision
Section 15
//b2ContactPoint (Engine.Collision.b2ContactPoint)
package Engine.Collision {
import Engine.Common.Math.*;
public class b2ContactPoint {
public var separation:Number;
public var position:b2Vec2;
public var normalImpulse:Number;
public var tangentImpulse:Number;
public var id:b2ContactID;
public function b2ContactPoint(){
position = new b2Vec2();
id = new b2ContactID();
super();
}
}
}//package Engine.Collision
Section 16
//b2Manifold (Engine.Collision.b2Manifold)
package Engine.Collision {
import Engine.Common.Math.*;
import Engine.Common.*;
public class b2Manifold {
public var points:Array;
public var pointCount:int;
public var normal:b2Vec2;
public function b2Manifold(){
var _local1:int;
super();
points = new Array(b2Settings.b2_maxManifoldPoints);
_local1 = 0;
while (_local1 < b2Settings.b2_maxManifoldPoints) {
points[_local1] = new b2ContactPoint();
_local1++;
};
normal = new b2Vec2();
}
}
}//package Engine.Collision
Section 17
//b2OBB (Engine.Collision.b2OBB)
package Engine.Collision {
import Engine.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 Engine.Collision
Section 18
//b2Pair (Engine.Collision.b2Pair)
package Engine.Collision {
public class b2Pair {
public var userData;// = null
public var proxyId1:uint;
public var proxyId2:uint;
public var status:uint;
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 e_pairReceived:uint = 4;
public static var b2_nullProxy:uint = 0xFFFF;
public static var b2_tableCapacity:int = 8192;
public function b2Pair(){
userData = null;
super();
}
public function SetBuffered(){
status = (status | e_pairBuffered);
}
public function SetReceived(){
status = (status | e_pairReceived);
}
public function IsBuffered():Boolean{
return (((status & e_pairBuffered) == e_pairBuffered));
}
public function IsReceived():Boolean{
return (((status & e_pairReceived) == e_pairReceived));
}
public function ClearBuffered(){
status = (status & ~(e_pairBuffered));
}
public function ClearRemoved(){
status = (status & ~(e_pairRemoved));
}
public function IsRemoved():Boolean{
return (((status & e_pairRemoved) == e_pairRemoved));
}
public function SetRemoved(){
status = (status | e_pairRemoved);
}
}
}//package Engine.Collision
Section 19
//b2PairCallback (Engine.Collision.b2PairCallback)
package Engine.Collision {
public class b2PairCallback {
public function PairRemoved(_arg1, _arg2, _arg3){
}
public function PairAdded(_arg1, _arg2){
return (null);
}
}
}//package Engine.Collision
Section 20
//b2PairManager (Engine.Collision.b2PairManager)
package Engine.Collision {
import Engine.Common.Math.*;
import Engine.Common.*;
public class b2PairManager {
public var m_next:Array;
public var m_pairs:Array;
public var m_pairCount:int;
public var m_hashTable:Array;
public function b2PairManager(){
var _local1:uint;
super();
m_hashTable = new Array(b2Pair.b2_tableCapacity);
_local1 = 0;
while (_local1 < b2Pair.b2_tableCapacity) {
m_hashTable[_local1] = b2Pair.b2_nullPair;
_local1++;
};
m_next = new Array(b2Settings.b2_maxPairs);
_local1 = 0;
while (_local1 < b2Settings.b2_maxPairs) {
m_next[_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_pairCount = 0;
}
public function Find(_arg1:uint, _arg2:uint):b2Pair{
var _local3:uint;
var _local4:uint;
var _local5:uint;
if (_arg1 > _arg2){
_local5 = _arg1;
_arg1 = _arg2;
_arg2 = _local5;
};
_local3 = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask);
_local4 = m_hashTable[_local3];
while (((!((_local4 == b2Pair.b2_nullPair))) && ((Equals(m_pairs[_local4], _arg1, _arg2) == false)))) {
_local4 = m_next[_local4];
};
if (_local4 == b2Pair.b2_nullPair){
return (null);
};
return (m_pairs[_local4]);
}
public function Add(_arg1:uint, _arg2:uint):b2Pair{
var _local3:uint;
var _local4:int;
var _local5:b2Pair;
var _local6:uint;
if (_arg1 > _arg2){
_local6 = _arg1;
_arg1 = _arg2;
_arg2 = _local6;
};
_local3 = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask);
_local4 = FindHash(_arg1, _arg2, _local3);
_local5 = ((_local4)!=b2Settings.USHRT_MAX) ? m_pairs[_local4] : null;
if (_local5 != null){
return (_local5);
};
if (m_pairCount == b2Settings.b2_maxPairs){
return (null);
};
_local5 = m_pairs[m_pairCount];
_local5.proxyId1 = _arg1;
_local5.proxyId2 = _arg2;
_local5.status = 0;
_local5.userData = null;
m_next[m_pairCount] = m_hashTable[_local3];
m_hashTable[_local3] = m_pairCount;
m_pairCount++;
return (_local5);
}
public function GetPairs():Array{
return (m_pairs);
}
public function Remove(_arg1:uint, _arg2:uint){
var _local3:uint;
var _local4:int;
var _local5:b2Pair;
var _local6:*;
var _local7:uint;
var _local8:uint;
var _local9:uint;
var _local10:b2Pair;
var _local11:uint;
var _local12:uint;
if (_arg1 > _arg2){
_local12 = _arg1;
_arg1 = _arg2;
_arg2 = _local12;
};
_local3 = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask);
_local4 = FindHash(_arg1, _arg2, _local3);
_local5 = ((_local4)!=b2Settings.USHRT_MAX) ? m_pairs[_local4] : null;
if (_local5 == null){
return (null);
};
_local6 = _local5.userData;
_local7 = m_hashTable[_local3];
_local8 = b2Pair.b2_nullPair;
while (_local7 != _local4) {
_local8 = _local7;
_local7 = m_next[_local7];
};
if (_local8 != b2Pair.b2_nullPair){
m_next[_local8] = m_next[_local4];
} else {
m_hashTable[_local3] = m_next[_local4];
};
_local9 = (m_pairCount - 1);
if (_local9 == _local4){
m_pairCount--;
return (_local6);
};
_local10 = m_pairs[_local9];
_local11 = (Hash(_local10.proxyId1, _local10.proxyId2) & b2Pair.b2_tableMask);
_local7 = m_hashTable[_local11];
_local8 = b2Pair.b2_nullPair;
while (_local7 != _local9) {
_local8 = _local7;
_local7 = m_next[_local7];
};
if (_local8 != b2Pair.b2_nullPair){
m_next[_local8] = m_next[_local9];
} else {
m_hashTable[_local11] = m_next[_local9];
};
m_pairs[_local4].userData = m_pairs[_local9].userData;
m_pairs[_local4].proxyId1 = m_pairs[_local9].proxyId1;
m_pairs[_local4].proxyId2 = m_pairs[_local9].proxyId2;
m_pairs[_local4].status = m_pairs[_local9].status;
m_next[_local4] = m_hashTable[_local11];
m_hashTable[_local11] = _local4;
m_pairCount--;
return (_local6);
}
public function GetCount():int{
return (m_pairCount);
}
private function FindHash(_arg1:uint, _arg2:uint, _arg3:uint):int{
var _local4:uint;
_local4 = m_hashTable[_arg3];
while (((!((_local4 == b2Pair.b2_nullPair))) && ((Equals(m_pairs[_local4], _arg1, _arg2) == false)))) {
_local4 = m_next[_local4];
};
if (_local4 == b2Pair.b2_nullPair){
return (b2Settings.USHRT_MAX);
};
return (_local4);
}
public static function Hash(_arg1:uint, _arg2:uint):uint{
var _local3:uint;
_local3 = (((_arg2 << 16) & 4294901760) | _arg1);
_local3 = (~(_local3) + ((_local3 << 15) & 4294934528));
_local3 = (_local3 ^ ((_local3 >> 12) & 1048575));
_local3 = (_local3 + ((_local3 << 2) & 4294967292));
_local3 = (_local3 ^ ((_local3 >> 4) & 268435455));
_local3 = (_local3 * 2057);
_local3 = (_local3 ^ ((_local3 >> 16) & 0xFFFF));
return (_local3);
}
public static function Equals(_arg1:b2Pair, _arg2:uint, _arg3:uint):Boolean{
return ((((_arg1.proxyId1 == _arg2)) && ((_arg1.proxyId2 == _arg3))));
}
}
}//package Engine.Collision
Section 21
//b2Proxy (Engine.Collision.b2Proxy)
package Engine.Collision {
public class b2Proxy {
public var categoryBits:uint;
public var overlapCount:uint;
public var lowerBounds:Array;
public var upperBounds:Array;
public var maskBits:uint;
public var groupIndex:int;
public var userData;// = null
public var timeStamp:uint;
public function b2Proxy(){
lowerBounds = [uint(0), uint(0)];
upperBounds = [uint(0), uint(0)];
userData = null;
super();
}
public function GetNext():uint{
return (lowerBounds[0]);
}
public function IsValid():Boolean{
return (!((overlapCount == b2BroadPhase.b2_invalid)));
}
public function SetNext(_arg1:uint){
lowerBounds[0] = (_arg1 & 0xFFFF);
}
}
}//package Engine.Collision
Section 22
//ClipVertex (Engine.Collision.ClipVertex)
package Engine.Collision {
import Engine.Common.Math.*;
public class ClipVertex {
public var v:b2Vec2;
public var id:b2ContactID;
public function ClipVertex(){
v = new b2Vec2();
id = new b2ContactID();
super();
}
}
}//package Engine.Collision
Section 23
//Features (Engine.Collision.Features)
package Engine.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){
_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){
_referenceFace = _arg1;
_m_id._key = ((_m_id._key & 4294967040) | (_referenceFace & 0xFF));
}
public function set flip(_arg1:int){
_flip = _arg1;
_m_id._key = ((_m_id._key & 0xFFFFFF) | ((_flip << 24) & 4278190080));
}
public function get incidentVertex():int{
return (_incidentVertex);
}
public function set incidentEdge(_arg1:int){
_incidentEdge = _arg1;
_m_id._key = ((_m_id._key & 4294902015) | ((_incidentEdge << 8) & 0xFF00));
}
}
}//package Engine.Collision
Section 24
//b2Mat22 (Engine.Common.Math.b2Mat22)
package Engine.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(){
col1.x = 1;
col2.x = 0;
col1.y = 0;
col2.y = 1;
}
public function Set(_arg1:Number){
var _local2:Number;
var _local3:Number;
_local2 = Math.cos(_arg1);
_local3 = Math.sin(_arg1);
col1.x = _local2;
col2.x = -(_local3);
col1.y = _local3;
col2.y = _local2;
}
public function SetVV(_arg1:b2Vec2, _arg2:b2Vec2){
col1.SetV(_arg1);
col2.SetV(_arg2);
}
public function SetZero(){
col1.x = 0;
col2.x = 0;
col1.y = 0;
col2.y = 0;
}
public function SetM(_arg1:b2Mat22){
col1.SetV(_arg1.col1);
col2.SetV(_arg1.col2);
}
public function AddM(_arg1:b2Mat22){
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(){
col1.Abs();
col2.Abs();
}
public function Copy():b2Mat22{
return (new b2Mat22(0, col1, col2));
}
public function Invert(_arg1:b2Mat22):b2Mat22{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
_local2 = col1.x;
_local3 = col2.x;
_local4 = col1.y;
_local5 = col2.y;
_local6 = ((_local2 * _local5) - (_local3 * _local4));
_local6 = (1 / _local6);
_arg1.col1.x = (_local6 * _local5);
_arg1.col2.x = (-(_local6) * _local3);
_arg1.col1.y = (-(_local6) * _local4);
_arg1.col2.y = (_local6 * _local2);
return (_arg1);
}
public function Solve(_arg1:b2Vec2, _arg2:Number, _arg3:Number):b2Vec2{
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local4 = col1.x;
_local5 = col2.x;
_local6 = col1.y;
_local7 = col2.y;
_local8 = ((_local4 * _local7) - (_local5 * _local6));
_local8 = (1 / _local8);
_arg1.x = (_local8 * ((_local7 * _arg2) - (_local5 * _arg3)));
_arg1.y = (_local8 * ((_local4 * _arg3) - (_local6 * _arg2)));
return (_arg1);
}
}
}//package Engine.Common.Math
Section 25
//b2Math (Engine.Common.Math.b2Math)
package Engine.Common.Math {
public class b2Math {
public static function b2CrossVF(_arg1:b2Vec2, _arg2:Number):b2Vec2{
var _local3:b2Vec2;
_local3 = new b2Vec2((_arg2 * _arg1.y), (-(_arg2) * _arg1.x));
return (_local3);
}
public static function AddVV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2;
_local3 = new b2Vec2((_arg1.x + _arg2.x), (_arg1.y + _arg2.y));
return (_local3);
}
public static function b2IsValid(_arg1:Number){
return (isFinite(_arg1));
}
public static function b2Swap(_arg1:Array, _arg2:Array){
var _local3:*;
_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;
_local2 = new b2Mat22(0, b2AbsV(_arg1.col1), b2AbsV(_arg1.col2));
return (_local2);
}
public static function SubtractVV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2;
_local3 = new b2Vec2((_arg1.x - _arg2.x), (_arg1.y - _arg2.y));
return (_local3);
}
public static function 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;
_local2 = new b2Vec2(b2Abs(_arg1.x), b2Abs(_arg1.y));
return (_local2);
}
public static function b2MinV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2;
_local3 = new b2Vec2(b2Min(_arg1.x, _arg2.x), b2Min(_arg1.y, _arg2.y));
return (_local3);
}
public static function b2Dot(_arg1:b2Vec2, _arg2:b2Vec2):Number{
return (((_arg1.x * _arg2.x) + (_arg1.y * _arg2.y)));
}
public static function b2CrossFV(_arg1:Number, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2;
_local3 = new b2Vec2((-(_arg1) * _arg2.y), (_arg1 * _arg2.x));
return (_local3);
}
public static function AddMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{
var _local3:b2Mat22;
_local3 = new b2Mat22(0, AddVV(_arg1.col1, _arg2.col1), AddVV(_arg1.col2, _arg2.col2));
return (_local3);
}
public static function b2MulTMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{
var _local3:b2Vec2;
var _local4:b2Vec2;
var _local5:b2Mat22;
_local3 = new b2Vec2(b2Dot(_arg1.col1, _arg2.col1), b2Dot(_arg1.col2, _arg2.col1));
_local4 = new b2Vec2(b2Dot(_arg1.col1, _arg2.col2), b2Dot(_arg1.col2, _arg2.col2));
_local5 = new b2Mat22(0, _local3, _local4);
return (_local5);
}
public static function b2MaxV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2;
_local3 = new b2Vec2(b2Max(_arg1.x, _arg2.x), b2Max(_arg1.y, _arg2.y));
return (_local3);
}
public static function b2IsPowerOfTwo(_arg1:uint):Boolean{
var _local2:Boolean;
_local2 = (((_arg1 > 0)) && (((_arg1 & (_arg1 - 1)) == 0)));
return (_local2);
}
public static function b2ClampV(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Vec2):b2Vec2{
return (b2MaxV(_arg2, b2MinV(_arg1, _arg3)));
}
public static function MulFV(_arg1:Number, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2;
_local3 = new b2Vec2((_arg1 * _arg2.x), (_arg1 * _arg2.y));
return (_local3);
}
public static function b2MulTMV(_arg1:b2Mat22, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2;
_local3 = new b2Vec2(b2Dot(_arg2, _arg1.col1), b2Dot(_arg2, _arg1.col2));
return (_local3);
}
public static function b2Min(_arg1:Number, _arg2:Number):Number{
return (((_arg1 < _arg2)) ? _arg1 : _arg2);
}
public static function b2Random():Number{
return (((Math.random() * 2) - 1));
}
public static function b2MulMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{
var _local3:b2Mat22;
_local3 = new b2Mat22(0, b2MulMV(_arg1, _arg2.col1), b2MulMV(_arg1, _arg2.col2));
return (_local3);
}
public static function b2NextPowerOfTwo(_arg1:uint):uint{
_arg1 = (_arg1 | ((_arg1 >> 1) & 2147483647));
_arg1 = (_arg1 | ((_arg1 >> 2) & 1073741823));
_arg1 = (_arg1 | ((_arg1 >> 4) & 268435455));
_arg1 = (_arg1 | ((_arg1 >> 8) & 0xFFFFFF));
_arg1 = (_arg1 | ((_arg1 >> 16) & 0xFFFF));
return ((_arg1 + 1));
}
public static function b2Max(_arg1:Number, _arg2:Number):Number{
return (((_arg1 > _arg2)) ? _arg1 : _arg2);
}
public static function b2MulMV(_arg1:b2Mat22, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2;
_local3 = new b2Vec2(((_arg1.col1.x * _arg2.x) + (_arg1.col2.x * _arg2.y)), ((_arg1.col1.y * _arg2.x) + (_arg1.col2.y * _arg2.y)));
return (_local3);
}
}
}//package Engine.Common.Math
Section 26
//b2Vec2 (Engine.Common.Math.b2Vec2)
package Engine.Common.Math {
public class b2Vec2 {
public var x:Number;
public var y:Number;
public function b2Vec2(_arg1:Number=0, _arg2:Number=0){
x = _arg1;
y = _arg2;
}
public function Set(_arg1:Number=0, _arg2:Number=0){
x = _arg1;
y = _arg2;
}
public function Multiply(_arg1:Number){
x = (x * _arg1);
y = (y * _arg1);
}
public function Length():Number{
return (Math.sqrt(((x * x) + (y * y))));
}
public function Add(_arg1:b2Vec2){
x = (x + _arg1.x);
y = (y + _arg1.y);
}
public function SetZero(){
x = 0;
y = 0;
}
public function CrossVF(_arg1:Number){
var _local2:Number;
_local2 = x;
x = (_arg1 * y);
y = (-(_arg1) * _local2);
}
public function MaxV(_arg1:b2Vec2){
x = ((x > _arg1.x)) ? x : _arg1.x;
y = ((y > _arg1.y)) ? y : _arg1.y;
}
public function SetV(_arg1:b2Vec2){
x = _arg1.x;
y = _arg1.y;
}
public function Negative():b2Vec2{
return (new b2Vec2(-(x), -(y)));
}
public function Abs(){
x = Math.abs(x);
y = Math.abs(y);
}
public function Copy():b2Vec2{
return (new b2Vec2(x, y));
}
public function MulTM(_arg1:b2Mat22){
var _local2:Number;
_local2 = b2Math.b2Dot(this, _arg1.col1);
y = b2Math.b2Dot(this, _arg1.col2);
x = _local2;
}
public function IsValid():Boolean{
return (((b2Math.b2IsValid(x)) && (b2Math.b2IsValid(y))));
}
public function MinV(_arg1:b2Vec2){
x = ((x < _arg1.x)) ? x : _arg1.x;
y = ((y < _arg1.y)) ? y : _arg1.y;
}
public function MulM(_arg1:b2Mat22){
var _local2:Number;
_local2 = x;
x = ((_arg1.col1.x * _local2) + (_arg1.col2.x * y));
y = ((_arg1.col1.y * _local2) + (_arg1.col2.y * y));
}
public function Normalize():Number{
var _local1:Number;
var _local2:Number;
_local1 = Length();
if (_local1 < Number.MIN_VALUE){
return (0);
};
_local2 = (1 / _local1);
x = (x * _local2);
y = (y * _local2);
return (_local1);
}
public function Subtract(_arg1:b2Vec2){
x = (x - _arg1.x);
y = (y - _arg1.y);
}
public function CrossFV(_arg1:Number){
var _local2:Number;
_local2 = x;
x = (-(_arg1) * y);
y = (_arg1 * _local2);
}
public static function Make(_arg1:Number, _arg2:Number):b2Vec2{
return (new b2Vec2(_arg1, _arg2));
}
}
}//package Engine.Common.Math
Section 27
//b2Settings (Engine.Common.b2Settings)
package Engine.Common {
import Engine.Common.Math.*;
public class b2Settings {
public static const b2_lengthUnitsPerMeter:Number = 1;
public static const b2_angularSleepTolerance:Number = 0.0111111111111111;
public static const b2_linearSleepTolerance:Number = 0.01;
public static const b2_angularSlop:Number = 0.0349065850398866;
public static const b2_linearSlop:Number = 0.005;
public static const b2_pi:Number = 3.14159265358979;
public static const b2_maxShapesPerBody:int = 64;
public static const b2_maxProxies:int = 0x0400;
public static const b2_velocityThreshold:Number = 1;
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_maxAngularCorrection:Number = 0.139626340159546;
public static const b2_massUnitsPerKilogram:Number = 1;
public static const USHRT_MAX:int = 0xFFFF;
public static const b2_maxLinearCorrection:Number = 0.2;
public static const b2_maxPolyVertices:int = 8;
public static const b2_timeUnitsPerSecond:Number = 1;
public static function b2Assert(_arg1:Boolean){
var _local2:b2Vec2;
if (!_arg1){
_local2.x++;
};
}
}
}//package Engine.Common
Section 28
//b2CircleContact (Engine.Dynamics.Contacts.b2CircleContact)
package Engine.Dynamics.Contacts {
import Engine.Common.Math.*;
import Engine.Collision.Shapes.*;
import Engine.Dynamics.*;
import Engine.Collision.*;
import Engine.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 GetManifolds():Array{
return (m_manifold);
}
override public function Evaluate(){
b2Collision.b2CollideCircle(m_manifold[0], (m_shape1 as b2CircleShape), (m_shape2 as b2CircleShape));
if (m_manifold[0].pointCount > 0){
m_manifoldCount = 1;
} else {
m_manifoldCount = 0;
};
}
public static function Destroy(_arg1:b2Contact, _arg2){
}
public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{
return (new b2CircleContact(_arg1, _arg2));
}
}
}//package Engine.Dynamics.Contacts
Section 29
//b2Contact (Engine.Dynamics.Contacts.b2Contact)
package Engine.Dynamics.Contacts {
import Engine.Common.Math.*;
import Engine.Collision.Shapes.*;
import Engine.Dynamics.*;
import Engine.Collision.*;
import Engine.Common.*;
public class b2Contact {
public var m_shape1:b2Shape;
public var m_shape2:b2Shape;
public var m_prev:b2Contact;
public var m_next: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 GetNext():b2Contact{
return (m_next);
}
public function GetShape2():b2Shape{
return (m_shape2);
}
public function GetManifoldCount():int{
return (m_manifoldCount);
}
public function GetManifolds():Array{
return (null);
}
public function Evaluate(){
}
public static function InitializeRegisters(){
var _local1:int;
var _local2:int;
s_registers = new Array(b2Shape.e_shapeTypeCount);
_local1 = 0;
while (_local1 < b2Shape.e_shapeTypeCount) {
s_registers[_local1] = new Array(b2Shape.e_shapeTypeCount);
_local2 = 0;
while (_local2 < b2Shape.e_shapeTypeCount) {
s_registers[_local1][_local2] = new b2ContactRegister();
_local2++;
};
_local1++;
};
AddType(b2CircleContact.Create, b2CircleContact.Destroy, b2Shape.e_circleShape, b2Shape.e_circleShape);
AddType(b2PolyAndCircleContact.Create, b2PolyAndCircleContact.Destroy, b2Shape.e_polyShape, b2Shape.e_circleShape);
AddType(b2PolyContact.Create, b2PolyContact.Destroy, b2Shape.e_polyShape, b2Shape.e_polyShape);
}
public static function Destroy(_arg1:b2Contact, _arg2){
var _local3:int;
var _local4:int;
var _local5:*;
if (_arg1.GetManifoldCount() > 0){
_arg1.m_shape1.m_body.WakeUp();
_arg1.m_shape2.m_body.WakeUp();
};
_local3 = _arg1.m_shape1.m_type;
_local4 = _arg1.m_shape2.m_type;
_local5 = s_registers[_local3][_local4].destroyFcn;
_local5(_arg1, _arg2);
}
public static function AddType(_arg1, _arg2, _arg3:int, _arg4:int){
s_registers[_arg3][_arg4].createFcn = _arg1;
s_registers[_arg3][_arg4].destroyFcn = _arg2;
s_registers[_arg3][_arg4].primary = true;
if (_arg3 != _arg4){
s_registers[_arg4][_arg3].createFcn = _arg1;
s_registers[_arg4][_arg3].destroyFcn = _arg2;
s_registers[_arg4][_arg3].primary = false;
};
}
public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{
var _local4:int;
var _local5:int;
var _local6:*;
var _local7:b2Contact;
var _local8:int;
var _local9:b2Manifold;
if (s_initialized == false){
InitializeRegisters();
s_initialized = true;
};
_local4 = _arg1.m_type;
_local5 = _arg2.m_type;
_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 Engine.Dynamics.Contacts
Section 30
//b2ContactConstraint (Engine.Dynamics.Contacts.b2ContactConstraint)
package Engine.Dynamics.Contacts {
import Engine.Common.Math.*;
import Engine.Dynamics.*;
import Engine.Collision.*;
import Engine.Common.*;
public class b2ContactConstraint {
public var points:Array;
public var restitution:Number;
public var body1:b2Body;
public var manifold:b2Manifold;
public var normal:b2Vec2;
public var body2:b2Body;
public var friction:Number;
public var pointCount:int;
public function b2ContactConstraint(){
var _local1:int;
normal = new b2Vec2();
super();
points = new Array(b2Settings.b2_maxManifoldPoints);
_local1 = 0;
while (_local1 < b2Settings.b2_maxManifoldPoints) {
points[_local1] = new b2ContactConstraintPoint();
_local1++;
};
}
}
}//package Engine.Dynamics.Contacts
Section 31
//b2ContactConstraintPoint (Engine.Dynamics.Contacts.b2ContactConstraintPoint)
package Engine.Dynamics.Contacts {
import Engine.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 Engine.Dynamics.Contacts
Section 32
//b2ContactNode (Engine.Dynamics.Contacts.b2ContactNode)
package Engine.Dynamics.Contacts {
import Engine.Dynamics.*;
public class b2ContactNode {
public var next:b2ContactNode;
public var other:b2Body;
public var contact:b2Contact;
public var prev:b2ContactNode;
}
}//package Engine.Dynamics.Contacts
Section 33
//b2ContactRegister (Engine.Dynamics.Contacts.b2ContactRegister)
package Engine.Dynamics.Contacts {
public class b2ContactRegister {
public var primary:Boolean;
public var createFcn;
public var destroyFcn;
}
}//package Engine.Dynamics.Contacts
Section 34
//b2ContactSolver (Engine.Dynamics.Contacts.b2ContactSolver)
package Engine.Dynamics.Contacts {
import Engine.Common.Math.*;
import Engine.Dynamics.*;
import Engine.Collision.*;
import Engine.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 _local7:int;
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:*;
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++;
};
_local7 = 0;
_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);
_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 = (-(_local25.restitution) * _local45);
} else {
_local28.velocityBias = 0;
};
_local26++;
};
_local7++;
_local21++;
};
_local4++;
};
}
public function SolvePositionConstraints(_arg1:Number):Boolean{
var _local2:Number;
var _local3:b2Mat22;
var _local4:b2Vec2;
var _local5:int;
var _local6:b2ContactConstraint;
var _local7:b2Body;
var _local8:b2Body;
var _local9:b2Vec2;
var _local10:Number;
var _local11:b2Vec2;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19: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;
_local2 = 0;
_local5 = 0;
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 SolveVelocityConstraints(){
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 _local15:int;
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;
_local15 = 0;
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(){
var _local1:b2Vec2;
var _local2:b2Vec2;
var _local3:b2Mat22;
var _local4:int;
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;
_local4 = 0;
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 PostSolve(){
var _local1:int;
var _local2:b2ContactConstraint;
var _local3:b2Manifold;
var _local4:int;
var _local5:b2ContactPoint;
var _local6:b2ContactConstraintPoint;
_local1 = 0;
while (_local1 < m_constraintCount) {
_local2 = m_constraints[_local1];
_local3 = _local2.manifold;
_local4 = 0;
while (_local4 < _local2.pointCount) {
_local5 = _local3.points[_local4];
_local6 = _local2.points[_local4];
_local5.normalImpulse = _local6.normalImpulse;
_local5.tangentImpulse = _local6.tangentImpulse;
_local4++;
};
_local1++;
};
}
}
}//package Engine.Dynamics.Contacts
Section 35
//b2NullContact (Engine.Dynamics.Contacts.b2NullContact)
package Engine.Dynamics.Contacts {
public class b2NullContact extends b2Contact {
override public function GetManifolds():Array{
return (null);
}
override public function Evaluate(){
}
}
}//package Engine.Dynamics.Contacts
Section 36
//b2PolyAndCircleContact (Engine.Dynamics.Contacts.b2PolyAndCircleContact)
package Engine.Dynamics.Contacts {
import Engine.Common.Math.*;
import Engine.Collision.Shapes.*;
import Engine.Dynamics.*;
import Engine.Collision.*;
import Engine.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);
b2Settings.b2Assert((m_shape1.m_type == b2Shape.e_polyShape));
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 GetManifolds():Array{
return (m_manifold);
}
override public function Evaluate(){
b2Collision.b2CollidePolyAndCircle(m_manifold[0], (m_shape1 as b2PolyShape), (m_shape2 as b2CircleShape));
if (m_manifold[0].pointCount > 0){
m_manifoldCount = 1;
} else {
m_manifoldCount = 0;
};
}
public static function Destroy(_arg1:b2Contact, _arg2){
}
public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{
return (new b2PolyAndCircleContact(_arg1, _arg2));
}
}
}//package Engine.Dynamics.Contacts
Section 37
//b2PolyContact (Engine.Dynamics.Contacts.b2PolyContact)
package Engine.Dynamics.Contacts {
import Engine.Common.Math.*;
import Engine.Collision.Shapes.*;
import Engine.Dynamics.*;
import Engine.Collision.*;
import Engine.Common.*;
public class b2PolyContact extends b2Contact {
public var m_manifold:Array;
private var m0:b2Manifold;
public function b2PolyContact(_arg1:b2Shape, _arg2:b2Shape){
m0 = new b2Manifold();
m_manifold = [new b2Manifold()];
super(_arg1, _arg2);
m_manifold[0].pointCount = 0;
}
override public function GetManifolds():Array{
return (m_manifold);
}
override public function Evaluate(){
var _local1:b2Manifold;
var _local2:Array;
var _local3:int;
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;
_local1 = m_manifold[0];
_local2 = m0.points;
_local3 = 0;
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));
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;
};
}
public static function Destroy(_arg1:b2Contact, _arg2){
}
public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{
return (new b2PolyContact(_arg1, _arg2));
}
}
}//package Engine.Dynamics.Contacts
Section 38
//b2DistanceJoint (Engine.Dynamics.Joints.b2DistanceJoint)
package Engine.Dynamics.Joints {
import Engine.Common.Math.*;
import Engine.Dynamics.*;
import Engine.Common.*;
public class b2DistanceJoint extends b2Joint {
public var m_localAnchor2:b2Vec2;
public var m_mass:Number;
public var m_localAnchor1:b2Vec2;
public var m_u:b2Vec2;
public var m_impulse:Number;
public var m_length:Number;
public function b2DistanceJoint(_arg1:b2DistanceJointDef){
var _local2:b2Mat22;
var _local3:Number;
var _local4:Number;
m_localAnchor1 = new b2Vec2();
m_localAnchor2 = new b2Vec2();
m_u = new b2Vec2();
super(_arg1);
_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 SolveVelocityConstraints(_arg1:b2StepInfo){
var _local2:b2Mat22;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
_local2 = m_body1.m_R;
_local3 = ((_local2.col1.x * m_localAnchor1.x) + (_local2.col2.x * m_localAnchor1.y));
_local4 = ((_local2.col1.y * m_localAnchor1.x) + (_local2.col2.y * m_localAnchor1.y));
_local2 = m_body2.m_R;
_local5 = ((_local2.col1.x * m_localAnchor2.x) + (_local2.col2.x * m_localAnchor2.y));
_local6 = ((_local2.col1.y * m_localAnchor2.x) + (_local2.col2.y * m_localAnchor2.y));
_local7 = (m_body1.m_linearVelocity.x + (-(m_body1.m_angularVelocity) * _local4));
_local8 = (m_body1.m_linearVelocity.y + (m_body1.m_angularVelocity * _local3));
_local9 = (m_body2.m_linearVelocity.x + (-(m_body2.m_angularVelocity) * _local6));
_local10 = (m_body2.m_linearVelocity.y + (m_body2.m_angularVelocity * _local5));
_local11 = ((m_u.x * (_local9 - _local7)) + (m_u.y * (_local10 - _local8)));
_local12 = (-(m_mass) * _local11);
m_impulse = (m_impulse + _local12);
_local13 = (_local12 * m_u.x);
_local14 = (_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))));
}
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 PrepareVelocitySolver(){
var _local1:b2Mat22;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8: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);
_local6 = 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();
};
_local7 = ((_local2 * m_u.y) - (_local3 * m_u.x));
_local8 = ((_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 GetReactionTorque(_arg1:Number):Number{
return (0);
}
override public function GetReactionForce(_arg1:Number):b2Vec2{
var _local2:b2Vec2;
_local2 = new b2Vec2();
_local2.SetV(m_u);
_local2.Multiply((m_impulse * _arg1));
return (_local2);
}
override public function SolvePositionConstraints():Boolean{
var _local1:b2Mat22;
var _local2:Number;
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;
_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));
_local6 = (((m_body2.m_position.x + _local4) - m_body1.m_position.x) - _local2);
_local7 = (((m_body2.m_position.y + _local5) - m_body1.m_position.y) - _local3);
_local8 = Math.sqrt(((_local6 * _local6) + (_local7 * _local7)));
_local6 = (_local6 / _local8);
_local7 = (_local7 / _local8);
_local9 = (_local8 - m_length);
_local9 = b2Math.b2Clamp(_local9, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection);
_local10 = (-(m_mass) * _local9);
m_u.Set(_local6, _local7);
_local11 = (_local10 * m_u.x);
_local12 = (_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));
}
}
}//package Engine.Dynamics.Joints
Section 39
//b2DistanceJointDef (Engine.Dynamics.Joints.b2DistanceJointDef)
package Engine.Dynamics.Joints {
import Engine.Common.Math.*;
public class b2DistanceJointDef extends b2JointDef {
public var anchorPoint2:b2Vec2;
public var anchorPoint1:b2Vec2;
public function b2DistanceJointDef(){
anchorPoint1 = new b2Vec2();
anchorPoint2 = new b2Vec2();
super();
type = b2Joint.e_distanceJoint;
}
}
}//package Engine.Dynamics.Joints
Section 40
//b2GearJoint (Engine.Dynamics.Joints.b2GearJoint)
package Engine.Dynamics.Joints {
import Engine.Common.Math.*;
import Engine.Dynamics.*;
import Engine.Common.*;
public class b2GearJoint extends b2Joint {
public var m_impulse:Number;
public var m_mass:Number;
public var m_prismatic1:b2PrismaticJoint;
public var m_prismatic2:b2PrismaticJoint;
public var m_ground1:b2Body;
public var m_ground2:b2Body;
public var m_constant:Number;
public var m_revolute1:b2RevoluteJoint;
public var m_revolute2:b2RevoluteJoint;
public var m_groundAnchor1:b2Vec2;
public var m_groundAnchor2:b2Vec2;
public var m_localAnchor1:b2Vec2;
public var m_localAnchor2:b2Vec2;
public var m_ratio:Number;
public var m_J:b2Jacobian;
public function b2GearJoint(_arg1:b2GearJointDef){
var _local2: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;
_local1 = 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;
_local1 = 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(){
var _local1:b2Body;
var _local2:b2Body;
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 _local12:Number;
_local1 = m_ground1;
_local2 = m_ground2;
_local3 = m_body1;
_local4 = m_body2;
_local12 = 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 GetReactionForce(_arg1:Number):b2Vec2{
return (new b2Vec2());
}
override public function SolvePositionConstraints():Boolean{
var _local1:Number;
var _local2:b2Body;
var _local3:b2Body;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local1 = 0;
_local2 = m_body1;
_local3 = m_body2;
if (m_revolute1){
_local4 = m_revolute1.GetJointAngle();
} else {
_local4 = m_prismatic1.GetJointTranslation();
};
if (m_revolute2){
_local5 = m_revolute2.GetJointAngle();
} else {
_local5 = m_prismatic2.GetJointTranslation();
};
_local6 = (m_constant - (_local4 + (m_ratio * _local5)));
_local7 = (-(m_mass) * _local6);
_local2.m_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));
}
override public function GetReactionTorque(_arg1:Number):Number{
return (0);
}
public function GetRatio():Number{
return (m_ratio);
}
override public function SolveVelocityConstraints(_arg1:b2StepInfo){
var _local2:b2Body;
var _local3:b2Body;
var _local4:Number;
var _local5:Number;
_local2 = m_body1;
_local3 = m_body2;
_local4 = m_J.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity);
_local5 = (-(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 Engine.Dynamics.Joints
Section 41
//b2GearJointDef (Engine.Dynamics.Joints.b2GearJointDef)
package Engine.Dynamics.Joints {
public class b2GearJointDef extends b2JointDef {
public var joint2:b2Joint;
public var joint1:b2Joint;
public var ratio:Number;
public function b2GearJointDef(){
type = b2Joint.e_gearJoint;
joint1 = null;
joint2 = null;
ratio = 1;
}
}
}//package Engine.Dynamics.Joints
Section 42
//b2Jacobian (Engine.Dynamics.Joints.b2Jacobian)
package Engine.Dynamics.Joints {
import Engine.Common.Math.*;
public class b2Jacobian {
public var linear1:b2Vec2;
public var linear2:b2Vec2;
public var angular2:Number;
public var angular1:Number;
public function b2Jacobian(){
linear1 = new b2Vec2();
linear2 = new b2Vec2();
super();
}
public function Set(_arg1:b2Vec2, _arg2:Number, _arg3:b2Vec2, _arg4:Number){
linear1.SetV(_arg1);
angular1 = _arg2;
linear2.SetV(_arg3);
angular2 = _arg4;
}
public function SetZero(){
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 Engine.Dynamics.Joints
Section 43
//b2Joint (Engine.Dynamics.Joints.b2Joint)
package Engine.Dynamics.Joints {
import Engine.Common.Math.*;
import Engine.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 GetBody2():b2Body{
return (m_body2);
}
public function PrepareVelocitySolver(){
}
public function PreparePositionSolver(){
}
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 SolveVelocityConstraints(_arg1:b2StepInfo){
}
public static function Destroy(_arg1:b2Joint, _arg2){
}
public static function Create(_arg1:b2JointDef, _arg2):b2Joint{
var _local3:b2Joint;
_local3 = null;
switch (_arg1.type){
case e_distanceJoint:
_local3 = new b2DistanceJoint((_arg1 as b2DistanceJointDef));
break;
case e_mouseJoint:
_local3 = new b2MouseJoint((_arg1 as b2MouseJointDef));
break;
case e_prismaticJoint:
_local3 = new b2PrismaticJoint((_arg1 as b2PrismaticJointDef));
break;
case e_revoluteJoint:
_local3 = new b2RevoluteJoint((_arg1 as b2RevoluteJointDef));
break;
case e_pulleyJoint:
_local3 = new b2PulleyJoint((_arg1 as b2PulleyJointDef));
break;
case e_gearJoint:
_local3 = new b2GearJoint((_arg1 as b2GearJointDef));
break;
default:
break;
};
return (_local3);
}
}
}//package Engine.Dynamics.Joints
Section 44
//b2JointDef (Engine.Dynamics.Joints.b2JointDef)
package Engine.Dynamics.Joints {
import Engine.Dynamics.*;
public class b2JointDef {
public var collideConnected:Boolean;
public var body1:b2Body;
public var body2:b2Body;
public var userData;
public var type:int;
public function b2JointDef(){
type = b2Joint.e_unknownJoint;
userData = null;
body1 = null;
body2 = null;
collideConnected = false;
}
}
}//package Engine.Dynamics.Joints
Section 45
//b2JointNode (Engine.Dynamics.Joints.b2JointNode)
package Engine.Dynamics.Joints {
import Engine.Dynamics.*;
public class b2JointNode {
public var joint:b2Joint;
public var other:b2Body;
public var next:b2JointNode;
public var prev:b2JointNode;
}
}//package Engine.Dynamics.Joints
Section 46
//b2MouseJoint (Engine.Dynamics.Joints.b2MouseJoint)
package Engine.Dynamics.Joints {
import Engine.Common.Math.*;
import Engine.Dynamics.*;
import Engine.Common.*;
public class b2MouseJoint extends b2Joint {
public var m_beta:Number;
public var m_target:b2Vec2;
public var m_impulse:b2Vec2;
public var m_ptpMass:b2Mat22;
public var m_localAnchor:b2Vec2;
private var K1:b2Mat22;
private var K2:b2Mat22;
private var K:b2Mat22;
public var m_gamma:Number;
public var m_C:b2Vec2;
public var m_maxForce:Number;
public function b2MouseJoint(_arg1:b2MouseJointDef){
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7: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);
_local2 = (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();
_local4 = m_body2.m_mass;
_local5 = ((2 * b2Settings.b2_pi) * _arg1.frequencyHz);
_local6 = (((2 * _local4) * _arg1.dampingRatio) * _local5);
_local7 = ((_local4 * _local5) * _local5);
m_gamma = (1 / (_local6 + (_arg1.timeStep * _local7)));
m_beta = ((_arg1.timeStep * _local7) / (_local6 + (_arg1.timeStep * _local7)));
}
override public function GetAnchor1():b2Vec2{
return (m_target);
}
override public function GetAnchor2():b2Vec2{
var _local1:b2Vec2;
_local1 = b2Math.b2MulMV(m_body2.m_R, m_localAnchor);
_local1.Add(m_body2.m_position);
return (_local1);
}
override public function PrepareVelocitySolver(){
var _local1:b2Body;
var _local2:b2Mat22;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8: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);
_local7 = m_impulse.x;
_local8 = 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 GetReactionForce(_arg1:Number):b2Vec2{
var _local2:b2Vec2;
_local2 = new b2Vec2();
_local2.SetV(m_impulse);
_local2.Multiply(_arg1);
return (_local2);
}
override public function SolvePositionConstraints():Boolean{
return (true);
}
override public function GetReactionTorque(_arg1:Number):Number{
return (0);
}
public function SetTarget(_arg1:b2Vec2){
m_body2.WakeUp();
m_target = _arg1;
}
override public function SolveVelocityConstraints(_arg1:b2StepInfo){
var _local2:b2Body;
var _local3:b2Mat22;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
_local2 = m_body2;
_local3 = _local2.m_R;
_local4 = ((_local3.col1.x * m_localAnchor.x) + (_local3.col2.x * m_localAnchor.y));
_local5 = ((_local3.col1.y * m_localAnchor.x) + (_local3.col2.y * m_localAnchor.y));
_local6 = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local5));
_local7 = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local4));
_local3 = m_ptpMass;
_local8 = ((_local6 + ((m_beta * _arg1.inv_dt) * m_C.x)) + (m_gamma * m_impulse.x));
_local9 = ((_local7 + ((m_beta * _arg1.inv_dt) * m_C.y)) + (m_gamma * m_impulse.y));
_local10 = -(((_local3.col1.x * _local8) + (_local3.col2.x * _local9)));
_local11 = -(((_local3.col1.y * _local8) + (_local3.col2.y * _local9)));
_local12 = m_impulse.x;
_local13 = m_impulse.y;
m_impulse.x = (m_impulse.x + _local10);
m_impulse.y = (m_impulse.y + _local11);
_local14 = m_impulse.Length();
if (_local14 > (_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 Engine.Dynamics.Joints
Section 47
//b2MouseJointDef (Engine.Dynamics.Joints.b2MouseJointDef)
package Engine.Dynamics.Joints {
import Engine.Common.Math.*;
public class b2MouseJointDef extends b2JointDef {
public var frequencyHz:Number;
public var dampingRatio:Number;
public var maxForce:Number;
public var target:b2Vec2;
public var timeStep:Number;
public function b2MouseJointDef(){
target = new b2Vec2();
super();
type = b2Joint.e_mouseJoint;
maxForce = 0;
frequencyHz = 5;
dampingRatio = 0.7;
timeStep = (1 / 60);
}
}
}//package Engine.Dynamics.Joints
Section 48
//b2PrismaticJoint (Engine.Dynamics.Joints.b2PrismaticJoint)
package Engine.Dynamics.Joints {
import Engine.Common.Math.*;
import Engine.Dynamics.*;
import Engine.Common.*;
public class b2PrismaticJoint extends b2Joint {
public var m_initialAngle:Number;
public var m_lowerTranslation:Number;
public var m_localXAxis1:b2Vec2;
public var m_enableLimit:Boolean;
public var m_maxMotorForce:Number;
public var m_angularMass:Number;
public var m_localYAxis1:b2Vec2;
public var m_linearImpulse:Number;
public var m_localAnchor1:b2Vec2;
public var m_localAnchor2:b2Vec2;
public var m_motorMass:Number;
public var m_limitState:int;
public var m_linearMass:Number;
public var m_upperTranslation:Number;
public var m_angularImpulse:Number;
public var m_motorImpulse:Number;
public var m_motorJacobian:b2Jacobian;
public var m_limitImpulse:Number;
public var m_motorSpeed:Number;
public var m_enableMotor:Boolean;
public var m_limitPositionImpulse:Number;
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;
var _local2:b2Vec2;
_local1 = m_body1;
_local2 = 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;
var _local2:b2Vec2;
_local1 = m_body2;
_local2 = new b2Vec2();
_local2.SetV(m_localAnchor2);
_local2.MulM(_local1.m_R);
_local2.Add(_local1.m_position);
return (_local2);
}
override public function PrepareVelocitySolver(){
var _local1:b2Body;
var _local2:b2Body;
var _local3:b2Mat22;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
var _local26:Number;
_local1 = m_body1;
_local2 = m_body2;
_local3 = _local1.m_R;
_local4 = ((_local3.col1.x * m_localAnchor1.x) + (_local3.col2.x * m_localAnchor1.y));
_local5 = ((_local3.col1.y * m_localAnchor1.x) + (_local3.col2.y * m_localAnchor1.y));
_local3 = _local2.m_R;
_local6 = ((_local3.col1.x * m_localAnchor2.x) + (_local3.col2.x * m_localAnchor2.y));
_local7 = ((_local3.col1.y * m_localAnchor2.x) + (_local3.col2.y * m_localAnchor2.y));
_local8 = _local1.m_invMass;
_local9 = _local2.m_invMass;
_local10 = _local1.m_invI;
_local11 = _local2.m_invI;
_local3 = _local1.m_R;
_local12 = ((_local3.col1.x * m_localYAxis1.x) + (_local3.col2.x * m_localYAxis1.y));
_local13 = ((_local3.col1.y * m_localYAxis1.x) + (_local3.col2.y * m_localYAxis1.y));
_local14 = ((_local2.m_position.x + _local6) - _local1.m_position.x);
_local15 = ((_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 _local1:b2Body;
var _local2:b2Body;
var _local3:b2Mat22;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
_local1 = m_body1;
_local2 = m_body2;
_local3 = _local1.m_R;
_local4 = ((_local3.col1.x * m_localAnchor1.x) + (_local3.col2.x * m_localAnchor1.y));
_local5 = ((_local3.col1.y * m_localAnchor1.x) + (_local3.col2.y * m_localAnchor1.y));
_local3 = _local2.m_R;
_local6 = ((_local3.col1.x * m_localAnchor2.x) + (_local3.col2.x * m_localAnchor2.y));
_local7 = ((_local3.col1.y * m_localAnchor2.x) + (_local3.col2.y * m_localAnchor2.y));
_local8 = (_local1.m_position.x + _local4);
_local9 = (_local1.m_position.y + _local5);
_local10 = (_local2.m_position.x + _local6);
_local11 = (_local2.m_position.y + _local7);
_local12 = (_local10 - _local8);
_local13 = (_local11 - _local9);
_local3 = _local1.m_R;
_local14 = ((_local3.col1.x * m_localXAxis1.x) + (_local3.col2.x * m_localXAxis1.y));
_local15 = ((_local3.col1.y * m_localXAxis1.x) + (_local3.col2.y * m_localXAxis1.y));
_local16 = ((_local14 * _local12) + (_local15 * _local13));
return (_local16);
}
override public function GetReactionForce(_arg1:Number):b2Vec2{
var _local2:Number;
var _local3:b2Mat22;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local2 = (_arg1 * m_limitImpulse);
_local3 = m_body1.m_R;
_local4 = (_local2 * ((_local3.col1.x * m_localXAxis1.x) + (_local3.col2.x * m_localXAxis1.y)));
_local5 = (_local2 * ((_local3.col1.y * m_localXAxis1.x) + (_local3.col2.y * m_localXAxis1.y)));
_local6 = (_local2 * ((_local3.col1.x * m_localYAxis1.x) + (_local3.col2.x * m_localYAxis1.y)));
_local7 = (_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 _local3:b2Body;
var _local4:b2Body;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:b2Mat22;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
var _local26:Number;
var _local27:Number;
var _local28:Number;
var _local29:Number;
var _local30:Number;
var _local31:Number;
_local3 = m_body1;
_local4 = m_body2;
_local5 = _local3.m_invMass;
_local6 = _local4.m_invMass;
_local7 = _local3.m_invI;
_local8 = _local4.m_invI;
_local9 = _local3.m_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;
_local20 = ((_local9.col1.x * m_localYAxis1.x) + (_local9.col2.x * m_localYAxis1.y));
_local21 = ((_local9.col1.y * m_localYAxis1.x) + (_local9.col2.y * m_localYAxis1.y));
_local22 = ((_local20 * _local18) + (_local21 * _local19));
_local22 = b2Math.b2Clamp(_local22, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection);
_local23 = (-(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));
_local24 = b2Math.b2Abs(_local22);
_local25 = ((_local4.m_rotation - _local3.m_rotation) - m_initialAngle);
_local25 = b2Math.b2Clamp(_local25, -(b2Settings.b2_maxAngularCorrection), b2Settings.b2_maxAngularCorrection);
_local26 = (-(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);
_local27 = 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 GetJointSpeed():Number{
var _local1:b2Body;
var _local2:b2Body;
var _local3:b2Mat22;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:b2Vec2;
var _local17:b2Vec2;
var _local18:Number;
var _local19:Number;
var _local20:Number;
_local1 = m_body1;
_local2 = m_body2;
_local3 = _local1.m_R;
_local4 = ((_local3.col1.x * m_localAnchor1.x) + (_local3.col2.x * m_localAnchor1.y));
_local5 = ((_local3.col1.y * m_localAnchor1.x) + (_local3.col2.y * m_localAnchor1.y));
_local3 = _local2.m_R;
_local6 = ((_local3.col1.x * m_localAnchor2.x) + (_local3.col2.x * m_localAnchor2.y));
_local7 = ((_local3.col1.y * m_localAnchor2.x) + (_local3.col2.y * m_localAnchor2.y));
_local8 = (_local1.m_position.x + _local4);
_local9 = (_local1.m_position.y + _local5);
_local10 = (_local2.m_position.x + _local6);
_local11 = (_local2.m_position.y + _local7);
_local12 = (_local10 - _local8);
_local13 = (_local11 - _local9);
_local3 = _local1.m_R;
_local14 = ((_local3.col1.x * m_localXAxis1.x) + (_local3.col2.x * m_localXAxis1.y));
_local15 = ((_local3.col1.y * m_localXAxis1.x) + (_local3.col2.y * m_localXAxis1.y));
_local16 = _local1.m_linearVelocity;
_local17 = _local2.m_linearVelocity;
_local18 = _local1.m_angularVelocity;
_local19 = _local2.m_angularVelocity;
_local20 = (((_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 SetMotorSpeed(_arg1:Number){
m_motorSpeed = _arg1;
}
public function GetMotorForce(_arg1:Number):Number{
return ((_arg1 * m_motorImpulse));
}
public function SetMotorForce(_arg1:Number){
m_maxMotorForce = _arg1;
}
override public function GetReactionTorque(_arg1:Number):Number{
return ((_arg1 * m_angularImpulse));
}
override public function SolveVelocityConstraints(_arg1:b2StepInfo){
var _local2:b2Body;
var _local3:b2Body;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:*;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
_local2 = m_body1;
_local3 = m_body2;
_local4 = _local2.m_invMass;
_local5 = _local3.m_invMass;
_local6 = _local2.m_invI;
_local7 = _local3.m_invI;
_local9 = m_linearJacobian.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity);
_local10 = (-(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));
_local11 = (_local3.m_angularVelocity - _local2.m_angularVelocity);
_local12 = (-(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 Engine.Dynamics.Joints
Section 49
//b2PrismaticJointDef (Engine.Dynamics.Joints.b2PrismaticJointDef)
package Engine.Dynamics.Joints {
import Engine.Common.Math.*;
public class b2PrismaticJointDef extends b2JointDef {
public var motorSpeed:Number;
public var anchorPoint:b2Vec2;
public var axis:b2Vec2;
public var upperTranslation:Number;
public var lowerTranslation:Number;
public var enableMotor:Boolean;
public var motorForce:Number;
public var enableLimit:Boolean;
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 Engine.Dynamics.Joints
Section 50
//b2PulleyJoint (Engine.Dynamics.Joints.b2PulleyJoint)
package Engine.Dynamics.Joints {
import Engine.Common.Math.*;
import Engine.Dynamics.*;
import Engine.Common.*;
public class b2PulleyJoint extends b2Joint {
public var m_ground:b2Body;
public var m_maxLength2:Number;
public var m_limitState1:int;
public var m_maxLength1:Number;
public var m_pulleyImpulse:Number;
public var m_limitPositionImpulse1:Number;
public var m_constant:Number;
public var m_ratio:Number;
public var m_groundAnchor1:b2Vec2;
public var m_groundAnchor2:b2Vec2;
public var m_limitPositionImpulse2:Number;
public var m_localAnchor1:b2Vec2;
public var m_localAnchor2:b2Vec2;
public var m_limitState2:int;
public var m_limitMass2:Number;
public var m_limitMass1:Number;
public var m_limitImpulse2:Number;
public var m_u1:b2Vec2;
public var m_u2:b2Vec2;
public var m_limitImpulse1:Number;
public var m_pulleyMass:Number;
public static var b2_minPulleyLength:Number = 1;
public function b2PulleyJoint(_arg1:b2PulleyJointDef){
var _local2:b2Mat22;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8: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);
_local5 = Math.sqrt(((_local3 * _local3) + (_local4 * _local4)));
_local3 = (_arg1.groundPoint2.x - _arg1.anchorPoint2.x);
_local4 = (_arg1.groundPoint2.y - _arg1.anchorPoint2.y);
_local6 = Math.sqrt(((_local3 * _local3) + (_local4 * _local4)));
_local7 = b2Math.b2Max((0.5 * b2_minPulleyLength), _local5);
_local8 = 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;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local1 = m_body1.m_R;
_local2 = (m_body1.m_position.x + ((_local1.col1.x * m_localAnchor1.x) + (_local1.col2.x * m_localAnchor1.y)));
_local3 = (m_body1.m_position.y + ((_local1.col1.y * m_localAnchor1.x) + (_local1.col2.y * m_localAnchor1.y)));
_local4 = (_local2 - (m_ground.m_position.x + m_groundAnchor1.x));
_local5 = (_local3 - (m_ground.m_position.y + m_groundAnchor1.y));
return (Math.sqrt(((_local4 * _local4) + (_local5 * _local5))));
}
override public function GetAnchor1():b2Vec2{
var _local1:b2Mat22;
_local1 = 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;
_local1 = 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(){
var _local1:b2Body;
var _local2:b2Body;
var _local3:b2Mat22;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
_local1 = m_body1;
_local2 = m_body2;
_local3 = _local1.m_R;
_local4 = ((_local3.col1.x * m_localAnchor1.x) + (_local3.col2.x * m_localAnchor1.y));
_local5 = ((_local3.col1.y * m_localAnchor1.x) + (_local3.col2.y * m_localAnchor1.y));
_local3 = _local2.m_R;
_local6 = ((_local3.col1.x * m_localAnchor2.x) + (_local3.col2.x * m_localAnchor2.y));
_local7 = ((_local3.col1.y * m_localAnchor2.x) + (_local3.col2.y * m_localAnchor2.y));
_local8 = (_local1.m_position.x + _local4);
_local9 = (_local1.m_position.y + _local5);
_local10 = (_local2.m_position.x + _local6);
_local11 = (_local2.m_position.y + _local7);
_local12 = (m_ground.m_position.x + m_groundAnchor1.x);
_local13 = (m_ground.m_position.y + m_groundAnchor1.y);
_local14 = (m_ground.m_position.x + m_groundAnchor2.x);
_local15 = (m_ground.m_position.y + m_groundAnchor2.y);
m_u1.Set((_local8 - _local12), (_local9 - _local13));
m_u2.Set((_local10 - _local14), (_local11 - _local15));
_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();
};
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;
};
_local18 = ((_local4 * m_u1.y) - (_local5 * m_u1.x));
_local19 = ((_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);
_local20 = ((-(m_pulleyImpulse) - m_limitImpulse1) * m_u1.x);
_local21 = ((-(m_pulleyImpulse) - m_limitImpulse1) * m_u1.y);
_local22 = (((-(m_ratio) * m_pulleyImpulse) - m_limitImpulse2) * m_u2.x);
_local23 = (((-(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 _local1:b2Body;
var _local2:b2Body;
var _local3:b2Mat22;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
_local1 = m_body1;
_local2 = m_body2;
_local4 = (m_ground.m_position.x + m_groundAnchor1.x);
_local5 = (m_ground.m_position.y + m_groundAnchor1.y);
_local6 = (m_ground.m_position.x + m_groundAnchor2.x);
_local7 = (m_ground.m_position.y + m_groundAnchor2.y);
_local21 = 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 GetGroundPoint1():b2Vec2{
return (new b2Vec2((m_ground.m_position.x + m_groundAnchor1.x), (m_ground.m_position.y + m_groundAnchor1.y)));
}
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 GetRatio():Number{
return (m_ratio);
}
public function GetLength2():Number{
var _local1:b2Mat22;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local1 = m_body2.m_R;
_local2 = (m_body2.m_position.x + ((_local1.col1.x * m_localAnchor2.x) + (_local1.col2.x * m_localAnchor2.y)));
_local3 = (m_body2.m_position.y + ((_local1.col1.y * m_localAnchor2.x) + (_local1.col2.y * m_localAnchor2.y)));
_local4 = (_local2 - (m_ground.m_position.x + m_groundAnchor2.x));
_local5 = (_local3 - (m_ground.m_position.y + m_groundAnchor2.y));
return (Math.sqrt(((_local4 * _local4) + (_local5 * _local5))));
}
override public function SolveVelocityConstraints(_arg1:b2StepInfo){
var _local2:b2Body;
var _local3:b2Body;
var _local4:b2Mat22;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
_local2 = m_body1;
_local3 = m_body2;
_local4 = _local2.m_R;
_local5 = ((_local4.col1.x * m_localAnchor1.x) + (_local4.col2.x * m_localAnchor1.y));
_local6 = ((_local4.col1.y * m_localAnchor1.x) + (_local4.col2.y * m_localAnchor1.y));
_local4 = _local3.m_R;
_local7 = ((_local4.col1.x * m_localAnchor2.x) + (_local4.col2.x * m_localAnchor2.y));
_local8 = ((_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))));
};
}
}
}//package Engine.Dynamics.Joints
Section 51
//b2PulleyJointDef (Engine.Dynamics.Joints.b2PulleyJointDef)
package Engine.Dynamics.Joints {
import Engine.Common.Math.*;
public class b2PulleyJointDef extends b2JointDef {
public var groundPoint1:b2Vec2;
public var groundPoint2:b2Vec2;
public var ratio:Number;
public var maxLength1: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 Engine.Dynamics.Joints
Section 52
//b2RevoluteJoint (Engine.Dynamics.Joints.b2RevoluteJoint)
package Engine.Dynamics.Joints {
import Engine.Common.Math.*;
import Engine.Dynamics.*;
import Engine.Common.*;
public class b2RevoluteJoint extends b2Joint {
public var m_intialAngle:Number;
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 K3:b2Mat22;
private var K:b2Mat22;
public var m_limitImpulse:Number;
public var m_motorImpulse:Number;
public var m_enableMotor:Boolean;
public var m_lowerAngle:Number;
public var m_limitPositionImpulse:Number;
public var m_maxMotorTorque:Number;
public var m_upperAngle:Number;
public var m_motorSpeed:Number;
public var m_ptpImpulse:b2Vec2;
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;
_local1 = 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;
_local1 = 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(){
var _local1:b2Body;
var _local2:b2Body;
var _local3:b2Mat22;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
_local1 = m_body1;
_local2 = m_body2;
_local3 = _local1.m_R;
_local4 = ((_local3.col1.x * m_localAnchor1.x) + (_local3.col2.x * m_localAnchor1.y));
_local5 = ((_local3.col1.y * m_localAnchor1.x) + (_local3.col2.y * m_localAnchor1.y));
_local3 = _local2.m_R;
_local6 = ((_local3.col1.x * m_localAnchor2.x) + (_local3.col2.x * m_localAnchor2.y));
_local7 = ((_local3.col1.y * m_localAnchor2.x) + (_local3.col2.y * m_localAnchor2.y));
_local8 = _local1.m_invMass;
_local9 = _local2.m_invMass;
_local10 = _local1.m_invI;
_local11 = _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;
_local2 = m_ptpImpulse.Copy();
_local2.Multiply(_arg1);
return (_local2);
}
override public function SolvePositionConstraints():Boolean{
var _local1:Number;
var _local2:Number;
var _local3:b2Body;
var _local4:b2Body;
var _local5:Number;
var _local6:b2Mat22;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
_local3 = m_body1;
_local4 = m_body2;
_local5 = 0;
_local6 = _local3.m_R;
_local7 = ((_local6.col1.x * m_localAnchor1.x) + (_local6.col2.x * m_localAnchor1.y));
_local8 = ((_local6.col1.y * m_localAnchor1.x) + (_local6.col2.y * m_localAnchor1.y));
_local6 = _local4.m_R;
_local9 = ((_local6.col1.x * m_localAnchor2.x) + (_local6.col2.x * m_localAnchor2.y));
_local10 = ((_local6.col1.y * m_localAnchor2.x) + (_local6.col2.y * m_localAnchor2.y));
_local11 = (_local3.m_position.x + _local7);
_local12 = (_local3.m_position.y + _local8);
_local13 = (_local4.m_position.x + _local9);
_local14 = (_local4.m_position.y + _local10);
_local15 = (_local13 - _local11);
_local16 = (_local14 - _local12);
_local5 = Math.sqrt(((_local15 * _local15) + (_local16 * _local16)));
_local17 = _local3.m_invMass;
_local18 = _local4.m_invMass;
_local19 = _local3.m_invI;
_local20 = _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));
_local21 = tImpulse.x;
_local22 = 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);
_local23 = 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 GetJointSpeed():Number{
return ((m_body2.m_angularVelocity - m_body1.m_angularVelocity));
}
public function SetMotorSpeed(_arg1:Number){
m_motorSpeed = _arg1;
}
public function SetMotorTorque(_arg1:Number){
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:b2StepInfo){
var _local2:b2Body;
var _local3:b2Body;
var _local4:b2Mat22;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
_local2 = m_body1;
_local3 = m_body2;
_local4 = _local2.m_R;
_local5 = ((_local4.col1.x * m_localAnchor1.x) + (_local4.col2.x * m_localAnchor1.y));
_local6 = ((_local4.col1.y * m_localAnchor1.x) + (_local4.col2.y * m_localAnchor1.y));
_local4 = _local3.m_R;
_local7 = ((_local4.col1.x * m_localAnchor2.x) + (_local4.col2.x * m_localAnchor2.y));
_local8 = ((_local4.col1.y * m_localAnchor2.x) + (_local4.col2.y * m_localAnchor2.y));
_local10 = (((_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local8)) - _local2.m_linearVelocity.x) - (-(_local2.m_angularVelocity) * _local6));
_local11 = (((_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local7)) - _local2.m_linearVelocity.y) - (_local2.m_angularVelocity * _local5));
_local12 = -(((m_ptpMass.col1.x * _local10) + (m_ptpMass.col2.x * _local11)));
_local13 = -(((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 Engine.Dynamics.Joints
Section 53
//b2RevoluteJointDef (Engine.Dynamics.Joints.b2RevoluteJointDef)
package Engine.Dynamics.Joints {
import Engine.Common.Math.*;
public class b2RevoluteJointDef extends b2JointDef {
public var upperAngle:Number;
public var lowerAngle:Number;
public var motorSpeed:Number;
public var anchorPoint:b2Vec2;
public var motorTorque:Number;
public var enableMotor:Boolean;
public var enableLimit:Boolean;
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 Engine.Dynamics.Joints
Section 54
//b2Body (Engine.Dynamics.b2Body)
package Engine.Dynamics {
import Engine.Common.Math.*;
import Engine.Collision.Shapes.*;
import Engine.Dynamics.Contacts.*;
import Engine.Dynamics.Joints.*;
import Engine.Common.*;
public class b2Body {
public var m_next:b2Body;
public var m_mass:Number;
public var m_contactList:b2ContactNode;
public var m_angularVelocity:Number;
public var m_rotation:Number;
public var m_shapeList:b2Shape;
public var m_R:b2Mat22;
public var m_force:b2Vec2;
public var m_torque:Number;
public var m_userData;
public var m_linearVelocity:b2Vec2;
public var m_invMass:Number;
public var m_position:b2Vec2;
public var m_flags:uint;
public var m_world:b2World;
public var m_invI:Number;
public var m_shapeCount:int;
public var m_linearDamping:Number;
public var m_prev:b2Body;
public var m_angularDamping:Number;
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 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 _local6:Array;
var _local7:b2Vec2;
var _local8:b2Shape;
m_position = new b2Vec2();
m_R = new b2Mat22(0);
super();
m_flags = 0;
m_position.SetV(_arg1.position);
m_rotation = _arg1.rotation;
m_R.Set(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;
_local6 = 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.Add(b2Math.MulFV(_local5.mass, b2Math.AddVV(_local4.localPosition, _local5.center)));
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){
var _local3:b2Shape;
if (IsFrozen()){
return;
};
m_rotation = _arg2;
m_R.Set(m_rotation);
m_position.SetV(_arg1);
_local3 = m_shapeList;
while (_local3 != null) {
_local3.Synchronize(m_position, m_R);
_local3 = _local3.m_next;
};
m_world.m_broadPhase.Flush();
}
public function GetWorldPoint(_arg1:b2Vec2):b2Vec2{
return (b2Math.AddVV(m_position, b2Math.b2MulMV(m_R, _arg1)));
}
public function SetLinearVelocity(_arg1:b2Vec2){
m_linearVelocity.SetV(_arg1);
}
public function IsFrozen():Boolean{
return (((m_flags & e_frozenFlag) == e_frozenFlag));
}
public function IsSleeping():Boolean{
return (((m_flags & e_sleepFlag) == e_sleepFlag));
}
public function GetInertia():Number{
return (m_I);
}
public function GetLocalVector(_arg1:b2Vec2):b2Vec2{
return (b2Math.b2MulTMV(m_R, _arg1));
}
public function GetLinearVelocity():b2Vec2{
return (m_linearVelocity);
}
public function GetJointList():b2JointNode{
return (m_jointList);
}
public function GetRotationMatrix():b2Mat22{
return (m_R);
}
public function Freeze(){
m_flags = (m_flags | e_frozenFlag);
m_linearVelocity.SetZero();
m_angularVelocity = 0;
}
public function SetAngularVelocity(_arg1:Number){
m_angularVelocity = _arg1;
}
public function SynchronizeShapes(){
var _local1:b2Shape;
_local1 = m_shapeList;
while (_local1 != null) {
_local1.Synchronize(m_position, m_R);
_local1 = _local1.m_next;
};
}
public function ApplyForce(_arg1:b2Vec2, _arg2:b2Vec2){
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){
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 GetAngularVelocity():Number{
return (m_angularVelocity);
}
public function GetMass():Number{
return (m_mass);
}
public function GetShapeList():b2Shape{
return (m_shapeList);
}
public function SetOriginPosition(_arg1:b2Vec2, _arg2:Number){
var _local3:b2Shape;
if (IsFrozen()){
return;
};
m_rotation = _arg2;
m_R.Set(m_rotation);
m_position = b2Math.AddVV(_arg1, b2Math.b2MulMV(m_R, m_center));
_local3 = m_shapeList;
while (_local3 != null) {
_local3.Synchronize(m_position, m_R);
_local3 = _local3.m_next;
};
m_world.m_broadPhase.Flush();
}
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(){
var _local1:b2Shape;
var _local2:b2Shape;
_local1 = 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;
_local2 = 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 GetCenterPosition():b2Vec2{
return (m_position);
}
public function ApplyTorque(_arg1:Number){
if (IsSleeping() == false){
m_torque = (m_torque + _arg1);
};
}
public function AllowSleeping(_arg1:Boolean){
if (_arg1){
m_flags = (m_flags | e_allowSleepFlag);
} else {
m_flags = (m_flags & ~(e_allowSleepFlag));
WakeUp();
};
}
public function WakeUp(){
m_flags = (m_flags & ~(e_sleepFlag));
m_sleepTime = 0;
}
}
}//package Engine.Dynamics
Section 55
//b2BodyDef (Engine.Dynamics.b2BodyDef)
package Engine.Dynamics {
import Engine.Common.Math.*;
import Engine.Collision.Shapes.*;
import Engine.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 shapes:Array;
public var isSleeping:Boolean;
public var preventRotation:Boolean;
public function b2BodyDef(){
var _local1:int;
shapes = new Array();
super();
userData = null;
_local1 = 0;
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;
}
public function AddShape(_arg1:b2ShapeDef){
var _local2:int;
_local2 = 0;
while (_local2 < b2Settings.b2_maxShapesPerBody) {
if (shapes[_local2] == null){
shapes[_local2] = _arg1;
break;
};
_local2++;
};
}
}
}//package Engine.Dynamics
Section 56
//b2ContactManager (Engine.Dynamics.b2ContactManager)
package Engine.Dynamics {
import Engine.Collision.Shapes.*;
import Engine.Dynamics.Contacts.*;
import Engine.Collision.*;
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(){
var _local1:b2Body;
var _local2:b2Body;
var _local3:b2ContactNode;
var _local4:b2ContactNode;
var _local5:b2Contact;
var _local6:int;
var _local7:int;
_local5 = 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 DestroyContact(_arg1:b2Contact){
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 PairAdded(_arg1, _arg2){
var _local3:b2Shape;
var _local4:b2Shape;
var _local5:b2Body;
var _local6:b2Body;
var _local7:b2Contact;
var _local8:b2Shape;
var _local9:b2Body;
_local3 = (_arg1 as b2Shape);
_local4 = (_arg2 as b2Shape);
_local5 = _local3.m_body;
_local6 = _local4.m_body;
if (((_local5.IsStatic()) && (_local6.IsStatic()))){
return (m_nullContact);
};
if (_local3.m_body == _local4.m_body){
return (m_nullContact);
};
if (_local6.m_invMass == 0){
_local8 = _local3;
_local3 = _local4;
_local4 = _local8;
_local9 = _local5;
_local5 = _local6;
_local6 = _local9;
};
if (_local6.IsConnected(_local5)){
return (m_nullContact);
};
_local7 = 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);
}
public function CleanContactList(){
var _local1:b2Contact;
var _local2:b2Contact;
_local1 = m_world.m_contactList;
while (_local1 != null) {
_local2 = _local1;
_local1 = _local1.m_next;
if ((_local2.m_flags & b2Contact.e_destroyFlag)){
DestroyContact(_local2);
_local2 = null;
};
};
}
override public function PairRemoved(_arg1, _arg2, _arg3){
var _local4:b2Contact;
if (_arg3 == null){
return;
};
_local4 = (_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);
};
};
}
}
}//package Engine.Dynamics
Section 57
//b2Island (Engine.Dynamics.b2Island)
package Engine.Dynamics {
import Engine.Common.Math.*;
import Engine.Dynamics.Contacts.*;
import Engine.Dynamics.Joints.*;
import Engine.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;
public function b2Island(_arg1:int, _arg2:int, _arg3:int, _arg4){
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){
var _local2 = m_bodyCount++;
m_bodies[_local2] = _arg1;
}
public function AddJoint(_arg1:b2Joint){
var _local2 = m_jointCount++;
m_joints[_local2] = _arg1;
}
public function Solve(_arg1:b2StepInfo, _arg2:b2Vec2){
var _local3:int;
var _local4:b2Body;
var _local5:b2ContactSolver;
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);
};
_local3++;
};
_local5 = 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 AddContact(_arg1:b2Contact){
var _local2 = m_contactCount++;
m_contacts[_local2] = _arg1;
}
public function Clear(){
m_bodyCount = 0;
m_contactCount = 0;
m_jointCount = 0;
}
public function UpdateSleep(_arg1:Number){
var _local2:int;
var _local3:b2Body;
var _local4:Number;
var _local5:Number;
var _local6:Number;
_local4 = Number.MAX_VALUE;
_local5 = (b2Settings.b2_linearSleepTolerance * b2Settings.b2_linearSleepTolerance);
_local6 = (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 Engine.Dynamics
Section 58
//b2StepInfo (Engine.Dynamics.b2StepInfo)
package Engine.Dynamics {
public class b2StepInfo {
public var dt:Number;
public var iterations:int;
public var inv_dt:Number;
}
}//package Engine.Dynamics
Section 59
//b2World (Engine.Dynamics.b2World)
package Engine.Dynamics {
import Engine.Common.Math.*;
import Engine.Collision.Shapes.*;
import Engine.Dynamics.Contacts.*;
import Engine.Dynamics.Joints.*;
import Engine.Collision.*;
public class b2World {
public var m_bodyCount:int;
public var m_gravity:b2Vec2;
public var m_listener:b2WorldListener;
private var step:b2StepInfo;
public var m_positionIterationCount:int;
public var m_blockAllocator;
public var m_contactList:b2Contact;
public var m_groundBody:b2Body;
public var m_contactCount:int;
public var m_broadPhase:b2BroadPhase;
public var m_stackAllocator;
public var m_jointCount:int;
public var m_bodyList:b2Body;
public var m_doSleep:Boolean;
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){
var _local4:b2BodyDef;
step = new b2StepInfo();
m_contactManager = new b2ContactManager();
super();
m_listener = null;
m_bodyList = null;
m_contactList = null;
m_jointList = null;
m_bodyCount = 0;
m_contactCount = 0;
m_jointCount = 0;
m_bodyDestroyList = null;
m_doSleep = _arg3;
m_gravity = _arg2;
m_contactManager.m_world = this;
m_broadPhase = new b2BroadPhase(_arg1, m_contactManager);
_local4 = new b2BodyDef();
m_groundBody = CreateBody(_local4);
}
public function GetContactList():b2Contact{
return (m_contactList);
}
public function CreateJoint(_arg1:b2JointDef):b2Joint{
var _local2:b2Joint;
var _local3:b2Body;
var _local4:b2Shape;
_local2 = b2Joint.Create(_arg1, m_blockAllocator);
_local2.m_prev = null;
_local2.m_next = m_jointList;
if (m_jointList){
m_jointList.m_prev = _local2;
};
m_jointList = _local2;
m_jointCount++;
_local2.m_node1.joint = _local2;
_local2.m_node1.other = _local2.m_body2;
_local2.m_node1.prev = null;
_local2.m_node1.next = _local2.m_body1.m_jointList;
if (_local2.m_body1.m_jointList){
_local2.m_body1.m_jointList.prev = _local2.m_node1;
};
_local2.m_body1.m_jointList = _local2.m_node1;
_local2.m_node2.joint = _local2;
_local2.m_node2.other = _local2.m_body1;
_local2.m_node2.prev = null;
_local2.m_node2.next = _local2.m_body2.m_jointList;
if (_local2.m_body2.m_jointList){
_local2.m_body2.m_jointList.prev = _local2.m_node2;
};
_local2.m_body2.m_jointList = _local2.m_node2;
if (_arg1.collideConnected == false){
_local3 = ((_arg1.body1.m_shapeCount < _arg1.body2.m_shapeCount)) ? _arg1.body1 : _arg1.body2;
_local4 = _local3.m_shapeList;
while (_local4) {
_local4.ResetProxy(m_broadPhase);
_local4 = _local4.m_next;
};
};
return (_local2);
}
public function DestroyJoint(_arg1:b2Joint){
var _local2:Boolean;
var _local3:b2Body;
var _local4:b2Body;
var _local5:b2Body;
var _local6:b2Shape;
_local2 = _arg1.m_collideConnected;
if (_arg1.m_prev){
_arg1.m_prev.m_next = _arg1.m_next;
};
if (_arg1.m_next){
_arg1.m_next.m_prev = _arg1.m_prev;
};
if (_arg1 == m_jointList){
m_jointList = _arg1.m_next;
};
_local3 = _arg1.m_body1;
_local4 = _arg1.m_body2;
_local3.WakeUp();
_local4.WakeUp();
if (_arg1.m_node1.prev){
_arg1.m_node1.prev.next = _arg1.m_node1.next;
};
if (_arg1.m_node1.next){
_arg1.m_node1.next.prev = _arg1.m_node1.prev;
};
if (_arg1.m_node1 == _local3.m_jointList){
_local3.m_jointList = _arg1.m_node1.next;
};
_arg1.m_node1.prev = null;
_arg1.m_node1.next = null;
if (_arg1.m_node2.prev){
_arg1.m_node2.prev.next = _arg1.m_node2.next;
};
if (_arg1.m_node2.next){
_arg1.m_node2.next.prev = _arg1.m_node2.prev;
};
if (_arg1.m_node2 == _local4.m_jointList){
_local4.m_jointList = _arg1.m_node2.next;
};
_arg1.m_node2.prev = null;
_arg1.m_node2.next = null;
b2Joint.Destroy(_arg1, m_blockAllocator);
m_jointCount--;
if (_local2 == false){
_local5 = ((_local3.m_shapeCount < _local4.m_shapeCount)) ? _local3 : _local4;
_local6 = _local5.m_shapeList;
while (_local6) {
_local6.ResetProxy(m_broadPhase);
_local6 = _local6.m_next;
};
};
}
public function DestroyBody(_arg1:b2Body){
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){
m_listener = _arg1;
}
public function CreateBody(_arg1:b2BodyDef):b2Body{
var _local2:b2Body;
_local2 = new b2Body(_arg1, this);
_local2.m_prev = null;
_local2.m_next = m_bodyList;
if (m_bodyList){
m_bodyList.m_prev = _local2;
};
m_bodyList = _local2;
m_bodyCount++;
return (_local2);
}
public function GetGroundBody():b2Body{
return (m_groundBody);
}
public function Query(_arg1:b2AABB, _arg2:Array, _arg3:int):int{
var _local4:Array;
var _local5:int;
var _local6:int;
_local4 = new Array();
_local5 = m_broadPhase.QueryAABB(_arg1, _local4, _arg3);
_local6 = 0;
while (_local6 < _local5) {
_arg2[_local6] = (_local4[_local6] as b2Shape);
_local6++;
};
return (_local5);
}
public function CleanBodyList(){
var _local1:b2Body;
var _local2:b2Body;
var _local3:b2JointNode;
var _local4:b2JointNode;
m_contactManager.m_destroyImmediate = true;
_local1 = 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){
var _local3:b2Body;
var _local4:b2Body;
var _local5:b2Island;
var _local6:b2Contact;
var _local7:b2Joint;
var _local8:int;
var _local9:Array;
var _local10:int;
var _local11: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;
m_contactManager.CleanContactList();
CleanBodyList();
m_contactManager.Collide();
_local5 = 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;
};
_local6 = m_contactList;
while (_local6 != null) {
_local6.m_flags = (_local6.m_flags & ~(b2Contact.e_islandFlag));
_local6 = _local6.m_next;
};
_local7 = m_jointList;
while (_local7 != null) {
_local7.m_islandFlag = false;
_local7 = _local7.m_next;
};
_local8 = m_bodyCount;
_local9 = new Array(m_bodyCount);
_local10 = 0;
while (_local10 < m_bodyCount) {
_local9[_local10] = null;
_local10++;
};
_local11 = 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)){
} else {
_local14 = _local3.m_contactList;
while (_local14 != null) {
if ((_local14.contact.m_flags & b2Contact.e_islandFlag)){
} 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_doSleep){
_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.Flush();
}
public function GetJointList():b2Joint{
return (m_jointList);
}
public function GetBodyList():b2Body{
return (m_bodyList);
}
}
}//package Engine.Dynamics
Section 60
//b2WorldListener (Engine.Dynamics.b2WorldListener)
package Engine.Dynamics {
import Engine.Dynamics.Joints.*;
public class b2WorldListener {
public static var b2_freezeBody:uint = 0;
public static var b2_destroyBody:uint = 1;
public function NotifyBoundaryViolated(_arg1:b2Body):uint{
return (b2_freezeBody);
}
public function NotifyJointDestroyed(_arg1:b2Joint){
}
}
}//package Engine.Dynamics
Section 61
//BaseScrollPane (fl.containers.BaseScrollPane)
package fl.containers {
import fl.core.*;
import fl.controls.*;
import flash.display.*;
import flash.events.*;
import fl.events.*;
import flash.geom.*;
public class BaseScrollPane extends UIComponent {
protected var defaultLineScrollSize:Number;// = 4
protected var _maxHorizontalScrollPosition:Number;// = 0
protected var vScrollBar:Boolean;
protected var disabledOverlay:Shape;
protected var hScrollBar:Boolean;
protected var availableWidth:Number;
protected var _verticalPageScrollSize:Number;// = 0
protected var vOffset:Number;// = 0
protected var _verticalScrollBar:ScrollBar;
protected var useFixedHorizontalScrolling:Boolean;// = false
protected var contentWidth:Number;// = 0
protected var contentHeight:Number;// = 0
protected var _horizontalPageScrollSize:Number;// = 0
protected var background:DisplayObject;
protected var _useBitmpScrolling:Boolean;// = false
protected var contentPadding:Number;// = 0
protected var availableHeight:Number;
protected var _horizontalScrollBar:ScrollBar;
protected var contentScrollRect:Rectangle;
protected var _horizontalScrollPolicy:String;
protected var _verticalScrollPolicy:String;
protected static const SCROLL_BAR_STYLES:Object = {upArrowDisabledSkin:"upArrowDisabledSkin", upArrowDownSkin:"upArrowDownSkin", upArrowOverSkin:"upArrowOverSkin", upArrowUpSkin:"upArrowUpSkin", downArrowDisabledSkin:"downArrowDisabledSkin", downArrowDownSkin:"downArrowDownSkin", downArrowOverSkin:"downArrowOverSkin", downArrowUpSkin:"downArrowUpSkin", thumbDisabledSkin:"thumbDisabledSkin", thumbDownSkin:"thumbDownSkin", thumbOverSkin:"thumbOverSkin", thumbUpSkin:"thumbUpSkin", thumbIcon:"thumbIcon", trackDisabledSkin:"trackDisabledSkin", trackDownSkin:"trackDownSkin", trackOverSkin:"trackOverSkin", trackUpSkin:"trackUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"};
private static var defaultStyles:Object = {repeatDelay:500, repeatInterval:35, skin:"ScrollPane_upSkin", contentPadding:0, disabledAlpha:0.5};
public function BaseScrollPane(){
contentWidth = 0;
contentHeight = 0;
contentPadding = 0;
vOffset = 0;
_maxHorizontalScrollPosition = 0;
_horizontalPageScrollSize = 0;
_verticalPageScrollSize = 0;
defaultLineScrollSize = 4;
useFixedHorizontalScrolling = false;
_useBitmpScrolling = false;
super();
}
protected function handleWheel(_arg1:MouseEvent):void{
if (((((!(enabled)) || (!(_verticalScrollBar.visible)))) || ((contentHeight <= availableHeight)))){
return;
};
_verticalScrollBar.scrollPosition = (_verticalScrollBar.scrollPosition - (_arg1.delta * verticalLineScrollSize));
setVerticalScrollPosition(_verticalScrollBar.scrollPosition);
dispatchEvent(new ScrollEvent(ScrollBarDirection.VERTICAL, _arg1.delta, horizontalScrollPosition));
}
public function get verticalScrollPosition():Number{
return (_verticalScrollBar.scrollPosition);
}
protected function drawDisabledOverlay():void{
if (enabled){
if (contains(disabledOverlay)){
removeChild(disabledOverlay);
};
} else {
disabledOverlay.x = (disabledOverlay.y = contentPadding);
disabledOverlay.width = availableWidth;
disabledOverlay.height = availableHeight;
disabledOverlay.alpha = (getStyleValue("disabledAlpha") as Number);
addChild(disabledOverlay);
};
}
public function set verticalScrollPosition(_arg1:Number):void{
drawNow();
_verticalScrollBar.scrollPosition = _arg1;
setVerticalScrollPosition(_verticalScrollBar.scrollPosition, false);
}
protected function setContentSize(_arg1:Number, _arg2:Number):void{
if ((((((contentWidth == _arg1)) || (useFixedHorizontalScrolling))) && ((contentHeight == _arg2)))){
return;
};
contentWidth = _arg1;
contentHeight = _arg2;
invalidate(InvalidationType.SIZE);
}
public function get horizontalScrollPosition():Number{
return (_horizontalScrollBar.scrollPosition);
}
public function get horizontalScrollBar():ScrollBar{
return (_horizontalScrollBar);
}
override public function set enabled(_arg1:Boolean):void{
if (enabled == _arg1){
return;
};
_verticalScrollBar.enabled = _arg1;
_horizontalScrollBar.enabled = _arg1;
super.enabled = _arg1;
}
public function get verticalLineScrollSize():Number{
return (_verticalScrollBar.lineScrollSize);
}
public function get horizontalScrollPolicy():String{
return (_horizontalScrollPolicy);
}
protected function calculateAvailableSize():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local1 = ScrollBar.WIDTH;
_local2 = (contentPadding = Number(getStyleValue("contentPadding")));
_local3 = ((height - (2 * _local2)) - vOffset);
vScrollBar = (((_verticalScrollPolicy == ScrollPolicy.ON)) || ((((_verticalScrollPolicy == ScrollPolicy.AUTO)) && ((contentHeight > _local3)))));
_local4 = ((width - (vScrollBar) ? _local1 : 0) - (2 * _local2));
_local5 = (useFixedHorizontalScrolling) ? _maxHorizontalScrollPosition : (contentWidth - _local4);
hScrollBar = (((_horizontalScrollPolicy == ScrollPolicy.ON)) || ((((_horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((_local5 > 0)))));
if (hScrollBar){
_local3 = (_local3 - _local1);
};
if (((((((hScrollBar) && (!(vScrollBar)))) && ((_verticalScrollPolicy == ScrollPolicy.AUTO)))) && ((contentHeight > _local3)))){
vScrollBar = true;
_local4 = (_local4 - _local1);
};
availableHeight = (_local3 + vOffset);
availableWidth = _local4;
}
public function get maxVerticalScrollPosition():Number{
drawNow();
return (Math.max(0, (contentHeight - availableHeight)));
}
public function set horizontalScrollPosition(_arg1:Number):void{
drawNow();
_horizontalScrollBar.scrollPosition = _arg1;
setHorizontalScrollPosition(_horizontalScrollBar.scrollPosition, false);
}
public function get horizontalLineScrollSize():Number{
return (_horizontalScrollBar.lineScrollSize);
}
public function set verticalPageScrollSize(_arg1:Number):void{
_verticalPageScrollSize = _arg1;
invalidate(InvalidationType.SIZE);
}
public function get verticalScrollPolicy():String{
return (_verticalScrollPolicy);
}
protected function setHorizontalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
}
public function get useBitmapScrolling():Boolean{
return (_useBitmpScrolling);
}
protected function handleScroll(_arg1:ScrollEvent):void{
if (_arg1.target == _verticalScrollBar){
setVerticalScrollPosition(_arg1.position);
} else {
setHorizontalScrollPosition(_arg1.position);
};
}
public function set verticalLineScrollSize(_arg1:Number):void{
_verticalScrollBar.lineScrollSize = _arg1;
}
public function get verticalScrollBar():ScrollBar{
return (_verticalScrollBar);
}
protected function setVerticalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
}
public function set horizontalPageScrollSize(_arg1:Number):void{
_horizontalPageScrollSize = _arg1;
invalidate(InvalidationType.SIZE);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES)){
setStyles();
drawBackground();
if (contentPadding != getStyleValue("contentPadding")){
invalidate(InvalidationType.SIZE, false);
};
};
if (isInvalid(InvalidationType.SIZE, InvalidationType.STATE)){
drawLayout();
};
updateChildren();
super.draw();
}
public function set horizontalScrollPolicy(_arg1:String):void{
_horizontalScrollPolicy = _arg1;
invalidate(InvalidationType.SIZE);
}
override protected function configUI():void{
var _local1:Graphics;
super.configUI();
contentScrollRect = new Rectangle(0, 0, 85, 85);
_verticalScrollBar = new ScrollBar();
_verticalScrollBar.addEventListener(ScrollEvent.SCROLL, handleScroll, false, 0, true);
_verticalScrollBar.visible = false;
_verticalScrollBar.lineScrollSize = defaultLineScrollSize;
addChild(_verticalScrollBar);
copyStylesToChild(_verticalScrollBar, SCROLL_BAR_STYLES);
_horizontalScrollBar = new ScrollBar();
_horizontalScrollBar.direction = ScrollBarDirection.HORIZONTAL;
_horizontalScrollBar.addEventListener(ScrollEvent.SCROLL, handleScroll, false, 0, true);
_horizontalScrollBar.visible = false;
_horizontalScrollBar.lineScrollSize = defaultLineScrollSize;
addChild(_horizontalScrollBar);
copyStylesToChild(_horizontalScrollBar, SCROLL_BAR_STYLES);
disabledOverlay = new Shape();
_local1 = disabledOverlay.graphics;
_local1.beginFill(0xFFFFFF);
_local1.drawRect(0, 0, width, height);
_local1.endFill();
addEventListener(MouseEvent.MOUSE_WHEEL, handleWheel, false, 0, true);
}
protected function calculateContentWidth():void{
}
public function get verticalPageScrollSize():Number{
if (isNaN(availableHeight)){
drawNow();
};
return (((((_verticalPageScrollSize == 0)) && (!(isNaN(availableHeight))))) ? availableHeight : _verticalPageScrollSize);
}
protected function drawLayout():void{
calculateAvailableSize();
calculateContentWidth();
background.width = width;
background.height = height;
if (vScrollBar){
_verticalScrollBar.visible = true;
_verticalScrollBar.x = ((width - ScrollBar.WIDTH) - contentPadding);
_verticalScrollBar.y = contentPadding;
_verticalScrollBar.height = availableHeight;
} else {
_verticalScrollBar.visible = false;
};
_verticalScrollBar.setScrollProperties(availableHeight, 0, (contentHeight - availableHeight), verticalPageScrollSize);
setVerticalScrollPosition(_verticalScrollBar.scrollPosition, false);
if (hScrollBar){
_horizontalScrollBar.visible = true;
_horizontalScrollBar.x = contentPadding;
_horizontalScrollBar.y = ((height - ScrollBar.WIDTH) - contentPadding);
_horizontalScrollBar.width = availableWidth;
} else {
_horizontalScrollBar.visible = false;
};
_horizontalScrollBar.setScrollProperties(availableWidth, 0, (useFixedHorizontalScrolling) ? _maxHorizontalScrollPosition : (contentWidth - availableWidth), horizontalPageScrollSize);
setHorizontalScrollPosition(_horizontalScrollBar.scrollPosition, false);
drawDisabledOverlay();
}
protected function drawBackground():void{
var _local1:DisplayObject;
_local1 = background;
background = getDisplayObjectInstance(getStyleValue("skin"));
background.width = width;
background.height = height;
addChildAt(background, 0);
if (((!((_local1 == null))) && (!((_local1 == background))))){
removeChild(_local1);
};
}
public function set horizontalLineScrollSize(_arg1:Number):void{
_horizontalScrollBar.lineScrollSize = _arg1;
}
public function get horizontalPageScrollSize():Number{
if (isNaN(availableWidth)){
drawNow();
};
return (((((_horizontalPageScrollSize == 0)) && (!(isNaN(availableWidth))))) ? availableWidth : _horizontalPageScrollSize);
}
public function get maxHorizontalScrollPosition():Number{
drawNow();
return (Math.max(0, (contentWidth - availableWidth)));
}
protected function setStyles():void{
copyStylesToChild(_verticalScrollBar, SCROLL_BAR_STYLES);
copyStylesToChild(_horizontalScrollBar, SCROLL_BAR_STYLES);
}
protected function updateChildren():void{
_verticalScrollBar.enabled = (_horizontalScrollBar.enabled = enabled);
_verticalScrollBar.drawNow();
_horizontalScrollBar.drawNow();
}
public function set verticalScrollPolicy(_arg1:String):void{
_verticalScrollPolicy = _arg1;
invalidate(InvalidationType.SIZE);
}
public function set useBitmapScrolling(_arg1:Boolean):void{
_useBitmpScrolling = _arg1;
invalidate(InvalidationType.STATE);
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, ScrollBar.getStyleDefinition()));
}
}
}//package fl.containers
Section 62
//CellRenderer (fl.controls.listClasses.CellRenderer)
package fl.controls.listClasses {
import fl.controls.*;
import flash.events.*;
public class CellRenderer extends LabelButton implements ICellRenderer {
protected var _data:Object;
protected var _listData:ListData;
private static var defaultStyles:Object = {upSkin:"CellRenderer_upSkin", downSkin:"CellRenderer_downSkin", overSkin:"CellRenderer_overSkin", disabledSkin:"CellRenderer_disabledSkin", selectedDisabledSkin:"CellRenderer_selectedDisabledSkin", selectedUpSkin:"CellRenderer_selectedUpSkin", selectedDownSkin:"CellRenderer_selectedDownSkin", selectedOverSkin:"CellRenderer_selectedOverSkin", textFormat:null, disabledTextFormat:null, embedFonts:null, textPadding:5};
public function CellRenderer():void{
toggle = true;
focusEnabled = false;
}
override protected function toggleSelected(_arg1:MouseEvent):void{
}
override public function get selected():Boolean{
return (super.selected);
}
public function set listData(_arg1:ListData):void{
_listData = _arg1;
label = _listData.label;
setStyle("icon", _listData.icon);
}
override public function set selected(_arg1:Boolean):void{
super.selected = _arg1;
}
public function set data(_arg1:Object):void{
_data = _arg1;
}
public function get listData():ListData{
return (_listData);
}
override public function setSize(_arg1:Number, _arg2:Number):void{
super.setSize(_arg1, _arg2);
}
override protected function drawLayout():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
_local1 = Number(getStyleValue("textPadding"));
_local2 = 0;
if (icon != null){
icon.x = _local1;
icon.y = Math.round(((height - icon.height) >> 1));
_local2 = (icon.width + _local1);
};
if (label.length > 0){
textField.visible = true;
_local3 = Math.max(0, ((width - _local2) - (_local1 * 2)));
textField.width = _local3;
textField.height = (textField.textHeight + 4);
textField.x = (_local2 + _local1);
textField.y = Math.round(((height - textField.height) >> 1));
} else {
textField.visible = false;
};
background.width = width;
background.height = height;
}
public function get data():Object{
return (_data);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls.listClasses
Section 63
//ICellRenderer (fl.controls.listClasses.ICellRenderer)
package fl.controls.listClasses {
public interface ICellRenderer {
function setSize(_arg1:Number, _arg2:Number):void;
function get listData():ListData;
function get data():Object;
function setMouseState(_arg1:String):void;
function set x(_arg1:Number):void;
function set y(_arg1:Number):void;
function set data(_arg1:Object):void;
function set selected(_arg1:Boolean):void;
function set listData(_arg1:ListData):void;
function get selected():Boolean;
}
}//package fl.controls.listClasses
Section 64
//ListData (fl.controls.listClasses.ListData)
package fl.controls.listClasses {
import fl.core.*;
public class ListData {
protected var _index:uint;
protected var _owner:UIComponent;
protected var _label:String;
protected var _icon:Object;// = null
protected var _row:uint;
protected var _column:uint;
public function ListData(_arg1:String, _arg2:Object, _arg3:UIComponent, _arg4:uint, _arg5:uint, _arg6:uint=0){
_icon = null;
super();
_label = _arg1;
_icon = _arg2;
_owner = _arg3;
_index = _arg4;
_row = _arg5;
_column = _arg6;
}
public function get owner():UIComponent{
return (_owner);
}
public function get label():String{
return (_label);
}
public function get row():uint{
return (_row);
}
public function get index():uint{
return (_index);
}
public function get icon():Object{
return (_icon);
}
public function get column():uint{
return (_column);
}
}
}//package fl.controls.listClasses
Section 65
//BaseButton (fl.controls.BaseButton)
package fl.controls {
import fl.core.*;
import flash.display.*;
import flash.events.*;
import fl.events.*;
import flash.utils.*;
public class BaseButton extends UIComponent {
protected var _selected:Boolean;// = false
private var unlockedMouseState:String;
protected var pressTimer:Timer;
protected var mouseState:String;
protected var background:DisplayObject;
private var _mouseStateLocked:Boolean;// = false
protected var _autoRepeat:Boolean;// = false
private static var defaultStyles:Object = {upSkin:"Button_upSkin", downSkin:"Button_downSkin", overSkin:"Button_overSkin", disabledSkin:"Button_disabledSkin", selectedDisabledSkin:"Button_selectedDisabledSkin", selectedUpSkin:"Button_selectedUpSkin", selectedDownSkin:"Button_selectedDownSkin", selectedOverSkin:"Button_selectedOverSkin", focusRectSkin:null, focusRectPadding:null, repeatDelay:500, repeatInterval:35};
public function BaseButton(){
_selected = false;
_autoRepeat = false;
_mouseStateLocked = false;
super();
buttonMode = true;
mouseChildren = false;
useHandCursor = false;
setupMouseEvents();
setMouseState("up");
pressTimer = new Timer(1, 0);
pressTimer.addEventListener(TimerEvent.TIMER, buttonDown, false, 0, true);
}
protected function endPress():void{
pressTimer.reset();
}
public function set mouseStateLocked(_arg1:Boolean):void{
_mouseStateLocked = _arg1;
if (_arg1 == false){
setMouseState(unlockedMouseState);
} else {
unlockedMouseState = mouseState;
};
}
public function get autoRepeat():Boolean{
return (_autoRepeat);
}
public function set autoRepeat(_arg1:Boolean):void{
_autoRepeat = _arg1;
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
mouseEnabled = _arg1;
}
public function get selected():Boolean{
return (_selected);
}
protected function mouseEventHandler(_arg1:MouseEvent):void{
if (_arg1.type == MouseEvent.MOUSE_DOWN){
setMouseState("down");
startPress();
} else {
if ((((_arg1.type == MouseEvent.ROLL_OVER)) || ((_arg1.type == MouseEvent.MOUSE_UP)))){
setMouseState("over");
endPress();
} else {
if (_arg1.type == MouseEvent.ROLL_OUT){
setMouseState("up");
endPress();
};
};
};
}
public function setMouseState(_arg1:String):void{
if (_mouseStateLocked){
unlockedMouseState = _arg1;
return;
};
if (mouseState == _arg1){
return;
};
mouseState = _arg1;
invalidate(InvalidationType.STATE);
}
protected function startPress():void{
if (_autoRepeat){
pressTimer.delay = Number(getStyleValue("repeatDelay"));
pressTimer.start();
};
dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true));
}
protected function buttonDown(_arg1:TimerEvent):void{
if (!_autoRepeat){
endPress();
return;
};
if (pressTimer.currentCount == 1){
pressTimer.delay = Number(getStyleValue("repeatInterval"));
};
dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true));
}
public function set selected(_arg1:Boolean):void{
if (_selected == _arg1){
return;
};
_selected = _arg1;
invalidate(InvalidationType.STATE);
}
override public function get enabled():Boolean{
return (super.enabled);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawBackground();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
super.draw();
}
protected function setupMouseEvents():void{
addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.MOUSE_DOWN, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.MOUSE_UP, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false, 0, true);
}
protected function drawLayout():void{
background.width = width;
background.height = height;
}
protected function drawBackground():void{
var _local1:String;
var _local2:DisplayObject;
_local1 = (enabled) ? mouseState : "disabled";
if (selected){
_local1 = (("selected" + _local1.substr(0, 1).toUpperCase()) + _local1.substr(1));
};
_local1 = (_local1 + "Skin");
_local2 = background;
background = getDisplayObjectInstance(getStyleValue(_local1));
addChildAt(background, 0);
if (((!((_local2 == null))) && (!((_local2 == background))))){
removeChild(_local2);
};
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 66
//Button (fl.controls.Button)
package fl.controls {
import fl.core.*;
import flash.display.*;
import fl.managers.*;
public class Button extends LabelButton implements IFocusManagerComponent {
protected var emphasizedBorder:DisplayObject;
protected var _emphasized:Boolean;// = false
private static var defaultStyles:Object = {emphasizedSkin:"Button_emphasizedSkin", emphasizedPadding:2};
public static var createAccessibilityImplementation:Function;
public function Button(){
_emphasized = false;
super();
}
override public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
var _local3:*;
super.drawFocus(_arg1);
if (_arg1){
_local2 = Number(getStyleValue("emphasizedPadding"));
if ((((_local2 < 0)) || (!(_emphasized)))){
_local2 = 0;
};
_local3 = getStyleValue("focusRectPadding");
_local3 = ((_local3)==null) ? 2 : _local3;
_local3 = (_local3 + _local2);
uiFocusRect.x = -(_local3);
uiFocusRect.y = -(_local3);
uiFocusRect.width = (width + (_local3 * 2));
uiFocusRect.height = (height + (_local3 * 2));
};
}
public function set emphasized(_arg1:Boolean):void{
_emphasized = _arg1;
invalidate(InvalidationType.STYLES);
}
override protected function draw():void{
if (((isInvalid(InvalidationType.STYLES)) || (isInvalid(InvalidationType.SIZE)))){
drawEmphasized();
};
super.draw();
if (emphasizedBorder != null){
setChildIndex(emphasizedBorder, (numChildren - 1));
};
}
public function get emphasized():Boolean{
return (_emphasized);
}
override protected function initializeAccessibility():void{
if (Button.createAccessibilityImplementation != null){
Button.createAccessibilityImplementation(this);
};
}
protected function drawEmphasized():void{
var _local1:Object;
var _local2:Number;
if (emphasizedBorder != null){
removeChild(emphasizedBorder);
};
emphasizedBorder = null;
if (!_emphasized){
return;
};
_local1 = getStyleValue("emphasizedSkin");
if (_local1 != null){
emphasizedBorder = getDisplayObjectInstance(_local1);
};
if (emphasizedBorder != null){
addChildAt(emphasizedBorder, 0);
_local2 = Number(getStyleValue("emphasizedPadding"));
emphasizedBorder.x = (emphasizedBorder.y = -(_local2));
emphasizedBorder.width = (width + (_local2 * 2));
emphasizedBorder.height = (height + (_local2 * 2));
};
}
public static function getStyleDefinition():Object{
return (UIComponent.mergeStyles(LabelButton.getStyleDefinition(), defaultStyles));
}
}
}//package fl.controls
Section 67
//ButtonLabelPlacement (fl.controls.ButtonLabelPlacement)
package fl.controls {
public class ButtonLabelPlacement {
public static const TOP:String = "top";
public static const LEFT:String = "left";
public static const BOTTOM:String = "bottom";
public static const RIGHT:String = "right";
}
}//package fl.controls
Section 68
//ComboBox (fl.controls.ComboBox)
package fl.controls {
import fl.controls.listClasses.*;
import fl.core.*;
import flash.display.*;
import flash.events.*;
import fl.data.*;
import fl.managers.*;
import fl.events.*;
import flash.text.*;
import flash.geom.*;
import flash.ui.*;
public class ComboBox extends UIComponent implements IFocusManagerComponent {
protected var _dropdownWidth:Number;
protected var highlightedCell:int;// = -1
protected var _prompt:String;
protected var isOpen:Boolean;// = false
protected var list:List;
protected var _rowCount:uint;// = 5
protected var currentIndex:int;
protected var isKeyDown:Boolean;// = false
protected var _labels:Array;
protected var background:BaseButton;
protected var inputField:TextInput;
protected var listOverIndex:uint;
protected var editableValue:String;
protected var _editable:Boolean;// = false
private var collectionItemImport:SimpleCollectionItem;
protected static const BACKGROUND_STYLES:Object = {overSkin:"overSkin", downSkin:"downSkin", upSkin:"upSkin", disabledSkin:"disabledSkin", repeatInterval:"repeatInterval"};
protected static const LIST_STYLES:Object = {upSkin:"comboListUpSkin", overSkin:"comboListOverSkin", downSkin:"comobListDownSkin", disabledSkin:"comboListDisabledSkin", downArrowDisabledSkin:"downArrowDisabledSkin", downArrowDownSkin:"downArrowDownSkin", downArrowOverSkin:"downArrowOverSkin", downArrowUpSkin:"downArrowUpSkin", upArrowDisabledSkin:"upArrowDisabledSkin", upArrowDownSkin:"upArrowDownSkin", upArrowOverSkin:"upArrowOverSkin", upArrowUpSkin:"upArrowUpSkin", thumbDisabledSkin:"thumbDisabledSkin", thumbDownSkin:"thumbDownSkin", thumbOverSkin:"thumbOverSkin", thumbUpSkin:"thumbUpSkin", thumbIcon:"thumbIcon", trackDisabledSkin:"trackDisabledSkin", trackDownSkin:"trackDownSkin", trackOverSkin:"trackOverSkin", trackUpSkin:"trackUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval", textFormat:"textFormat", disabledAlpha:"disabledAlpha", skin:"listSkin"};
private static var defaultStyles:Object = {upSkin:"ComboBox_upSkin", downSkin:"ComboBox_downSkin", overSkin:"ComboBox_overSkin", disabledSkin:"ComboBox_disabledSkin", focusRectSkin:null, focusRectPadding:null, textFormat:null, disabledTextFormat:null, textPadding:3, buttonWidth:24, disabledAlpha:null, listSkin:null};
public static var createAccessibilityImplementation:Function;
public function ComboBox(){
_rowCount = 5;
_editable = false;
isOpen = false;
highlightedCell = -1;
isKeyDown = false;
super();
}
protected function drawList():void{
list.rowCount = Math.max(0, Math.min(_rowCount, list.dataProvider.length));
}
public function set imeMode(_arg1:String):void{
inputField.imeMode = _arg1;
}
public function get dropdown():List{
return (list);
}
public function get dropdownWidth():Number{
return (list.width);
}
public function sortItemsOn(_arg1:String, _arg2:Object=null){
return (list.sortItemsOn(_arg1, _arg2));
}
protected function onEnter(_arg1:ComponentEvent):void{
_arg1.stopPropagation();
}
public function removeItemAt(_arg1:uint):void{
list.removeItemAt(_arg1);
invalidate(InvalidationType.DATA);
}
public function open():void{
currentIndex = selectedIndex;
if (((isOpen) || ((length == 0)))){
return;
};
dispatchEvent(new Event(Event.OPEN));
isOpen = true;
addEventListener(Event.ENTER_FRAME, addCloseListener, false, 0, true);
positionList();
list.scrollToSelected();
stage.addChild(list);
}
public function get selectedItem():Object{
return (list.selectedItem);
}
public function set text(_arg1:String):void{
if (!editable){
return;
};
inputField.text = _arg1;
}
public function get labelField():String{
return (list.labelField);
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
var _local2:int;
var _local3:uint;
var _local4:Number;
var _local5:int;
isKeyDown = true;
if (_arg1.ctrlKey){
switch (_arg1.keyCode){
case Keyboard.UP:
if (highlightedCell > -1){
selectedIndex = highlightedCell;
dispatchEvent(new Event(Event.CHANGE));
};
close();
break;
case Keyboard.DOWN:
open();
break;
};
return;
};
_arg1.stopPropagation();
_local2 = Math.max(((calculateAvailableHeight() / list.rowHeight) << 0), 1);
_local3 = selectedIndex;
_local4 = ((highlightedCell)==-1) ? selectedIndex : highlightedCell;
_local5 = -1;
switch (_arg1.keyCode){
case Keyboard.SPACE:
if (isOpen){
close();
} else {
open();
};
return;
case Keyboard.ESCAPE:
if (isOpen){
if (highlightedCell > -1){
selectedIndex = selectedIndex;
};
close();
};
return;
case Keyboard.UP:
_local5 = Math.max(0, (_local4 - 1));
break;
case Keyboard.DOWN:
_local5 = Math.min((length - 1), (_local4 + 1));
break;
case Keyboard.PAGE_UP:
_local5 = Math.max((_local4 - _local2), 0);
break;
case Keyboard.PAGE_DOWN:
_local5 = Math.min((_local4 + _local2), (length - 1));
break;
case Keyboard.HOME:
_local5 = 0;
break;
case Keyboard.END:
_local5 = (length - 1);
break;
case Keyboard.ENTER:
if (((_editable) && ((highlightedCell == -1)))){
editableValue = inputField.text;
selectedIndex = -1;
} else {
if (((isOpen) && ((highlightedCell > -1)))){
editableValue = null;
selectedIndex = highlightedCell;
dispatchEvent(new Event(Event.CHANGE));
};
};
dispatchEvent(new ComponentEvent(ComponentEvent.ENTER));
close();
return;
default:
if (editable){
break;
};
_local5 = list.getNextIndexAtLetter(String.fromCharCode(_arg1.keyCode), _local4);
break;
};
if (_local5 > -1){
if (isOpen){
highlightCell(_local5);
inputField.text = list.itemToLabel(getItemAt(_local5));
} else {
highlightCell();
selectedIndex = _local5;
dispatchEvent(new Event(Event.CHANGE));
};
};
}
public function set dropdownWidth(_arg1:Number):void{
_dropdownWidth = _arg1;
invalidate(InvalidationType.SIZE);
}
public function get editable():Boolean{
return (_editable);
}
override protected function focusInHandler(_arg1:FocusEvent):void{
super.focusInHandler(_arg1);
if (editable){
stage.focus = inputField.textField;
};
}
protected function onStageClick(_arg1:MouseEvent):void{
if (!isOpen){
return;
};
if (((!(contains((_arg1.target as DisplayObject)))) && (!(list.contains((_arg1.target as DisplayObject)))))){
if (highlightedCell != -1){
selectedIndex = highlightedCell;
dispatchEvent(new Event(Event.CHANGE));
};
close();
};
}
protected function handleDataChange(_arg1:DataChangeEvent):void{
invalidate(InvalidationType.DATA);
}
override protected function keyUpHandler(_arg1:KeyboardEvent):void{
isKeyDown = false;
}
protected function onListItemUp(_arg1:MouseEvent):void{
var _local2:*;
stage.removeEventListener(MouseEvent.MOUSE_UP, onListItemUp);
if (((!((_arg1.target is ICellRenderer))) || (!(list.contains((_arg1.target as DisplayObject)))))){
return;
};
editableValue = null;
_local2 = selectedIndex;
selectedIndex = _arg1.target.listData.index;
if (_local2 != selectedIndex){
dispatchEvent(new Event(Event.CHANGE));
};
close();
}
public function removeAll():void{
list.removeAll();
inputField.text = "";
invalidate(InvalidationType.DATA);
}
public function set selectedItem(_arg1:Object):void{
list.selectedItem = _arg1;
invalidate(InvalidationType.SELECTED);
}
protected function highlightCell(_arg1:int=-1):void{
var _local2:ICellRenderer;
if (highlightedCell > -1){
_local2 = list.itemToCellRenderer(getItemAt(highlightedCell));
if (_local2 != null){
_local2.setMouseState("up");
};
};
if (_arg1 == -1){
return;
};
list.scrollToIndex(_arg1);
list.drawNow();
_local2 = list.itemToCellRenderer(getItemAt(_arg1));
if (_local2 != null){
_local2.setMouseState("over");
highlightedCell = _arg1;
};
}
public function itemToLabel(_arg1:Object):String{
if (_arg1 == null){
return ("");
};
return (list.itemToLabel(_arg1));
}
public function addItemAt(_arg1:Object, _arg2:uint):void{
list.addItemAt(_arg1, _arg2);
invalidate(InvalidationType.DATA);
}
public function replaceItemAt(_arg1:Object, _arg2:uint):Object{
return (list.replaceItemAt(_arg1, _arg2));
}
protected function showPrompt():void{
inputField.text = _prompt;
}
public function set rowCount(_arg1:uint):void{
_rowCount = _arg1;
invalidate(InvalidationType.SIZE);
}
public function get restrict():String{
return (inputField.restrict);
}
protected function setEmbedFonts():void{
var _local1:Object;
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
inputField.textField.embedFonts = _local1;
};
}
public function sortItems(... _args){
return (list.sortItems.apply(list, _args));
}
public function set labelField(_arg1:String):void{
list.labelField = _arg1;
invalidate(InvalidationType.DATA);
}
public function set editable(_arg1:Boolean):void{
_editable = _arg1;
drawTextField();
}
public function set prompt(_arg1:String):void{
if (_arg1 == ""){
_prompt = null;
} else {
_prompt = _arg1;
};
invalidate(InvalidationType.STATE);
}
public function get length():int{
return (list.length);
}
protected function drawTextField():void{
inputField.setStyle("upSkin", "");
inputField.setStyle("disabledSkin", "");
inputField.enabled = enabled;
inputField.editable = _editable;
inputField.textField.selectable = ((enabled) && (_editable));
inputField.mouseEnabled = (inputField.mouseChildren = ((enabled) && (_editable)));
inputField.focusEnabled = false;
if (_editable){
inputField.addEventListener(FocusEvent.FOCUS_IN, onInputFieldFocus, false, 0, true);
inputField.addEventListener(FocusEvent.FOCUS_OUT, onInputFieldFocusOut, false, 0, true);
} else {
inputField.removeEventListener(FocusEvent.FOCUS_IN, onInputFieldFocus);
inputField.removeEventListener(FocusEvent.FOCUS_OUT, onInputFieldFocusOut);
};
}
protected function onInputFieldFocusOut(_arg1:FocusEvent):void{
inputField.removeEventListener(ComponentEvent.ENTER, onEnter);
selectedIndex = selectedIndex;
}
protected function passEvent(_arg1:Event):void{
dispatchEvent(_arg1);
}
public function get imeMode():String{
return (inputField.imeMode);
}
public function get labelFunction():Function{
return (list.labelFunction);
}
protected function calculateAvailableHeight():Number{
var _local1:Number;
_local1 = Number(getStyleValue("contentPadding"));
return ((list.height - (_local1 * 2)));
}
public function get selectedIndex():int{
return (list.selectedIndex);
}
override protected function focusOutHandler(_arg1:FocusEvent):void{
isKeyDown = false;
if (isOpen){
if (((!(_arg1.relatedObject)) || (!(list.contains(_arg1.relatedObject))))){
if (((!((highlightedCell == -1))) && (!((highlightedCell == selectedIndex))))){
selectedIndex = highlightedCell;
dispatchEvent(new Event(Event.CHANGE));
};
close();
};
};
super.focusOutHandler(_arg1);
}
public function get selectedLabel():String{
if (editableValue != null){
return (editableValue);
};
if (selectedIndex == -1){
return (null);
};
return (itemToLabel(selectedItem));
}
public function get text():String{
return (inputField.text);
}
protected function onListChange(_arg1:Event):void{
editableValue = null;
dispatchEvent(_arg1);
invalidate(InvalidationType.SELECTED);
if (isKeyDown){
return;
};
close();
}
protected function onToggleListVisibility(_arg1:MouseEvent):void{
_arg1.stopPropagation();
dispatchEvent(_arg1);
if (isOpen){
close();
} else {
open();
stage.addEventListener(MouseEvent.MOUSE_UP, onListItemUp, false, 0, true);
};
}
override protected function draw():void{
var _local1:*;
_local1 = selectedIndex;
if ((((_local1 == -1)) && (((((!((prompt == null))) || (editable))) || ((length == 0)))))){
_local1 = Math.max(-1, Math.min(_local1, (length - 1)));
} else {
editableValue = null;
_local1 = Math.max(0, Math.min(_local1, (length - 1)));
};
if (list.selectedIndex != _local1){
list.selectedIndex = _local1;
invalidate(InvalidationType.SELECTED, false);
};
if (isInvalid(InvalidationType.STYLES)){
setStyles();
setEmbedFonts();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE, InvalidationType.DATA, InvalidationType.STATE)){
drawTextFormat();
drawLayout();
invalidate(InvalidationType.DATA);
};
if (isInvalid(InvalidationType.DATA)){
drawList();
invalidate(InvalidationType.SELECTED, true);
};
if (isInvalid(InvalidationType.SELECTED)){
if ((((_local1 == -1)) && (!((editableValue == null))))){
inputField.text = editableValue;
} else {
if (_local1 > -1){
if (length > 0){
inputField.horizontalScrollPosition = 0;
inputField.text = itemToLabel(list.selectedItem);
};
} else {
if ((((_local1 == -1)) && (!((_prompt == null))))){
showPrompt();
} else {
inputField.text = "";
};
};
};
if (((((editable) && ((selectedIndex > -1)))) && ((stage.focus == inputField.textField)))){
inputField.setSelection(0, inputField.length);
};
};
drawTextField();
super.draw();
}
public function addItem(_arg1:Object):void{
list.addItem(_arg1);
invalidate(InvalidationType.DATA);
}
public function get rowCount():uint{
return (_rowCount);
}
override protected function configUI():void{
super.configUI();
background = new BaseButton();
background.focusEnabled = false;
copyStylesToChild(background, BACKGROUND_STYLES);
background.addEventListener(MouseEvent.MOUSE_DOWN, onToggleListVisibility, false, 0, true);
addChild(background);
inputField = new TextInput();
inputField.focusTarget = (this as IFocusManagerComponent);
inputField.focusEnabled = false;
inputField.addEventListener(Event.CHANGE, onTextInput, false, 0, true);
addChild(inputField);
list = new List();
list.focusEnabled = false;
copyStylesToChild(list, LIST_STYLES);
list.addEventListener(Event.CHANGE, onListChange, false, 0, true);
list.addEventListener(ListEvent.ITEM_CLICK, onListChange, false, 0, true);
list.addEventListener(ListEvent.ITEM_ROLL_OUT, passEvent, false, 0, true);
list.addEventListener(ListEvent.ITEM_ROLL_OVER, passEvent, false, 0, true);
list.verticalScrollBar.addEventListener(Event.SCROLL, passEvent, false, 0, true);
}
protected function positionList():void{
var _local1:Point;
_local1 = localToGlobal(new Point(0, 0));
list.x = _local1.x;
if (((_local1.y + height) + list.height) > stage.stageHeight){
list.y = (_local1.y - list.height);
} else {
list.y = (_local1.y + height);
};
}
public function get value():String{
var _local1:Object;
if (editableValue != null){
return (editableValue);
};
_local1 = selectedItem;
if (((!(_editable)) && (!((_local1.data == null))))){
return (_local1.data);
};
return (itemToLabel(_local1));
}
public function get prompt():String{
return (_prompt);
}
public function set dataProvider(_arg1:DataProvider):void{
_arg1.addEventListener(DataChangeEvent.DATA_CHANGE, handleDataChange, false, 0, true);
list.dataProvider = _arg1;
invalidate(InvalidationType.DATA);
}
public function set restrict(_arg1:String):void{
if (((componentInspectorSetting) && ((_arg1 == "")))){
_arg1 = null;
};
if (!_editable){
return;
};
inputField.restrict = _arg1;
}
protected function onTextInput(_arg1:Event):void{
_arg1.stopPropagation();
if (!_editable){
return;
};
editableValue = inputField.text;
selectedIndex = -1;
dispatchEvent(new Event(Event.CHANGE));
}
protected function onInputFieldFocus(_arg1:FocusEvent):void{
inputField.addEventListener(ComponentEvent.ENTER, onEnter, false, 0, true);
close();
}
public function getItemAt(_arg1:uint):Object{
return (list.getItemAt(_arg1));
}
override protected function initializeAccessibility():void{
if (ComboBox.createAccessibilityImplementation != null){
ComboBox.createAccessibilityImplementation(this);
};
}
protected function drawLayout():void{
var _local1:Number;
var _local2:Number;
_local1 = (getStyleValue("buttonWidth") as Number);
_local2 = (getStyleValue("textPadding") as Number);
background.setSize(width, height);
inputField.x = (inputField.y = _local2);
inputField.setSize(((width - _local1) - _local2), (height - _local2));
list.width = (isNaN(_dropdownWidth)) ? width : _dropdownWidth;
background.enabled = enabled;
background.drawNow();
}
public function removeItem(_arg1:Object):Object{
return (list.removeItem(_arg1));
}
private function addCloseListener(_arg1:Event){
removeEventListener(Event.ENTER_FRAME, addCloseListener);
if (!isOpen){
return;
};
stage.addEventListener(MouseEvent.MOUSE_DOWN, onStageClick, false, 0, true);
}
public function get dataProvider():DataProvider{
return (list.dataProvider);
}
public function get textField():TextInput{
return (inputField);
}
protected function setStyles():void{
copyStylesToChild(background, BACKGROUND_STYLES);
copyStylesToChild(list, LIST_STYLES);
}
public function set labelFunction(_arg1:Function):void{
list.labelFunction = _arg1;
invalidate(InvalidationType.DATA);
}
protected function drawTextFormat():void{
var _local1:TextFormat;
_local1 = (getStyleValue((_enabled) ? "textFormat" : "disabledTextFormat") as TextFormat);
if (_local1 == null){
_local1 = new TextFormat();
};
inputField.textField.defaultTextFormat = _local1;
inputField.textField.setTextFormat(_local1);
setEmbedFonts();
}
public function set selectedIndex(_arg1:int):void{
list.selectedIndex = _arg1;
highlightCell();
invalidate(InvalidationType.SELECTED);
}
public function close():void{
highlightCell();
highlightedCell = -1;
if (!isOpen){
return;
};
dispatchEvent(new Event(Event.CLOSE));
stage.removeEventListener(MouseEvent.MOUSE_DOWN, onStageClick);
isOpen = false;
stage.removeChild(list);
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, List.getStyleDefinition()));
}
}
}//package fl.controls
Section 69
//LabelButton (fl.controls.LabelButton)
package fl.controls {
import fl.core.*;
import flash.display.*;
import flash.events.*;
import fl.managers.*;
import fl.events.*;
import flash.text.*;
import flash.ui.*;
public class LabelButton extends BaseButton implements IFocusManagerComponent {
protected var _labelPlacement:String;// = "right"
protected var _toggle:Boolean;// = false
protected var icon:DisplayObject;
protected var oldMouseState:String;
protected var mode:String;// = "center"
public var textField:TextField;
protected var _label:String;// = "Label"
private static var defaultStyles:Object = {icon:null, upIcon:null, downIcon:null, overIcon:null, disabledIcon:null, selectedDisabledIcon:null, selectedUpIcon:null, selectedDownIcon:null, selectedOverIcon:null, textFormat:null, disabledTextFormat:null, textPadding:5, embedFonts:false};
public static var createAccessibilityImplementation:Function;
public function LabelButton(){
_labelPlacement = ButtonLabelPlacement.RIGHT;
_toggle = false;
_label = "Label";
mode = "center";
super();
}
protected function toggleSelected(_arg1:MouseEvent):void{
selected = !(selected);
dispatchEvent(new Event(Event.CHANGE, true));
}
public function get labelPlacement():String{
return (_labelPlacement);
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
if (oldMouseState == null){
oldMouseState = mouseState;
};
setMouseState("down");
startPress();
};
}
protected function setEmbedFont(){
var _local1:Object;
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
}
override protected function keyUpHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
setMouseState(oldMouseState);
oldMouseState = null;
endPress();
dispatchEvent(new MouseEvent(MouseEvent.CLICK));
};
}
override public function get selected():Boolean{
return ((_toggle) ? _selected : false);
}
public function set labelPlacement(_arg1:String):void{
_labelPlacement = _arg1;
invalidate(InvalidationType.SIZE);
}
public function set toggle(_arg1:Boolean):void{
if (((!(_arg1)) && (super.selected))){
selected = false;
};
_toggle = _arg1;
if (_toggle){
addEventListener(MouseEvent.CLICK, toggleSelected, false, 0, true);
} else {
removeEventListener(MouseEvent.CLICK, toggleSelected);
};
invalidate(InvalidationType.STATE);
}
public function get label():String{
return (_label);
}
override public function set selected(_arg1:Boolean):void{
_selected = _arg1;
if (_toggle){
invalidate(InvalidationType.STATE);
};
}
override protected function draw():void{
if (textField.text != _label){
label = _label;
};
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawBackground();
drawIcon();
drawTextFormat();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){
if (((isFocused) && (focusManager.showFocusIndicator))){
drawFocus(true);
};
};
validate();
}
public function get toggle():Boolean{
return (_toggle);
}
override protected function configUI():void{
super.configUI();
textField = new TextField();
textField.type = TextFieldType.DYNAMIC;
textField.selectable = false;
addChild(textField);
}
override protected function drawLayout():void{
var _local1:Number;
var _local2:String;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local1 = Number(getStyleValue("textPadding"));
_local2 = ((((icon == null)) && ((mode == "center")))) ? ButtonLabelPlacement.TOP : _labelPlacement;
textField.height = (textField.textHeight + 4);
_local3 = (textField.textWidth + 4);
_local4 = (textField.textHeight + 4);
_local5 = ((icon)==null) ? 0 : (icon.width + _local1);
_local6 = ((icon)==null) ? 0 : (icon.height + _local1);
textField.visible = (label.length > 0);
if (icon != null){
icon.x = Math.round(((width - icon.width) / 2));
icon.y = Math.round(((height - icon.height) / 2));
};
if (textField.visible == false){
textField.width = 0;
textField.height = 0;
} else {
if ((((_local2 == ButtonLabelPlacement.BOTTOM)) || ((_local2 == ButtonLabelPlacement.TOP)))){
_local7 = Math.max(0, Math.min(_local3, (width - (2 * _local1))));
if ((height - 2) > _local4){
_local8 = _local4;
} else {
_local8 = (height - 2);
};
_local3 = _local7;
textField.width = _local3;
_local4 = _local8;
textField.height = _local4;
textField.x = Math.round(((width - _local3) / 2));
textField.y = Math.round(((((height - textField.height) - _local6) / 2) + ((_local2)==ButtonLabelPlacement.BOTTOM) ? _local6 : 0));
if (icon != null){
icon.y = Math.round(((_local2)==ButtonLabelPlacement.BOTTOM) ? (textField.y - _local6) : ((textField.y + textField.height) + _local1));
};
} else {
_local7 = Math.max(0, Math.min(_local3, ((width - _local5) - (2 * _local1))));
_local3 = _local7;
textField.width = _local3;
textField.x = Math.round(((((width - _local3) - _local5) / 2) + ((_local2)!=ButtonLabelPlacement.LEFT) ? _local5 : 0));
textField.y = Math.round(((height - textField.height) / 2));
if (icon != null){
icon.x = Math.round(((_local2)!=ButtonLabelPlacement.LEFT) ? (textField.x - _local5) : ((textField.x + _local3) + _local1));
};
};
};
super.drawLayout();
}
override protected function initializeAccessibility():void{
if (LabelButton.createAccessibilityImplementation != null){
LabelButton.createAccessibilityImplementation(this);
};
}
protected function drawIcon():void{
var _local1:DisplayObject;
var _local2:String;
var _local3:Object;
_local1 = icon;
_local2 = (enabled) ? mouseState : "disabled";
if (selected){
_local2 = (("selected" + _local2.substr(0, 1).toUpperCase()) + _local2.substr(1));
};
_local2 = (_local2 + "Icon");
_local3 = getStyleValue(_local2);
if (_local3 == null){
_local3 = getStyleValue("icon");
};
if (_local3 != null){
icon = getDisplayObjectInstance(_local3);
};
if (icon != null){
addChildAt(icon, 1);
};
if (((!((_local1 == null))) && (!((_local1 == icon))))){
removeChild(_local1);
};
}
public function set label(_arg1:String):void{
_label = _arg1;
if (textField.text != _label){
textField.text = _label;
dispatchEvent(new ComponentEvent(ComponentEvent.LABEL_CHANGE));
};
invalidate(InvalidationType.SIZE);
invalidate(InvalidationType.STYLES);
}
protected function drawTextFormat():void{
var _local1:Object;
var _local2:TextFormat;
var _local3:TextFormat;
_local1 = UIComponent.getStyleDefinition();
_local2 = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat);
textField.setTextFormat(_local2);
_local3 = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat);
if (_local3 != null){
textField.setTextFormat(_local3);
} else {
_local3 = _local2;
};
textField.defaultTextFormat = _local3;
setEmbedFont();
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, BaseButton.getStyleDefinition()));
}
}
}//package fl.controls
Section 70
//List (fl.controls.List)
package fl.controls {
import fl.controls.listClasses.*;
import fl.core.*;
import flash.display.*;
import flash.events.*;
import fl.managers.*;
import flash.utils.*;
import flash.geom.*;
import flash.ui.*;
public class List extends SelectableList implements IFocusManagerComponent {
protected var _labelField:String;// = "label"
protected var _rowHeight:Number;// = 20
protected var _cellRenderer:Object;
protected var _iconField:String;// = "icon"
protected var _labelFunction:Function;
protected var _iconFunction:Function;
private static var defaultStyles:Object = {focusRectSkin:null, focusRectPadding:null};
public static var createAccessibilityImplementation:Function;
public function List(){
_rowHeight = 20;
_labelField = "label";
_iconField = "icon";
super();
}
public function get iconField():String{
return (_iconField);
}
protected function doKeySelection(_arg1:int, _arg2:Boolean, _arg3:Boolean):void{
var _local4:Boolean;
var _local5:int;
var _local6:Array;
var _local7:int;
var _local8:int;
_local4 = false;
if (_arg2){
_local6 = [];
_local7 = lastCaretIndex;
_local8 = _arg1;
if (_local7 == -1){
_local7 = ((caretIndex)!=-1) ? caretIndex : _arg1;
};
if (_local7 > _local8){
_local8 = _local7;
_local7 = _arg1;
};
_local5 = _local7;
while (_local5 <= _local8) {
_local6.push(_local5);
_local5++;
};
selectedIndices = _local6;
caretIndex = _arg1;
_local4 = true;
} else {
selectedIndex = _arg1;
caretIndex = (lastCaretIndex = _arg1);
_local4 = true;
};
if (_local4){
dispatchEvent(new Event(Event.CHANGE));
};
invalidate(InvalidationType.DATA);
}
override protected function drawList():void{
var _local1:Rectangle;
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:Object;
var _local6:ICellRenderer;
var _local7:Dictionary;
var _local8:Dictionary;
var _local9:Boolean;
var _local10:String;
var _local11:Object;
var _local12:Sprite;
var _local13:String;
listHolder.x = (listHolder.y = contentPadding);
_local1 = listHolder.scrollRect;
_local1.x = _horizontalScrollPosition;
_local1.y = (Math.floor(_verticalScrollPosition) % rowHeight);
listHolder.scrollRect = _local1;
listHolder.cacheAsBitmap = useBitmapScrolling;
_local2 = Math.floor((_verticalScrollPosition / rowHeight));
_local3 = Math.min(length, ((_local2 + rowCount) + 1));
_local7 = (renderedItems = new Dictionary(true));
_local4 = _local2;
while (_local4 < _local3) {
_local7[_dataProvider.getItemAt(_local4)] = true;
_local4++;
};
_local8 = new Dictionary(true);
while (activeCellRenderers.length > 0) {
_local6 = (activeCellRenderers.pop() as ICellRenderer);
_local5 = _local6.data;
if ((((_local7[_local5] == null)) || ((invalidItems[_local5] == true)))){
availableCellRenderers.push(_local6);
} else {
_local8[_local5] = _local6;
invalidItems[_local5] = true;
};
list.removeChild((_local6 as DisplayObject));
};
invalidItems = new Dictionary(true);
_local4 = _local2;
while (_local4 < _local3) {
_local9 = false;
_local5 = _dataProvider.getItemAt(_local4);
if (_local8[_local5] != null){
_local9 = true;
_local6 = _local8[_local5];
delete _local8[_local5];
} else {
if (availableCellRenderers.length > 0){
_local6 = (availableCellRenderers.pop() as ICellRenderer);
} else {
_local6 = (getDisplayObjectInstance(getStyleValue("cellRenderer")) as ICellRenderer);
_local12 = (_local6 as Sprite);
if (_local12 != null){
_local12.addEventListener(MouseEvent.CLICK, handleCellRendererClick, false, 0, true);
_local12.addEventListener(MouseEvent.ROLL_OVER, handleCellRendererMouseEvent, false, 0, true);
_local12.addEventListener(MouseEvent.ROLL_OUT, handleCellRendererMouseEvent, false, 0, true);
_local12.addEventListener(Event.CHANGE, handleCellRendererChange, false, 0, true);
_local12.doubleClickEnabled = true;
_local12.addEventListener(MouseEvent.DOUBLE_CLICK, handleCellRendererDoubleClick, false, 0, true);
if (_local12["setStyle"] != null){
for (_local13 in rendererStyles) {
var _local16 = _local12;
_local16["setStyle"](_local13, rendererStyles[_local13]);
};
};
};
};
};
list.addChild((_local6 as Sprite));
activeCellRenderers.push(_local6);
_local6.y = (rowHeight * (_local4 - _local2));
_local6.setSize((availableWidth + _maxHorizontalScrollPosition), rowHeight);
_local10 = itemToLabel(_local5);
_local11 = null;
if (_iconFunction != null){
_local11 = _iconFunction(_local5);
} else {
if (_iconField != null){
_local11 = _local5[_iconField];
};
};
if (!_local9){
_local6.data = _local5;
};
_local6.listData = new ListData(_local10, _local11, this, _local4, _local4, 0);
_local6.selected = !((_selectedIndices.indexOf(_local4) == -1));
if ((_local6 is UIComponent)){
(_local6 as UIComponent).drawNow();
};
_local4++;
};
}
public function get iconFunction():Function{
return (_iconFunction);
}
public function set iconField(_arg1:String):void{
if (_arg1 == _iconField){
return;
};
_iconField = _arg1;
invalidate(InvalidationType.DATA);
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
var _local2:int;
if (!selectable){
return;
};
switch (_arg1.keyCode){
case Keyboard.UP:
case Keyboard.DOWN:
case Keyboard.END:
case Keyboard.HOME:
case Keyboard.PAGE_UP:
case Keyboard.PAGE_DOWN:
moveSelectionVertically(_arg1.keyCode, ((_arg1.shiftKey) && (_allowMultipleSelection)), ((_arg1.ctrlKey) && (_allowMultipleSelection)));
break;
case Keyboard.LEFT:
case Keyboard.RIGHT:
moveSelectionHorizontally(_arg1.keyCode, ((_arg1.shiftKey) && (_allowMultipleSelection)), ((_arg1.ctrlKey) && (_allowMultipleSelection)));
break;
case Keyboard.SPACE:
if (caretIndex == -1){
caretIndex = 0;
};
doKeySelection(caretIndex, _arg1.shiftKey, _arg1.ctrlKey);
scrollToSelected();
break;
default:
_local2 = getNextIndexAtLetter(String.fromCharCode(_arg1.keyCode), selectedIndex);
if (_local2 > -1){
selectedIndex = _local2;
scrollToSelected();
};
break;
};
_arg1.stopPropagation();
}
override public function itemToLabel(_arg1:Object):String{
if (_labelFunction != null){
return (String(_labelFunction(_arg1)));
};
return (((_arg1[_labelField])!=null) ? String(_arg1[_labelField]) : "");
}
public function get labelField():String{
return (_labelField);
}
override protected function moveSelectionVertically(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{
var _local4:int;
var _local5:int;
var _local6:int;
_local4 = Math.max(Math.floor((calculateAvailableHeight() / rowHeight)), 1);
_local5 = -1;
_local6 = 0;
switch (_arg1){
case Keyboard.UP:
if (caretIndex > 0){
_local5 = (caretIndex - 1);
};
break;
case Keyboard.DOWN:
if (caretIndex < (length - 1)){
_local5 = (caretIndex + 1);
};
break;
case Keyboard.PAGE_UP:
if (caretIndex > 0){
_local5 = Math.max((caretIndex - _local4), 0);
};
break;
case Keyboard.PAGE_DOWN:
if (caretIndex < (length - 1)){
_local5 = Math.min((caretIndex + _local4), (length - 1));
};
break;
case Keyboard.HOME:
if (caretIndex > 0){
_local5 = 0;
};
break;
case Keyboard.END:
if (caretIndex < (length - 1)){
_local5 = (length - 1);
};
break;
};
if (_local5 >= 0){
doKeySelection(_local5, _arg2, _arg3);
scrollToSelected();
};
}
public function set labelField(_arg1:String):void{
if (_arg1 == _labelField){
return;
};
_labelField = _arg1;
invalidate(InvalidationType.DATA);
}
public function set rowCount(_arg1:uint):void{
var _local2:Number;
var _local3:Number;
_local2 = Number(getStyleValue("contentPadding"));
_local3 = ((((_horizontalScrollPolicy == ScrollPolicy.ON)) || ((((_horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((_maxHorizontalScrollPosition > 0)))))) ? 15 : 0;
height = (((rowHeight * _arg1) + (2 * _local2)) + _local3);
}
override protected function setHorizontalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
list.x = -(_arg1);
super.setHorizontalScrollPosition(_arg1, true);
}
public function set iconFunction(_arg1:Function):void{
if (_iconFunction == _arg1){
return;
};
_iconFunction = _arg1;
invalidate(InvalidationType.DATA);
}
public function get labelFunction():Function{
return (_labelFunction);
}
override protected function moveSelectionHorizontally(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{
}
override protected function setVerticalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
invalidate(InvalidationType.SCROLL);
super.setVerticalScrollPosition(_arg1, true);
}
protected function calculateAvailableHeight():Number{
var _local1:Number;
_local1 = Number(getStyleValue("contentPadding"));
return (((height - (_local1 * 2)) - ((((_horizontalScrollPolicy == ScrollPolicy.ON)) || ((((_horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((_maxHorizontalScrollPosition > 0)))))) ? 15 : 0));
}
override protected function draw():void{
var _local1:Boolean;
_local1 = !((contentHeight == (rowHeight * length)));
contentHeight = (rowHeight * length);
if (isInvalid(InvalidationType.STYLES)){
setStyles();
drawBackground();
if (contentPadding != getStyleValue("contentPadding")){
invalidate(InvalidationType.SIZE, false);
};
if (_cellRenderer != getStyleValue("cellRenderer")){
_invalidateList();
_cellRenderer = getStyleValue("cellRenderer");
};
};
if (((isInvalid(InvalidationType.SIZE, InvalidationType.STATE)) || (_local1))){
drawLayout();
};
if (isInvalid(InvalidationType.RENDERER_STYLES)){
updateRendererStyles();
};
if (isInvalid(InvalidationType.STYLES, InvalidationType.SIZE, InvalidationType.DATA, InvalidationType.SCROLL, InvalidationType.SELECTED)){
drawList();
};
updateChildren();
validate();
}
override protected function configUI():void{
useFixedHorizontalScrolling = true;
_horizontalScrollPolicy = ScrollPolicy.AUTO;
_verticalScrollPolicy = ScrollPolicy.AUTO;
super.configUI();
}
override public function get rowCount():uint{
return (Math.ceil((calculateAvailableHeight() / rowHeight)));
}
override protected function initializeAccessibility():void{
if (List.createAccessibilityImplementation != null){
List.createAccessibilityImplementation(this);
};
}
override public function scrollToIndex(_arg1:int):void{
var _local2:uint;
var _local3:uint;
drawNow();
_local2 = (Math.floor(((_verticalScrollPosition + availableHeight) / rowHeight)) - 1);
_local3 = Math.ceil((_verticalScrollPosition / rowHeight));
if (_arg1 < _local3){
verticalScrollPosition = (_arg1 * rowHeight);
} else {
if (_arg1 > _local2){
verticalScrollPosition = (((_arg1 + 1) * rowHeight) - availableHeight);
};
};
}
public function get rowHeight():Number{
return (_rowHeight);
}
public function set labelFunction(_arg1:Function):void{
if (_labelFunction == _arg1){
return;
};
_labelFunction = _arg1;
invalidate(InvalidationType.DATA);
}
public function set rowHeight(_arg1:Number):void{
_rowHeight = _arg1;
invalidate(InvalidationType.SIZE);
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, SelectableList.getStyleDefinition()));
}
}
}//package fl.controls
Section 71
//ScrollBar (fl.controls.ScrollBar)
package fl.controls {
import fl.core.*;
import flash.events.*;
import fl.events.*;
public class ScrollBar extends UIComponent {
private var _direction:String;// = "vertical"
protected var inDrag:Boolean;// = false
protected var upArrow:BaseButton;
private var _pageScrollSize:Number;// = 0
protected var downArrow:BaseButton;
private var _pageSize:Number;// = 10
private var thumbScrollOffset:Number;
private var _maxScrollPosition:Number;// = 0
private var _scrollPosition:Number;// = 0
protected var track:BaseButton;
private var _minScrollPosition:Number;// = 0
private var _lineScrollSize:Number;// = 1
protected var thumb:LabelButton;
protected static const THUMB_STYLES:Object = {disabledSkin:"thumbDisabledSkin", downSkin:"thumbDownSkin", overSkin:"thumbOverSkin", upSkin:"thumbUpSkin", icon:"thumbIcon", textPadding:0};
public static const WIDTH:Number = 15;
protected static const DOWN_ARROW_STYLES:Object = {disabledSkin:"downArrowDisabledSkin", downSkin:"downArrowDownSkin", overSkin:"downArrowOverSkin", upSkin:"downArrowUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"};
protected static const UP_ARROW_STYLES:Object = {disabledSkin:"upArrowDisabledSkin", downSkin:"upArrowDownSkin", overSkin:"upArrowOverSkin", upSkin:"upArrowUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"};
protected static const TRACK_STYLES:Object = {disabledSkin:"trackDisabledSkin", downSkin:"trackDownSkin", overSkin:"trackOverSkin", upSkin:"trackUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"};
private static var defaultStyles:Object = {downArrowDisabledSkin:"ScrollArrowDown_disabledSkin", downArrowDownSkin:"ScrollArrowDown_downSkin", downArrowOverSkin:"ScrollArrowDown_overSkin", downArrowUpSkin:"ScrollArrowDown_upSkin", thumbDisabledSkin:"ScrollThumb_upSkin", thumbDownSkin:"ScrollThumb_downSkin", thumbOverSkin:"ScrollThumb_overSkin", thumbUpSkin:"ScrollThumb_upSkin", trackDisabledSkin:"ScrollTrack_skin", trackDownSkin:"ScrollTrack_skin", trackOverSkin:"ScrollTrack_skin", trackUpSkin:"ScrollTrack_skin", upArrowDisabledSkin:"ScrollArrowUp_disabledSkin", upArrowDownSkin:"ScrollArrowUp_downSkin", upArrowOverSkin:"ScrollArrowUp_overSkin", upArrowUpSkin:"ScrollArrowUp_upSkin", thumbIcon:"ScrollBar_thumbIcon", repeatDelay:500, repeatInterval:35};
public function ScrollBar(){
_pageSize = 10;
_pageScrollSize = 0;
_lineScrollSize = 1;
_minScrollPosition = 0;
_maxScrollPosition = 0;
_scrollPosition = 0;
_direction = ScrollBarDirection.VERTICAL;
inDrag = false;
super();
setStyles();
focusEnabled = false;
}
public function get minScrollPosition():Number{
return (_minScrollPosition);
}
public function set minScrollPosition(_arg1:Number):void{
setScrollProperties(_pageSize, _arg1, _maxScrollPosition);
}
public function setScrollPosition(_arg1:Number, _arg2:Boolean=true):void{
var _local3:Number;
_local3 = scrollPosition;
_scrollPosition = Math.max(_minScrollPosition, Math.min(_maxScrollPosition, _arg1));
if (_local3 == _scrollPosition){
return;
};
if (_arg2){
dispatchEvent(new ScrollEvent(_direction, (scrollPosition - _local3), scrollPosition));
};
updateThumb();
}
public function set scrollPosition(_arg1:Number):void{
setScrollPosition(_arg1, true);
}
public function get pageScrollSize():Number{
return (((_pageScrollSize)==0) ? _pageSize : _pageScrollSize);
}
public function set pageSize(_arg1:Number):void{
if (_arg1 > 0){
_pageSize = _arg1;
};
}
public function setScrollProperties(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=0):void{
this.pageSize = _arg1;
_minScrollPosition = _arg2;
_maxScrollPosition = _arg3;
if (_arg4 >= 0){
_pageScrollSize = _arg4;
};
enabled = (_maxScrollPosition > _minScrollPosition);
setScrollPosition(_scrollPosition, false);
updateThumb();
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
downArrow.enabled = (track.enabled = (thumb.enabled = (upArrow.enabled = ((enabled) && ((_maxScrollPosition > _minScrollPosition))))));
updateThumb();
}
protected function updateThumb():void{
var _local1:Number;
_local1 = ((_maxScrollPosition - _minScrollPosition) + _pageSize);
if ((((((track.height <= 12)) || ((_maxScrollPosition <= _minScrollPosition)))) || ((((_local1 == 0)) || (isNaN(_local1)))))){
thumb.height = 12;
thumb.visible = false;
} else {
thumb.height = Math.max(13, ((_pageSize / _local1) * track.height));
thumb.y = (track.y + ((track.height - thumb.height) * ((_scrollPosition - _minScrollPosition) / (_maxScrollPosition - _minScrollPosition))));
thumb.visible = enabled;
};
}
protected function thumbPressHandler(_arg1:MouseEvent):void{
inDrag = true;
thumbScrollOffset = (mouseY - thumb.y);
thumb.mouseStateLocked = true;
mouseChildren = false;
stage.addEventListener(MouseEvent.MOUSE_MOVE, handleThumbDrag, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler, false, 0, true);
}
protected function thumbReleaseHandler(_arg1:MouseEvent):void{
inDrag = false;
mouseChildren = true;
thumb.mouseStateLocked = false;
stage.removeEventListener(MouseEvent.MOUSE_MOVE, handleThumbDrag);
stage.removeEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler);
}
public function set pageScrollSize(_arg1:Number):void{
if (_arg1 >= 0){
_pageScrollSize = _arg1;
};
}
protected function handleThumbDrag(_arg1:MouseEvent):void{
var _local2:Number;
_local2 = Math.max(0, Math.min((track.height - thumb.height), ((mouseY - track.y) - thumbScrollOffset)));
setScrollPosition((((_local2 / (track.height - thumb.height)) * (_maxScrollPosition - _minScrollPosition)) + _minScrollPosition));
}
public function set direction(_arg1:String):void{
var _local2:Boolean;
if (_direction == _arg1){
return;
};
_direction = _arg1;
if (isLivePreview){
return;
};
setScaleY(1);
_local2 = (_direction == ScrollBarDirection.HORIZONTAL);
if (((_local2) && (componentInspectorSetting))){
if (rotation == 90){
return;
};
setScaleX(-1);
rotation = -90;
};
if (!componentInspectorSetting){
if (((_local2) && ((rotation == 0)))){
rotation = -90;
setScaleX(-1);
} else {
if (((!(_local2)) && ((rotation == -90)))){
rotation = 0;
setScaleX(1);
};
};
};
invalidate(InvalidationType.SIZE);
}
public function set lineScrollSize(_arg1:Number):void{
if (_arg1 > 0){
_lineScrollSize = _arg1;
};
}
override public function get height():Number{
return (((_direction)==ScrollBarDirection.HORIZONTAL) ? super.width : super.height);
}
protected function scrollPressHandler(_arg1:ComponentEvent):void{
var _local2:Number;
var _local3:Number;
_arg1.stopImmediatePropagation();
if (_arg1.currentTarget == upArrow){
setScrollPosition((_scrollPosition - _lineScrollSize));
} else {
if (_arg1.currentTarget == downArrow){
setScrollPosition((_scrollPosition + _lineScrollSize));
} else {
_local2 = (((track.mouseY / track.height) * (_maxScrollPosition - _minScrollPosition)) + _minScrollPosition);
_local3 = ((pageScrollSize)==0) ? pageSize : pageScrollSize;
if (_scrollPosition < _local2){
setScrollPosition(Math.min(_local2, (_scrollPosition + _local3)));
} else {
if (_scrollPosition > _local2){
setScrollPosition(Math.max(_local2, (_scrollPosition - _local3)));
};
};
};
};
}
public function get pageSize():Number{
return (_pageSize);
}
public function set maxScrollPosition(_arg1:Number):void{
setScrollProperties(_pageSize, _minScrollPosition, _arg1);
}
public function get scrollPosition():Number{
return (_scrollPosition);
}
override public function get enabled():Boolean{
return (super.enabled);
}
override protected function draw():void{
var _local1:Number;
if (isInvalid(InvalidationType.SIZE)){
_local1 = super.height;
downArrow.move(0, Math.max(upArrow.height, (_local1 - downArrow.height)));
track.setSize(WIDTH, Math.max(0, (_local1 - (downArrow.height + upArrow.height))));
updateThumb();
};
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
setStyles();
};
downArrow.drawNow();
upArrow.drawNow();
track.drawNow();
thumb.drawNow();
validate();
}
override protected function configUI():void{
super.configUI();
track = new BaseButton();
track.move(0, 14);
track.useHandCursor = false;
track.autoRepeat = true;
track.focusEnabled = false;
addChild(track);
thumb = new LabelButton();
thumb.label = "";
thumb.setSize(WIDTH, 15);
thumb.move(0, 15);
thumb.focusEnabled = false;
addChild(thumb);
downArrow = new BaseButton();
downArrow.setSize(WIDTH, 14);
downArrow.autoRepeat = true;
downArrow.focusEnabled = false;
addChild(downArrow);
upArrow = new BaseButton();
upArrow.setSize(WIDTH, 14);
upArrow.move(0, 0);
upArrow.autoRepeat = true;
upArrow.focusEnabled = false;
addChild(upArrow);
upArrow.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true);
downArrow.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true);
track.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true);
thumb.addEventListener(MouseEvent.MOUSE_DOWN, thumbPressHandler, false, 0, true);
enabled = false;
}
public function get direction():String{
return (_direction);
}
public function get lineScrollSize():Number{
return (_lineScrollSize);
}
override public function setSize(_arg1:Number, _arg2:Number):void{
if (_direction == ScrollBarDirection.HORIZONTAL){
super.setSize(_arg2, _arg1);
} else {
super.setSize(_arg1, _arg2);
};
}
public function get maxScrollPosition():Number{
return (_maxScrollPosition);
}
override public function get width():Number{
return (((_direction)==ScrollBarDirection.HORIZONTAL) ? super.height : super.width);
}
protected function setStyles():void{
copyStylesToChild(downArrow, DOWN_ARROW_STYLES);
copyStylesToChild(thumb, THUMB_STYLES);
copyStylesToChild(track, TRACK_STYLES);
copyStylesToChild(upArrow, UP_ARROW_STYLES);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 72
//ScrollBarDirection (fl.controls.ScrollBarDirection)
package fl.controls {
public class ScrollBarDirection {
public static const HORIZONTAL:String = "horizontal";
public static const VERTICAL:String = "vertical";
}
}//package fl.controls
Section 73
//ScrollPolicy (fl.controls.ScrollPolicy)
package fl.controls {
public class ScrollPolicy {
public static const OFF:String = "off";
public static const ON:String = "on";
public static const AUTO:String = "auto";
}
}//package fl.controls
Section 74
//SelectableList (fl.controls.SelectableList)
package fl.controls {
import fl.controls.listClasses.*;
import fl.core.*;
import flash.display.*;
import flash.events.*;
import fl.data.*;
import fl.managers.*;
import fl.events.*;
import flash.utils.*;
import fl.containers.*;
import flash.ui.*;
public class SelectableList extends BaseScrollPane implements IFocusManagerComponent {
protected var invalidItems:Dictionary;
protected var renderedItems:Dictionary;
protected var listHolder:Sprite;
protected var _allowMultipleSelection:Boolean;// = false
protected var lastCaretIndex:int;// = -1
protected var _selectedIndices:Array;
protected var availableCellRenderers:Array;
protected var list:Sprite;
protected var caretIndex:int;// = -1
protected var updatedRendererStyles:Object;
protected var preChangeItems:Array;
protected var activeCellRenderers:Array;
protected var rendererStyles:Object;
protected var _verticalScrollPosition:Number;
protected var _dataProvider:DataProvider;
protected var _horizontalScrollPosition:Number;
private var collectionItemImport:SimpleCollectionItem;
protected var _selectable:Boolean;// = true
private static var defaultStyles:Object = {skin:"List_skin", cellRenderer:CellRenderer, contentPadding:null, disabledAlpha:null};
public static var createAccessibilityImplementation:Function;
public function SelectableList(){
_allowMultipleSelection = false;
_selectable = true;
caretIndex = -1;
lastCaretIndex = -1;
super();
activeCellRenderers = [];
availableCellRenderers = [];
invalidItems = new Dictionary(true);
renderedItems = new Dictionary(true);
_selectedIndices = [];
if (dataProvider == null){
dataProvider = new DataProvider();
};
verticalScrollPolicy = ScrollPolicy.AUTO;
rendererStyles = {};
updatedRendererStyles = {};
}
protected function drawList():void{
}
public function set allowMultipleSelection(_arg1:Boolean):void{
if (_arg1 == _allowMultipleSelection){
return;
};
_allowMultipleSelection = _arg1;
if (((!(_arg1)) && ((_selectedIndices.length > 1)))){
_selectedIndices = [_selectedIndices.pop()];
invalidate(InvalidationType.DATA);
};
}
public function sortItemsOn(_arg1:String, _arg2:Object=null){
return (_dataProvider.sortOn(_arg1, _arg2));
}
public function removeItemAt(_arg1:uint):Object{
return (_dataProvider.removeItemAt(_arg1));
}
public function get selectedItem():Object{
return (((_selectedIndices.length)==0) ? null : _dataProvider.getItemAt(selectedIndex));
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
if (!selectable){
return;
};
switch (_arg1.keyCode){
case Keyboard.UP:
case Keyboard.DOWN:
case Keyboard.END:
case Keyboard.HOME:
case Keyboard.PAGE_UP:
case Keyboard.PAGE_DOWN:
moveSelectionVertically(_arg1.keyCode, ((_arg1.shiftKey) && (_allowMultipleSelection)), ((_arg1.ctrlKey) && (_allowMultipleSelection)));
_arg1.stopPropagation();
break;
case Keyboard.LEFT:
case Keyboard.RIGHT:
moveSelectionHorizontally(_arg1.keyCode, ((_arg1.shiftKey) && (_allowMultipleSelection)), ((_arg1.ctrlKey) && (_allowMultipleSelection)));
_arg1.stopPropagation();
break;
};
}
public function get selectable():Boolean{
return (_selectable);
}
public function itemToCellRenderer(_arg1:Object):ICellRenderer{
var _local2:*;
var _local3:ICellRenderer;
if (_arg1 != null){
for (_local2 in activeCellRenderers) {
_local3 = (activeCellRenderers[_local2] as ICellRenderer);
if (_local3.data == _arg1){
return (_local3);
};
};
};
return (null);
}
public function getNextIndexAtLetter(_arg1:String, _arg2:int=-1):int{
var _local3:int;
var _local4:Number;
var _local5:Number;
var _local6:Object;
var _local7:String;
if (length == 0){
return (-1);
};
_arg1 = _arg1.toUpperCase();
_local3 = (length - 1);
_local4 = 0;
while (_local4 < _local3) {
_local5 = ((_arg2 + 1) + _local4);
if (_local5 > (length - 1)){
_local5 = (_local5 - length);
};
_local6 = getItemAt(_local5);
if (_local6 == null){
break;
};
_local7 = itemToLabel(_local6);
if (_local7 == null){
} else {
if (_local7.charAt(0).toUpperCase() == _arg1){
return (_local5);
};
};
_local4++;
};
return (-1);
}
public function invalidateList():void{
_invalidateList();
invalidate(InvalidationType.DATA);
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
list.mouseChildren = _enabled;
}
public function get selectedIndices():Array{
return (_selectedIndices.concat());
}
public function set selectable(_arg1:Boolean):void{
if (_arg1 == _selectable){
return;
};
if (!_arg1){
selectedIndices = [];
};
_selectable = _arg1;
}
public function itemToLabel(_arg1:Object):String{
return (_arg1["label"]);
}
public function addItemAt(_arg1:Object, _arg2:uint):void{
_dataProvider.addItemAt(_arg1, _arg2);
invalidateList();
}
public function replaceItemAt(_arg1:Object, _arg2:uint):Object{
return (_dataProvider.replaceItemAt(_arg1, _arg2));
}
protected function handleDataChange(_arg1:DataChangeEvent):void{
var _local2:int;
var _local3:int;
var _local4:String;
var _local5:uint;
_local2 = _arg1.startIndex;
_local3 = _arg1.endIndex;
_local4 = _arg1.changeType;
if (_local4 == DataChangeType.INVALIDATE_ALL){
clearSelection();
invalidateList();
} else {
if (_local4 == DataChangeType.INVALIDATE){
_local5 = 0;
while (_local5 < _arg1.items.length) {
invalidateItem(_arg1.items[_local5]);
_local5++;
};
} else {
if (_local4 == DataChangeType.ADD){
_local5 = 0;
while (_local5 < _selectedIndices.length) {
if (_selectedIndices[_local5] >= _local2){
_selectedIndices[_local5] = (_selectedIndices[_local5] + (_local2 - _local3));
};
_local5++;
};
} else {
if (_local4 == DataChangeType.REMOVE){
_local5 = 0;
while (_local5 < _selectedIndices.length) {
if (_selectedIndices[_local5] >= _local2){
if (_selectedIndices[_local5] <= _local3){
delete _selectedIndices[_local5];
} else {
_selectedIndices[_local5] = (_selectedIndices[_local5] - ((_local2 - _local3) + 1));
};
};
_local5++;
};
} else {
if (_local4 == DataChangeType.REMOVE_ALL){
clearSelection();
} else {
if (_local4 == DataChangeType.REPLACE){
} else {
selectedItems = preChangeItems;
preChangeItems = null;
};
};
};
};
};
};
invalidate(InvalidationType.DATA);
}
protected function _invalidateList():void{
availableCellRenderers = [];
while (activeCellRenderers.length > 0) {
list.removeChild((activeCellRenderers.pop() as DisplayObject));
};
}
protected function updateRendererStyles():void{
var _local1:Array;
var _local2:uint;
var _local3:uint;
var _local4:String;
_local1 = availableCellRenderers.concat(activeCellRenderers);
_local2 = _local1.length;
_local3 = 0;
while (_local3 < _local2) {
if (_local1[_local3].setStyle == null){
} else {
for (_local4 in updatedRendererStyles) {
_local1[_local3].setStyle(_local4, updatedRendererStyles[_local4]);
};
_local1[_local3].drawNow();
};
_local3++;
};
updatedRendererStyles = {};
}
public function set selectedItem(_arg1:Object):void{
var _local2:int;
_local2 = _dataProvider.getItemIndex(_arg1);
selectedIndex = _local2;
}
public function sortItems(... _args){
return (_dataProvider.sort.apply(_dataProvider, _args));
}
public function removeAll():void{
_dataProvider.removeAll();
}
protected function handleCellRendererChange(_arg1:Event):void{
var _local2:ICellRenderer;
var _local3:uint;
_local2 = (_arg1.currentTarget as ICellRenderer);
_local3 = _local2.listData.index;
_dataProvider.invalidateItemAt(_local3);
}
protected function moveSelectionVertically(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{
}
override protected function setHorizontalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
var _local3:Number;
if (_arg1 == _horizontalScrollPosition){
return;
};
_local3 = (_arg1 - _horizontalScrollPosition);
_horizontalScrollPosition = _arg1;
if (_arg2){
dispatchEvent(new ScrollEvent(ScrollBarDirection.HORIZONTAL, _local3, _arg1));
};
}
public function scrollToSelected():void{
scrollToIndex(selectedIndex);
}
public function invalidateItem(_arg1:Object):void{
if (renderedItems[_arg1] == null){
return;
};
invalidItems[_arg1] = true;
invalidate(InvalidationType.DATA);
}
protected function handleCellRendererClick(_arg1:MouseEvent):void{
var _local2:ICellRenderer;
var _local3:uint;
var _local4:int;
var _local5:int;
var _local6:uint;
if (!_enabled){
return;
};
_local2 = (_arg1.currentTarget as ICellRenderer);
_local3 = _local2.listData.index;
if (((!(dispatchEvent(new ListEvent(ListEvent.ITEM_CLICK, false, true, _local2.listData.column, _local2.listData.row, _local3, _local2.data)))) || (!(_selectable)))){
return;
};
_local4 = selectedIndices.indexOf(_local3);
if (!_allowMultipleSelection){
if (_local4 != -1){
return;
};
_local2.selected = true;
_selectedIndices = [_local3];
lastCaretIndex = (caretIndex = _local3);
} else {
if (_arg1.shiftKey){
_local6 = ((_selectedIndices.length)>0) ? _selectedIndices[0] : _local3;
_selectedIndices = [];
if (_local6 > _local3){
_local5 = _local6;
while (_local5 >= _local3) {
_selectedIndices.push(_local5);
_local5--;
};
} else {
_local5 = _local6;
while (_local5 <= _local3) {
_selectedIndices.push(_local5);
_local5++;
};
};
caretIndex = _local3;
} else {
if (_arg1.ctrlKey){
if (_local4 != -1){
_local2.selected = false;
_selectedIndices.splice(_local4, 1);
} else {
_local2.selected = true;
_selectedIndices.push(_local3);
};
caretIndex = _local3;
} else {
_selectedIndices = [_local3];
lastCaretIndex = (caretIndex = _local3);
};
};
};
dispatchEvent(new Event(Event.CHANGE));
invalidate(InvalidationType.DATA);
}
public function get length():uint{
return (_dataProvider.length);
}
public function get allowMultipleSelection():Boolean{
return (_allowMultipleSelection);
}
protected function onPreChange(_arg1:DataChangeEvent):void{
switch (_arg1.changeType){
case DataChangeType.REMOVE:
case DataChangeType.ADD:
case DataChangeType.INVALIDATE:
case DataChangeType.REMOVE_ALL:
case DataChangeType.REPLACE:
case DataChangeType.INVALIDATE_ALL:
break;
default:
preChangeItems = selectedItems;
break;
};
}
public function getRendererStyle(_arg1:String, _arg2:int=-1):Object{
return (rendererStyles[_arg1]);
}
override protected function setVerticalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
var _local3:Number;
if (_arg1 == _verticalScrollPosition){
return;
};
_local3 = (_arg1 - _verticalScrollPosition);
_verticalScrollPosition = _arg1;
if (_arg2){
dispatchEvent(new ScrollEvent(ScrollBarDirection.VERTICAL, _local3, _arg1));
};
}
protected function moveSelectionHorizontally(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{
}
public function set selectedIndices(_arg1:Array):void{
if (!_selectable){
return;
};
_selectedIndices = ((_arg1)==null) ? [] : _arg1.concat();
invalidate(InvalidationType.SELECTED);
}
public function get selectedIndex():int{
return (((_selectedIndices.length)==0) ? -1 : _selectedIndices[(_selectedIndices.length - 1)]);
}
override protected function draw():void{
super.draw();
}
override protected function configUI():void{
super.configUI();
listHolder = new Sprite();
addChild(listHolder);
listHolder.scrollRect = contentScrollRect;
list = new Sprite();
listHolder.addChild(list);
}
public function addItem(_arg1:Object):void{
_dataProvider.addItem(_arg1);
invalidateList();
}
protected function handleCellRendererMouseEvent(_arg1:MouseEvent):void{
var _local2:ICellRenderer;
var _local3:String;
_local2 = (_arg1.target as ICellRenderer);
_local3 = ((_arg1.type)==MouseEvent.ROLL_OVER) ? ListEvent.ITEM_ROLL_OVER : ListEvent.ITEM_ROLL_OUT;
dispatchEvent(new ListEvent(_local3, false, false, _local2.listData.column, _local2.listData.row, _local2.listData.index, _local2.data));
}
public function clearRendererStyle(_arg1:String, _arg2:int=-1):void{
delete rendererStyles[_arg1];
updatedRendererStyles[_arg1] = null;
invalidate(InvalidationType.RENDERER_STYLES);
}
protected function handleCellRendererDoubleClick(_arg1:MouseEvent):void{
var _local2:ICellRenderer;
var _local3:uint;
if (!_enabled){
return;
};
_local2 = (_arg1.currentTarget as ICellRenderer);
_local3 = _local2.listData.index;
dispatchEvent(new ListEvent(ListEvent.ITEM_DOUBLE_CLICK, false, true, _local2.listData.column, _local2.listData.row, _local3, _local2.data));
}
public function get rowCount():uint{
return (0);
}
public function isItemSelected(_arg1:Object):Boolean{
return ((selectedItems.indexOf(_arg1) > -1));
}
public function set dataProvider(_arg1:DataProvider):void{
if (_dataProvider != null){
_dataProvider.removeEventListener(DataChangeEvent.DATA_CHANGE, handleDataChange);
_dataProvider.removeEventListener(DataChangeEvent.PRE_DATA_CHANGE, onPreChange);
};
_dataProvider = _arg1;
_dataProvider.addEventListener(DataChangeEvent.DATA_CHANGE, handleDataChange, false, 0, true);
_dataProvider.addEventListener(DataChangeEvent.PRE_DATA_CHANGE, onPreChange, false, 0, true);
clearSelection();
invalidateList();
}
override protected function drawLayout():void{
super.drawLayout();
contentScrollRect = listHolder.scrollRect;
contentScrollRect.width = availableWidth;
contentScrollRect.height = availableHeight;
listHolder.scrollRect = contentScrollRect;
}
public function getItemAt(_arg1:uint):Object{
return (_dataProvider.getItemAt(_arg1));
}
override protected function initializeAccessibility():void{
if (SelectableList.createAccessibilityImplementation != null){
SelectableList.createAccessibilityImplementation(this);
};
}
public function scrollToIndex(_arg1:int):void{
}
public function removeItem(_arg1:Object):Object{
return (_dataProvider.removeItem(_arg1));
}
public function get dataProvider():DataProvider{
return (_dataProvider);
}
public function set maxHorizontalScrollPosition(_arg1:Number):void{
_maxHorizontalScrollPosition = _arg1;
invalidate(InvalidationType.SIZE);
}
public function setRendererStyle(_arg1:String, _arg2:Object, _arg3:uint=0):void{
if (rendererStyles[_arg1] == _arg2){
return;
};
updatedRendererStyles[_arg1] = _arg2;
rendererStyles[_arg1] = _arg2;
invalidate(InvalidationType.RENDERER_STYLES);
}
public function invalidateItemAt(_arg1:uint):void{
var _local2:Object;
_local2 = _dataProvider.getItemAt(_arg1);
if (_local2 != null){
invalidateItem(_local2);
};
}
public function set selectedItems(_arg1:Array):void{
var _local2:Array;
var _local3:uint;
var _local4:int;
if (_arg1 == null){
selectedIndices = null;
return;
};
_local2 = [];
_local3 = 0;
while (_local3 < _arg1.length) {
_local4 = _dataProvider.getItemIndex(_arg1[_local3]);
if (_local4 != -1){
_local2.push(_local4);
};
_local3++;
};
selectedIndices = _local2;
}
public function clearSelection():void{
selectedIndex = -1;
}
override public function get maxHorizontalScrollPosition():Number{
return (_maxHorizontalScrollPosition);
}
public function get selectedItems():Array{
var _local1:Array;
var _local2:uint;
_local1 = [];
_local2 = 0;
while (_local2 < _selectedIndices.length) {
_local1.push(_dataProvider.getItemAt(_selectedIndices[_local2]));
_local2++;
};
return (_local1);
}
public function set selectedIndex(_arg1:int):void{
selectedIndices = ((_arg1)==-1) ? null : [_arg1];
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, BaseScrollPane.getStyleDefinition()));
}
}
}//package fl.controls
Section 75
//Slider (fl.controls.Slider)
package fl.controls {
import fl.core.*;
import flash.display.*;
import flash.events.*;
import fl.managers.*;
import fl.events.*;
import flash.ui.*;
public class Slider extends UIComponent implements IFocusManagerComponent {
protected var _direction:String;
protected var _liveDragging:Boolean;// = false
protected var _value:Number;// = 0
protected var _snapInterval:Number;// = 0
protected var _minimum:Number;// = 0
protected var _maximum:Number;// = 10
protected var track:BaseButton;
protected var _tickInterval:Number;// = 0
protected var tickContainer:Sprite;
protected var thumb:BaseButton;
protected static const TICK_STYLES:Object = {upSkin:"tickSkin"};
protected static const TRACK_STYLES:Object = {upSkin:"sliderTrackSkin", overSkin:"sliderTrackSkin", downSkin:"sliderTrackSkin", disabledSkin:"sliderTrackDisabledSkin"};
protected static const THUMB_STYLES:Object = {upSkin:"thumbUpSkin", overSkin:"thumbOverSkin", downSkin:"thumbDownSkin", disabledSkin:"thumbDisabledSkin"};
protected static var defaultStyles:Object = {thumbUpSkin:"SliderThumb_upSkin", thumbOverSkin:"SliderThumb_overSkin", thumbDownSkin:"SliderThumb_downSkin", thumbDisabledSkin:"SliderThumb_disabledSkin", sliderTrackSkin:"SliderTrack_skin", sliderTrackDisabledSkin:"SliderTrack_disabledSkin", tickSkin:"SliderTick_skin", focusRectSkin:null, focusRectPadding:null};
public function Slider(){
_direction = SliderDirection.HORIZONTAL;
_minimum = 0;
_maximum = 10;
_value = 0;
_tickInterval = 0;
_snapInterval = 0;
_liveDragging = false;
super();
setStyles();
}
public function get minimum():Number{
return (_minimum);
}
public function set minimum(_arg1:Number):void{
_minimum = _arg1;
this.value = Math.max(_arg1, this.value);
invalidate(InvalidationType.DATA);
}
public function get maximum():Number{
return (_maximum);
}
protected function positionThumb():void{
thumb.x = ((((_direction)==SliderDirection.VERTICAL) ? ((maximum - minimum) - value) : (value - minimum) / (maximum - minimum)) * _width);
}
protected function clearTicks():void{
if (((!(tickContainer)) || (!(tickContainer.parent)))){
return;
};
removeChild(tickContainer);
}
protected function onTrackClick(_arg1:MouseEvent):void{
calculateValue(track.mouseX, InteractionInputType.MOUSE, SliderEventClickTarget.TRACK);
if (!liveDragging){
dispatchEvent(new SliderEvent(SliderEvent.CHANGE, value, SliderEventClickTarget.TRACK, InteractionInputType.MOUSE));
};
}
public function set maximum(_arg1:Number):void{
_maximum = _arg1;
this.value = Math.min(_arg1, this.value);
invalidate(InvalidationType.DATA);
}
public function get liveDragging():Boolean{
return (_liveDragging);
}
protected function doDrag(_arg1:MouseEvent):void{
var _local2:Number;
var _local3:Number;
_local2 = (_width / snapInterval);
_local3 = track.mouseX;
calculateValue(_local3, InteractionInputType.MOUSE, SliderEventClickTarget.THUMB);
dispatchEvent(new SliderEvent(SliderEvent.THUMB_DRAG, value, SliderEventClickTarget.THUMB, InteractionInputType.MOUSE));
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
var _local2:uint;
var _local3:Number;
var _local4:Boolean;
if (!enabled){
return;
};
_local2 = ((snapInterval)>0) ? snapInterval : 1;
_local4 = (direction == SliderDirection.HORIZONTAL);
if ((((((_arg1.keyCode == Keyboard.DOWN)) && (!(_local4)))) || ((((_arg1.keyCode == Keyboard.LEFT)) && (_local4))))){
_local3 = (value - _local2);
} else {
if ((((((_arg1.keyCode == Keyboard.UP)) && (!(_local4)))) || ((((_arg1.keyCode == Keyboard.RIGHT)) && (_local4))))){
_local3 = (value + _local2);
} else {
if ((((((_arg1.keyCode == Keyboard.PAGE_DOWN)) && (!(_local4)))) || ((((_arg1.keyCode == Keyboard.HOME)) && (_local4))))){
_local3 = minimum;
} else {
if ((((((_arg1.keyCode == Keyboard.PAGE_UP)) && (!(_local4)))) || ((((_arg1.keyCode == Keyboard.END)) && (_local4))))){
_local3 = maximum;
};
};
};
};
if (!isNaN(_local3)){
_arg1.stopPropagation();
doSetValue(_local3, InteractionInputType.KEYBOARD, null, _arg1.keyCode);
};
}
override public function set enabled(_arg1:Boolean):void{
if (enabled == _arg1){
return;
};
super.enabled = _arg1;
track.enabled = (thumb.enabled = _arg1);
}
protected function thumbPressHandler(_arg1:MouseEvent):void{
stage.addEventListener(MouseEvent.MOUSE_MOVE, doDrag, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler, false, 0, true);
dispatchEvent(new SliderEvent(SliderEvent.THUMB_PRESS, value, InteractionInputType.MOUSE, SliderEventClickTarget.THUMB));
}
public function get snapInterval():Number{
return (_snapInterval);
}
protected function thumbReleaseHandler(_arg1:MouseEvent):void{
stage.removeEventListener(MouseEvent.MOUSE_MOVE, doDrag);
stage.removeEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler);
dispatchEvent(new SliderEvent(SliderEvent.THUMB_RELEASE, value, InteractionInputType.MOUSE, SliderEventClickTarget.THUMB));
dispatchEvent(new SliderEvent(SliderEvent.CHANGE, value, SliderEventClickTarget.THUMB, InteractionInputType.MOUSE));
}
public function set liveDragging(_arg1:Boolean):void{
_liveDragging = _arg1;
}
public function set value(_arg1:Number):void{
doSetValue(_arg1);
}
public function set direction(_arg1:String):void{
var _local2:Boolean;
_direction = _arg1;
_local2 = (_direction == SliderDirection.VERTICAL);
if (isLivePreview){
if (_local2){
setScaleY(-1);
y = track.height;
} else {
setScaleY(1);
y = 0;
};
positionThumb();
return;
};
if (((_local2) && (componentInspectorSetting))){
if ((rotation % 90) == 0){
setScaleY(-1);
};
};
if (!componentInspectorSetting){
rotation = (_local2) ? 90 : 0;
};
}
public function set tickInterval(_arg1:Number):void{
_tickInterval = _arg1;
invalidate(InvalidationType.SIZE);
}
override public function get enabled():Boolean{
return (super.enabled);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES)){
setStyles();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
track.setSize(_width, track.height);
track.drawNow();
thumb.drawNow();
};
if (tickInterval > 0){
drawTicks();
} else {
clearTicks();
};
positionThumb();
super.draw();
}
override protected function configUI():void{
super.configUI();
thumb = new BaseButton();
thumb.setSize(13, 13);
thumb.autoRepeat = false;
addChild(thumb);
thumb.addEventListener(MouseEvent.MOUSE_DOWN, thumbPressHandler, false, 0, true);
track = new BaseButton();
track.move(0, 0);
track.setSize(80, 4);
track.autoRepeat = false;
track.useHandCursor = false;
track.addEventListener(MouseEvent.CLICK, onTrackClick, false, 0, true);
addChildAt(track, 0);
}
public function set snapInterval(_arg1:Number):void{
_snapInterval = _arg1;
}
public function get value():Number{
return (_value);
}
public function get direction():String{
return (_direction);
}
public function get tickInterval():Number{
return (_tickInterval);
}
override public function setSize(_arg1:Number, _arg2:Number):void{
if ((((_direction == SliderDirection.VERTICAL)) && (!(isLivePreview)))){
super.setSize(_arg2, _arg1);
} else {
super.setSize(_arg1, _arg2);
};
invalidate(InvalidationType.SIZE);
}
protected function drawTicks():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:uint;
var _local5:DisplayObject;
clearTicks();
tickContainer = new Sprite();
_local1 = ((maximum)<1) ? (tickInterval / 100) : tickInterval;
_local2 = ((maximum - minimum) / _local1);
_local3 = (_width / _local2);
_local4 = 0;
while (_local4 <= _local2) {
_local5 = getDisplayObjectInstance(getStyleValue("tickSkin"));
_local5.x = (_local3 * _local4);
_local5.y = ((track.y - _local5.height) - 2);
tickContainer.addChild(_local5);
_local4++;
};
addChild(tickContainer);
}
protected function calculateValue(_arg1:Number, _arg2:String, _arg3:String, _arg4:int=undefined):void{
var _local5:Number;
_local5 = ((_arg1 / _width) * (maximum - minimum));
if (_direction == SliderDirection.VERTICAL){
_local5 = (maximum - _local5);
} else {
_local5 = (minimum + _local5);
};
doSetValue(_local5, _arg2, _arg3, _arg4);
}
protected function getPrecision(_arg1:Number):Number{
var _local2:String;
_local2 = _arg1.toString();
if (_local2.indexOf(".") == -1){
return (0);
};
return (_local2.split(".").pop().length);
}
protected function doSetValue(_arg1:Number, _arg2:String=null, _arg3:String=null, _arg4:int=undefined):void{
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
_local5 = _value;
if (((!((_snapInterval == 0))) && (!((_snapInterval == 1))))){
_local6 = Math.pow(10, getPrecision(snapInterval));
_local7 = (_snapInterval * _local6);
_local8 = Math.round((_arg1 * _local6));
_local9 = (Math.round((_local8 / _local7)) * _local7);
_arg1 = (_local9 / _local6);
_value = Math.max(minimum, Math.min(maximum, _arg1));
} else {
_value = Math.max(minimum, Math.min(maximum, Math.round(_arg1)));
};
if (((!((_local5 == _value))) && (((((liveDragging) && (!((_arg3 == null))))) || ((_arg2 == InteractionInputType.KEYBOARD)))))){
dispatchEvent(new SliderEvent(SliderEvent.CHANGE, value, _arg3, _arg2, _arg4));
};
positionThumb();
}
protected function setStyles():void{
copyStylesToChild(thumb, THUMB_STYLES);
copyStylesToChild(track, TRACK_STYLES);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 76
//SliderDirection (fl.controls.SliderDirection)
package fl.controls {
public class SliderDirection {
public static var HORIZONTAL:String = "horizontal";
public static var VERTICAL:String = "vertical";
}
}//package fl.controls
Section 77
//TextInput (fl.controls.TextInput)
package fl.controls {
import fl.core.*;
import flash.display.*;
import flash.events.*;
import fl.managers.*;
import fl.events.*;
import flash.text.*;
import flash.ui.*;
public class TextInput extends UIComponent implements IFocusManagerComponent {
protected var _html:Boolean;// = false
protected var _savedHTML:String;
protected var background:DisplayObject;
protected var _editable:Boolean;// = true
public var textField:TextField;
private static var defaultStyles:Object = {upSkin:"TextInput_upSkin", disabledSkin:"TextInput_disabledSkin", focusRectSkin:null, focusRectPadding:null, textFormat:null, disabledTextFormat:null, textPadding:0, embedFonts:false};
public static var createAccessibilityImplementation:Function;
public function TextInput(){
_editable = true;
_html = false;
super();
}
override public function drawFocus(_arg1:Boolean):void{
if (focusTarget != null){
focusTarget.drawFocus(_arg1);
return;
};
super.drawFocus(_arg1);
}
public function set imeMode(_arg1:String):void{
_imeMode = _arg1;
}
override protected function isOurFocus(_arg1:DisplayObject):Boolean{
return ((((_arg1 == textField)) || (super.isOurFocus(_arg1))));
}
protected function handleKeyDown(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.ENTER){
dispatchEvent(new ComponentEvent(ComponentEvent.ENTER, true));
};
}
public function set text(_arg1:String):void{
textField.text = _arg1;
_html = false;
invalidate(InvalidationType.DATA);
invalidate(InvalidationType.STYLES);
}
protected function updateTextFieldType():void{
textField.type = (((enabled) && (editable))) ? TextFieldType.INPUT : TextFieldType.DYNAMIC;
textField.selectable = enabled;
}
public function get selectionEndIndex():int{
return (textField.selectionEndIndex);
}
public function get editable():Boolean{
return (_editable);
}
override protected function focusInHandler(_arg1:FocusEvent):void{
var _local2:IFocusManager;
if (_arg1.target == this){
stage.focus = textField;
};
_local2 = focusManager;
if (((editable) && (_local2))){
_local2.showFocusIndicator = true;
if (((textField.selectable) && ((textField.selectionBeginIndex == textField.selectionBeginIndex)))){
setSelection(0, textField.length);
};
};
super.focusInHandler(_arg1);
if (editable){
setIMEMode(true);
};
}
public function get selectionBeginIndex():int{
return (textField.selectionBeginIndex);
}
public function set alwaysShowSelection(_arg1:Boolean):void{
textField.alwaysShowSelection = _arg1;
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
updateTextFieldType();
}
protected function setEmbedFont(){
var _local1:Object;
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
}
public function get horizontalScrollPosition():int{
return (textField.scrollH);
}
public function set condenseWhite(_arg1:Boolean):void{
textField.condenseWhite = _arg1;
}
public function set displayAsPassword(_arg1:Boolean):void{
textField.displayAsPassword = _arg1;
}
public function set horizontalScrollPosition(_arg1:int):void{
textField.scrollH = _arg1;
}
public function get restrict():String{
return (textField.restrict);
}
public function get textWidth():Number{
return (textField.textWidth);
}
public function get textHeight():Number{
return (textField.textHeight);
}
public function set editable(_arg1:Boolean):void{
_editable = _arg1;
updateTextFieldType();
}
public function get maxChars():int{
return (textField.maxChars);
}
public function get length():int{
return (textField.length);
}
public function getLineMetrics(_arg1:int):TextLineMetrics{
return (textField.getLineMetrics(_arg1));
}
public function get imeMode():String{
return (_imeMode);
}
override protected function focusOutHandler(_arg1:FocusEvent):void{
super.focusOutHandler(_arg1);
if (editable){
setIMEMode(false);
};
}
public function set htmlText(_arg1:String):void{
if (_arg1 == ""){
text = "";
return;
};
_html = true;
_savedHTML = _arg1;
textField.htmlText = _arg1;
invalidate(InvalidationType.DATA);
invalidate(InvalidationType.STYLES);
}
public function get text():String{
return (textField.text);
}
override public function get enabled():Boolean{
return (super.enabled);
}
public function get condenseWhite():Boolean{
return (textField.condenseWhite);
}
public function get alwaysShowSelection():Boolean{
return (textField.alwaysShowSelection);
}
override protected function draw():void{
var _local1:Object;
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawTextFormat();
drawBackground();
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
super.draw();
}
protected function handleTextInput(_arg1:TextEvent):void{
_arg1.stopPropagation();
dispatchEvent(new TextEvent(TextEvent.TEXT_INPUT, true, false, _arg1.text));
}
override protected function configUI():void{
super.configUI();
tabChildren = true;
textField = new TextField();
addChild(textField);
updateTextFieldType();
textField.addEventListener(TextEvent.TEXT_INPUT, handleTextInput, false, 0, true);
textField.addEventListener(Event.CHANGE, handleChange, false, 0, true);
textField.addEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown, false, 0, true);
}
public function setSelection(_arg1:int, _arg2:int):void{
textField.setSelection(_arg1, _arg2);
}
public function get displayAsPassword():Boolean{
return (textField.displayAsPassword);
}
public function appendText(_arg1:String):void{
textField.appendText(_arg1);
}
public function set restrict(_arg1:String):void{
if (((componentInspectorSetting) && ((_arg1 == "")))){
_arg1 = null;
};
textField.restrict = _arg1;
}
public function get htmlText():String{
return (textField.htmlText);
}
protected function drawBackground():void{
var _local1:DisplayObject;
var _local2:String;
_local1 = background;
_local2 = (enabled) ? "upSkin" : "disabledSkin";
background = getDisplayObjectInstance(getStyleValue(_local2));
if (background == null){
return;
};
addChildAt(background, 0);
if (((((!((_local1 == null))) && (!((_local1 == background))))) && (contains(_local1)))){
removeChild(_local1);
};
}
override public function setFocus():void{
stage.focus = textField;
}
protected function drawLayout():void{
var _local1:Number;
_local1 = Number(getStyleValue("textPadding"));
if (background != null){
background.width = width;
background.height = height;
};
textField.width = (width - (2 * _local1));
textField.height = (height - (2 * _local1));
textField.x = (textField.y = _local1);
}
public function set maxChars(_arg1:int):void{
textField.maxChars = _arg1;
}
public function get maxHorizontalScrollPosition():int{
return (textField.maxScrollH);
}
protected function drawTextFormat():void{
var _local1:Object;
var _local2:TextFormat;
var _local3:TextFormat;
_local1 = UIComponent.getStyleDefinition();
_local2 = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat);
textField.setTextFormat(_local2);
_local3 = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat);
if (_local3 != null){
textField.setTextFormat(_local3);
} else {
_local3 = _local2;
};
textField.defaultTextFormat = _local3;
setEmbedFont();
if (_html){
textField.htmlText = _savedHTML;
};
}
protected function handleChange(_arg1:Event):void{
_arg1.stopPropagation();
dispatchEvent(new Event(Event.CHANGE, true));
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 78
//ComponentShim (fl.core.ComponentShim)
package fl.core {
import flash.display.*;
public dynamic class ComponentShim extends MovieClip {
}
}//package fl.core
Section 79
//InvalidationType (fl.core.InvalidationType)
package fl.core {
public class InvalidationType {
public static const SIZE:String = "size";
public static const ALL:String = "all";
public static const DATA:String = "data";
public static const SCROLL:String = "scroll";
public static const STATE:String = "state";
public static const STYLES:String = "styles";
public static const SELECTED:String = "selected";
public static const RENDERER_STYLES:String = "rendererStyles";
}
}//package fl.core
Section 80
//UIComponent (fl.core.UIComponent)
package fl.core {
import flash.display.*;
import flash.events.*;
import fl.managers.*;
import fl.events.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
public class UIComponent extends Sprite {
protected var _enabled:Boolean;// = true
private var _mouseFocusEnabled:Boolean;// = true
protected var startHeight:Number;
protected var _height:Number;
protected var _oldIMEMode:String;// = null
protected var startWidth:Number;
public var focusTarget:IFocusManagerComponent;
protected var errorCaught:Boolean;// = false
protected var uiFocusRect:DisplayObject;
protected var _width:Number;
public var version:String;// = "3.0.0.15"
protected var isFocused:Boolean;// = false
protected var callLaterMethods:Dictionary;
private var _focusEnabled:Boolean;// = true
private var tempText:TextField;
protected var invalidateFlag:Boolean;// = false
protected var _inspector:Boolean;// = false
protected var sharedStyles:Object;
protected var invalidHash:Object;
protected var isLivePreview:Boolean;// = false
protected var _imeMode:String;// = null
protected var instanceStyles:Object;
protected var _x:Number;
protected var _y:Number;
public static var inCallLaterPhase:Boolean = false;
private static var defaultStyles:Object = {focusRectSkin:"focusRectSkin", focusRectPadding:2, textFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), disabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultTextFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultDisabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0)};
public static var createAccessibilityImplementation:Function;
private static var focusManagers:Dictionary = new Dictionary(false);
public function UIComponent(){
version = "3.0.0.15";
isLivePreview = false;
invalidateFlag = false;
_enabled = true;
isFocused = false;
_focusEnabled = true;
_mouseFocusEnabled = true;
_imeMode = null;
_oldIMEMode = null;
errorCaught = false;
_inspector = false;
super();
instanceStyles = {};
sharedStyles = {};
invalidHash = {};
callLaterMethods = new Dictionary();
StyleManager.registerInstance(this);
configUI();
invalidate(InvalidationType.ALL);
tabEnabled = (this is IFocusManagerComponent);
focusRect = false;
if (tabEnabled){
addEventListener(FocusEvent.FOCUS_IN, focusInHandler);
addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler);
addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
addEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
};
initializeFocusManager();
addEventListener(Event.ENTER_FRAME, hookAccessibility, false, 0, true);
}
public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
isFocused = _arg1;
if (((!((uiFocusRect == null))) && (contains(uiFocusRect)))){
removeChild(uiFocusRect);
uiFocusRect = null;
};
if (_arg1){
uiFocusRect = (getDisplayObjectInstance(getStyleValue("focusRectSkin")) as Sprite);
if (uiFocusRect == null){
return;
};
_local2 = Number(getStyleValue("focusRectPadding"));
uiFocusRect.x = -(_local2);
uiFocusRect.y = -(_local2);
uiFocusRect.width = (width + (_local2 * 2));
uiFocusRect.height = (height + (_local2 * 2));
addChildAt(uiFocusRect, 0);
};
}
private function callLaterDispatcher(_arg1:Event):void{
var _local2:Dictionary;
var _local3:Object;
if (_arg1.type == Event.ADDED_TO_STAGE){
removeEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher);
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
return;
};
_arg1.target.removeEventListener(Event.RENDER, callLaterDispatcher);
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
return;
};
inCallLaterPhase = true;
_local2 = callLaterMethods;
for (_local3 in _local2) {
_local3();
delete _local2[_local3];
};
inCallLaterPhase = false;
}
private function addedHandler(_arg1:Event):void{
removeEventListener("addedToStage", addedHandler);
initializeFocusManager();
}
protected function getStyleValue(_arg1:String):Object{
return (((instanceStyles[_arg1])==null) ? sharedStyles[_arg1] : instanceStyles[_arg1]);
}
protected function isOurFocus(_arg1:DisplayObject):Boolean{
return ((_arg1 == this));
}
override public function get scaleX():Number{
return ((width / startWidth));
}
override public function get scaleY():Number{
return ((height / startHeight));
}
override public function set height(_arg1:Number):void{
if (_height == _arg1){
return;
};
setSize(width, _arg1);
}
protected function keyDownHandler(_arg1:KeyboardEvent):void{
}
protected function focusInHandler(_arg1:FocusEvent):void{
var _local2:IFocusManager;
if (isOurFocus((_arg1.target as DisplayObject))){
_local2 = focusManager;
if (((_local2) && (_local2.showFocusIndicator))){
drawFocus(true);
isFocused = true;
};
};
}
public function setStyle(_arg1:String, _arg2:Object):void{
if ((((instanceStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
instanceStyles[_arg1] = _arg2;
invalidate(InvalidationType.STYLES);
}
override public function get visible():Boolean{
return (super.visible);
}
public function get componentInspectorSetting():Boolean{
return (_inspector);
}
override public function get x():Number{
return ((isNaN(_x)) ? super.x : _x);
}
override public function get y():Number{
return ((isNaN(_y)) ? super.y : _y);
}
protected function setIMEMode(_arg1:Boolean){
var enabled = _arg1;
if (_imeMode != null){
if (enabled){
IME.enabled = true;
_oldIMEMode = IME.conversionMode;
try {
if (((!(errorCaught)) && (!((IME.conversionMode == IMEConversionMode.UNKNOWN))))){
IME.conversionMode = _imeMode;
};
errorCaught = false;
} catch(e:Error) {
errorCaught = true;
throw (new Error(("IME mode not supported: " + _imeMode)));
};
} else {
if (((!((IME.conversionMode == IMEConversionMode.UNKNOWN))) && (!((_oldIMEMode == IMEConversionMode.UNKNOWN))))){
IME.conversionMode = _oldIMEMode;
};
IME.enabled = false;
};
};
}
public function set enabled(_arg1:Boolean):void{
if (_arg1 == _enabled){
return;
};
_enabled = _arg1;
invalidate(InvalidationType.STATE);
}
public function setSharedStyle(_arg1:String, _arg2:Object):void{
if ((((sharedStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
sharedStyles[_arg1] = _arg2;
if (instanceStyles[_arg1] == null){
invalidate(InvalidationType.STYLES);
};
}
protected function keyUpHandler(_arg1:KeyboardEvent):void{
}
public function set focusEnabled(_arg1:Boolean):void{
_focusEnabled = _arg1;
}
override public function set scaleX(_arg1:Number):void{
setSize((startWidth * _arg1), height);
}
public function get mouseFocusEnabled():Boolean{
return (_mouseFocusEnabled);
}
override public function set scaleY(_arg1:Number):void{
setSize(width, (startHeight * _arg1));
}
protected function getDisplayObjectInstance(_arg1:Object):DisplayObject{
var classDef:Object;
var skin = _arg1;
classDef = null;
if ((skin is Class)){
return ((new (skin) as DisplayObject));
};
if ((skin is DisplayObject)){
(skin as DisplayObject).x = 0;
(skin as DisplayObject).y = 0;
return ((skin as DisplayObject));
};
try {
classDef = getDefinitionByName(skin.toString());
} catch(e:Error) {
try {
classDef = (loaderInfo.applicationDomain.getDefinition(skin.toString()) as Object);
} catch(e:Error) {
};
};
if (classDef == null){
return (null);
};
return ((new (classDef) as DisplayObject));
}
protected function copyStylesToChild(_arg1:UIComponent, _arg2:Object):void{
var _local3:String;
for (_local3 in _arg2) {
_arg1.setStyle(_local3, getStyleValue(_arg2[_local3]));
};
}
protected function beforeComponentParameters():void{
}
protected function callLater(_arg1:Function):void{
if (inCallLaterPhase){
return;
};
callLaterMethods[_arg1] = true;
if (stage != null){
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
} else {
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
};
}
protected function createFocusManager():void{
if (focusManagers[stage] == null){
focusManagers[stage] = new FocusManager(stage);
};
}
override public function set visible(_arg1:Boolean):void{
var _local2:String;
if (super.visible == _arg1){
return;
};
super.visible = _arg1;
_local2 = (_arg1) ? ComponentEvent.SHOW : ComponentEvent.HIDE;
dispatchEvent(new ComponentEvent(_local2, true));
}
protected function hookAccessibility(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, hookAccessibility);
initializeAccessibility();
}
public function set componentInspectorSetting(_arg1:Boolean):void{
_inspector = _arg1;
if (_inspector){
beforeComponentParameters();
} else {
afterComponentParameters();
};
}
override public function set x(_arg1:Number):void{
move(_arg1, _y);
}
public function drawNow():void{
draw();
}
override public function set y(_arg1:Number):void{
move(_x, _arg1);
}
protected function checkLivePreview():Boolean{
var className:String;
if (parent == null){
return (false);
};
try {
className = getQualifiedClassName(parent);
} catch(e:Error) {
};
return ((className == "fl.livepreview::LivePreviewParent"));
}
protected function focusOutHandler(_arg1:FocusEvent):void{
if (isOurFocus((_arg1.target as DisplayObject))){
drawFocus(false);
isFocused = false;
};
}
public function set mouseFocusEnabled(_arg1:Boolean):void{
_mouseFocusEnabled = _arg1;
}
public function getFocus():InteractiveObject{
if (stage){
return (stage.focus);
};
return (null);
}
protected function validate():void{
invalidHash = {};
}
override public function get height():Number{
return (_height);
}
public function invalidate(_arg1:String="all", _arg2:Boolean=true):void{
invalidHash[_arg1] = true;
if (_arg2){
this.callLater(draw);
};
}
public function get enabled():Boolean{
return (_enabled);
}
protected function getScaleX():Number{
return (super.scaleX);
}
protected function getScaleY():Number{
return (super.scaleY);
}
public function get focusEnabled():Boolean{
return (_focusEnabled);
}
protected function afterComponentParameters():void{
}
protected function draw():void{
if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){
if (((isFocused) && (focusManager.showFocusIndicator))){
drawFocus(true);
};
};
validate();
}
protected function configUI():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
isLivePreview = checkLivePreview();
_local1 = rotation;
rotation = 0;
_local2 = super.width;
_local3 = super.height;
var _local4 = 1;
super.scaleY = _local4;
super.scaleX = _local4;
setSize(_local2, _local3);
move(super.x, super.y);
rotation = _local1;
startWidth = _local2;
startHeight = _local3;
if (numChildren > 0){
removeChildAt(0);
};
}
protected function setScaleX(_arg1:Number):void{
super.scaleX = _arg1;
}
protected function setScaleY(_arg1:Number):void{
super.scaleY = _arg1;
}
private function initializeFocusManager():void{
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, addedHandler, false, 0, true);
} else {
createFocusManager();
};
}
public function set focusManager(_arg1:IFocusManager):void{
UIComponent.focusManagers[this] = _arg1;
}
public function clearStyle(_arg1:String):void{
setStyle(_arg1, null);
}
protected function isInvalid(_arg1:String, ... _args):Boolean{
if (((invalidHash[_arg1]) || (invalidHash[InvalidationType.ALL]))){
return (true);
};
while (_args.length > 0) {
if (invalidHash[_args.pop()]){
return (true);
};
};
return (false);
}
public function setSize(_arg1:Number, _arg2:Number):void{
_width = _arg1;
_height = _arg2;
invalidate(InvalidationType.SIZE);
dispatchEvent(new ComponentEvent(ComponentEvent.RESIZE, false));
}
override public function set width(_arg1:Number):void{
if (_width == _arg1){
return;
};
setSize(_arg1, height);
}
public function setFocus():void{
if (stage){
stage.focus = this;
};
}
protected function initializeAccessibility():void{
if (UIComponent.createAccessibilityImplementation != null){
UIComponent.createAccessibilityImplementation(this);
};
}
public function get focusManager():IFocusManager{
var _local1:DisplayObject;
_local1 = this;
while (_local1) {
if (UIComponent.focusManagers[_local1] != null){
return (IFocusManager(UIComponent.focusManagers[_local1]));
};
_local1 = _local1.parent;
};
return (null);
}
override public function get width():Number{
return (_width);
}
public function move(_arg1:Number, _arg2:Number):void{
_x = _arg1;
_y = _arg2;
super.x = Math.round(_arg1);
super.y = Math.round(_arg2);
dispatchEvent(new ComponentEvent(ComponentEvent.MOVE));
}
public function validateNow():void{
invalidate(InvalidationType.ALL, false);
draw();
}
public function getStyle(_arg1:String):Object{
return (instanceStyles[_arg1]);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
public static function mergeStyles(... _args):Object{
var _local2:Object;
var _local3:uint;
var _local4:uint;
var _local5:Object;
var _local6:String;
_local2 = {};
_local3 = _args.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = _args[_local4];
for (_local6 in _local5) {
if (_local2[_local6] != null){
} else {
_local2[_local6] = _args[_local4][_local6];
};
};
_local4++;
};
return (_local2);
}
}
}//package fl.core
Section 81
//DataProvider (fl.data.DataProvider)
package fl.data {
import flash.events.*;
import fl.events.*;
public class DataProvider extends EventDispatcher {
protected var data:Array;
public function DataProvider(_arg1:Object=null){
if (_arg1 == null){
data = [];
} else {
data = getDataFromObject(_arg1);
};
}
protected function dispatchPreChangeEvent(_arg1:String, _arg2:Array, _arg3:int, _arg4:int):void{
dispatchEvent(new DataChangeEvent(DataChangeEvent.PRE_DATA_CHANGE, _arg1, _arg2, _arg3, _arg4));
}
public function invalidateItemAt(_arg1:int):void{
checkIndex(_arg1, (data.length - 1));
dispatchChangeEvent(DataChangeType.INVALIDATE, [data[_arg1]], _arg1, _arg1);
}
public function getItemIndex(_arg1:Object):int{
return (data.indexOf(_arg1));
}
protected function getDataFromObject(_arg1:Object):Array{
var _local2:Array;
var _local3:Array;
var _local4:uint;
var _local5:Object;
var _local6:XML;
var _local7:XMLList;
var _local8:XML;
var _local9:XMLList;
var _local10:XML;
var _local11:XMLList;
var _local12:XML;
if ((_arg1 is Array)){
_local3 = (_arg1 as Array);
if (_local3.length > 0){
if ((((_local3[0] is String)) || ((_local3[0] is Number)))){
_local2 = [];
_local4 = 0;
while (_local4 < _local3.length) {
_local5 = {label:String(_local3[_local4]), data:_local3[_local4]};
_local2.push(_local5);
_local4++;
};
return (_local2);
};
};
return (_arg1.concat());
//unresolved jump
};
if ((_arg1 is DataProvider)){
return (_arg1.toArray());
};
if ((_arg1 is XML)){
_local6 = (_arg1 as XML);
_local2 = [];
_local7 = _local6.*;
for each (_local8 in _local7) {
_arg1 = {};
_local9 = _local8.attributes();
for each (_local10 in _local9) {
_arg1[_local10.localName()] = _local10.toString();
};
_local11 = _local8.*;
for each (_local12 in _local11) {
if (_local12.hasSimpleContent()){
_arg1[_local12.localName()] = _local12.toString();
};
};
_local2.push(_arg1);
};
return (_local2);
//unresolved jump
};
throw (new TypeError((("Error: Type Coercion failed: cannot convert " + _arg1) + " to Array or DataProvider.")));
}
public function removeItemAt(_arg1:uint):Object{
var _local2:Array;
checkIndex(_arg1, (data.length - 1));
dispatchPreChangeEvent(DataChangeType.REMOVE, data.slice(_arg1, (_arg1 + 1)), _arg1, _arg1);
_local2 = data.splice(_arg1, 1);
dispatchChangeEvent(DataChangeType.REMOVE, _local2, _arg1, _arg1);
return (_local2[0]);
}
public function addItem(_arg1:Object):void{
dispatchPreChangeEvent(DataChangeType.ADD, [_arg1], (data.length - 1), (data.length - 1));
data.push(_arg1);
dispatchChangeEvent(DataChangeType.ADD, [_arg1], (data.length - 1), (data.length - 1));
}
public function sortOn(_arg1:Object, _arg2:Object=null){
var _local3:Array;
dispatchPreChangeEvent(DataChangeType.SORT, data.concat(), 0, (data.length - 1));
_local3 = data.sortOn(_arg1, _arg2);
dispatchChangeEvent(DataChangeType.SORT, data.concat(), 0, (data.length - 1));
return (_local3);
}
public function sort(... _args){
var _local2:Array;
dispatchPreChangeEvent(DataChangeType.SORT, data.concat(), 0, (data.length - 1));
_local2 = data.sort.apply(data, _args);
dispatchChangeEvent(DataChangeType.SORT, data.concat(), 0, (data.length - 1));
return (_local2);
}
public function addItems(_arg1:Object):void{
addItemsAt(_arg1, data.length);
}
public function concat(_arg1:Object):void{
addItems(_arg1);
}
public function clone():DataProvider{
return (new DataProvider(data));
}
public function toArray():Array{
return (data.concat());
}
public function get length():uint{
return (data.length);
}
public function addItemAt(_arg1:Object, _arg2:uint):void{
checkIndex(_arg2, data.length);
dispatchPreChangeEvent(DataChangeType.ADD, [_arg1], _arg2, _arg2);
data.splice(_arg2, 0, _arg1);
dispatchChangeEvent(DataChangeType.ADD, [_arg1], _arg2, _arg2);
}
public function getItemAt(_arg1:uint):Object{
checkIndex(_arg1, (data.length - 1));
return (data[_arg1]);
}
override public function toString():String{
return ((("DataProvider [" + data.join(" , ")) + "]"));
}
public function invalidateItem(_arg1:Object):void{
var _local2:uint;
_local2 = getItemIndex(_arg1);
if (_local2 == -1){
return;
};
invalidateItemAt(_local2);
}
protected function dispatchChangeEvent(_arg1:String, _arg2:Array, _arg3:int, _arg4:int):void{
dispatchEvent(new DataChangeEvent(DataChangeEvent.DATA_CHANGE, _arg1, _arg2, _arg3, _arg4));
}
protected function checkIndex(_arg1:int, _arg2:int):void{
if ((((_arg1 > _arg2)) || ((_arg1 < 0)))){
throw (new RangeError((((("DataProvider index (" + _arg1) + ") is not in acceptable range (0 - ") + _arg2) + ")")));
};
}
public function addItemsAt(_arg1:Object, _arg2:uint):void{
var _local3:Array;
checkIndex(_arg2, data.length);
_local3 = getDataFromObject(_arg1);
dispatchPreChangeEvent(DataChangeType.ADD, _local3, _arg2, ((_arg2 + _local3.length) - 1));
data.splice.apply(data, [_arg2, 0].concat(_local3));
dispatchChangeEvent(DataChangeType.ADD, _local3, _arg2, ((_arg2 + _local3.length) - 1));
}
public function replaceItem(_arg1:Object, _arg2:Object):Object{
var _local3:int;
_local3 = getItemIndex(_arg2);
if (_local3 != -1){
return (replaceItemAt(_arg1, _local3));
};
return (null);
}
public function removeItem(_arg1:Object):Object{
var _local2:int;
_local2 = getItemIndex(_arg1);
if (_local2 != -1){
return (removeItemAt(_local2));
};
return (null);
}
public function merge(_arg1:Object):void{
var _local2:Array;
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:Object;
_local2 = getDataFromObject(_arg1);
_local3 = _local2.length;
_local4 = data.length;
dispatchPreChangeEvent(DataChangeType.ADD, data.slice(_local4, data.length), _local4, (this.data.length - 1));
_local5 = 0;
while (_local5 < _local3) {
_local6 = _local2[_local5];
if (getItemIndex(_local6) == -1){
data.push(_local6);
};
_local5++;
};
if (data.length > _local4){
dispatchChangeEvent(DataChangeType.ADD, data.slice(_local4, data.length), _local4, (this.data.length - 1));
} else {
dispatchChangeEvent(DataChangeType.ADD, [], -1, -1);
};
}
public function replaceItemAt(_arg1:Object, _arg2:uint):Object{
var _local3:Array;
checkIndex(_arg2, (data.length - 1));
_local3 = [data[_arg2]];
dispatchPreChangeEvent(DataChangeType.REPLACE, _local3, _arg2, _arg2);
data[_arg2] = _arg1;
dispatchChangeEvent(DataChangeType.REPLACE, _local3, _arg2, _arg2);
return (_local3[0]);
}
public function invalidate():void{
dispatchEvent(new DataChangeEvent(DataChangeEvent.DATA_CHANGE, DataChangeType.INVALIDATE_ALL, data.concat(), 0, data.length));
}
public function removeAll():void{
var _local1:Array;
_local1 = data.concat();
dispatchPreChangeEvent(DataChangeType.REMOVE_ALL, _local1, 0, _local1.length);
data = [];
dispatchChangeEvent(DataChangeType.REMOVE_ALL, _local1, 0, _local1.length);
}
}
}//package fl.data
Section 82
//SimpleCollectionItem (fl.data.SimpleCollectionItem)
package fl.data {
public dynamic class SimpleCollectionItem {
public var label:String;
public var data:String;
public function toString():String{
return ((((("[SimpleCollectionItem: " + label) + ",") + data) + "]"));
}
}
}//package fl.data
Section 83
//ComponentEvent (fl.events.ComponentEvent)
package fl.events {
import flash.events.*;
public class ComponentEvent extends Event {
public static const HIDE:String = "hide";
public static const BUTTON_DOWN:String = "buttonDown";
public static const MOVE:String = "move";
public static const RESIZE:String = "resize";
public static const ENTER:String = "enter";
public static const LABEL_CHANGE:String = "labelChange";
public static const SHOW:String = "show";
public function ComponentEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function toString():String{
return (formatToString("ComponentEvent", "type", "bubbles", "cancelable"));
}
override public function clone():Event{
return (new ComponentEvent(type, bubbles, cancelable));
}
}
}//package fl.events
Section 84
//DataChangeEvent (fl.events.DataChangeEvent)
package fl.events {
import flash.events.*;
public class DataChangeEvent extends Event {
protected var _items:Array;
protected var _endIndex:uint;
protected var _changeType:String;
protected var _startIndex:uint;
public static const PRE_DATA_CHANGE:String = "preDataChange";
public static const DATA_CHANGE:String = "dataChange";
public function DataChangeEvent(_arg1:String, _arg2:String, _arg3:Array, _arg4:int=-1, _arg5:int=-1):void{
super(_arg1);
_changeType = _arg2;
_startIndex = _arg4;
_items = _arg3;
_endIndex = ((_arg5)==-1) ? _startIndex : _arg5;
}
public function get changeType():String{
return (_changeType);
}
public function get startIndex():uint{
return (_startIndex);
}
public function get items():Array{
return (_items);
}
override public function clone():Event{
return (new DataChangeEvent(type, _changeType, _items, _startIndex, _endIndex));
}
override public function toString():String{
return (formatToString("DataChangeEvent", "type", "changeType", "startIndex", "endIndex", "bubbles", "cancelable"));
}
public function get endIndex():uint{
return (_endIndex);
}
}
}//package fl.events
Section 85
//DataChangeType (fl.events.DataChangeType)
package fl.events {
public class DataChangeType {
public static const ADD:String = "add";
public static const REMOVE:String = "remove";
public static const REMOVE_ALL:String = "removeAll";
public static const CHANGE:String = "change";
public static const REPLACE:String = "replace";
public static const INVALIDATE:String = "invalidate";
public static const INVALIDATE_ALL:String = "invalidateAll";
public static const SORT:String = "sort";
}
}//package fl.events
Section 86
//InteractionInputType (fl.events.InteractionInputType)
package fl.events {
public class InteractionInputType {
public static const MOUSE:String = "mouse";
public static const KEYBOARD:String = "keyboard";
}
}//package fl.events
Section 87
//ListEvent (fl.events.ListEvent)
package fl.events {
import flash.events.*;
public class ListEvent extends Event {
protected var _index:int;
protected var _item:Object;
protected var _columnIndex:int;
protected var _rowIndex:int;
public static const ITEM_DOUBLE_CLICK:String = "itemDoubleClick";
public static const ITEM_ROLL_OUT:String = "itemRollOut";
public static const ITEM_ROLL_OVER:String = "itemRollOver";
public static const ITEM_CLICK:String = "itemClick";
public function ListEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:int=-1, _arg5:int=-1, _arg6:int=-1, _arg7:Object=null){
super(_arg1, _arg2, _arg3);
_rowIndex = _arg5;
_columnIndex = _arg4;
_index = _arg6;
_item = _arg7;
}
public function get rowIndex():Object{
return (_rowIndex);
}
public function get index():int{
return (_index);
}
public function get item():Object{
return (_item);
}
public function get columnIndex():int{
return (_columnIndex);
}
override public function clone():Event{
return (new ListEvent(type, bubbles, cancelable, _columnIndex, _rowIndex));
}
override public function toString():String{
return (formatToString("ListEvent", "type", "bubbles", "cancelable", "columnIndex", "rowIndex", "index", "item"));
}
}
}//package fl.events
Section 88
//ScrollEvent (fl.events.ScrollEvent)
package fl.events {
import flash.events.*;
public class ScrollEvent extends Event {
private var _position:Number;
private var _direction:String;
private var _delta:Number;
public static const SCROLL:String = "scroll";
public function ScrollEvent(_arg1:String, _arg2:Number, _arg3:Number){
super(ScrollEvent.SCROLL, false, false);
_direction = _arg1;
_delta = _arg2;
_position = _arg3;
}
override public function clone():Event{
return (new ScrollEvent(_direction, _delta, _position));
}
public function get position():Number{
return (_position);
}
override public function toString():String{
return (formatToString("ScrollEvent", "type", "bubbles", "cancelable", "direction", "delta", "position"));
}
public function get delta():Number{
return (_delta);
}
public function get direction():String{
return (_direction);
}
}
}//package fl.events
Section 89
//SliderEvent (fl.events.SliderEvent)
package fl.events {
import flash.events.*;
public class SliderEvent extends Event {
protected var _triggerEvent:String;
protected var _keyCode:Number;
protected var _value:Number;
protected var _clickTarget:String;
public static const CHANGE:String = "change";
public static const THUMB_PRESS:String = "thumbPress";
public static const THUMB_DRAG:String = "thumbDrag";
public static const THUMB_RELEASE:String = "thumbRelease";
public function SliderEvent(_arg1:String, _arg2:Number, _arg3:String, _arg4:String, _arg5:int=0){
_value = _arg2;
_keyCode = _arg5;
_triggerEvent = _arg4;
_clickTarget = _arg3;
super(_arg1);
}
public function get clickTarget():String{
return (_clickTarget);
}
override public function clone():Event{
return (new SliderEvent(type, _value, _clickTarget, _triggerEvent, _keyCode));
}
override public function toString():String{
return (formatToString("SliderEvent", "type", "value", "bubbles", "cancelable", "keyCode", "triggerEvent", "clickTarget"));
}
public function get triggerEvent():String{
return (_triggerEvent);
}
public function get value():Number{
return (_value);
}
public function get keyCode():Number{
return (_keyCode);
}
}
}//package fl.events
Section 90
//SliderEventClickTarget (fl.events.SliderEventClickTarget)
package fl.events {
public class SliderEventClickTarget {
public static const TRACK:String = "track";
public static const THUMB:String = "thumb";
}
}//package fl.events
Section 91
//FocusManager (fl.managers.FocusManager)
package fl.managers {
import fl.core.*;
import fl.controls.*;
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.ui.*;
public class FocusManager implements IFocusManager {
private var focusableObjects:Dictionary;
private var _showFocusIndicator:Boolean;// = true
private var defButton:Button;
private var focusableCandidates:Array;
private var _form:DisplayObjectContainer;
private var _defaultButtonEnabled:Boolean;// = true
private var activated:Boolean;// = false
private var _defaultButton:Button;
private var calculateCandidates:Boolean;// = true
private var lastFocus:InteractiveObject;
private var lastAction:String;
public function FocusManager(_arg1:DisplayObjectContainer){
activated = false;
calculateCandidates = true;
_showFocusIndicator = true;
_defaultButtonEnabled = true;
super();
focusableObjects = new Dictionary(true);
if (_arg1 != null){
_form = _arg1;
addFocusables(DisplayObject(_arg1));
_arg1.addEventListener(Event.ADDED, addedHandler);
_arg1.addEventListener(Event.REMOVED, removedHandler);
activate();
};
}
public function get showFocusIndicator():Boolean{
return (_showFocusIndicator);
}
private function getIndexOfNextObject(_arg1:int, _arg2:Boolean, _arg3:Boolean, _arg4:String):int{
var _local5:int;
var _local6:int;
var _local7:DisplayObject;
var _local8:IFocusManagerGroup;
var _local9:int;
var _local10:DisplayObject;
var _local11:IFocusManagerGroup;
_local5 = focusableCandidates.length;
_local6 = _arg1;
while (true) {
if (_arg2){
_arg1--;
} else {
_arg1++;
};
if (_arg3){
if (((_arg2) && ((_arg1 < 0)))){
break;
};
if (((!(_arg2)) && ((_arg1 == _local5)))){
break;
};
} else {
_arg1 = ((_arg1 + _local5) % _local5);
if (_local6 == _arg1){
break;
};
};
if (isValidFocusCandidate(focusableCandidates[_arg1], _arg4)){
_local7 = DisplayObject(findFocusManagerComponent(focusableCandidates[_arg1]));
if ((_local7 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local7);
_local9 = 0;
while (_local9 < focusableCandidates.length) {
_local10 = focusableCandidates[_local9];
if ((_local10 is IFocusManagerGroup)){
_local11 = IFocusManagerGroup(_local10);
if ((((_local11.groupName == _local8.groupName)) && (_local11.selected))){
_arg1 = _local9;
break;
};
};
_local9++;
};
};
return (_arg1);
};
};
return (_arg1);
}
public function set form(_arg1:DisplayObjectContainer):void{
_form = _arg1;
}
private function addFocusables(_arg1:DisplayObject, _arg2:Boolean=false):void{
var focusable:IFocusManagerComponent;
var io:InteractiveObject;
var doc:DisplayObjectContainer;
var i:int;
var child:DisplayObject;
var o = _arg1;
var skipTopLevel = _arg2;
if (!skipTopLevel){
if ((o is IFocusManagerComponent)){
focusable = IFocusManagerComponent(o);
if (focusable.focusEnabled){
if (((focusable.tabEnabled) && (isTabVisible(o)))){
focusableObjects[o] = true;
calculateCandidates = true;
};
o.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
o.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
};
} else {
if ((o is InteractiveObject)){
io = (o as InteractiveObject);
if (((((io) && (io.tabEnabled))) && ((findFocusManagerComponent(io) == io)))){
focusableObjects[io] = true;
calculateCandidates = true;
};
io.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
io.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
};
};
};
if ((o is DisplayObjectContainer)){
doc = DisplayObjectContainer(o);
o.addEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler);
if ((((((doc is Stage)) || ((doc.parent is Stage)))) || (doc.tabChildren))){
i = 0;
while (i < doc.numChildren) {
try {
child = doc.getChildAt(i);
if (child != null){
addFocusables(doc.getChildAt(i));
};
} catch(error:SecurityError) {
};
i = (i + 1);
};
};
};
}
private function getChildIndex(_arg1:DisplayObjectContainer, _arg2:DisplayObject):int{
return (_arg1.getChildIndex(_arg2));
}
private function mouseFocusChangeHandler(_arg1:FocusEvent):void{
if ((_arg1.relatedObject is TextField)){
return;
};
_arg1.preventDefault();
}
private function focusOutHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
_local2 = (_arg1.target as InteractiveObject);
}
private function isValidFocusCandidate(_arg1:DisplayObject, _arg2:String):Boolean{
var _local3:IFocusManagerGroup;
if (!isEnabledAndVisible(_arg1)){
return (false);
};
if ((_arg1 is IFocusManagerGroup)){
_local3 = IFocusManagerGroup(_arg1);
if (_arg2 == _local3.groupName){
return (false);
};
};
return (true);
}
public function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject{
var _local2:InteractiveObject;
_local2 = _arg1;
while (_arg1) {
if ((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))){
return (_arg1);
};
_arg1 = _arg1.parent;
};
return (_local2);
}
private function sortFocusableObjectsTabIndex():void{
var _local1:Object;
var _local2:InteractiveObject;
focusableCandidates = [];
for (_local1 in focusableObjects) {
_local2 = InteractiveObject(_local1);
if (((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))){
focusableCandidates.push(_local2);
};
};
focusableCandidates.sort(sortByTabIndex);
}
private function removeFocusables(_arg1:DisplayObject):void{
var _local2:Object;
var _local3:DisplayObject;
if ((_arg1 is DisplayObjectContainer)){
_arg1.removeEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler);
_arg1.removeEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
for (_local2 in focusableObjects) {
_local3 = DisplayObject(_local2);
if (DisplayObjectContainer(_arg1).contains(_local3)){
if (_local3 == lastFocus){
lastFocus = null;
};
_local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
delete focusableObjects[_local2];
calculateCandidates = true;
};
};
};
}
private function addedHandler(_arg1:Event):void{
var _local2:DisplayObject;
_local2 = DisplayObject(_arg1.target);
if (_local2.stage){
addFocusables(DisplayObject(_arg1.target));
};
}
private function getTopLevelFocusTarget(_arg1:InteractiveObject):InteractiveObject{
while (_arg1 != InteractiveObject(form)) {
if ((((((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))) && (IFocusManagerComponent(_arg1).mouseFocusEnabled))) && (UIComponent(_arg1).enabled))){
return (_arg1);
};
_arg1 = _arg1.parent;
if (_arg1 == null){
break;
};
};
return (null);
}
private function tabChildrenChangeHandler(_arg1:Event):void{
var _local2:DisplayObjectContainer;
if (_arg1.target != _arg1.currentTarget){
return;
};
calculateCandidates = true;
_local2 = DisplayObjectContainer(_arg1.target);
if (_local2.tabChildren){
addFocusables(_local2, true);
} else {
removeFocusables(_local2);
};
}
public function sendDefaultButtonEvent():void{
defButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
}
public function getFocus():InteractiveObject{
var _local1:InteractiveObject;
_local1 = form.stage.focus;
return (findFocusManagerComponent(_local1));
}
private function isEnabledAndVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer;
var _local3:TextField;
var _local4:SimpleButton;
_local2 = DisplayObject(form).parent;
while (_arg1 != _local2) {
if ((_arg1 is UIComponent)){
if (!UIComponent(_arg1).enabled){
return (false);
};
} else {
if ((_arg1 is TextField)){
_local3 = TextField(_arg1);
if ((((_local3.type == TextFieldType.DYNAMIC)) || (!(_local3.selectable)))){
return (false);
};
} else {
if ((_arg1 is SimpleButton)){
_local4 = SimpleButton(_arg1);
if (!_local4.enabled){
return (false);
};
};
};
};
if (!_arg1.visible){
return (false);
};
_arg1 = _arg1.parent;
};
return (true);
}
public function set defaultButton(_arg1:Button):void{
var _local2:Button;
_local2 = (_arg1) ? Button(_arg1) : null;
if (_local2 != _defaultButton){
if (_defaultButton){
_defaultButton.emphasized = false;
};
if (defButton){
defButton.emphasized = false;
};
_defaultButton = _local2;
defButton = _local2;
if (_local2){
_local2.emphasized = true;
};
};
}
private function deactivateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
}
public function setFocus(_arg1:InteractiveObject):void{
if ((_arg1 is IFocusManagerComponent)){
IFocusManagerComponent(_arg1).setFocus();
} else {
form.stage.focus = _arg1;
};
}
private function setFocusToNextObject(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
if (!hasFocusableObjects()){
return;
};
_local2 = getNextFocusManagerComponent(_arg1.shiftKey);
if (_local2){
setFocus(_local2);
};
}
private function hasFocusableObjects():Boolean{
var _local1:Object;
for (_local1 in focusableObjects) {
return (true);
};
return (false);
}
private function tabIndexChangeHandler(_arg1:Event):void{
calculateCandidates = true;
}
private function sortFocusableObjects():void{
var _local1:Object;
var _local2:InteractiveObject;
focusableCandidates = [];
for (_local1 in focusableObjects) {
_local2 = InteractiveObject(_local1);
if (((((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))) && ((_local2.tabIndex > 0)))){
sortFocusableObjectsTabIndex();
return;
};
focusableCandidates.push(_local2);
};
focusableCandidates.sort(sortByDepth);
}
private function keyFocusChangeHandler(_arg1:FocusEvent):void{
showFocusIndicator = true;
if ((((((_arg1.keyCode == Keyboard.TAB)) || ((_arg1.keyCode == 0)))) && (!(_arg1.isDefaultPrevented())))){
setFocusToNextObject(_arg1);
_arg1.preventDefault();
};
}
private function getIndexOfFocusedObject(_arg1:DisplayObject):int{
var _local2:int;
var _local3:int;
_local2 = focusableCandidates.length;
_local3 = 0;
_local3 = 0;
while (_local3 < _local2) {
if (focusableCandidates[_local3] == _arg1){
return (_local3);
};
_local3++;
};
return (-1);
}
public function hideFocus():void{
}
private function removedHandler(_arg1:Event):void{
var _local2:int;
var _local3:DisplayObject;
var _local4:InteractiveObject;
_local3 = DisplayObject(_arg1.target);
if ((((_local3 is IFocusManagerComponent)) && ((focusableObjects[_local3] == true)))){
if (_local3 == lastFocus){
IFocusManagerComponent(lastFocus).drawFocus(false);
lastFocus = null;
};
_local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
delete focusableObjects[_local3];
calculateCandidates = true;
} else {
if ((((_local3 is InteractiveObject)) && ((focusableObjects[_local3] == true)))){
_local4 = (_local3 as InteractiveObject);
if (_local4){
if (_local4 == lastFocus){
lastFocus = null;
};
delete focusableObjects[_local4];
calculateCandidates = true;
};
_local3.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
};
};
removeFocusables(_local3);
}
private function sortByDepth(_arg1:InteractiveObject, _arg2:InteractiveObject):Number{
var _local3:String;
var _local4:String;
var _local5:int;
var _local6:String;
var _local7:String;
var _local8:String;
var _local9:DisplayObject;
var _local10:DisplayObject;
_local3 = "";
_local4 = "";
_local8 = "0000";
_local9 = DisplayObject(_arg1);
_local10 = DisplayObject(_arg2);
while (((!((_local9 == DisplayObject(form)))) && (_local9.parent))) {
_local5 = getChildIndex(_local9.parent, _local9);
_local6 = _local5.toString(16);
if (_local6.length < 4){
_local7 = (_local8.substring(0, (4 - _local6.length)) + _local6);
};
_local3 = (_local7 + _local3);
_local9 = _local9.parent;
};
while (((!((_local10 == DisplayObject(form)))) && (_local10.parent))) {
_local5 = getChildIndex(_local10.parent, _local10);
_local6 = _local5.toString(16);
if (_local6.length < 4){
_local7 = (_local8.substring(0, (4 - _local6.length)) + _local6);
};
_local4 = (_local7 + _local4);
_local10 = _local10.parent;
};
return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : 0);
}
public function get defaultButton():Button{
return (_defaultButton);
}
private function activateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
if (lastFocus){
if ((lastFocus is IFocusManagerComponent)){
IFocusManagerComponent(lastFocus).setFocus();
} else {
form.stage.focus = lastFocus;
};
};
lastAction = "ACTIVATE";
}
public function showFocus():void{
}
public function set defaultButtonEnabled(_arg1:Boolean):void{
_defaultButtonEnabled = _arg1;
}
public function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject{
var _local2:DisplayObject;
var _local3:String;
var _local4:int;
var _local5:Boolean;
var _local6:int;
var _local7:int;
var _local8:IFocusManagerGroup;
if (!hasFocusableObjects()){
return (null);
};
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
_local2 = form.stage.focus;
_local2 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local2)));
_local3 = "";
if ((_local2 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local2);
_local3 = _local8.groupName;
};
_local4 = getIndexOfFocusedObject(_local2);
_local5 = false;
_local6 = _local4;
if (_local4 == -1){
if (_arg1){
_local4 = focusableCandidates.length;
};
_local5 = true;
};
_local7 = getIndexOfNextObject(_local4, _arg1, _local5, _local3);
return (findFocusManagerComponent(focusableCandidates[_local7]));
}
private function mouseDownHandler(_arg1:MouseEvent):void{
var _local2:InteractiveObject;
if (_arg1.isDefaultPrevented()){
return;
};
_local2 = getTopLevelFocusTarget(InteractiveObject(_arg1.target));
if (!_local2){
return;
};
showFocusIndicator = false;
if (((((!((_local2 == lastFocus))) || ((lastAction == "ACTIVATE")))) && (!((_local2 is TextField))))){
setFocus(_local2);
};
lastAction = "MOUSEDOWN";
}
private function isTabVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer;
_local2 = _arg1.parent;
while (((((_local2) && (!((_local2 is Stage))))) && (!(((_local2.parent) && ((_local2.parent is Stage))))))) {
if (!_local2.tabChildren){
return (false);
};
_local2 = _local2.parent;
};
return (true);
}
public function get nextTabIndex():int{
return (0);
}
private function keyDownHandler(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.TAB){
lastAction = "KEY";
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
};
if (((((((defaultButtonEnabled) && ((_arg1.keyCode == Keyboard.ENTER)))) && (defaultButton))) && (defButton.enabled))){
sendDefaultButtonEvent();
};
}
private function focusInHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
var _local3:Button;
_local2 = InteractiveObject(_arg1.target);
if (form.contains(_local2)){
lastFocus = findFocusManagerComponent(InteractiveObject(_local2));
if ((lastFocus is Button)){
_local3 = Button(lastFocus);
if (defButton){
defButton.emphasized = false;
defButton = _local3;
_local3.emphasized = true;
};
} else {
if (((defButton) && (!((defButton == _defaultButton))))){
defButton.emphasized = false;
defButton = _defaultButton;
_defaultButton.emphasized = true;
};
};
};
}
private function tabEnabledChangeHandler(_arg1:Event):void{
var _local2:InteractiveObject;
var _local3:Boolean;
calculateCandidates = true;
_local2 = InteractiveObject(_arg1.target);
_local3 = (focusableObjects[_local2] == true);
if (_local2.tabEnabled){
if (((!(_local3)) && (isTabVisible(_local2)))){
if (!(_local2 is IFocusManagerComponent)){
_local2.focusRect = false;
};
focusableObjects[_local2] = true;
};
} else {
if (_local3){
delete focusableObjects[_local2];
};
};
}
public function set showFocusIndicator(_arg1:Boolean):void{
_showFocusIndicator = _arg1;
}
public function get form():DisplayObjectContainer{
return (_form);
}
private function sortByTabIndex(_arg1:InteractiveObject, _arg2:InteractiveObject):int{
return (((_arg1.tabIndex > _arg2.tabIndex)) ? 1 : ((_arg1.tabIndex < _arg2.tabIndex)) ? -1 : sortByDepth(_arg1, _arg2));
}
public function activate():void{
if (activated){
return;
};
form.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true);
form.stage.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 0, true);
form.addEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.stage.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true);
form.stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true);
form.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = true;
if (lastFocus){
setFocus(lastFocus);
};
}
public function deactivate():void{
form.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler);
form.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler);
form.removeEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.stage.removeEventListener(Event.ACTIVATE, activateHandler);
form.stage.removeEventListener(Event.DEACTIVATE, deactivateHandler);
form.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = false;
}
public function get defaultButtonEnabled():Boolean{
return (_defaultButtonEnabled);
}
}
}//package fl.managers
Section 92
//IFocusManager (fl.managers.IFocusManager)
package fl.managers {
import fl.controls.*;
import flash.display.*;
public interface IFocusManager {
function getFocus():InteractiveObject;
function deactivate():void;
function set defaultButton(_arg1:Button):void;
function set showFocusIndicator(_arg1:Boolean):void;
function get defaultButtonEnabled():Boolean;
function get nextTabIndex():int;
function get defaultButton():Button;
function get showFocusIndicator():Boolean;
function setFocus(_arg1:InteractiveObject):void;
function activate():void;
function showFocus():void;
function set defaultButtonEnabled(_arg1:Boolean):void;
function hideFocus():void;
function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject;
function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject;
}
}//package fl.managers
Section 93
//IFocusManagerComponent (fl.managers.IFocusManagerComponent)
package fl.managers {
public interface IFocusManagerComponent {
function set focusEnabled(_arg1:Boolean):void;
function drawFocus(_arg1:Boolean):void;
function setFocus():void;
function get focusEnabled():Boolean;
function get tabEnabled():Boolean;
function get tabIndex():int;
function get mouseFocusEnabled():Boolean;
}
}//package fl.managers
Section 94
//IFocusManagerGroup (fl.managers.IFocusManagerGroup)
package fl.managers {
public interface IFocusManagerGroup {
function set groupName(_arg1:String):void;
function set selected(_arg1:Boolean):void;
function get groupName():String;
function get selected():Boolean;
}
}//package fl.managers
Section 95
//StyleManager (fl.managers.StyleManager)
package fl.managers {
import fl.core.*;
import flash.text.*;
import flash.utils.*;
public class StyleManager {
private var globalStyles:Object;
private var classToDefaultStylesDict:Dictionary;
private var styleToClassesHash:Object;
private var classToStylesDict:Dictionary;
private var classToInstancesDict:Dictionary;
private static var _instance:StyleManager;
public function StyleManager(){
styleToClassesHash = {};
classToInstancesDict = new Dictionary(true);
classToStylesDict = new Dictionary(true);
classToDefaultStylesDict = new Dictionary(true);
globalStyles = UIComponent.getStyleDefinition();
}
public static function clearComponentStyle(_arg1:Object, _arg2:String):void{
var _local3:Class;
var _local4:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance().classToStylesDict[_local3];
if (((!((_local4 == null))) && (!((_local4[_arg2] == null))))){
delete _local4[_arg2];
invalidateComponentStyle(_local3, _arg2);
};
}
private static function getClassDef(_arg1:Object):Class{
var component = _arg1;
if ((component is Class)){
return ((component as Class));
};
try {
return ((getDefinitionByName(getQualifiedClassName(component)) as Class));
} catch(e:Error) {
if ((component is UIComponent)){
try {
return ((component.loaderInfo.applicationDomain.getDefinition(getQualifiedClassName(component)) as Class));
} catch(e:Error) {
};
};
};
return (null);
}
public static function clearStyle(_arg1:String):void{
setStyle(_arg1, null);
}
public static function setComponentStyle(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Class;
var _local5:Object;
_local4 = getClassDef(_arg1);
_local5 = getInstance().classToStylesDict[_local4];
if (_local5 == null){
_local5 = (getInstance().classToStylesDict[_local4] = {});
};
if (_local5 == _arg3){
return;
};
_local5[_arg2] = _arg3;
invalidateComponentStyle(_local4, _arg2);
}
private static function setSharedStyles(_arg1:UIComponent):void{
var _local2:StyleManager;
var _local3:Class;
var _local4:Object;
var _local5:String;
_local2 = getInstance();
_local3 = getClassDef(_arg1);
_local4 = _local2.classToDefaultStylesDict[_local3];
for (_local5 in _local4) {
_arg1.setSharedStyle(_local5, getSharedStyle(_arg1, _local5));
};
}
public static function getComponentStyle(_arg1:Object, _arg2:String):Object{
var _local3:Class;
var _local4:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance().classToStylesDict[_local3];
return (((_local4)==null) ? null : _local4[_arg2]);
}
private static function getInstance(){
if (_instance == null){
_instance = new (StyleManager);
};
return (_instance);
}
private static function invalidateComponentStyle(_arg1:Class, _arg2:String):void{
var _local3:Dictionary;
var _local4:Object;
var _local5:UIComponent;
_local3 = getInstance().classToInstancesDict[_arg1];
if (_local3 == null){
return;
};
for (_local4 in _local3) {
_local5 = (_local4 as UIComponent);
if (_local5 == null){
} else {
_local5.setSharedStyle(_arg2, getSharedStyle(_local5, _arg2));
};
};
}
private static function invalidateStyle(_arg1:String):void{
var _local2:Dictionary;
var _local3:Object;
_local2 = getInstance().styleToClassesHash[_arg1];
if (_local2 == null){
return;
};
for (_local3 in _local2) {
invalidateComponentStyle(Class(_local3), _arg1);
};
}
public static function registerInstance(_arg1:UIComponent):void{
var inst:StyleManager;
var classDef:Class;
var target:Class;
var defaultStyles:Object;
var styleToClasses:Object;
var n:String;
var instance = _arg1;
inst = getInstance();
classDef = getClassDef(instance);
if (classDef == null){
return;
};
if (inst.classToInstancesDict[classDef] == null){
inst.classToInstancesDict[classDef] = new Dictionary(true);
target = classDef;
while (defaultStyles == null) {
if (target["getStyleDefinition"] != null){
defaultStyles = target["getStyleDefinition"]();
break;
};
try {
target = (instance.loaderInfo.applicationDomain.getDefinition(getQualifiedSuperclassName(target)) as Class);
} catch(err:Error) {
try {
target = (getDefinitionByName(getQualifiedSuperclassName(target)) as Class);
} catch(e:Error) {
defaultStyles = UIComponent.getStyleDefinition();
break;
};
};
};
styleToClasses = inst.styleToClassesHash;
for (n in defaultStyles) {
if (styleToClasses[n] == null){
styleToClasses[n] = new Dictionary(true);
};
styleToClasses[n][classDef] = true;
};
inst.classToDefaultStylesDict[classDef] = defaultStyles;
inst.classToStylesDict[classDef] = {};
};
inst.classToInstancesDict[classDef][instance] = true;
setSharedStyles(instance);
}
public static function getStyle(_arg1:String):Object{
return (getInstance().globalStyles[_arg1]);
}
private static function getSharedStyle(_arg1:UIComponent, _arg2:String):Object{
var _local3:Class;
var _local4:StyleManager;
var _local5:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance();
_local5 = _local4.classToStylesDict[_local3][_arg2];
if (_local5 != null){
return (_local5);
};
_local5 = _local4.globalStyles[_arg2];
if (_local5 != null){
return (_local5);
};
return (_local4.classToDefaultStylesDict[_local3][_arg2]);
}
public static function setStyle(_arg1:String, _arg2:Object):void{
var _local3:Object;
_local3 = getInstance().globalStyles;
if ((((_local3[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
_local3[_arg1] = _arg2;
invalidateStyle(_arg1);
}
}
}//package fl.managers
Section 96
//BaseLevel (GameLogic.BaseLevel)
package GameLogic {
import flash.display.*;
import Engine.Common.Math.*;
import Engine.Dynamics.*;
import Engine.Collision.*;
public class BaseLevel extends ObjectGroup {
public var m_world:b2World;
public static const m_iterations:int = 10;
public static const m_timeStep:Number = 0.0166666666666667;
public function BaseLevel(){
var _local1:b2AABB;
var _local2:b2Vec2;
var _local3:Boolean;
super();
_local1 = new b2AABB();
_local1.minVertex.Set(-100, -100);
_local1.maxVertex.Set(100, 100);
_local2 = new b2Vec2(Globals.gravity.x, Globals.gravity.y);
_local3 = true;
Globals.world = new b2World(_local1, _local2, _local3);
Globals.currentLevel = this;
m_world = Globals.world;
}
public function destroy(){
this.parent.removeChild(Globals.currentLevel);
Globals.world = null;
Globals.currentLevel = null;
m_world = null;
}
public function restart(){
}
public function start(){
}
override public function adoptChildren(_arg1:DisplayObject){
this.addChild(_arg1);
}
override public function Update(){
m_world.Step(m_timeStep, m_iterations);
UpdateChildren();
}
}
}//package GameLogic
Section 97
//Box (GameLogic.Box)
package GameLogic {
import Engine.Collision.Shapes.*;
import Engine.Dynamics.*;
public class Box extends GameObject {
override public function createBody(_arg1:Number, _arg2:Number, _arg3:Number){
var _local4:b2BoxDef;
var _local5:b2BodyDef;
_local4 = new b2BoxDef();
_local5 = new b2BodyDef();
_local5.AddShape(_local4);
_local4.extents.Set(Globals.physX((this.width / 2)), Globals.physY((this.height / 2)));
_local4.density = _arg1;
_local4.friction = _arg2;
_local4.restitution = _arg3;
_local5.position.Set(Globals.physX(this.x), Globals.physY(this.y));
m_body = Globals.world.CreateBody(_local5);
}
}
}//package GameLogic
Section 98
//Circle (GameLogic.Circle)
package GameLogic {
import Engine.Common.Math.*;
import Engine.Collision.Shapes.*;
import Engine.Dynamics.*;
public class Circle extends GameObject {
override public function createBody(_arg1:Number, _arg2:Number, _arg3:Number){
var _local4:b2BodyDef;
var _local5:b2CircleDef;
var _local6:b2Vec2;
_local4 = new b2BodyDef();
_local5 = new b2CircleDef();
_local4.AddShape(_local5);
_local5.radius = Globals.physX((this.width / 2));
_local5.restitution = _arg3;
_local5.density = _arg1;
_local5.friction = _arg2;
_local4.position.Set(Globals.physX(this.x), Globals.physY(this.y));
m_body = Globals.world.CreateBody(_local4);
_local6 = m_body.GetOriginPosition();
}
}
}//package GameLogic
Section 99
//ComplexObject (GameLogic.ComplexObject)
package GameLogic {
import flash.display.*;
public class ComplexObject extends ObjectGroup {
public function delegateChildren(){
var _local1:DisplayObject;
var _local2:int;
_local2 = 0;
while (_local2 < this.numChildren) {
_local1 = this.getChildAt(_local2);
_local1.x = (_local1.x + this.x);
_local1.y = (_local1.y + this.y);
ObjectGroup(parent).adoptChildren(_local1);
_local2++;
};
parent.removeChild(this);
}
override public function adoptChildren(_arg1:DisplayObject){
_arg1.x = (_arg1.x + this.x);
_arg1.y = (_arg1.y + this.y);
ObjectGroup(parent).adoptChildren(_arg1);
}
}
}//package GameLogic
Section 100
//GameObject (GameLogic.GameObject)
package GameLogic {
import flash.display.*;
import Engine.Common.Math.*;
import Engine.Dynamics.*;
public class GameObject extends MovieClip {
public var m_body:b2Body;
public function createBody(_arg1:Number, _arg2:Number, _arg3:Number){
}
public function Update(){
var _local1:b2Vec2;
_local1 = this.m_body.GetOriginPosition();
this.x = (_local1.x * Globals.physScale);
this.y = (_local1.y * Globals.physScale);
this.rotation = Globals.toDeg(this.m_body.GetRotation());
}
}
}//package GameLogic
Section 101
//Globals (GameLogic.Globals)
package GameLogic {
import flash.display.*;
import Engine.Common.Math.*;
import Engine.Dynamics.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
public class Globals {
public static const ST_RESTART:int = 7;
public static const Q_MEDIUM:int = 1;
public static const ST_PASSWORD:int = 8;
public static const ST_MOCHIADD:int = 10;
public static const Q_LOW:int = 0;
public static const ST_PAUSED:int = 3;
public static const gravity:b2Vec2 = new b2Vec2(0, 10);
public static const Q_HIGH:int = 2;
public static const ST_PLAY:int = 2;
public static const zeroPoint:Point = new Point(0, 0);
public static const physScale:Number = 30;
public static const ST_START:int = 9;
public static const ST_GAMEOVER:int = 4;
public static const ST_INTRO:int = 0;
public static const ST_NEXTLEVEL:int = 5;
public static const ST_DEATH:int = 6;
public static const ST_MENU:int = 1;
public static var seconds:int = 0;
public static var currentLevel:BaseLevel;
public static var scene:MovieClip;
public static var quality:int = 2;
public static var world:b2World;
public static var numLevels:Number;
public static var currentSound:Sound;
public static var g_stage:Stage;
public static var initial_ball_pos:b2Vec2 = new b2Vec2(0, 0);
public static var secondFractions:int = 0;
public static var gameState:int;
public static var timer:STBCTimer;
public static var currentChannel:SoundChannel;
public static var savedData:SharedObject;
public static var levelNumber:int;
public static var rotationAngle:Number;
public static var ball:GameObject;
public static function updateTimer(){
var _local1:String;
_local1 = Globals.formatTime(((Globals.seconds * 60) + Globals.secondFractions));
Globals.timer.i_time.text = _local1;
}
public static function physY(_arg1:Number):Number{
return ((_arg1 / physScale));
}
public static function toRad(_arg1:Number):Number{
return ((_arg1 * 0.017453293));
}
public static function physX(_arg1:Number):Number{
return ((_arg1 / physScale));
}
public static function toDeg(_arg1:Number):Number{
return ((_arg1 * 57.29577951));
}
public static function forceGC(){
try {
new LocalConnection().connect("foo");
new LocalConnection().connect("foo");
} catch(e) {
};
}
public static function toggleQuality(){
if (quality == Q_LOW){
quality = Q_MEDIUM;
g_stage.quality = StageQuality.MEDIUM;
} else {
if (quality == Q_MEDIUM){
quality = Q_HIGH;
g_stage.quality = StageQuality.HIGH;
} else {
if (quality == Q_HIGH){
quality = Q_LOW;
g_stage.quality = StageQuality.LOW;
};
};
};
}
public static function toggleMusic(){
if (SoundMixer.soundTransform.volume > 0){
SoundMixer.soundTransform = new SoundTransform(0, 0);
} else {
SoundMixer.soundTransform = new SoundTransform(1, 0);
};
}
public static function removeFromStage(_arg1:DisplayObject){
Globals.g_stage.removeChild(_arg1);
}
public static function formatTime(_arg1:int):String{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:String;
_local2 = 0;
_local3 = 0;
_local4 = 0;
_local5 = "";
_local2 = _arg1;
_local4 = Math.floor((_local2 / 3600));
_local2 = (_local2 - (_local4 * 3600));
_local3 = Math.floor((_local2 / 60));
_local2 = (_local2 - (_local3 * 60));
_local2 = Math.ceil((_local2 * 1.66666));
if (_local4 < 10){
_local5 = (_local5 + ("0" + _local4));
} else {
_local5 = (_local5 + _local4);
};
_local5 = (_local5 + ":");
if (_local3 < 10){
_local5 = (_local5 + ("0" + _local3));
} else {
_local5 = (_local5 + _local3);
};
_local5 = (_local5 + ":");
if (_local2 < 10){
_local5 = (_local5 + ("0" + _local2));
} else {
_local5 = (_local5 + _local2);
};
return (_local5);
}
}
}//package GameLogic
Section 102
//LaberintoLevel (GameLogic.LaberintoLevel)
package GameLogic {
import flash.display.*;
import Engine.Common.Math.*;
import Engine.Collision.Shapes.*;
import Engine.Dynamics.Contacts.*;
import Engine.Dynamics.Joints.*;
import Engine.Dynamics.*;
import Engine.Collision.*;
import flash.events.*;
import Engine.Common.*;
import flash.geom.*;
import flash.ui.*;
public class LaberintoLevel extends BaseLevel {
const rotMatrix2;
const rotMatrix;
public var i_rjoint1:PRevoluteJoint;
public var fence12:MovieClip;
public var fence13:MovieClip;
public var fence17:MovieClip;
public var fence18:MovieClip;
public var fence14:MovieClip;
public var fence15:MovieClip;
public var fence16:MovieClip;
public var fence1:MovieClip;
public var fence2:MovieClip;
public var fence3:MovieClip;
public var fence4:MovieClip;
public var fence6:MovieClip;
public var fence8:MovieClip;
public var fence11:MovieClip;
public var fence5:MovieClip;
public var fence7:MovieClip;
public var fence21:MovieClip;
public var fence22:MovieClip;
public var fence23:MovieClip;
public var fence24:MovieClip;
public var fence25:MovieClip;
public var fence26:MovieClip;
public var fence27:MovieClip;
public var fence29:MovieClip;
public var fence19:MovieClip;
public var fence28:MovieClip;
public var fence32:MovieClip;
public var fence34:MovieClip;
public var fence33:MovieClip;
public var fence36:MovieClip;
public var fence30:MovieClip;
public var fence31:MovieClip;
public var fences:Array;
public var fence35:MovieClip;
public var fence37:MovieClip;
public var fence9:MovieClip;
public var fence10:MovieClip;
public var oneway3:MovieClip;
public var oneway5:MovieClip;
public var oneway1:MovieClip;
public var oneway2:MovieClip;
public var oneway4:MovieClip;
public var llama2:MovieClip;
public var llama4:MovieClip;
public var llama6:MovieClip;
public var llama9:MovieClip;
public var pico1:MovieClip;
public var llama3:MovieClip;
public var pico3:MovieClip;
public var pico5:MovieClip;
public var pico6:MovieClip;
public var pico8:MovieClip;
public var llama5:MovieClip;
public var pico7:MovieClip;
public var llama7:MovieClip;
public var pico9:MovieClip;
public var i_target:MovieClip;
public var llama1:MovieClip;
public var pico2:MovieClip;
public var oneway6:MovieClip;
public var pico4:MovieClip;
public var oneways:Array;
public var llama8:MovieClip;
var gravity:b2Vec2;
public var llamas:Array;
var rightDown:Boolean;
public var picos:Array;
public var fence20:MovieClip;
public var pico10:MovieClip;
public var pico11:MovieClip;
public var pico12:MovieClip;
public var pico14:MovieClip;
public var pico15:MovieClip;
public var pico17:MovieClip;
public var pico19:MovieClip;
public var pico13:MovieClip;
public var pico18:MovieClip;
public var llama10:MovieClip;
public var llama11:MovieClip;
public var pico16:MovieClip;
public var pico20:MovieClip;
public var llama12:MovieClip;
public var objetivo:MovieClip;
var leftDown:Boolean;
public var portals:Array;
public function LaberintoLevel(){
rotMatrix = new b2Mat22(Globals.toRad(Globals.rotationAngle));
rotMatrix2 = new b2Mat22(Globals.toRad(-(Globals.rotationAngle)));
super();
Globals.g_stage.addEventListener(KeyboardEvent.KEY_DOWN, this.keyDownFun);
Globals.g_stage.addEventListener(KeyboardEvent.KEY_UP, this.keyUpFun);
gravity = new b2Vec2(Globals.gravity.x, Globals.gravity.y);
portals = new Array();
picos = new Array();
llamas = new Array();
fences = new Array();
oneways = new Array();
Globals.initial_ball_pos.x = 0;
Globals.initial_ball_pos.y = 0;
leftDown = false;
rightDown = false;
}
override public function restart(){
gravity.x = Globals.gravity.x;
gravity.y = Globals.gravity.y;
Globals.world.m_gravity = gravity;
Globals.ball.m_body.SetOriginPosition(Globals.initial_ball_pos, 0);
Globals.ball.m_body.SetLinearVelocity(new b2Vec2(0, 0));
Globals.ball.m_body.SetAngularVelocity(0);
Globals.currentLevel.rotation = 0;
leftDown = false;
rightDown = false;
Globals.secondFractions = 0;
Globals.seconds = 0;
Globals.updateTimer();
}
public function keyDownFun(_arg1:KeyboardEvent){
if (Globals.gameState == Globals.ST_PLAY){
if (_arg1.keyCode == Keyboard.LEFT){
leftDown = true;
} else {
if (_arg1.keyCode == Keyboard.RIGHT){
rightDown = true;
} else {
if (_arg1.keyCode == Keyboard.SPACE){
Globals.ball.gotoAndStop(Globals.ball.totalFrames);
Globals.gameState = Globals.ST_DEATH;
};
};
};
};
}
override public function start(){
this.objetivo = i_target;
this.findPortals();
Globals.gameState = Globals.ST_PLAY;
Globals.secondFractions = 0;
Globals.seconds = 0;
Globals.updateTimer();
}
public function scrollLevel(){
var _local1:Number;
var _local2:b2Mat22;
var _local3:b2Vec2;
_local1 = this.rotation;
if (_local1 < 0){
_local1 = (_local1 + 360);
};
_local2 = new b2Mat22(Globals.toRad(_local1));
_local3 = new b2Vec2(-(Globals.ball.x), -(Globals.ball.y));
_local3.MulM(_local2);
this.x = (_local3.x + 340);
this.y = (_local3.y + 200);
}
override public function Update(){
super.Update();
Globals.secondFractions++;
if (Globals.secondFractions >= 60){
Globals.seconds++;
Globals.secondFractions = 0;
};
Globals.updateTimer();
if (Globals.gameState == Globals.ST_PLAY){
checkVictory();
};
}
public function findPortals(){
var _local1:int;
var _local2:MovieClip;
var _local3:MovieClip;
_local1 = 1;
while (true) {
if (Globals.currentLevel[("portal" + _local1)] == null){
break;
};
_local2 = Globals.currentLevel[("portal" + _local1)];
_local3 = Globals.currentLevel[(("portal" + _local1) + "b")];
portals.push(new Portal(_local2, _local3));
_local1++;
};
_local1 = 1;
while (true) {
if (Globals.currentLevel[("llama" + _local1)] == null){
break;
};
llamas.push(Globals.currentLevel[("llama" + _local1)]);
_local1++;
};
_local1 = 1;
while (true) {
if (Globals.currentLevel[("pico" + _local1)] == null){
break;
};
picos.push(Globals.currentLevel[("pico" + _local1)]);
_local1++;
};
_local1 = 1;
while (true) {
if (Globals.currentLevel[("fence" + _local1)] == null){
break;
};
fences.push(Globals.currentLevel[("fence" + _local1)]);
_local1++;
};
_local1 = 1;
while (true) {
if (Globals.currentLevel[("oneway" + _local1)] == null){
break;
};
oneways.push(Globals.currentLevel[("oneway" + _local1)]);
_local1++;
};
}
public function keyUpFun(_arg1:KeyboardEvent){
if (Globals.gameState == Globals.ST_PLAY){
if (_arg1.keyCode == Keyboard.LEFT){
leftDown = false;
} else {
if (_arg1.keyCode == Keyboard.RIGHT){
rightDown = false;
};
};
};
}
public function checkVictory(){
var _local1:*;
var _local2:*;
var _local3:ReplayQuestion;
var _local4:Number;
var _local5:int;
var _local6:b2Vec2;
if (leftDown){
this.gravity.MulM(rotMatrix);
Globals.world.m_gravity = this.gravity;
Globals.currentLevel.rotation = Globals.toDeg(Math.atan2(gravity.x, gravity.y));
} else {
if (rightDown){
this.gravity.MulM(rotMatrix2);
Globals.world.m_gravity = this.gravity;
Globals.currentLevel.rotation = Globals.toDeg(Math.atan2(gravity.x, gravity.y));
};
};
_local1 = objetivo.localToGlobal(Globals.zeroPoint);
_local2 = Globals.ball.localToGlobal(Globals.zeroPoint);
if (objetivo.hitTestPoint(_local2.x, _local2.y, true)){
_local3 = new ReplayQuestion();
_local4 = ((Globals.seconds * 60) + Globals.secondFractions);
if ((Globals.savedData.data.bestTimes.length - 1) < Globals.levelNumber){
_local3.i_besttime.text = "N/A";
Globals.savedData.data.bestTimes[Globals.levelNumber] = _local4;
Globals.savedData.flush();
} else {
_local3.i_besttime.text = Globals.formatTime(Globals.savedData.data.bestTimes[Globals.levelNumber]);
};
_local3.i_lasttime.text = Globals.formatTime(_local4);
if (_local4 < Globals.savedData.data.bestTimes[Globals.levelNumber]){
Globals.savedData.data.bestTimes[Globals.levelNumber] = _local4;
Globals.savedData.flush();
};
Globals.g_stage.addChild(_local3);
Globals.gameState = Globals.ST_PAUSED;
} else {
_local5 = 0;
_local5 = 0;
while (_local5 < portals.length) {
if (portals[_local5].entrance.hitTestPoint(_local2.x, _local2.y)){
Globals.ball.m_body.m_position.x = Globals.physX(portals[_local5].exit.x);
Globals.ball.m_body.m_position.y = Globals.physY(portals[_local5].exit.y);
};
_local5++;
};
_local5 = 0;
while (_local5 < picos.length) {
if (picos[_local5].hitTestPoint(_local2.x, _local2.y, true)){
Globals.gameState = Globals.ST_DEATH;
Globals.ball.gotoAndPlay("pico");
};
_local5++;
};
_local5 = 0;
while (_local5 < llamas.length) {
if (llamas[_local5].hitTestPoint(_local2.x, _local2.y, true)){
Globals.gameState = Globals.ST_DEATH;
Globals.ball.gotoAndPlay("llama");
};
_local5++;
};
_local5 = 0;
while (_local5 < fences.length) {
if (fences[_local5].hitTestPoint(_local2.x, _local2.y, true)){
Globals.gameState = Globals.ST_DEATH;
Globals.ball.gotoAndPlay("fence");
};
_local5++;
};
_local5 = 0;
while (_local5 < oneways.length) {
if (oneways[_local5].hitTestPoint(_local2.x, _local2.y, true)){
_local6 = Globals.ball.m_body.GetLinearVelocity();
if (((((_local6.x * oneways[_local5].force.x) < 0)) || (((_local6.y * oneways[_local5].force.y) < 0)))){
Globals.ball.m_body.SetLinearVelocity(oneways[_local5].force);
};
};
_local5++;
};
};
}
override public function destroy(){
portals = null;
picos = null;
llamas = null;
fences = null;
oneways = null;
gravity = null;
objetivo = null;
while (this.numChildren > 0) {
this.removeChildAt(0);
};
Globals.g_stage.removeEventListener(KeyboardEvent.KEY_DOWN, this.keyDownFun);
Globals.g_stage.removeEventListener(KeyboardEvent.KEY_UP, this.keyUpFun);
super.destroy();
}
}
}//package GameLogic
Section 103
//ObjectGroup (GameLogic.ObjectGroup)
package GameLogic {
import flash.display.*;
import Engine.Common.Math.*;
public class ObjectGroup extends MovieClip {
public function UpdateChildren(){
var _local1:*;
var _local2:GameObject;
var _local3:ComplexObject;
var _local4:b2Vec2;
var _local5:int;
_local4 = new b2Vec2();
_local5 = 0;
while (_local5 < this.numChildren) {
_local1 = this.getChildAt(_local5);
if ((_local1 is GameObject)){
_local2 = GameObject(_local1);
_local2.Update();
};
_local5++;
};
}
public function adoptChildren(_arg1:DisplayObject){
}
public function Update(){
}
}
}//package GameLogic
Section 104
//Portal (GameLogic.Portal)
package GameLogic {
import flash.display.*;
public class Portal {
public var entrance:MovieClip;
public var exit:MovieClip;
public function Portal(_arg1:MovieClip, _arg2:MovieClip){
entrance = _arg1;
exit = _arg2;
}
}
}//package GameLogic
Section 105
//RevoluteJoint (GameLogic.RevoluteJoint)
package GameLogic {
import flash.display.*;
import Engine.Dynamics.Joints.*;
import flash.geom.*;
public class RevoluteJoint extends MovieClip {
var padre:ObjectGroup;
public var m_joint:b2RevoluteJoint;
public function createJoint(_arg1:Number, _arg2:Number){
var _local3:b2RevoluteJointDef;
var _local4:Array;
var _local5:GameObject;
var _local6:Point;
var _local7:int;
_local3 = new b2RevoluteJointDef();
_local4 = new Array();
_local7 = 0;
while (_local7 < Globals.currentLevel.numChildren) {
if ((Globals.currentLevel.getChildAt(_local7) is GameObject)){
_local5 = GameObject(Globals.currentLevel.getChildAt(_local7));
_local6 = this.localToGlobal(Globals.zeroPoint);
if (_local5.hitTestPoint(_local6.x, _local6.y, true)){
_local4.push(_local5);
};
};
_local7++;
};
if (_local4.length > 0){
if (_local4.length >= 2){
_local3.body1 = GameObject(_local4[0]).m_body;
_local3.body2 = GameObject(_local4[1]).m_body;
} else {
_local3.body1 = Globals.world.m_groundBody;
_local3.body2 = GameObject(_local4[0]).m_body;
};
_local3.anchorPoint.Set(Globals.physX(this.x), Globals.physY(this.y));
if ((((_arg1 > 0)) || ((_arg2 > 0)))){
_local3.motorTorque = _arg1;
_local3.motorSpeed = _arg2;
_local3.enableMotor = true;
};
m_joint = b2RevoluteJoint(Globals.world.CreateJoint(_local3));
//unresolved jump
};
}
}
}//package GameLogic
Section 106
//Triangle (GameLogic.Triangle)
package GameLogic {
import flash.display.*;
import Engine.Common.Math.*;
import Engine.Collision.Shapes.*;
import Engine.Dynamics.Contacts.*;
import Engine.Dynamics.Joints.*;
import Engine.Dynamics.*;
import Engine.Collision.*;
import Engine.Common.*;
import flash.geom.*;
public class Triangle extends GameObject {
override public function createBody(_arg1:Number, _arg2:Number, _arg3:Number){
var _local4:b2PolyDef;
var _local5:b2BodyDef;
var _local6:Rectangle;
_local4 = new b2PolyDef();
_local5 = new b2BodyDef();
_local5.AddShape(_local4);
_local6 = this.getRect(this);
if (_local6.topLeft.y == 0){
if (_local6.topLeft.x == 0){
_local4.vertices[0].Set(0, 0);
_local4.vertices[1].Set(Globals.physX(width), 0);
_local4.vertices[2].Set(0, Globals.physY(height));
} else {
_local4.vertices[0].Set(0, 0);
_local4.vertices[1].Set(0, Globals.physY(height));
_local4.vertices[2].Set(-(Globals.physX(width)), 0);
};
} else {
if (_local6.topLeft.x == 0){
_local4.vertices[0].Set(0, 0);
_local4.vertices[1].Set(0, -(Globals.physY(height)));
_local4.vertices[2].Set(Globals.physX(width), 0);
} else {
_local4.vertices[0].Set(0, 0);
_local4.vertices[1].Set(-(Globals.physY(width)), 0);
_local4.vertices[2].Set(0, -(Globals.physY(height)));
};
};
_local4.vertexCount = 3;
_local4.density = _arg1;
_local4.friction = _arg2;
_local4.restitution = _arg3;
_local5.position.Set(Globals.physX(this.x), Globals.physY(this.y));
m_body = Globals.world.CreateBody(_local5);
}
}
}//package GameLogic
Section 107
//Vertex (GameLogic.Vertex)
package GameLogic {
import flash.display.*;
public class Vertex extends MovieClip {
}
}//package GameLogic
Section 108
//MochiBot (General.MochiBot)
package General {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
var _local3:MochiBot;
var _local4:String;
var _local5:URLVariables;
var _local6:String;
var _local7:URLRequest;
var _local8:Loader;
if (Security.sandboxType == "localWithFile"){
return (null);
};
_local3 = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
_local4 = "http://core.mochibot.com/my/core.swf";
_local5 = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
_local6 = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
_local7 = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
_local8 = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package General
Section 109
//bubblebox_logo_ro_80 (Main_fla.bubblebox_logo_ro_80)
package Main_fla {
import flash.display.*;
public dynamic class bubblebox_logo_ro_80 extends MovieClip {
public function bubblebox_logo_ro_80(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Main_fla
Section 110
//bubblebox_saving_58 (Main_fla.bubblebox_saving_58)
package Main_fla {
import flash.display.*;
public dynamic class bubblebox_saving_58 extends MovieClip {
public function bubblebox_saving_58(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Main_fla
Section 111
//bubblebox_send_btn_56 (Main_fla.bubblebox_send_btn_56)
package Main_fla {
import flash.display.*;
import flash.events.*;
public dynamic class bubblebox_send_btn_56 extends MovieClip {
public function bubblebox_send_btn_56(){
addFrameScript(0, frame1);
}
public function frout(_arg1:Event){
this.gotoAndStop(1);
}
function frame1(){
addEventListener(MouseEvent.ROLL_OVER, frover, false, 0, true);
addEventListener(MouseEvent.ROLL_OUT, frout, false, 0, true);
addEventListener(MouseEvent.MOUSE_UP, fup, false, 0, true);
stop();
}
public function fup(_arg1:Event){
this.gotoAndStop(1);
}
public function frover(_arg1:Event){
this.gotoAndStop(2);
}
}
}//package Main_fla
Section 112
//bubblebox_submit_score_55 (Main_fla.bubblebox_submit_score_55)
package Main_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class bubblebox_submit_score_55 extends MovieClip {
public var try_again:MovieClip;
public var send_btn:MovieClip;
public var player_name:TextField;
public var bubbleboxGameID:int;
public var bubblebox_saving:MovieClip;
public var totalScore:int;
public var scoreMc:MovieClip;
public var player;
public var bubblebox_view_score:MovieClip;
public function bubblebox_submit_score_55(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
public function clickSend(_arg1:Event){
if (((!((player.text == "YOUR NAME"))) && ((player.text.length > 0)))){
sendBubbleBoxScore(bubbleboxGameID);
gotoAndStop("saving");
};
}
public function clicktry(){
gotoAndStop(1);
}
public function clickview(_arg1:Event){
navigateToURL(new URLRequest((("http://www.bubblebox.com/highscores/" + bubbleboxGameID) + ".htm")));
}
function frame3(){
bubblebox_view_score.addEventListener(MouseEvent.CLICK, clickview, false, 0, true);
}
function frame1(){
stop();
bubbleboxGameID = 902;
scoreMc = this;
totalScore = formatScore();
player = player_name;
send_btn.addEventListener(MouseEvent.CLICK, clickSend, false, 0, true);
if (Globals.savedData.data.player_name != ""){
player.type = TextFieldType.DYNAMIC;
player.text = Globals.savedData.data.player_name;
};
}
function frame4(){
try_again.addEventListener(MouseEvent.CLICK, clicktry, false, 0, true);
}
function frame2(){
stop();
}
public function handleSuccess(_arg1:Event){
Globals.savedData.data.player_name = player.text;
Globals.savedData.data.lastTime = totalScore;
scoreMc.gotoAndStop("success");
}
public function formatScore():Number{
var _local1:int;
var _local2:int;
var _local3:String;
var _local4:int;
var _local5:int;
_local1 = 0;
_local2 = 1;
while (_local2 <= (Globals.savedData.data.bestTimes.length - 1)) {
_local1 = (_local1 + Globals.savedData.data.bestTimes[_local2]);
_local2++;
};
_local3 = "";
_local4 = 0;
_local5 = 0;
_local5 = Math.floor((_local1 / 3600));
_local1 = (_local1 - (_local5 * 3600));
_local4 = Math.floor((_local1 / 60));
_local1 = (_local1 - (_local4 * 60));
_local3 = (_local3 + _local5);
if (_local4 < 10){
_local3 = (_local3 + ("0" + _local4));
} else {
_local3 = (_local3 + _local4);
};
return (Number(_local3));
}
public function handleError(_arg1:Event){
scoreMc.gotoAndStop("tryagain");
}
public function sendBubbleBoxScore(_arg1:int){
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = new URLLoader();
_local3 = new URLRequest();
_local4 = new URLVariables();
_local4.name = player.text;
_local4.score = totalScore;
_local4.game = _arg1;
_local3.method = "POST";
_local3.url = "http://www.bubblebox.com/scripts/insertscore.php";
_local3.data = _local4;
_local2.addEventListener(IOErrorEvent.IO_ERROR, handleError, false, 0, true);
_local2.addEventListener(Event.COMPLETE, handleSuccess, false, 0, true);
_local2.load(_local3);
}
}
}//package Main_fla
Section 113
//bubblebox_try_again_62 (Main_fla.bubblebox_try_again_62)
package Main_fla {
import flash.display.*;
import flash.events.*;
public dynamic class bubblebox_try_again_62 extends MovieClip {
public function bubblebox_try_again_62(){
addFrameScript(0, frame1);
}
function frame1(){
addEventListener(MouseEvent.ROLL_OUT, onrollout, false, 0, true);
addEventListener(MouseEvent.ROLL_OVER, onrollover, false, 0, true);
addEventListener(MouseEvent.MOUSE_UP, onup, false, 0, true);
stop();
}
public function onrollover(_arg1:Event){
this.gotoAndStop(2);
}
public function onup(_arg1:Event){
this.gotoAndStop(1);
}
public function onrollout(_arg1:Event){
this.gotoAndStop(1);
}
}
}//package Main_fla
Section 114
//bubblebox_view_scores_60 (Main_fla.bubblebox_view_scores_60)
package Main_fla {
import flash.display.*;
import flash.events.*;
public dynamic class bubblebox_view_scores_60 extends MovieClip {
public function bubblebox_view_scores_60(){
addFrameScript(0, frame1);
}
function frame1(){
addEventListener(MouseEvent.ROLL_OUT, onrollout, false, 0, true);
addEventListener(MouseEvent.ROLL_OVER, onrollover, false, 0, true);
addEventListener(MouseEvent.MOUSE_UP, onup, false, 0, true);
stop();
}
public function onrollover(_arg1:Event){
this.gotoAndStop(2);
}
public function onup(_arg1:Event){
this.gotoAndStop(1);
}
public function onrollout(_arg1:Event){
this.gotoAndStop(1);
}
}
}//package Main_fla
Section 115
//bubblxbox_play_latest_text_78 (Main_fla.bubblxbox_play_latest_text_78)
package Main_fla {
import flash.display.*;
public dynamic class bubblxbox_play_latest_text_78 extends MovieClip {
public function bubblxbox_play_latest_text_78(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package Main_fla
Section 116
//bubblxbox_smallLogo_66 (Main_fla.bubblxbox_smallLogo_66)
package Main_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public dynamic class bubblxbox_smallLogo_66 extends MovieClip {
public var logo_ro:MovieClip;
public function bubblxbox_smallLogo_66(){
addFrameScript(0, frame1);
}
public function frollover(_arg1:Event){
this.logo_ro.gotoAndStop(2);
}
function frame1(){
addEventListener(MouseEvent.ROLL_OVER, frollover, false, 0, true);
addEventListener(MouseEvent.ROLL_OUT, frollout, false, 0, true);
addEventListener(MouseEvent.MOUSE_UP, fmouseup, false, 0, true);
addEventListener(MouseEvent.CLICK, fmouseclick, false, 0, true);
}
public function frollout(_arg1:Event){
this.logo_ro.gotoAndStop(1);
}
public function fmouseup(_arg1:Event){
this.logo_ro.gotoAndStop(1);
}
public function fmouseclick(_arg1:Event){
navigateToURL(new URLRequest("http://www.bubblebox.com/"));
}
}
}//package Main_fla
Section 117
//bubblxbox_smallLogo_ro_67 (Main_fla.bubblxbox_smallLogo_ro_67)
package Main_fla {
import flash.display.*;
public dynamic class bubblxbox_smallLogo_ro_67 extends MovieClip {
public function bubblxbox_smallLogo_ro_67(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Main_fla
Section 118
//Container_1 (Main_fla.Container_1)
package Main_fla {
import flash.display.*;
public dynamic class Container_1 extends MovieClip {
public function Container_1(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package Main_fla
Section 119
//Fuego_25 (Main_fla.Fuego_25)
package Main_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Fuego_25 extends MovieClip {
public var next_burst;
public function Fuego_25(){
addFrameScript(0, frame1, 1, frame2, 63, frame64);
}
function frame64(){
this.gotoAndStop(2);
}
public function countDown(_arg1:Event){
next_burst--;
if (next_burst <= 0){
next_burst = this._gap;
this.gotoAndPlay(3);
};
}
function frame1(){
next_burst = this._delay;
Globals.currentLevel.addEventListener(Event.ENTER_FRAME, countDown, false, 0, true);
}
function frame2(){
stop();
}
}
}//package Main_fla
Section 120
//logoWhite_83 (Main_fla.logoWhite_83)
package Main_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public dynamic class logoWhite_83 extends MovieClip {
public function logoWhite_83(){
addFrameScript(0, frame1);
}
public function frollover(_arg1:Event){
this.gotoAndStop(2);
}
function frame1(){
addEventListener(MouseEvent.ROLL_OVER, frollover, false, 0, true);
addEventListener(MouseEvent.ROLL_OUT, frollout, false, 0, true);
addEventListener(MouseEvent.MOUSE_UP, fmouseup, false, 0, true);
addEventListener(MouseEvent.CLICK, fmouseclick, false, 0, true);
stop();
}
public function frollout(_arg1:Event){
this.gotoAndStop(1);
}
public function fmouseup(_arg1:Event){
this.gotoAndStop(1);
}
public function fmouseclick(_arg1:Event){
navigateToURL(new URLRequest("http://www.bubblebox.com/"));
}
}
}//package Main_fla
Section 121
//MusicButton_82 (Main_fla.MusicButton_82)
package Main_fla {
import flash.display.*;
public dynamic class MusicButton_82 extends MovieClip {
public function MusicButton_82(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package Main_fla
Section 122
//OneWayHor_43 (Main_fla.OneWayHor_43)
package Main_fla {
import flash.display.*;
import Engine.Common.Math.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class OneWayHor_43 extends MovieClip {
public function OneWayHor_43(){
addFrameScript(0, frame1);
}
function frame1(){
this.force = new b2Vec2(this._forcex, this._forcey);
}
}
}//package Main_fla
Section 123
//QualityButton_85 (Main_fla.QualityButton_85)
package Main_fla {
import flash.display.*;
public dynamic class QualityButton_85 extends MovieClip {
public function QualityButton_85(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
stop();
}
function frame1(){
gotoAndStop(3);
}
function frame4(){
stop();
}
function frame2(){
stop();
}
}
}//package Main_fla
Section 124
//BallOfDeath (BallOfDeath)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class BallOfDeath extends Circle {
public function BallOfDeath(){
addFrameScript(0, frame1);
}
function frame1(){
this.createBody(this._density, this._friction, this._rest);
this.m_body.AllowSleeping(false);
}
}
}//package
Section 125
//Caja (Caja)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Caja extends Box {
public function Caja(){
addFrameScript(0, frame1);
}
function frame1(){
this.createBody(this._density, this._friction, this._rest);
this.m_body.AllowSleeping(false);
}
}
}//package
Section 126
//CellRenderer_disabledSkin (CellRenderer_disabledSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_disabledSkin extends MovieClip {
}
}//package
Section 127
//CellRenderer_downSkin (CellRenderer_downSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_downSkin extends MovieClip {
}
}//package
Section 128
//CellRenderer_overSkin (CellRenderer_overSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_overSkin extends MovieClip {
}
}//package
Section 129
//CellRenderer_selectedDisabledSkin (CellRenderer_selectedDisabledSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_selectedDisabledSkin extends MovieClip {
}
}//package
Section 130
//CellRenderer_selectedDownSkin (CellRenderer_selectedDownSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_selectedDownSkin extends MovieClip {
}
}//package
Section 131
//CellRenderer_selectedOverSkin (CellRenderer_selectedOverSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_selectedOverSkin extends MovieClip {
}
}//package
Section 132
//CellRenderer_selectedUpSkin (CellRenderer_selectedUpSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_selectedUpSkin extends MovieClip {
}
}//package
Section 133
//CellRenderer_upSkin (CellRenderer_upSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_upSkin extends MovieClip {
}
}//package
Section 134
//Circle1 (Circle1)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Circle1 extends Circle {
public function Circle1(){
addFrameScript(0, frame1, 1, frame2, 34, frame35, 82, frame83, 108, frame109);
}
function frame1(){
this.createBody(this._density, this._friction, this._rest);
Globals.ball = this;
Globals.ball.m_body.AllowSleeping(false);
Globals.initial_ball_pos.x = Globals.physX(this.x);
Globals.initial_ball_pos.y = Globals.physY(this.y);
}
function frame109(){
stop();
}
function frame83(){
gotoAndStop("final");
}
function frame2(){
stop();
}
function frame35(){
gotoAndStop("final");
}
}
}//package
Section 135
//Circulo (Circulo)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Circulo extends Circle {
public function Circulo(){
addFrameScript(0, frame1);
}
function frame1(){
this.createBody(this._density, this._friction, this._rest);
this.parent.removeChild(this);
}
}
}//package
Section 136
//ComboBox_disabledSkin (ComboBox_disabledSkin)
package {
import flash.display.*;
public dynamic class ComboBox_disabledSkin extends MovieClip {
}
}//package
Section 137
//ComboBox_downSkin (ComboBox_downSkin)
package {
import flash.display.*;
public dynamic class ComboBox_downSkin extends MovieClip {
}
}//package
Section 138
//ComboBox_overSkin (ComboBox_overSkin)
package {
import flash.display.*;
public dynamic class ComboBox_overSkin extends MovieClip {
}
}//package
Section 139
//ComboBox_upSkin (ComboBox_upSkin)
package {
import flash.display.*;
public dynamic class ComboBox_upSkin extends MovieClip {
}
}//package
Section 140
//Cruz (Cruz)
package {
import Engine.Collision.Shapes.*;
import Engine.Dynamics.*;
import GameLogic.*;
public dynamic class Cruz extends GameObject {
public var bloquehor:b2BoxDef;
public var bodyDefP:b2BodyDef;
public var bloquever:b2BoxDef;
public function Cruz(){
addFrameScript(0, frame1);
}
function frame1(){
bloquehor = new b2BoxDef();
bloquever = new b2BoxDef();
bodyDefP = new b2BodyDef();
bodyDefP.AddShape(bloquever);
bodyDefP.AddShape(bloquehor);
bloquever.extents.Set(Globals.physX(4), Globals.physY(100));
bloquever.localPosition.Set(0, 0);
bloquever.density = 1;
bloquever.friction = 1;
bloquever.restitution = 0;
bloquehor.extents.Set(Globals.physX(100), Globals.physY(4));
bloquehor.localPosition.Set(0, 0);
bloquehor.density = 1;
bloquehor.friction = 1;
bloquehor.restitution = 0;
bodyDefP.position.Set(Globals.physX(this.x), Globals.physY(this.y));
m_body = Globals.world.CreateBody(bodyDefP);
this.m_body.AllowSleeping(false);
}
}
}//package
Section 141
//FadeIn (FadeIn)
package {
import flash.display.*;
import GameLogic.*;
public dynamic class FadeIn extends MovieClip {
public var caca:MovieClip;
public function FadeIn(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
Globals.removeFromStage(this);
}
}
}//package
Section 142
//FadeOut (FadeOut)
package {
import flash.display.*;
public dynamic class FadeOut extends MovieClip {
public var caca:MovieClip;
public function FadeOut(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
}
}
}//package
Section 143
//focusRectSkin (focusRectSkin)
package {
import flash.display.*;
public dynamic class focusRectSkin extends MovieClip {
}
}//package
Section 144
//GameMenu (GameMenu)
package {
import fl.controls.*;
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class GameMenu extends MovieClip {
public var i_levelList:List;
public var i_continue2:SimpleButton;
public var t_totalSelect:TextField;
public var i_moregames:SimpleButton;
public var total30secs:Number;
public var i_tuerca:MovieClip;
public var j:int;
public var i_play:SimpleButton;
public var lastLevel:int;
public var i_continue:SimpleButton;
public var i_credits:SimpleButton;
public var i_backcredits:SimpleButton;
public function GameMenu(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
}
function frame3(){
i_continue.addEventListener(MouseEvent.CLICK, gotoDisclaimer, false, 0, true);
stop();
}
function frame1(){
lastLevel = 1;
i_play.addEventListener(MouseEvent.CLICK, fplay, false, 0, true);
i_credits.addEventListener(MouseEvent.CLICK, fcredits, false, 0, true);
i_moregames.addEventListener(MouseEvent.CLICK, fmoregames, false, 0, true);
addEventListener(Event.ENTER_FRAME, frotar, false, 0, true);
stop();
}
public function gotoDisclaimer(_arg1:Event){
gotoAndStop("disclaimer");
}
public function setListStyle(){
var _local1:TextFormat;
_local1 = new TextFormat();
_local1.color = 0xFFFFFF;
i_levelList.width = 192;
i_levelList.height = 156;
i_levelList.x = (340 - (i_levelList.width / 2));
i_levelList.y = 115;
i_levelList.setStyle("textFormat", _local1);
}
function frame4(){
i_backcredits.addEventListener(MouseEvent.CLICK, goback, false, 0, true);
stop();
}
public function fcontinuegame(_arg1:Event){
Globals.levelNumber = lastLevel;
Globals.gameState = Globals.ST_START;
}
public function fcredits(_arg1:Event){
gotoAndStop(4);
}
function frame2(){
i_continue2.addEventListener(MouseEvent.CLICK, fstartgame, false, 0, true);
stop();
}
function frame5(){
total30secs = 0;
j = 1;
while (j <= (Globals.savedData.data.bestTimes.length - 1)) {
total30secs = (total30secs + Globals.savedData.data.bestTimes[j]);
j++;
};
t_totalSelect.text = ("" + Globals.formatTime(total30secs));
initList();
i_levelList.addEventListener(Event.CHANGE, fselect, false, 0, true);
stage.addChild(i_levelList);
setListStyle();
stop();
}
public function fplay(_arg1:Event){
if (Globals.savedData.data.bestTimes.length > 0){
lastLevel = (Globals.savedData.data.bestTimes.length + 1);
gotoAndStop(5);
} else {
gotoAndStop(3);
};
}
public function frotar(_arg1:Event){
i_tuerca.rotation = (i_tuerca.rotation + 1);
}
public function fstartgame(_arg1:Event){
Globals.levelNumber = 1;
Globals.gameState = Globals.ST_START;
}
public function initList(){
var _local1:int;
var _local2:String;
i_levelList = new List();
i_levelList.allowMultipleSelection = false;
i_levelList.enabled = true;
i_levelList.horizontalLineScrollSize = 4;
i_levelList.horizontalPageScrollSize = 0;
i_levelList.horizontalScrollPolicy = ScrollPolicy.OFF;
i_levelList.verticalLineScrollSize = 4;
i_levelList.verticalPageScrollSize = 0;
i_levelList.verticalScrollPolicy = ScrollPolicy.ON;
i_levelList.visible = true;
_local1 = 1;
while (_local1 <= (Globals.savedData.data.bestTimes.length - 1)) {
_local2 = (("Level " + _local1) + " Best time: ");
_local2 = (_local2 + Globals.formatTime(Globals.savedData.data.bestTimes[_local1]));
i_levelList.addItem({label:_local2, data:_local1});
_local1++;
};
if (Globals.savedData.data.bestTimes.length <= Globals.numLevels){
i_levelList.addItem({label:(("Level " + _local1) + " Best time: N/A"), data:_local1});
};
}
public function goback(_arg1:Event){
gotoAndStop(1);
}
public function fselect(_arg1:Event){
lastLevel = _arg1.target.selectedItem.data;
stage.removeChild(i_levelList);
i_levelList = null;
fcontinuegame(_arg1);
}
public function fmoregames(_arg1:Event){
navigateToURL(new URLRequest("http://www.bubblebox.com/"));
}
}
}//package
Section 145
//GameOver (GameOver)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class GameOver extends MovieClip {
public var t_totalTime:TextField;
public var total30secs:Number;
public var i:int;
public var i_backbutton:SimpleButton;
public var rueda:MovieClip;
public function GameOver(){
addFrameScript(0, frame1);
}
public function rotar(_arg1:Event){
rueda.rotation = (rueda.rotation + 1);
}
public function backToMenu(_arg1:Event){
var _local2:MovieClip;
Globals.removeFromStage(this);
_local2 = new GameMenu();
Globals.scene = _local2;
_local2.x = 340;
_local2.y = 200;
Globals.g_stage.addChild(_local2);
Globals.gameState = Globals.ST_MENU;
}
function frame1(){
this.addEventListener(Event.ENTER_FRAME, rotar, false, 0, true);
i_backbutton.addEventListener(MouseEvent.CLICK, backToMenu, false, 0, true);
total30secs = 0;
i = 1;
while (i <= Globals.numLevels) {
total30secs = (total30secs + Globals.savedData.data.bestTimes[i]);
i++;
};
t_totalTime.text = ("Total Time: " + Globals.formatTime(total30secs));
Globals.savedData.data.gameCompleted = true;
stop();
}
}
}//package
Section 146
//Gear (Gear)
package {
import Engine.Collision.Shapes.*;
import Engine.Dynamics.*;
import GameLogic.*;
public dynamic class Gear extends GameObject {
public var circulo:b2CircleDef;
public var bloquediag1:b2BoxDef;
public var bloquediag2:b2BoxDef;
public var bloquehor:b2BoxDef;
public var bodyDefP:b2BodyDef;
public var bloquever:b2BoxDef;
public function Gear(){
addFrameScript(0, frame1);
}
function frame1(){
bloquehor = new b2BoxDef();
bloquever = new b2BoxDef();
bloquediag1 = new b2BoxDef();
bloquediag2 = new b2BoxDef();
circulo = new b2CircleDef();
bodyDefP = new b2BodyDef();
bodyDefP.AddShape(bloquever);
bodyDefP.AddShape(bloquehor);
bodyDefP.AddShape(bloquediag1);
bodyDefP.AddShape(bloquediag2);
bodyDefP.AddShape(circulo);
bloquever.extents.Set(Globals.physX(4), Globals.physY(100));
bloquever.localPosition.Set(0, 0);
bloquever.density = 1;
bloquever.friction = 1;
bloquever.restitution = 0;
bloquehor.extents.Set(Globals.physX(100), Globals.physY(4));
bloquehor.localPosition.Set(0, 0);
bloquehor.density = 1;
bloquehor.friction = 1;
bloquehor.restitution = 0;
bloquediag1.extents.Set(Globals.physX(100), Globals.physY(4));
bloquediag1.localPosition.Set(0, 0);
bloquediag1.localRotation = Globals.toRad(45);
bloquediag1.density = 1;
bloquediag1.friction = 1;
bloquediag1.restitution = 0;
bloquediag2.extents.Set(Globals.physX(100), Globals.physY(4));
bloquediag2.localPosition.Set(0, 0);
bloquediag2.localRotation = Globals.toRad(-45);
bloquediag2.density = 1;
bloquediag2.friction = 1;
bloquediag2.restitution = 0;
circulo.radius = Globals.physX(64);
circulo.density = 1;
circulo.friction = 1;
circulo.restitution = 0;
bodyDefP.position.Set(Globals.physX(this.x), Globals.physY(this.y));
m_body = Globals.world.CreateBody(bodyDefP);
this.m_body.AllowSleeping(false);
}
}
}//package
Section 147
//Intro (Intro)
package {
import flash.media.*;
public dynamic class Intro extends Sound {
}
}//package
Section 148
//Isosceles (Isosceles)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Isosceles extends Triangle {
public function Isosceles(){
addFrameScript(0, frame1);
}
function frame1(){
this.createBody(this._density, this._friction, this._rest);
parent.removeChild(this);
}
}
}//package
Section 149
//Lev1 (Lev1)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Lev1 extends LaberintoLevel {
public var __id1_:PlacaHorizontal;
public var __id3_:PlacaVertical;
public var __id2_:PlacaHorizontal;
public var __id4_:PlacaVertical;
public var __id6_:PlacaHorizontal;
public var __id5_:Circulo;
public var __id7_:Circle1;
public function Lev1(){
addFrameScript(0, frame1, 1, frame2);
__setProp___id7__Lev1_objetos_1();
__setProp___id2__Lev1_laberinto_1();
__setProp___id3__Lev1_laberinto_1();
__setProp___id1__Lev1_laberinto_1();
__setProp___id6__Lev1_laberinto_1();
__setProp___id4__Lev1_laberinto_1();
__setProp___id5__Lev1_laberinto_1();
}
function __setProp___id6__Lev1_laberinto_1(){
try {
__id6_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id6_._density = 0;
__id6_._friction = 1;
__id6_._rest = 0;
try {
__id6_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame1(){
Globals.g_stage.addEventListener(KeyboardEvent.KEY_DOWN, fcontinue, false, 0, true);
stop();
}
function __setProp___id5__Lev1_laberinto_1(){
try {
__id5_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id5_._density = 0;
__id5_._friction = 1;
__id5_._rest = 0;
try {
__id5_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id4__Lev1_laberinto_1(){
try {
__id4_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id4_._density = 0;
__id4_._friction = 1;
__id4_._rest = 0;
try {
__id4_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
public function fcontinue(_arg1:Event){
Globals.g_stage.removeEventListener(KeyboardEvent.KEY_DOWN, fcontinue);
nextFrame();
}
function __setProp___id2__Lev1_laberinto_1(){
try {
__id2_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id2_._density = 0;
__id2_._friction = 1;
__id2_._rest = 0;
try {
__id2_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame2(){
this.start();
stop();
}
function __setProp___id3__Lev1_laberinto_1(){
try {
__id3_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id3_._density = 0;
__id3_._friction = 1;
__id3_._rest = 0;
try {
__id3_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id1__Lev1_laberinto_1(){
try {
__id1_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id1_._density = 0;
__id1_._friction = 1;
__id1_._rest = 0;
try {
__id1_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id7__Lev1_objetos_1(){
try {
__id7_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id7_._density = 1;
__id7_._friction = 1;
__id7_._rest = 0.3;
try {
__id7_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 150
//Lev10 (Lev10)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Lev10 extends LaberintoLevel {
public var __id88_:PlacaVertical;
public var __id84_:PlacaHorizontal;
public var __id86_:Triangle2;
public var __id85_:PlacaHorizontal;
public var __id87_:Triangle4;
public var __id89_:PlacaVertical;
public var __id91_:Triangle3;
public var __id90_:PlacaVertical;
public var __id92_:PlacaHorizontal;
public var __id80_:PlacaHorizontal;
public var __id93_:Isosceles;
public var __id81_:PlacaHorizontal;
public var __id94_:PlacaHorizontal;
public var __id82_:PlacaVertical;
public var __id95_:Circle1;
public var __id83_:PlacaVertical;
public function Lev10(){
addFrameScript(0, frame1, 1, frame2);
__setProp___id89__Lev10_laberinto_1();
__setProp___id88__Lev10_laberinto_1();
__setProp___id94__Lev10_laberinto_1();
__setProp___id85__Lev10_laberinto_1();
__setProp___id84__Lev10_laberinto_1();
__setProp___id87__Lev10_laberinto_1();
__setProp___id91__Lev10_laberinto_1();
__setProp___id86__Lev10_laberinto_1();
__setProp___id90__Lev10_laberinto_1();
__setProp___id81__Lev10_laberinto_1();
__setProp___id93__Lev10_laberinto_1();
__setProp___id80__Lev10_laberinto_1();
__setProp___id95__Lev10_objetos_1();
__setProp___id92__Lev10_laberinto_1();
__setProp___id83__Lev10_laberinto_1();
__setProp___id82__Lev10_laberinto_1();
__setProp_llama1_Lev10_objetos_1();
}
function __setProp___id86__Lev10_laberinto_1(){
try {
__id86_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id86_._density = 0;
__id86_._friction = 1;
__id86_._rest = 0;
try {
__id86_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame1(){
Globals.g_stage.addEventListener(KeyboardEvent.KEY_DOWN, fcontinue, false, 0, true);
stop();
}
function __setProp___id87__Lev10_laberinto_1(){
try {
__id87_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id87_._density = 0;
__id87_._friction = 1;
__id87_._rest = 0;
try {
__id87_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id92__Lev10_laberinto_1(){
try {
__id92_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id92_._density = 0;
__id92_._friction = 1;
__id92_._rest = 0;
try {
__id92_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id81__Lev10_laberinto_1(){
try {
__id81_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id81_._density = 0;
__id81_._friction = 1;
__id81_._rest = 0;
try {
__id81_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id93__Lev10_laberinto_1(){
try {
__id93_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id93_._density = 0;
__id93_._friction = 1;
__id93_._rest = 0;
try {
__id93_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama1_Lev10_objetos_1(){
try {
llama1["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama1._gap = 120;
llama1._delay = 0;
try {
llama1["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id95__Lev10_objetos_1(){
try {
__id95_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id95_._density = 1;
__id95_._friction = 1;
__id95_._rest = 0.3;
try {
__id95_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id82__Lev10_laberinto_1(){
try {
__id82_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id82_._density = 0;
__id82_._friction = 1;
__id82_._rest = 0;
try {
__id82_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id94__Lev10_laberinto_1(){
try {
__id94_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id94_._density = 0;
__id94_._friction = 1;
__id94_._rest = 0;
try {
__id94_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
public function fcontinue(_arg1:Event){
Globals.g_stage.removeEventListener(KeyboardEvent.KEY_DOWN, fcontinue);
nextFrame();
}
function __setProp___id88__Lev10_laberinto_1(){
try {
__id88_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id88_._density = 0;
__id88_._friction = 1;
__id88_._rest = 0;
try {
__id88_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id83__Lev10_laberinto_1(){
try {
__id83_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id83_._density = 0;
__id83_._friction = 1;
__id83_._rest = 0;
try {
__id83_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id89__Lev10_laberinto_1(){
try {
__id89_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id89_._density = 0;
__id89_._friction = 1;
__id89_._rest = 0;
try {
__id89_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id84__Lev10_laberinto_1(){
try {
__id84_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id84_._density = 0;
__id84_._friction = 1;
__id84_._rest = 0;
try {
__id84_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame2(){
this.start();
stop();
}
function __setProp___id90__Lev10_laberinto_1(){
try {
__id90_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id90_._density = 0;
__id90_._friction = 1;
__id90_._rest = 0;
try {
__id90_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id85__Lev10_laberinto_1(){
try {
__id85_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id85_._density = 0;
__id85_._friction = 1;
__id85_._rest = 0;
try {
__id85_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id91__Lev10_laberinto_1(){
try {
__id91_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id91_._density = 0;
__id91_._friction = 1;
__id91_._rest = 0;
try {
__id91_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id80__Lev10_laberinto_1(){
try {
__id80_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id80_._density = 0;
__id80_._friction = 1;
__id80_._rest = 0;
try {
__id80_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 151
//Lev11 (Lev11)
package {
import flash.display.*;
import Engine.Dynamics.Joints.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Lev11 extends LaberintoLevel {
public var __id148_:PlacaVertical;
public var __id149_:PlacaHorizontal;
public var next_change:int;
public var __id150_:PlacaHorizontal;
public var __id151_:BallOfDeath;
public var backwards:Boolean;
public var __id153_:Circle1;
public var __id152_:PlacaHorizontal;
public var timer:int;
public var __id145_:PlacaHorizontal;
public var __id146_:PlacaHorizontal;
public var __id147_:PlacaVertical;
public function Lev11(){
addFrameScript(0, frame1);
__setProp___id148__Lev11_laberinto_1();
__setProp___id149__Lev11_laberinto_1();
__setProp_llama2_Lev11_laberinto2_1();
__setProp_i_rjoint1_Lev11_laberinto2_1();
__setProp___id153__Lev11_objetos_1();
__setProp___id151__Lev11_laberinto_1();
__setProp___id150__Lev11_laberinto_1();
__setProp___id145__Lev11_laberinto_1();
__setProp_llama1_Lev11_laberinto2_1();
__setProp___id152__Lev11_laberinto_1();
__setProp___id146__Lev11_laberinto_1();
__setProp___id147__Lev11_laberinto_1();
}
public function countDown(_arg1:Event){
timer--;
if (timer <= 0){
timer = next_change;
changeSpeed();
};
}
public function changeSpeed(){
var _local1:Number;
backwards = !(backwards);
if (backwards){
_local1 = -0.1;
} else {
_local1 = -(((Math.random() * 6) + 8));
};
i_rjoint1.m_joint.SetMotorSpeed(_local1);
}
function __setProp___id147__Lev11_laberinto_1(){
try {
__id147_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id147_._density = 0;
__id147_._friction = 1;
__id147_._rest = 0;
try {
__id147_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id146__Lev11_laberinto_1(){
try {
__id146_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id146_._density = 0;
__id146_._friction = 1;
__id146_._rest = 0;
try {
__id146_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama1_Lev11_laberinto2_1(){
try {
llama1["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama1._gap = 90;
llama1._delay = 0;
try {
llama1["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame1(){
next_change = 40;
timer = next_change;
backwards = true;
Globals.currentLevel.addEventListener(Event.ENTER_FRAME, countDown, false, 0, true);
this.start();
stop();
}
function __setProp___id148__Lev11_laberinto_1(){
try {
__id148_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id148_._density = 0;
__id148_._friction = 1;
__id148_._rest = 0;
try {
__id148_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama2_Lev11_laberinto2_1(){
try {
llama2["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama2._gap = 90;
llama2._delay = 0;
try {
llama2["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id152__Lev11_laberinto_1(){
try {
__id152_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id152_._density = 0;
__id152_._friction = 1;
__id152_._rest = 0;
try {
__id152_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id149__Lev11_laberinto_1(){
try {
__id149_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id149_._density = 0;
__id149_._friction = 1;
__id149_._rest = 0;
try {
__id149_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id150__Lev11_laberinto_1(){
try {
__id150_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id150_._density = 0;
__id150_._friction = 1;
__id150_._rest = 0;
try {
__id150_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id153__Lev11_objetos_1(){
try {
__id153_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id153_._density = 1;
__id153_._friction = 1;
__id153_._rest = 0.3;
try {
__id153_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_i_rjoint1_Lev11_laberinto2_1(){
try {
i_rjoint1["componentInspectorSetting"] = true;
} catch(e:Error) {
};
i_rjoint1._torque = 5000;
i_rjoint1._speed = -5;
try {
i_rjoint1["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id145__Lev11_laberinto_1(){
try {
__id145_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id145_._density = 0;
__id145_._friction = 1;
__id145_._rest = 0;
try {
__id145_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id151__Lev11_laberinto_1(){
try {
__id151_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id151_._density = 1;
__id151_._friction = 1;
__id151_._rest = 0;
try {
__id151_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 152
//Lev12 (Lev12)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Lev12 extends LaberintoLevel {
public var __id116_:PlacaHorizontal;
public var __id118_:PlacaHorizontal;
public var __id112_:PlacaHorizontal;
public var __id119_:PlacaVertical;
public var __id114_:PlacaHorizontal;
public var __id107_:PlacaHorizontal;
public var __id113_:PlacaVertical;
public var __id109_:PlacaVertical;
public var __id115_:PlacaVertical;
public var __id117_:PlacaVertical;
public var __id108_:PlacaVertical;
public var __id120_:PlacaHorizontal;
public var __id106_:PlacaHorizontal;
public var __id121_:Circle1;
public var __id110_:PlacaHorizontal;
public var __id111_:PlacaVertical;
public function Lev12(){
addFrameScript(0, frame1);
__setProp___id120__Lev12_laberinto_1();
__setProp___id110__Lev12_laberinto_1();
__setProp___id111__Lev12_laberinto_1();
__setProp___id114__Lev12_laberinto_1();
__setProp___id115__Lev12_laberinto_1();
__setProp___id112__Lev12_laberinto_1();
__setProp___id113__Lev12_laberinto_1();
__setProp___id106__Lev12_laberinto_1();
__setProp___id107__Lev12_laberinto_1();
__setProp___id121__Lev12_objetos_1();
__setProp___id116__Lev12_laberinto_1();
__setProp___id118__Lev12_laberinto_1();
__setProp___id117__Lev12_laberinto_1();
__setProp___id119__Lev12_laberinto_1();
__setProp___id108__Lev12_laberinto_1();
__setProp___id109__Lev12_laberinto_1();
}
function __setProp___id116__Lev12_laberinto_1(){
try {
__id116_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id116_._density = 0;
__id116_._friction = 1;
__id116_._rest = 0;
try {
__id116_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame1(){
this.start();
stop();
}
function __setProp___id111__Lev12_laberinto_1(){
try {
__id111_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id111_._density = 0;
__id111_._friction = 1;
__id111_._rest = 0;
try {
__id111_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id112__Lev12_laberinto_1(){
try {
__id112_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id112_._density = 0;
__id112_._friction = 1;
__id112_._rest = 0;
try {
__id112_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id106__Lev12_laberinto_1(){
try {
__id106_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id106_._density = 0;
__id106_._friction = 1;
__id106_._rest = 0;
try {
__id106_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id121__Lev12_objetos_1(){
try {
__id121_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id121_._density = 1;
__id121_._friction = 1;
__id121_._rest = 0.3;
try {
__id121_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id117__Lev12_laberinto_1(){
try {
__id117_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id117_._density = 0;
__id117_._friction = 1;
__id117_._rest = 0;
try {
__id117_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id118__Lev12_laberinto_1(){
try {
__id118_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id118_._density = 0;
__id118_._friction = 1;
__id118_._rest = 0;
try {
__id118_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id113__Lev12_laberinto_1(){
try {
__id113_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id113_._density = 0;
__id113_._friction = 1;
__id113_._rest = 0;
try {
__id113_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id107__Lev12_laberinto_1(){
try {
__id107_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id107_._density = 0;
__id107_._friction = 1;
__id107_._rest = 0;
try {
__id107_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id119__Lev12_laberinto_1(){
try {
__id119_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id119_._density = 0;
__id119_._friction = 1;
__id119_._rest = 0;
try {
__id119_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id120__Lev12_laberinto_1(){
try {
__id120_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id120_._density = 0;
__id120_._friction = 1;
__id120_._rest = 0;
try {
__id120_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id108__Lev12_laberinto_1(){
try {
__id108_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id108_._density = 0;
__id108_._friction = 1;
__id108_._rest = 0;
try {
__id108_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id114__Lev12_laberinto_1(){
try {
__id114_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id114_._density = 0;
__id114_._friction = 1;
__id114_._rest = 0;
try {
__id114_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id109__Lev12_laberinto_1(){
try {
__id109_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id109_._density = 0;
__id109_._friction = 1;
__id109_._rest = 0;
try {
__id109_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id115__Lev12_laberinto_1(){
try {
__id115_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id115_._density = 0;
__id115_._friction = 1;
__id115_._rest = 0;
try {
__id115_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id110__Lev12_laberinto_1(){
try {
__id110_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id110_._density = 0;
__id110_._friction = 1;
__id110_._rest = 0;
try {
__id110_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 153
//Lev13 (Lev13)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Lev13 extends LaberintoLevel {
public var __id124_:PlacaVertical;
public var __id136_:PlacaVertical;
public var __id139_:PlacaHorizontal;
public var __id126_:PlacaHorizontal;
public var __id127_:PlacaVertical;
public var __id128_:PlacaVertical;
public var __id137_:PlacaHorizontal;
public var __id138_:PlacaVertical;
public var __id129_:PlacaHorizontal;
public var __id140_:PlacaVertical;
public var __id141_:PlacaVertical;
public var __id125_:PlacaVertical;
public var __id130_:PlacaHorizontal;
public var __id143_:PlacaHorizontal;
public var __id131_:PlacaVertical;
public var __id142_:PlacaHorizontal;
public var __id144_:Circle1;
public var __id132_:PlacaVertical;
public var __id133_:PlacaHorizontal;
public var __id134_:PlacaHorizontal;
public var __id122_:PlacaHorizontal;
public var __id135_:PlacaVertical;
public var __id123_:PlacaHorizontal;
public function Lev13(){
addFrameScript(0, frame1);
__setProp_llama1_Lev13_objetos_1();
__setProp_llama5_Lev13_objetos_1();
__setProp___id139__Lev13_laberinto_1();
__setProp___id128__Lev13_laberinto_1();
__setProp___id129__Lev13_laberinto_1();
__setProp_llama7_Lev13_objetos_1();
__setProp_llama6_Lev13_objetos_1();
__setProp_llama12_Lev13_objetos_1();
__setProp_llama3_Lev13_objetos_1();
__setProp_llama10_Lev13_objetos_1();
__setProp___id140__Lev13_laberinto_1();
__setProp___id141__Lev13_laberinto_1();
__setProp___id130__Lev13_laberinto_1();
__setProp___id131__Lev13_laberinto_1();
__setProp___id124__Lev13_laberinto_1();
__setProp_llama4_Lev13_objetos_1();
__setProp___id125__Lev13_laberinto_1();
__setProp_llama11_Lev13_objetos_1();
__setProp___id122__Lev13_laberinto_1();
__setProp___id134__Lev13_laberinto_1();
__setProp___id123__Lev13_laberinto_1();
__setProp___id142__Lev13_laberinto_1();
__setProp___id135__Lev13_laberinto_1();
__setProp_llama9_Lev13_objetos_1();
__setProp_llama2_Lev13_objetos_1();
__setProp___id143__Lev13_laberinto_1();
__setProp___id132__Lev13_laberinto_1();
__setProp___id133__Lev13_laberinto_1();
__setProp___id126__Lev13_laberinto_1();
__setProp___id127__Lev13_laberinto_1();
__setProp_llama8_Lev13_objetos_1();
__setProp___id144__Lev13_objetos_1();
__setProp___id136__Lev13_laberinto_1();
__setProp___id138__Lev13_laberinto_1();
__setProp___id137__Lev13_laberinto_1();
}
function __setProp___id143__Lev13_laberinto_1(){
try {
__id143_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id143_._density = 0;
__id143_._friction = 1;
__id143_._rest = 0;
try {
__id143_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id127__Lev13_laberinto_1(){
try {
__id127_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id127_._density = 0;
__id127_._friction = 1;
__id127_._rest = 0;
try {
__id127_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id126__Lev13_laberinto_1(){
try {
__id126_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id126_._density = 0;
__id126_._friction = 1;
__id126_._rest = 0;
try {
__id126_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id132__Lev13_laberinto_1(){
try {
__id132_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id132_._density = 0;
__id132_._friction = 1;
__id132_._rest = 0;
try {
__id132_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id139__Lev13_laberinto_1(){
try {
__id139_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id139_._density = 0;
__id139_._friction = 1;
__id139_._rest = 0;
try {
__id139_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id122__Lev13_laberinto_1(){
try {
__id122_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id122_._density = 0;
__id122_._friction = 1;
__id122_._rest = 0;
try {
__id122_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id128__Lev13_laberinto_1(){
try {
__id128_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id128_._density = 0;
__id128_._friction = 1;
__id128_._rest = 0;
try {
__id128_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id134__Lev13_laberinto_1(){
try {
__id134_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id134_._density = 0;
__id134_._friction = 1;
__id134_._rest = 0;
try {
__id134_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama1_Lev13_objetos_1(){
try {
llama1["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama1._gap = 135;
llama1._delay = 45;
try {
llama1["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama3_Lev13_objetos_1(){
try {
llama3["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama3._gap = 135;
llama3._delay = 45;
try {
llama3["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama4_Lev13_objetos_1(){
try {
llama4["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama4._gap = 135;
llama4._delay = 0;
try {
llama4["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama7_Lev13_objetos_1(){
try {
llama7["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama7._gap = 135;
llama7._delay = 0;
try {
llama7["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama6_Lev13_objetos_1(){
try {
llama6["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama6._gap = 135;
llama6._delay = 0;
try {
llama6["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id140__Lev13_laberinto_1(){
try {
__id140_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id140_._density = 0;
__id140_._friction = 1;
__id140_._rest = 0;
try {
__id140_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama5_Lev13_objetos_1(){
try {
llama5["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama5._gap = 135;
llama5._delay = 45;
try {
llama5["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id123__Lev13_laberinto_1(){
try {
__id123_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id123_._density = 0;
__id123_._friction = 1;
__id123_._rest = 0;
try {
__id123_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama8_Lev13_objetos_1(){
try {
llama8["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama8._gap = 135;
llama8._delay = 45;
try {
llama8["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id133__Lev13_laberinto_1(){
try {
__id133_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id133_._density = 0;
__id133_._friction = 1;
__id133_._rest = 0;
try {
__id133_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id135__Lev13_laberinto_1(){
try {
__id135_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id135_._density = 0;
__id135_._friction = 1;
__id135_._rest = 0;
try {
__id135_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id129__Lev13_laberinto_1(){
try {
__id129_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id129_._density = 0;
__id129_._friction = 1;
__id129_._rest = 0;
try {
__id129_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id137__Lev13_laberinto_1(){
try {
__id137_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id137_._density = 0;
__id137_._friction = 1;
__id137_._rest = 0;
try {
__id137_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama2_Lev13_objetos_1(){
try {
llama2["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama2._gap = 135;
llama2._delay = 0;
try {
llama2["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id130__Lev13_laberinto_1(){
try {
__id130_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id130_._density = 0;
__id130_._friction = 1;
__id130_._rest = 0;
try {
__id130_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id141__Lev13_laberinto_1(){
try {
__id141_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id141_._density = 0;
__id141_._friction = 1;
__id141_._rest = 0;
try {
__id141_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id144__Lev13_objetos_1(){
try {
__id144_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id144_._density = 1;
__id144_._friction = 1;
__id144_._rest = 0.3;
try {
__id144_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id124__Lev13_laberinto_1(){
try {
__id124_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id124_._density = 0;
__id124_._friction = 1;
__id124_._rest = 0;
try {
__id124_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama9_Lev13_objetos_1(){
try {
llama9["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama9._gap = 135;
llama9._delay = 0;
try {
llama9["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id138__Lev13_laberinto_1(){
try {
__id138_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id138_._density = 0;
__id138_._friction = 1;
__id138_._rest = 0;
try {
__id138_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id136__Lev13_laberinto_1(){
try {
__id136_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id136_._density = 0;
__id136_._friction = 1;
__id136_._rest = 0;
try {
__id136_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id142__Lev13_laberinto_1(){
try {
__id142_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id142_._density = 0;
__id142_._friction = 1;
__id142_._rest = 0;
try {
__id142_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama10_Lev13_objetos_1(){
try {
llama10["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama10._gap = 135;
llama10._delay = 45;
try {
llama10["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama12_Lev13_objetos_1(){
try {
llama12["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama12._gap = 135;
llama12._delay = 45;
try {
llama12["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id125__Lev13_laberinto_1(){
try {
__id125_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id125_._density = 0;
__id125_._friction = 1;
__id125_._rest = 0;
try {
__id125_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id131__Lev13_laberinto_1(){
try {
__id131_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id131_._density = 0;
__id131_._friction = 1;
__id131_._rest = 0;
try {
__id131_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama11_Lev13_objetos_1(){
try {
llama11["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama11._gap = 135;
llama11._delay = 0;
try {
llama11["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame1(){
this.start();
stop();
}
}
}//package
Section 154
//Lev14 (Lev14)
package {
import flash.display.*;
import Engine.Dynamics.Joints.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Lev14 extends LaberintoLevel {
public var __id96_:PlacaHorizontal;
public var __id100_:PlacaHorizontal;
public var __id103_:Caja;
public var __id99_:PlacaVertical;
public var __id102_:Caja;
public var __id98_:PlacaVertical;
public var __id104_:PlacaHorizontal;
public var __id105_:Circle1;
public var __id97_:PlacaHorizontal;
public var __id101_:PlacaHorizontal;
public function Lev14(){
addFrameScript(0, frame1);
__setProp___id100__Lev14_laberinto_1();
__setProp___id105__Lev14_objetos_1();
__setProp___id101__Lev14_laberinto_1();
__setProp___id99__Lev14_laberinto_1();
__setProp___id98__Lev14_laberinto_1();
__setProp___id104__Lev14_laberinto_1();
__setProp___id97__Lev14_laberinto_1();
__setProp_llama2_Lev14_laberinto2_1();
__setProp___id102__Lev14_laberinto_1();
__setProp___id96__Lev14_laberinto_1();
__setProp___id103__Lev14_laberinto_1();
__setProp_llama1_Lev14_laberinto2_1();
__setProp_i_rjoint1_Lev14_laberinto2_1();
}
function __setProp___id97__Lev14_laberinto_1(){
try {
__id97_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id97_._density = 0;
__id97_._friction = 1;
__id97_._rest = 0;
try {
__id97_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id103__Lev14_laberinto_1(){
try {
__id103_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id103_._density = 0;
__id103_._friction = 1;
__id103_._rest = 0;
try {
__id103_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id98__Lev14_laberinto_1(){
try {
__id98_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id98_._density = 0;
__id98_._friction = 1;
__id98_._rest = 0;
try {
__id98_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id99__Lev14_laberinto_1(){
try {
__id99_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id99_._density = 0;
__id99_._friction = 1;
__id99_._rest = 0;
try {
__id99_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame1(){
this.start();
stop();
}
function __setProp___id104__Lev14_laberinto_1(){
try {
__id104_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id104_._density = 0;
__id104_._friction = 1;
__id104_._rest = 0;
try {
__id104_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id102__Lev14_laberinto_1(){
try {
__id102_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id102_._density = 1;
__id102_._friction = 1;
__id102_._rest = 0;
try {
__id102_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id105__Lev14_objetos_1(){
try {
__id105_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id105_._density = 1;
__id105_._friction = 1;
__id105_._rest = 0.3;
try {
__id105_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id100__Lev14_laberinto_1(){
try {
__id100_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id100_._density = 0;
__id100_._friction = 1;
__id100_._rest = 0;
try {
__id100_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama1_Lev14_laberinto2_1(){
try {
llama1["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama1._gap = 90;
llama1._delay = 0;
try {
llama1["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_i_rjoint1_Lev14_laberinto2_1(){
try {
i_rjoint1["componentInspectorSetting"] = true;
} catch(e:Error) {
};
i_rjoint1._torque = 5000;
i_rjoint1._speed = 1;
try {
i_rjoint1["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id96__Lev14_laberinto_1(){
try {
__id96_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id96_._density = 0;
__id96_._friction = 1;
__id96_._rest = 0;
try {
__id96_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id101__Lev14_laberinto_1(){
try {
__id101_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id101_._density = 0;
__id101_._friction = 1;
__id101_._rest = 0;
try {
__id101_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama2_Lev14_laberinto2_1(){
try {
llama2["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama2._gap = 90;
llama2._delay = 0;
try {
llama2["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 155
//Lev15 (Lev15)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Lev15 extends LaberintoLevel {
public var __id171_:PlacaHorizontal;
public var __id180_:PlacaHorizontal;
public var __id182_:Circle1;
public var __id170_:PlacaHorizontal;
public var __id161_:PlacaHorizontal;
public var __id172_:Circulo;
public var __id162_:PlacaHorizontal;
public var __id174_:Circulo;
public var __id173_:Circulo;
public var __id175_:Circulo;
public var __id181_:Circulo;
public var __id176_:PlacaHorizontal;
public var __id177_:PlacaHorizontal;
public var __id165_:Triangle4;
public var __id164_:PlacaVertical;
public var __id163_:PlacaVertical;
public var __id166_:Triangle3;
public var __id178_:PlacaHorizontal;
public var __id155_:PlacaHorizontal;
public var __id179_:PlacaHorizontal;
public var __id167_:Triangle2;
public var __id154_:PlacaHorizontal;
public var __id156_:PlacaVertical;
public var __id168_:Isosceles;
public var __id169_:PlacaHorizontal;
public var __id157_:PlacaVertical;
public var __id158_:PlacaVertical;
public var __id160_:PlacaHorizontal;
public var __id159_:PlacaVertical;
public function Lev15(){
addFrameScript(0, frame1);
__setProp___id182__Lev15_objetos_1();
__setProp___id167__Lev15_laberinto_1();
__setProp___id156__Lev15_laberinto_1();
__setProp___id158__Lev15_laberinto_1();
__setProp___id157__Lev15_laberinto_1();
__setProp___id176__Lev15_laberinto_1();
__setProp___id159__Lev15_laberinto_1();
__setProp___id178__Lev15_laberinto_1();
__setProp___id177__Lev15_laberinto_1();
__setProp___id179__Lev15_laberinto_1();
__setProp___id168__Lev15_laberinto_1();
__setProp___id169__Lev15_laberinto_1();
__setProp___id160__Lev15_laberinto_1();
__setProp___id161__Lev15_laberinto_1();
__setProp___id170__Lev15_laberinto_1();
__setProp___id181__Lev15_laberinto_1();
__setProp___id171__Lev15_laberinto_1();
__setProp___id164__Lev15_laberinto_1();
__setProp___id180__Lev15_laberinto_1();
__setProp___id165__Lev15_laberinto_1();
__setProp___id154__Lev15_laberinto_1();
__setProp___id162__Lev15_laberinto_1();
__setProp___id155__Lev15_laberinto_1();
__setProp___id174__Lev15_laberinto_1();
__setProp___id163__Lev15_laberinto_1();
__setProp___id175__Lev15_laberinto_1();
__setProp___id172__Lev15_laberinto_1();
__setProp___id173__Lev15_laberinto_1();
__setProp___id166__Lev15_laberinto_1();
}
function __setProp___id180__Lev15_laberinto_1(){
try {
__id180_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id180_._density = 0;
__id180_._friction = 1;
__id180_._rest = 0;
try {
__id180_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id181__Lev15_laberinto_1(){
try {
__id181_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id181_._density = 0;
__id181_._friction = 1;
__id181_._rest = 0;
try {
__id181_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id158__Lev15_laberinto_1(){
try {
__id158_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id158_._density = 0;
__id158_._friction = 1;
__id158_._rest = 0;
try {
__id158_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id176__Lev15_laberinto_1(){
try {
__id176_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id176_._density = 0;
__id176_._friction = 1;
__id176_._rest = 0;
try {
__id176_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id159__Lev15_laberinto_1(){
try {
__id159_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id159_._density = 0;
__id159_._friction = 1;
__id159_._rest = 0;
try {
__id159_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id171__Lev15_laberinto_1(){
try {
__id171_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id171_._density = 0;
__id171_._friction = 1;
__id171_._rest = 0;
try {
__id171_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id175__Lev15_laberinto_1(){
try {
__id175_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id175_._density = 0;
__id175_._friction = 1;
__id175_._rest = 0;
try {
__id175_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id165__Lev15_laberinto_1(){
try {
__id165_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id165_._density = 0;
__id165_._friction = 1;
__id165_._rest = 0;
try {
__id165_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id170__Lev15_laberinto_1(){
try {
__id170_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id170_._density = 0;
__id170_._friction = 1;
__id170_._rest = 0;
try {
__id170_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id160__Lev15_laberinto_1(){
try {
__id160_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id160_._density = 0;
__id160_._friction = 1;
__id160_._rest = 0;
try {
__id160_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id154__Lev15_laberinto_1(){
try {
__id154_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id154_._density = 0;
__id154_._friction = 1;
__id154_._rest = 0;
try {
__id154_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id163__Lev15_laberinto_1(){
try {
__id163_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id163_._density = 0;
__id163_._friction = 1;
__id163_._rest = 0;
try {
__id163_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id164__Lev15_laberinto_1(){
try {
__id164_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id164_._density = 0;
__id164_._friction = 1;
__id164_._rest = 0;
try {
__id164_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id166__Lev15_laberinto_1(){
try {
__id166_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id166_._density = 0;
__id166_._friction = 1;
__id166_._rest = 0;
try {
__id166_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id177__Lev15_laberinto_1(){
try {
__id177_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id177_._density = 0;
__id177_._friction = 1;
__id177_._rest = 0;
try {
__id177_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id155__Lev15_laberinto_1(){
try {
__id155_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id155_._density = 0;
__id155_._friction = 1;
__id155_._rest = 0;
try {
__id155_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id172__Lev15_laberinto_1(){
try {
__id172_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id172_._density = 0;
__id172_._friction = 1;
__id172_._rest = 0;
try {
__id172_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id178__Lev15_laberinto_1(){
try {
__id178_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id178_._density = 0;
__id178_._friction = 1;
__id178_._rest = 0;
try {
__id178_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id157__Lev15_laberinto_1(){
try {
__id157_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id157_._density = 0;
__id157_._friction = 1;
__id157_._rest = 0;
try {
__id157_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id161__Lev15_laberinto_1(){
try {
__id161_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id161_._density = 0;
__id161_._friction = 1;
__id161_._rest = 0;
try {
__id161_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id169__Lev15_laberinto_1(){
try {
__id169_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id169_._density = 0;
__id169_._friction = 1;
__id169_._rest = 0;
try {
__id169_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id167__Lev15_laberinto_1(){
try {
__id167_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id167_._density = 0;
__id167_._friction = 1;
__id167_._rest = 0;
try {
__id167_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id173__Lev15_laberinto_1(){
try {
__id173_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id173_._density = 0;
__id173_._friction = 1;
__id173_._rest = 0;
try {
__id173_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id182__Lev15_objetos_1(){
try {
__id182_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id182_._density = 1;
__id182_._friction = 1;
__id182_._rest = 0.3;
try {
__id182_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id156__Lev15_laberinto_1(){
try {
__id156_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id156_._density = 0;
__id156_._friction = 1;
__id156_._rest = 0;
try {
__id156_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id162__Lev15_laberinto_1(){
try {
__id162_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id162_._density = 0;
__id162_._friction = 1;
__id162_._rest = 0;
try {
__id162_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame1(){
this.start();
stop();
}
function __setProp___id179__Lev15_laberinto_1(){
try {
__id179_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id179_._density = 0;
__id179_._friction = 1;
__id179_._rest = 0;
try {
__id179_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id168__Lev15_laberinto_1(){
try {
__id168_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id168_._density = 0;
__id168_._friction = 1;
__id168_._rest = 0;
try {
__id168_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id174__Lev15_laberinto_1(){
try {
__id174_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id174_._density = 0;
__id174_._friction = 1;
__id174_._rest = 0;
try {
__id174_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 156
//Lev16 (Lev16)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Lev16 extends LaberintoLevel {
public var __id183_:PlacaHorizontal;
public var __id196_:Circle1;
public var __id186_:PlacaVertical;
public var __id192_:Triangle2;
public var __id185_:PlacaVertical;
public var __id184_:PlacaVertical;
public var __id195_:PlacaVertical;
public var __id187_:PlacaVertical;
public var __id193_:PlacaHorizontal;
public var __id194_:PlacaHorizontal;
public var __id188_:PlacaHorizontal;
public var __id189_:PlacaHorizontal;
public var __id190_:Triangle3;
public var __id191_:Isosceles;
public function Lev16(){
addFrameScript(0, frame1);
__setProp___id196__Lev16_objetos_1();
__setProp___id189__Lev16_laberinto_1();
__setProp___id188__Lev16_laberinto_1();
__setProp___id195__Lev16_laberinto_1();
__setProp___id194__Lev16_laberinto_1();
__setProp___id185__Lev16_laberinto_1();
__setProp___id184__Lev16_laberinto_1();
__setProp___id187__Lev16_laberinto_1();
__setProp___id191__Lev16_laberinto_1();
__setProp___id186__Lev16_laberinto_1();
__setProp___id190__Lev16_laberinto_1();
__setProp___id193__Lev16_laberinto_1();
__setProp___id192__Lev16_laberinto_1();
__setProp___id183__Lev16_laberinto_1();
}
function frame1(){
this.start();
stop();
}
function __setProp___id196__Lev16_objetos_1(){
try {
__id196_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id196_._density = 1;
__id196_._friction = 1;
__id196_._rest = 0.3;
try {
__id196_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id186__Lev16_laberinto_1(){
try {
__id186_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id186_._density = 0;
__id186_._friction = 1;
__id186_._rest = 0;
try {
__id186_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id192__Lev16_laberinto_1(){
try {
__id192_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id192_._density = 0;
__id192_._friction = 1;
__id192_._rest = 0;
try {
__id192_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id191__Lev16_laberinto_1(){
try {
__id191_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id191_._density = 0;
__id191_._friction = 1;
__id191_._rest = 0;
try {
__id191_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id187__Lev16_laberinto_1(){
try {
__id187_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id187_._density = 0;
__id187_._friction = 1;
__id187_._rest = 0;
try {
__id187_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id193__Lev16_laberinto_1(){
try {
__id193_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id193_._density = 0;
__id193_._friction = 1;
__id193_._rest = 0;
try {
__id193_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id185__Lev16_laberinto_1(){
try {
__id185_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id185_._density = 0;
__id185_._friction = 1;
__id185_._rest = 0;
try {
__id185_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id188__Lev16_laberinto_1(){
try {
__id188_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id188_._density = 0;
__id188_._friction = 1;
__id188_._rest = 0;
try {
__id188_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id194__Lev16_laberinto_1(){
try {
__id194_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id194_._density = 0;
__id194_._friction = 1;
__id194_._rest = 0;
try {
__id194_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id183__Lev16_laberinto_1(){
try {
__id183_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id183_._density = 0;
__id183_._friction = 1;
__id183_._rest = 0;
try {
__id183_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id195__Lev16_laberinto_1(){
try {
__id195_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id195_._density = 0;
__id195_._friction = 1;
__id195_._rest = 0;
try {
__id195_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id189__Lev16_laberinto_1(){
try {
__id189_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id189_._density = 0;
__id189_._friction = 1;
__id189_._rest = 0;
try {
__id189_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id184__Lev16_laberinto_1(){
try {
__id184_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id184_._density = 0;
__id184_._friction = 1;
__id184_._rest = 0;
try {
__id184_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id190__Lev16_laberinto_1(){
try {
__id190_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id190_._density = 0;
__id190_._friction = 1;
__id190_._rest = 0;
try {
__id190_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 157
//Lev17 (Lev17)
package {
import flash.display.*;
import Engine.Dynamics.Joints.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Lev17 extends LaberintoLevel {
public var __id200_:PlacaVertical;
public var __id201_:PlacaHorizontal;
public var __id202_:PlacaHorizontal;
public var __id197_:PlacaHorizontal;
public var __id198_:PlacaHorizontal;
public var __id203_:PlacaHorizontal;
public var __id204_:RevJoint1;
public var __id199_:PlacaVertical;
public var __id205_:Circle1;
public function Lev17(){
addFrameScript(0, frame1);
__setProp___id201__Lev17_laberinto_1();
__setProp___id202__Lev17_laberinto_1();
__setProp___id205__Lev17_objetos_1();
__setProp___id200__Lev17_laberinto_1();
__setProp_llama2_Lev17_laberinto2_1();
__setProp___id199__Lev17_laberinto_1();
__setProp___id198__Lev17_laberinto_1();
__setProp___id197__Lev17_laberinto_1();
__setProp_llama1_Lev17_laberinto2_1();
__setProp___id204__Lev17_laberinto2_1();
__setProp___id203__Lev17_laberinto_1();
}
function __setProp_llama1_Lev17_laberinto2_1(){
try {
llama1["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama1._gap = 90;
llama1._delay = 0;
try {
llama1["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id202__Lev17_laberinto_1(){
try {
__id202_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id202_._density = 0;
__id202_._friction = 1;
__id202_._rest = 0;
try {
__id202_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame1(){
this.start();
stop();
}
function __setProp___id203__Lev17_laberinto_1(){
try {
__id203_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id203_._density = 0;
__id203_._friction = 1;
__id203_._rest = 0;
try {
__id203_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama2_Lev17_laberinto2_1(){
try {
llama2["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama2._gap = 90;
llama2._delay = 0;
try {
llama2["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id197__Lev17_laberinto_1(){
try {
__id197_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id197_._density = 0;
__id197_._friction = 1;
__id197_._rest = 0;
try {
__id197_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id198__Lev17_laberinto_1(){
try {
__id198_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id198_._density = 0;
__id198_._friction = 1;
__id198_._rest = 0;
try {
__id198_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id200__Lev17_laberinto_1(){
try {
__id200_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id200_._density = 0;
__id200_._friction = 1;
__id200_._rest = 0;
try {
__id200_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id204__Lev17_laberinto2_1(){
try {
__id204_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id204_._torque = 1000;
__id204_._speed = -0.5;
try {
__id204_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id199__Lev17_laberinto_1(){
try {
__id199_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id199_._density = 0;
__id199_._friction = 1;
__id199_._rest = 0;
try {
__id199_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id205__Lev17_objetos_1(){
try {
__id205_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id205_._density = 1;
__id205_._friction = 1;
__id205_._rest = 0.3;
try {
__id205_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id201__Lev17_laberinto_1(){
try {
__id201_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id201_._density = 0;
__id201_._friction = 1;
__id201_._rest = 0;
try {
__id201_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 158
//Lev18 (Lev18)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Lev18 extends LaberintoLevel {
public var __id221_:Circle1;
public var __id212_:Circulo;
public var __id213_:PlacaVertical;
public var __id210_:PlacaVertical;
public var __id214_:PlacaVertical;
public var __id215_:PlacaVertical;
public var __id216_:Circulo;
public var __id211_:PlacaVertical;
public var __id206_:PlacaHorizontal;
public var __id217_:PlacaVertical;
public var __id218_:Circulo;
public var __id207_:PlacaHorizontal;
public var __id219_:PlacaHorizontal;
public var __id208_:PlacaVertical;
public var __id209_:PlacaVertical;
public var __id220_:PlacaHorizontal;
public function Lev18(){
addFrameScript(0, frame1);
__setProp___id213__Lev18_laberinto_1();
__setProp___id207__Lev18_laberinto_1();
__setProp___id211__Lev18_laberinto_1();
__setProp___id212__Lev18_laberinto_1();
__setProp___id220__Lev18_laberinto_1();
__setProp___id217__Lev18_laberinto_1();
__setProp___id206__Lev18_laberinto_1();
__setProp___id210__Lev18_laberinto_1();
__setProp___id215__Lev18_laberinto_1();
__setProp_llama2_Lev18_objetos_1();
__setProp_llama3_Lev18_objetos_1();
__setProp___id216__Lev18_laberinto_1();
__setProp___id214__Lev18_laberinto_1();
__setProp___id218__Lev18_laberinto_1();
__setProp_llama1_Lev18_objetos_1();
__setProp___id219__Lev18_laberinto_1();
__setProp___id208__Lev18_laberinto_1();
__setProp___id221__Lev18_objetos_1();
__setProp___id209__Lev18_laberinto_1();
}
function __setProp_llama1_Lev18_objetos_1(){
try {
llama1["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama1._gap = 165;
llama1._delay = 0;
try {
llama1["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama2_Lev18_objetos_1(){
try {
llama2["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama2._gap = 165;
llama2._delay = 0;
try {
llama2["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id218__Lev18_laberinto_1(){
try {
__id218_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id218_._density = 0;
__id218_._friction = 1;
__id218_._rest = 0;
try {
__id218_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id212__Lev18_laberinto_1(){
try {
__id212_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id212_._density = 0;
__id212_._friction = 1;
__id212_._rest = 0;
try {
__id212_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id207__Lev18_laberinto_1(){
try {
__id207_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id207_._density = 0;
__id207_._friction = 1;
__id207_._rest = 0;
try {
__id207_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama3_Lev18_objetos_1(){
try {
llama3["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama3._gap = 165;
llama3._delay = 0;
try {
llama3["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame1(){
this.start();
stop();
}
function __setProp___id213__Lev18_laberinto_1(){
try {
__id213_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id213_._density = 0;
__id213_._friction = 1;
__id213_._rest = 0;
try {
__id213_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id219__Lev18_laberinto_1(){
try {
__id219_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id219_._density = 0;
__id219_._friction = 1;
__id219_._rest = 0;
try {
__id219_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id217__Lev18_laberinto_1(){
try {
__id217_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id217_._density = 0;
__id217_._friction = 1;
__id217_._rest = 0;
try {
__id217_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id214__Lev18_laberinto_1(){
try {
__id214_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id214_._density = 0;
__id214_._friction = 1;
__id214_._rest = 0;
try {
__id214_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id208__Lev18_laberinto_1(){
try {
__id208_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id208_._density = 0;
__id208_._friction = 1;
__id208_._rest = 0;
try {
__id208_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id220__Lev18_laberinto_1(){
try {
__id220_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id220_._density = 0;
__id220_._friction = 1;
__id220_._rest = 0;
try {
__id220_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id209__Lev18_laberinto_1(){
try {
__id209_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id209_._density = 0;
__id209_._friction = 1;
__id209_._rest = 0;
try {
__id209_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id215__Lev18_laberinto_1(){
try {
__id215_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id215_._density = 0;
__id215_._friction = 1;
__id215_._rest = 0;
try {
__id215_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id210__Lev18_laberinto_1(){
try {
__id210_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id210_._density = 0;
__id210_._friction = 1;
__id210_._rest = 0;
try {
__id210_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id206__Lev18_laberinto_1(){
try {
__id206_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id206_._density = 0;
__id206_._friction = 1;
__id206_._rest = 0;
try {
__id206_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id221__Lev18_objetos_1(){
try {
__id221_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id221_._density = 1;
__id221_._friction = 1;
__id221_._rest = 0.3;
try {
__id221_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id216__Lev18_laberinto_1(){
try {
__id216_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id216_._density = 0;
__id216_._friction = 1;
__id216_._rest = 0;
try {
__id216_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id211__Lev18_laberinto_1(){
try {
__id211_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id211_._density = 0;
__id211_._friction = 1;
__id211_._rest = 0;
try {
__id211_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 159
//Lev19 (Lev19)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Lev19 extends LaberintoLevel {
public var __id224_:PlacaVertical;
public var __id237_:PlacaHorizontal;
public var __id239_:Circle1;
public var __id225_:PlacaVertical;
public var __id222_:PlacaHorizontal;
public var __id233_:PlacaVertical;
public var __id223_:PlacaHorizontal;
public var __id226_:PlacaHorizontal;
public var __id235_:PlacaHorizontal;
public var __id228_:PlacaHorizontal;
public var __id234_:PlacaHorizontal;
public var __id238_:PlacaVertical;
public var __id236_:PlacaVertical;
public var __id229_:PlacaHorizontal;
public var __id227_:PlacaVertical;
public var __id230_:PlacaVertical;
public var __id231_:PlacaVertical;
public var __id232_:PlacaHorizontal;
public function Lev19(){
addFrameScript(0, frame1);
__setProp_llama9_Lev19_objetos_1();
__setProp___id223__Lev19_laberinto_1();
__setProp_llama8_Lev19_objetos_1();
__setProp_llama5_Lev19_objetos_1();
__setProp_oneway2_Lev19_objetos_1();
__setProp_llama6_Lev19_objetos_1();
__setProp___id233__Lev19_laberinto_1();
__setProp___id222__Lev19_laberinto_1();
__setProp_llama4_Lev19_objetos_1();
__setProp_llama2_Lev19_objetos_1();
__setProp___id227__Lev19_laberinto_1();
__setProp___id231__Lev19_laberinto_1();
__setProp___id232__Lev19_laberinto_1();
__setProp___id225__Lev19_laberinto_1();
__setProp_llama3_Lev19_objetos_1();
__setProp___id237__Lev19_laberinto_1();
__setProp___id226__Lev19_laberinto_1();
__setProp___id230__Lev19_laberinto_1();
__setProp___id235__Lev19_laberinto_1();
__setProp___id224__Lev19_laberinto_1();
__setProp___id236__Lev19_laberinto_1();
__setProp___id239__Lev19_objetos_1();
__setProp_llama1_Lev19_objetos_1();
__setProp___id234__Lev19_laberinto_1();
__setProp___id238__Lev19_laberinto_1();
__setProp_oneway1_Lev19_objetos_1();
__setProp_llama10_Lev19_objetos_1();
__setProp___id228__Lev19_laberinto_1();
__setProp_llama7_Lev19_objetos_1();
__setProp___id229__Lev19_laberinto_1();
}
function __setProp___id233__Lev19_laberinto_1(){
try {
__id233_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id233_._density = 0;
__id233_._friction = 1;
__id233_._rest = 0;
try {
__id233_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id227__Lev19_laberinto_1(){
try {
__id227_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id227_._density = 0;
__id227_._friction = 1;
__id227_._rest = 0;
try {
__id227_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame1(){
this.start();
stop();
}
function __setProp_llama10_Lev19_objetos_1(){
try {
llama10["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama10._gap = 90;
llama10._delay = 0;
try {
llama10["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id222__Lev19_laberinto_1(){
try {
__id222_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id222_._density = 0;
__id222_._friction = 1;
__id222_._rest = 0;
try {
__id222_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id223__Lev19_laberinto_1(){
try {
__id223_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id223_._density = 0;
__id223_._friction = 1;
__id223_._rest = 0;
try {
__id223_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id234__Lev19_laberinto_1(){
try {
__id234_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id234_._density = 0;
__id234_._friction = 1;
__id234_._rest = 0;
try {
__id234_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id235__Lev19_laberinto_1(){
try {
__id235_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id235_._density = 0;
__id235_._friction = 1;
__id235_._rest = 0;
try {
__id235_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id229__Lev19_laberinto_1(){
try {
__id229_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id229_._density = 0;
__id229_._friction = 1;
__id229_._rest = 0;
try {
__id229_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id224__Lev19_laberinto_1(){
try {
__id224_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id224_._density = 0;
__id224_._friction = 1;
__id224_._rest = 0;
try {
__id224_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id230__Lev19_laberinto_1(){
try {
__id230_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id230_._density = 0;
__id230_._friction = 1;
__id230_._rest = 0;
try {
__id230_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id239__Lev19_objetos_1(){
try {
__id239_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id239_._density = 1;
__id239_._friction = 1;
__id239_._rest = 0.3;
try {
__id239_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id236__Lev19_laberinto_1(){
try {
__id236_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id236_._density = 0;
__id236_._friction = 1;
__id236_._rest = 0;
try {
__id236_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id225__Lev19_laberinto_1(){
try {
__id225_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id225_._density = 0;
__id225_._friction = 1;
__id225_._rest = 0;
try {
__id225_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id238__Lev19_laberinto_1(){
try {
__id238_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id238_._density = 0;
__id238_._friction = 1;
__id238_._rest = 0;
try {
__id238_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id231__Lev19_laberinto_1(){
try {
__id231_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id231_._density = 0;
__id231_._friction = 1;
__id231_._rest = 0;
try {
__id231_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama1_Lev19_objetos_1(){
try {
llama1["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama1._gap = 180;
llama1._delay = 0;
try {
llama1["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama2_Lev19_objetos_1(){
try {
llama2["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama2._gap = 135;
llama2._delay = 45;
try {
llama2["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama5_Lev19_objetos_1(){
try {
llama5["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama5._gap = 110;
llama5._delay = 5;
try {
llama5["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama7_Lev19_objetos_1(){
try {
llama7["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama7._gap = 110;
llama7._delay = 15;
try {
llama7["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama9_Lev19_objetos_1(){
try {
llama9["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama9._gap = 105;
llama9._delay = 45;
try {
llama9["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama3_Lev19_objetos_1(){
try {
llama3["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama3._gap = 90;
llama3._delay = 0;
try {
llama3["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama4_Lev19_objetos_1(){
try {
llama4["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama4._gap = 110;
llama4._delay = 0;
try {
llama4["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama8_Lev19_objetos_1(){
try {
llama8["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama8._gap = 110;
llama8._delay = 20;
try {
llama8["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama6_Lev19_objetos_1(){
try {
llama6["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama6._gap = 110;
llama6._delay = 10;
try {
llama6["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id228__Lev19_laberinto_1(){
try {
__id228_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id228_._density = 0;
__id228_._friction = 1;
__id228_._rest = 0;
try {
__id228_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id237__Lev19_laberinto_1(){
try {
__id237_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id237_._density = 0;
__id237_._friction = 1;
__id237_._rest = 0;
try {
__id237_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_oneway2_Lev19_objetos_1(){
try {
oneway2["componentInspectorSetting"] = true;
} catch(e:Error) {
};
oneway2._forcex = 3;
oneway2._forcey = 0;
try {
oneway2["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_oneway1_Lev19_objetos_1(){
try {
oneway1["componentInspectorSetting"] = true;
} catch(e:Error) {
};
oneway1._forcex = -3;
oneway1._forcey = 0;
try {
oneway1["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id226__Lev19_laberinto_1(){
try {
__id226_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id226_._density = 0;
__id226_._friction = 1;
__id226_._rest = 0;
try {
__id226_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id232__Lev19_laberinto_1(){
try {
__id232_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id232_._density = 0;
__id232_._friction = 1;
__id232_._rest = 0;
try {
__id232_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 160
//Lev2 (Lev2)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Lev2 extends LaberintoLevel {
public var __id10_:PlacaVertical;
public var __id8_:PlacaHorizontal;
public var __id11_:PlacaVertical;
public var __id9_:PlacaHorizontal;
public var __id12_:PlacaHorizontal;
public var __id13_:RevJoint1;
public var __id14_:Circle1;
public function Lev2(){
addFrameScript(0, frame1);
__setProp___id14__Lev2_objetos_1();
__setProp___id13__Lev2_objetos_1();
__setProp___id9__Lev2_laberinto_1();
__setProp___id12__Lev2_laberinto_1();
__setProp___id8__Lev2_laberinto_1();
__setProp___id11__Lev2_laberinto_1();
__setProp___id10__Lev2_laberinto_1();
}
function __setProp___id13__Lev2_objetos_1(){
try {
__id13_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id13_._torque = 1000;
__id13_._speed = 1;
try {
__id13_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame1(){
this.start();
stop();
}
function __setProp___id14__Lev2_objetos_1(){
try {
__id14_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id14_._density = 1;
__id14_._friction = 1;
__id14_._rest = 0.3;
try {
__id14_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id8__Lev2_laberinto_1(){
try {
__id8_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id8_._density = 0;
__id8_._friction = 1;
__id8_._rest = 0;
try {
__id8_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id12__Lev2_laberinto_1(){
try {
__id12_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id12_._density = 0;
__id12_._friction = 1;
__id12_._rest = 0;
try {
__id12_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id11__Lev2_laberinto_1(){
try {
__id11_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id11_._density = 0;
__id11_._friction = 1;
__id11_._rest = 0;
try {
__id11_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id10__Lev2_laberinto_1(){
try {
__id10_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id10_._density = 0;
__id10_._friction = 1;
__id10_._rest = 0;
try {
__id10_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id9__Lev2_laberinto_1(){
try {
__id9_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id9_._density = 0;
__id9_._friction = 1;
__id9_._rest = 0;
try {
__id9_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 161
//Lev20 (Lev20)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Lev20 extends LaberintoLevel {
public var __id245_:PlacaHorizontal;
public var __id257_:Circulo;
public var __id258_:Circulo;
public var __id246_:PlacaVertical;
public var __id247_:PlacaVertical;
public var __id259_:Circulo;
public var __id248_:PlacaVertical;
public var __id249_:PlacaVertical;
public var __id260_:Isosceles;
public var __id261_:Isosceles;
public var __id262_:Isosceles;
public var __id250_:PlacaVertical;
public var __id263_:Isosceles;
public var __id251_:PlacaHorizontal;
public var __id264_:Circulo;
public var __id252_:PlacaHorizontal;
public var __id240_:PlacaHorizontal;
public var __id265_:PlacaVertical;
public var __id253_:PlacaHorizontal;
public var __id241_:PlacaHorizontal;
public var __id266_:PlacaVertical;
public var __id254_:PlacaHorizontal;
public var __id242_:PlacaVertical;
public var __id267_:Circle1;
public var __id255_:PlacaHorizontal;
public var __id243_:PlacaVertical;
public var __id256_:Isosceles;
public var __id244_:PlacaVertical;
public function Lev20(){
addFrameScript(0, frame1);
__setProp___id249__Lev20_laberinto_1();
__setProp___id243__Lev20_laberinto_1();
__setProp___id263__Lev20_laberinto_1();
__setProp___id241__Lev20_laberinto_1();
__setProp___id253__Lev20_laberinto_1();
__setProp___id242__Lev20_laberinto_1();
__setProp___id247__Lev20_laberinto_1();
__setProp___id261__Lev20_laberinto_1();
__setProp___id251__Lev20_laberinto_1();
__setProp___id240__Lev20_laberinto_1();
__setProp_llama1_Lev20_objetos_1();
__setProp___id262__Lev20_laberinto_1();
__setProp___id252__Lev20_laberinto_1();
__setProp___id245__Lev20_laberinto_1();
__setProp_llama2_Lev20_objetos_1();
__setProp___id257__Lev20_laberinto_1();
__setProp___id246__Lev20_laberinto_1();
__setProp___id265__Lev20_laberinto_1();
__setProp___id260__Lev20_laberinto_1();
__setProp___id250__Lev20_laberinto_1();
__setProp___id267__Lev20_objetos_1();
__setProp___id266__Lev20_laberinto_1();
__setProp___id255__Lev20_laberinto_1();
__setProp___id244__Lev20_laberinto_1();
__setProp_llama4_Lev20_objetos_1();
__setProp_llama3_Lev20_objetos_1();
__setProp_llama5_Lev20_objetos_1();
__setProp___id256__Lev20_laberinto_1();
__setProp___id264__Lev20_laberinto_1();
__setProp___id254__Lev20_laberinto_1();
__setProp___id258__Lev20_laberinto_1();
__setProp___id259__Lev20_laberinto_1();
__setProp___id248__Lev20_laberinto_1();
}
function __setProp_llama2_Lev20_objetos_1(){
try {
llama2["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama2._gap = 150;
llama2._delay = 30;
try {
llama2["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama4_Lev20_objetos_1(){
try {
llama4["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama4._gap = 90;
llama4._delay = 30;
try {
llama4["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id264__Lev20_laberinto_1(){
try {
__id264_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id264_._density = 0;
__id264_._friction = 1;
__id264_._rest = 0;
try {
__id264_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id258__Lev20_laberinto_1(){
try {
__id258_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id258_._density = 0;
__id258_._friction = 1;
__id258_._rest = 0;
try {
__id258_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id253__Lev20_laberinto_1(){
try {
__id253_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id253_._density = 0;
__id253_._friction = 1;
__id253_._rest = 0;
try {
__id253_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id247__Lev20_laberinto_1(){
try {
__id247_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id247_._density = 0;
__id247_._friction = 1;
__id247_._rest = 0;
try {
__id247_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id242__Lev20_laberinto_1(){
try {
__id242_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id242_._density = 0;
__id242_._friction = 1;
__id242_._rest = 0;
try {
__id242_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame1(){
this.start();
stop();
}
function __setProp___id266__Lev20_laberinto_1(){
try {
__id266_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id266_._density = 0;
__id266_._friction = 1;
__id266_._rest = 0;
try {
__id266_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id261__Lev20_laberinto_1(){
try {
__id261_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id261_._density = 0;
__id261_._friction = 1;
__id261_._rest = 1;
try {
__id261_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id249__Lev20_laberinto_1(){
try {
__id249_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id249_._density = 0;
__id249_._friction = 1;
__id249_._rest = 0;
try {
__id249_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id244__Lev20_laberinto_1(){
try {
__id244_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id244_._density = 0;
__id244_._friction = 1;
__id244_._rest = 0;
try {
__id244_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id255__Lev20_laberinto_1(){
try {
__id255_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id255_._density = 0;
__id255_._friction = 1;
__id255_._rest = 0;
try {
__id255_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id250__Lev20_laberinto_1(){
try {
__id250_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id250_._density = 0;
__id250_._friction = 1;
__id250_._rest = 0;
try {
__id250_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id257__Lev20_laberinto_1(){
try {
__id257_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id257_._density = 0;
__id257_._friction = 1;
__id257_._rest = 0;
try {
__id257_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id263__Lev20_laberinto_1(){
try {
__id263_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id263_._density = 0;
__id263_._friction = 1;
__id263_._rest = 0;
try {
__id263_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id246__Lev20_laberinto_1(){
try {
__id246_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id246_._density = 0;
__id246_._friction = 1;
__id246_._rest = 0;
try {
__id246_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id252__Lev20_laberinto_1(){
try {
__id252_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id252_._density = 0;
__id252_._friction = 1;
__id252_._rest = 0;
try {
__id252_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama5_Lev20_objetos_1(){
try {
llama5["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama5._gap = 90;
llama5._delay = 0;
try {
llama5["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id241__Lev20_laberinto_1(){
try {
__id241_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id241_._density = 0;
__id241_._friction = 1;
__id241_._rest = 0;
try {
__id241_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama3_Lev20_objetos_1(){
try {
llama3["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama3._gap = 150;
llama3._delay = 60;
try {
llama3["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama1_Lev20_objetos_1(){
try {
llama1["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama1._gap = 150;
llama1._delay = 0;
try {
llama1["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id259__Lev20_laberinto_1(){
try {
__id259_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id259_._density = 0;
__id259_._friction = 1;
__id259_._rest = 0;
try {
__id259_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id265__Lev20_laberinto_1(){
try {
__id265_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id265_._density = 0;
__id265_._friction = 1;
__id265_._rest = 0;
try {
__id265_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id248__Lev20_laberinto_1(){
try {
__id248_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id248_._density = 0;
__id248_._friction = 1;
__id248_._rest = 0;
try {
__id248_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id254__Lev20_laberinto_1(){
try {
__id254_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id254_._density = 0;
__id254_._friction = 1;
__id254_._rest = 0;
try {
__id254_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id260__Lev20_laberinto_1(){
try {
__id260_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id260_._density = 0;
__id260_._friction = 1;
__id260_._rest = 1;
try {
__id260_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id267__Lev20_objetos_1(){
try {
__id267_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id267_._density = 1;
__id267_._friction = 1;
__id267_._rest = 0.3;
try {
__id267_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id243__Lev20_laberinto_1(){
try {
__id243_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id243_._density = 0;
__id243_._friction = 1;
__id243_._rest = 0;
try {
__id243_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id262__Lev20_laberinto_1(){
try {
__id262_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id262_._density = 0;
__id262_._friction = 1;
__id262_._rest = 1;
try {
__id262_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id256__Lev20_laberinto_1(){
try {
__id256_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id256_._density = 0;
__id256_._friction = 1;
__id256_._rest = 0;
try {
__id256_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id251__Lev20_laberinto_1(){
try {
__id251_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id251_._density = 0;
__id251_._friction = 1;
__id251_._rest = 0;
try {
__id251_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id245__Lev20_laberinto_1(){
try {
__id245_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id245_._density = 0;
__id245_._friction = 1;
__id245_._rest = 0;
try {
__id245_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id240__Lev20_laberinto_1(){
try {
__id240_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id240_._density = 0;
__id240_._friction = 1;
__id240_._rest = 0;
try {
__id240_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 162
//Lev21 (Lev21)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Lev21 extends LaberintoLevel {
public var __id269_:PlacaHorizontal;
public var __id281_:PlacaHorizontal;
public var __id282_:PlacaHorizontal;
public var __id283_:PlacaHorizontal;
public var __id271_:PlacaVertical;
public var __id270_:PlacaVertical;
public var __id280_:PlacaHorizontal;
public var __id272_:PlacaVertical;
public var __id284_:PlacaHorizontal;
public var __id286_:Triangle4;
public var __id274_:PlacaVertical;
public var __id285_:PlacaHorizontal;
public var __id273_:PlacaHorizontal;
public var __id287_:Circle1;
public var __id276_:PlacaVertical;
public var __id275_:PlacaHorizontal;
public var __id277_:PlacaVertical;
public var __id278_:PlacaVertical;
public var __id279_:PlacaVertical;
public var __id268_:PlacaHorizontal;
public function Lev21(){
addFrameScript(0, frame1);
__setProp___id278__Lev21_laberinto_1();
__setProp___id279__Lev21_laberinto_1();
__setProp___id268__Lev21_laberinto_1();
__setProp___id269__Lev21_laberinto_1();
__setProp___id287__Lev21_objetos_1();
__setProp_llama2_Lev21_objetos_1();
__setProp_llama3_Lev21_objetos_1();
__setProp_llama4_Lev21_objetos_1();
__setProp___id273__Lev21_laberinto_1();
__setProp___id285__Lev21_laberinto_1();
__setProp___id271__Lev21_laberinto_1();
__setProp___id284__Lev21_laberinto_1();
__setProp___id272__Lev21_laberinto_1();
__setProp_llama1_Lev21_objetos_1();
__setProp___id277__Lev21_laberinto_1();
__setProp___id286__Lev21_laberinto_1();
__setProp___id270__Lev21_laberinto_1();
__setProp___id281__Lev21_laberinto_1();
__setProp___id275__Lev21_laberinto_1();
__setProp_llama5_Lev21_objetos_1();
__setProp___id280__Lev21_laberinto_1();
__setProp___id276__Lev21_laberinto_1();
__setProp___id283__Lev21_laberinto_1();
__setProp___id282__Lev21_laberinto_1();
__setProp___id274__Lev21_laberinto_1();
}
function __setProp___id285__Lev21_laberinto_1(){
try {
__id285_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id285_._density = 0;
__id285_._friction = 1;
__id285_._rest = 0;
try {
__id285_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id268__Lev21_laberinto_1(){
try {
__id268_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id268_._density = 0;
__id268_._friction = 1;
__id268_._rest = 0;
try {
__id268_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id286__Lev21_laberinto_1(){
try {
__id286_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id286_._density = 0;
__id286_._friction = 1;
__id286_._rest = 0;
try {
__id286_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame1(){
this.start();
stop();
}
function __setProp___id275__Lev21_laberinto_1(){
try {
__id275_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id275_._density = 0;
__id275_._friction = 1;
__id275_._rest = 0;
try {
__id275_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id280__Lev21_laberinto_1(){
try {
__id280_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id280_._density = 0;
__id280_._friction = 1;
__id280_._rest = 0;
try {
__id280_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id269__Lev21_laberinto_1(){
try {
__id269_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id269_._density = 0;
__id269_._friction = 1;
__id269_._rest = 0;
try {
__id269_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id270__Lev21_laberinto_1(){
try {
__id270_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id270_._density = 0;
__id270_._friction = 1;
__id270_._rest = 0;
try {
__id270_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama5_Lev21_objetos_1(){
try {
llama5["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama5._gap = 120;
llama5._delay = 120;
try {
llama5["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama1_Lev21_objetos_1(){
try {
llama1["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama1._gap = 120;
llama1._delay = 0;
try {
llama1["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama3_Lev21_objetos_1(){
try {
llama3["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama3._gap = 120;
llama3._delay = 60;
try {
llama3["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id281__Lev21_laberinto_1(){
try {
__id281_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id281_._density = 0;
__id281_._friction = 1;
__id281_._rest = 0;
try {
__id281_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama4_Lev21_objetos_1(){
try {
llama4["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama4._gap = 120;
llama4._delay = 90;
try {
llama4["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id282__Lev21_laberinto_1(){
try {
__id282_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id282_._density = 0;
__id282_._friction = 1;
__id282_._rest = 0;
try {
__id282_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id287__Lev21_objetos_1(){
try {
__id287_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id287_._density = 1;
__id287_._friction = 1;
__id287_._rest = 0.3;
try {
__id287_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id276__Lev21_laberinto_1(){
try {
__id276_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id276_._density = 0;
__id276_._friction = 1;
__id276_._rest = 0;
try {
__id276_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id271__Lev21_laberinto_1(){
try {
__id271_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id271_._density = 0;
__id271_._friction = 1;
__id271_._rest = 0;
try {
__id271_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id277__Lev21_laberinto_1(){
try {
__id277_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id277_._density = 0;
__id277_._friction = 1;
__id277_._rest = 0;
try {
__id277_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id279__Lev21_laberinto_1(){
try {
__id279_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id279_._density = 0;
__id279_._friction = 1;
__id279_._rest = 0;
try {
__id279_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama2_Lev21_objetos_1(){
try {
llama2["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama2._gap = 120;
llama2._delay = 30;
try {
llama2["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id274__Lev21_laberinto_1(){
try {
__id274_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id274_._density = 0;
__id274_._friction = 1;
__id274_._rest = 0;
try {
__id274_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id272__Lev21_laberinto_1(){
try {
__id272_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id272_._density = 0;
__id272_._friction = 1;
__id272_._rest = 0;
try {
__id272_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id283__Lev21_laberinto_1(){
try {
__id283_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id283_._density = 0;
__id283_._friction = 1;
__id283_._rest = 0;
try {
__id283_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id284__Lev21_laberinto_1(){
try {
__id284_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id284_._density = 0;
__id284_._friction = 1;
__id284_._rest = 0;
try {
__id284_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id278__Lev21_laberinto_1(){
try {
__id278_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id278_._density = 0;
__id278_._friction = 1;
__id278_._rest = 0;
try {
__id278_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id273__Lev21_laberinto_1(){
try {
__id273_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id273_._density = 0;
__id273_._friction = 1;
__id273_._rest = 0;
try {
__id273_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 163
//Lev22 (Lev22)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Lev22 extends LaberintoLevel {
public var __id292_:Caja;
public var __id293_:PlacaHorizontal;
public var __id291_:PlacaVertical;
public var __id290_:PlacaVertical;
public var __id300_:Circle1;
public var __id295_:PlacaHorizontal;
public var __id294_:PlacaVertical;
public var __id296_:Caja;
public var __id297_:PlacaVertical;
public var __id298_:RevJoint1;
public var __id299_:RevJoint1;
public var __id288_:PlacaHorizontal;
public var __id289_:PlacaHorizontal;
public function Lev22(){
addFrameScript(0, frame1);
__setProp___id300__Lev22_objetos_1();
__setProp___id299__Lev22_laberinto2_1();
__setProp___id298__Lev22_laberinto2_1();
__setProp___id288__Lev22_laberinto_1();
__setProp___id289__Lev22_laberinto_1();
__setProp___id295__Lev22_laberinto_1();
__setProp___id294__Lev22_laberinto_1();
__setProp___id297__Lev22_laberinto_1();
__setProp___id296__Lev22_laberinto_1();
__setProp___id291__Lev22_laberinto_1();
__setProp___id290__Lev22_laberinto_1();
__setProp___id293__Lev22_laberinto_1();
__setProp___id292__Lev22_laberinto_1();
}
function __setProp___id290__Lev22_laberinto_1(){
try {
__id290_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id290_._density = 0;
__id290_._friction = 1;
__id290_._rest = 0;
try {
__id290_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame1(){
this.start();
stop();
}
function __setProp___id291__Lev22_laberinto_1(){
try {
__id291_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id291_._density = 0;
__id291_._friction = 1;
__id291_._rest = 0;
try {
__id291_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id295__Lev22_laberinto_1(){
try {
__id295_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id295_._density = 0;
__id295_._friction = 1;
__id295_._rest = 0;
try {
__id295_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id297__Lev22_laberinto_1(){
try {
__id297_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id297_._density = 0;
__id297_._friction = 1;
__id297_._rest = 0;
try {
__id297_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id296__Lev22_laberinto_1(){
try {
__id296_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id296_._density = 1;
__id296_._friction = 1;
__id296_._rest = 0;
try {
__id296_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id299__Lev22_laberinto2_1(){
try {
__id299_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id299_._torque = 1000;
__id299_._speed = 1;
try {
__id299_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id293__Lev22_laberinto_1(){
try {
__id293_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id293_._density = 0;
__id293_._friction = 1;
__id293_._rest = 0;
try {
__id293_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id300__Lev22_objetos_1(){
try {
__id300_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id300_._density = 1;
__id300_._friction = 1;
__id300_._rest = 0.3;
try {
__id300_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id289__Lev22_laberinto_1(){
try {
__id289_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id289_._density = 0;
__id289_._friction = 1;
__id289_._rest = 0;
try {
__id289_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id292__Lev22_laberinto_1(){
try {
__id292_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id292_._density = 1;
__id292_._friction = 1;
__id292_._rest = 0;
try {
__id292_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id298__Lev22_laberinto2_1(){
try {
__id298_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id298_._torque = 1000;
__id298_._speed = 1;
try {
__id298_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id288__Lev22_laberinto_1(){
try {
__id288_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id288_._density = 0;
__id288_._friction = 1;
__id288_._rest = 0;
try {
__id288_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id294__Lev22_laberinto_1(){
try {
__id294_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id294_._density = 0;
__id294_._friction = 1;
__id294_._rest = 0;
try {
__id294_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 164
//Lev23 (Lev23)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Lev23 extends LaberintoLevel {
public var __id321_:Circle1;
public var __id320_:PlacaHorizontal;
public var __id310_:PlacaHorizontal;
public var __id312_:Isosceles;
public var __id311_:PlacaHorizontal;
public var __id301_:PlacaHorizontal;
public var __id313_:PlacaVertical;
public var __id314_:Triangle4;
public var __id315_:PlacaHorizontal;
public var __id303_:PlacaVertical;
public var __id302_:PlacaHorizontal;
public var __id304_:PlacaVertical;
public var __id305_:Triangle4;
public var __id317_:Triangle3;
public var __id306_:Triangle3;
public var __id318_:Triangle2;
public var __id319_:PlacaHorizontal;
public var __id307_:Triangle2;
public var __id316_:Isosceles;
public var __id308_:Isosceles;
public var __id309_:PlacaHorizontal;
public function Lev23(){
addFrameScript(0, frame1);
__setProp___id302__Lev23_laberinto_1();
__setProp___id303__Lev23_laberinto_1();
__setProp___id312__Lev23_laberinto_1();
__setProp___id301__Lev23_laberinto_1();
__setProp___id320__Lev23_laberinto_1();
__setProp___id313__Lev23_laberinto_1();
__setProp___id306__Lev23_laberinto_1();
__setProp___id310__Lev23_laberinto_1();
__setProp___id307__Lev23_laberinto_1();
__setProp___id311__Lev23_laberinto_1();
__setProp___id304__Lev23_laberinto_1();
__setProp___id316__Lev23_laberinto_1();
__setProp___id305__Lev23_laberinto_1();
__setProp___id317__Lev23_laberinto_1();
__setProp___id314__Lev23_laberinto_1();
__setProp___id315__Lev23_laberinto_1();
__setProp_llama2_Lev23_objetos_1();
__setProp___id318__Lev23_laberinto_1();
__setProp___id319__Lev23_laberinto_1();
__setProp___id308__Lev23_laberinto_1();
__setProp___id321__Lev23_objetos_1();
__setProp___id309__Lev23_laberinto_1();
__setProp_llama1_Lev23_objetos_1();
}
function __setProp___id306__Lev23_laberinto_1(){
try {
__id306_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id306_._density = 0;
__id306_._friction = 1;
__id306_._rest = 0;
try {
__id306_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id307__Lev23_laberinto_1(){
try {
__id307_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id307_._density = 0;
__id307_._friction = 1;
__id307_._rest = 0;
try {
__id307_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame1(){
this.start();
stop();
}
function __setProp___id302__Lev23_laberinto_1(){
try {
__id302_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id302_._density = 0;
__id302_._friction = 1;
__id302_._rest = 0;
try {
__id302_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id313__Lev23_laberinto_1(){
try {
__id313_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id313_._density = 0;
__id313_._friction = 1;
__id313_._rest = 0;
try {
__id313_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id314__Lev23_laberinto_1(){
try {
__id314_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id314_._density = 0;
__id314_._friction = 1;
__id314_._rest = 0;
try {
__id314_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id320__Lev23_laberinto_1(){
try {
__id320_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id320_._density = 0;
__id320_._friction = 1;
__id320_._rest = 0;
try {
__id320_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id308__Lev23_laberinto_1(){
try {
__id308_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id308_._density = 0;
__id308_._friction = 1;
__id308_._rest = 0;
try {
__id308_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama1_Lev23_objetos_1(){
try {
llama1["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama1._gap = 135;
llama1._delay = 0;
try {
llama1["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id303__Lev23_laberinto_1(){
try {
__id303_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id303_._density = 0;
__id303_._friction = 1;
__id303_._rest = 0;
try {
__id303_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id319__Lev23_laberinto_1(){
try {
__id319_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id319_._density = 0;
__id319_._friction = 1;
__id319_._rest = 0;
try {
__id319_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id315__Lev23_laberinto_1(){
try {
__id315_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id315_._density = 0;
__id315_._friction = 1;
__id315_._rest = 0;
try {
__id315_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id309__Lev23_laberinto_1(){
try {
__id309_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id309_._density = 0;
__id309_._friction = 1;
__id309_._rest = 0;
try {
__id309_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama2_Lev23_objetos_1(){
try {
llama2["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama2._gap = 135;
llama2._delay = 0;
try {
llama2["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id304__Lev23_laberinto_1(){
try {
__id304_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id304_._density = 0;
__id304_._friction = 1;
__id304_._rest = 0;
try {
__id304_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id310__Lev23_laberinto_1(){
try {
__id310_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id310_._density = 0;
__id310_._friction = 1;
__id310_._rest = 0;
try {
__id310_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id312__Lev23_laberinto_1(){
try {
__id312_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id312_._density = 0;
__id312_._friction = 1;
__id312_._rest = 0;
try {
__id312_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id318__Lev23_laberinto_1(){
try {
__id318_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id318_._density = 0;
__id318_._friction = 1;
__id318_._rest = 0;
try {
__id318_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id301__Lev23_laberinto_1(){
try {
__id301_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id301_._density = 0;
__id301_._friction = 1;
__id301_._rest = 0;
try {
__id301_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id316__Lev23_laberinto_1(){
try {
__id316_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id316_._density = 0;
__id316_._friction = 1;
__id316_._rest = 0;
try {
__id316_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id321__Lev23_objetos_1(){
try {
__id321_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id321_._density = 1;
__id321_._friction = 1;
__id321_._rest = 0.3;
try {
__id321_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id305__Lev23_laberinto_1(){
try {
__id305_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id305_._density = 0;
__id305_._friction = 1;
__id305_._rest = 0;
try {
__id305_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id311__Lev23_laberinto_1(){
try {
__id311_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id311_._density = 0;
__id311_._friction = 1;
__id311_._rest = 0;
try {
__id311_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id317__Lev23_laberinto_1(){
try {
__id317_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id317_._density = 0;
__id317_._friction = 1;
__id317_._rest = 0;
try {
__id317_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 165
//Lev24 (Lev24)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Lev24 extends LaberintoLevel {
public var __id331_:PlacaVertical;
public var __id333_:PlacaVertical;
public var __id334_:PlacaHorizontal;
public var __id322_:PlacaHorizontal;
public var __id323_:PlacaHorizontal;
public var __id335_:Circle1;
public var __id324_:PlacaVertical;
public var __id325_:PlacaVertical;
public var __id332_:PlacaHorizontal;
public var __id327_:PlacaVertical;
public var __id328_:PlacaHorizontal;
public var __id330_:PlacaHorizontal;
public var __id326_:PlacaHorizontal;
public var __id329_:PlacaVertical;
public function Lev24(){
addFrameScript(0, frame1, 1, frame2);
__setProp___id335__Lev24_objetos_1();
__setProp___id322__Lev24_laberinto_1();
__setProp___id323__Lev24_laberinto_1();
__setProp___id332__Lev24_laberinto_1();
__setProp___id333__Lev24_laberinto_1();
__setProp___id326__Lev24_laberinto_1();
__setProp_oneway5_Lev24_objetos_1();
__setProp_oneway4_Lev24_objetos_1();
__setProp_oneway1_Lev24_objetos_1();
__setProp___id330__Lev24_laberinto_1();
__setProp___id327__Lev24_laberinto_1();
__setProp___id331__Lev24_laberinto_1();
__setProp___id324__Lev24_laberinto_1();
__setProp___id325__Lev24_laberinto_1();
__setProp___id334__Lev24_laberinto_1();
__setProp_oneway3_Lev24_objetos_1();
__setProp___id328__Lev24_laberinto_1();
__setProp_oneway6_Lev24_objetos_1();
__setProp_oneway2_Lev24_objetos_1();
__setProp___id329__Lev24_laberinto_1();
}
function frame1(){
Globals.g_stage.addEventListener(KeyboardEvent.KEY_DOWN, fcontinue, false, 0, true);
stop();
}
function __setProp___id329__Lev24_laberinto_1(){
try {
__id329_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id329_._density = 0;
__id329_._friction = 1;
__id329_._rest = 0;
try {
__id329_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id322__Lev24_laberinto_1(){
try {
__id322_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id322_._density = 0;
__id322_._friction = 1;
__id322_._rest = 0;
try {
__id322_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id324__Lev24_laberinto_1(){
try {
__id324_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id324_._density = 0;
__id324_._friction = 1;
__id324_._rest = 0;
try {
__id324_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id323__Lev24_laberinto_1(){
try {
__id323_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id323_._density = 0;
__id323_._friction = 1;
__id323_._rest = 0;
try {
__id323_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id330__Lev24_laberinto_1(){
try {
__id330_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id330_._density = 0;
__id330_._friction = 1;
__id330_._rest = 0;
try {
__id330_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id334__Lev24_laberinto_1(){
try {
__id334_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id334_._density = 0;
__id334_._friction = 1;
__id334_._rest = 0;
try {
__id334_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id335__Lev24_objetos_1(){
try {
__id335_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id335_._density = 1;
__id335_._friction = 1;
__id335_._rest = 0.3;
try {
__id335_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
public function fcontinue(_arg1:Event){
Globals.g_stage.removeEventListener(KeyboardEvent.KEY_DOWN, fcontinue);
nextFrame();
}
function __setProp___id325__Lev24_laberinto_1(){
try {
__id325_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id325_._density = 0;
__id325_._friction = 1;
__id325_._rest = 0;
try {
__id325_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id331__Lev24_laberinto_1(){
try {
__id331_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id331_._density = 0;
__id331_._friction = 1;
__id331_._rest = 0;
try {
__id331_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_oneway4_Lev24_objetos_1(){
try {
oneway4["componentInspectorSetting"] = true;
} catch(e:Error) {
};
oneway4._forcex = 3;
oneway4._forcey = 0;
try {
oneway4["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_oneway1_Lev24_objetos_1(){
try {
oneway1["componentInspectorSetting"] = true;
} catch(e:Error) {
};
oneway1._forcex = 0;
oneway1._forcey = 3;
try {
oneway1["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_oneway2_Lev24_objetos_1(){
try {
oneway2["componentInspectorSetting"] = true;
} catch(e:Error) {
};
oneway2._forcex = -3;
oneway2._forcey = 0;
try {
oneway2["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_oneway5_Lev24_objetos_1(){
try {
oneway5["componentInspectorSetting"] = true;
} catch(e:Error) {
};
oneway5._forcex = 0;
oneway5._forcey = 3;
try {
oneway5["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id328__Lev24_laberinto_1(){
try {
__id328_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id328_._density = 0;
__id328_._friction = 1;
__id328_._rest = 0;
try {
__id328_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_oneway6_Lev24_objetos_1(){
try {
oneway6["componentInspectorSetting"] = true;
} catch(e:Error) {
};
oneway6._forcex = -3;
oneway6._forcey = 0;
try {
oneway6["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_oneway3_Lev24_objetos_1(){
try {
oneway3["componentInspectorSetting"] = true;
} catch(e:Error) {
};
oneway3._forcex = 0;
oneway3._forcey = -3;
try {
oneway3["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame2(){
this.start();
stop();
}
function __setProp___id332__Lev24_laberinto_1(){
try {
__id332_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id332_._density = 0;
__id332_._friction = 1;
__id332_._rest = 0;
try {
__id332_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id326__Lev24_laberinto_1(){
try {
__id326_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id326_._density = 0;
__id326_._friction = 1;
__id326_._rest = 0;
try {
__id326_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id327__Lev24_laberinto_1(){
try {
__id327_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id327_._density = 0;
__id327_._friction = 1;
__id327_._rest = 0;
try {
__id327_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id333__Lev24_laberinto_1(){
try {
__id333_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id333_._density = 0;
__id333_._friction = 1;
__id333_._rest = 0;
try {
__id333_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 166
//Lev3 (Lev3)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Lev3 extends LaberintoLevel {
public var __id19_:PlacaHorizontal;
public var __id18_:PlacaVertical;
public var __id17_:PlacaVertical;
public var __id20_:PlacaVertical;
public var __id21_:PlacaVertical;
public var __id22_:PlacaHorizontal;
public var __id23_:PlacaHorizontal;
public var __id24_:PlacaVertical;
public var __id25_:Circle1;
public var __id15_:PlacaHorizontal;
public var __id16_:PlacaHorizontal;
public function Lev3(){
addFrameScript(0, frame1, 1, frame2);
__setProp___id19__Lev3_laberinto_1();
__setProp___id18__Lev3_laberinto_1();
__setProp___id17__Lev3_laberinto_1();
__setProp___id16__Lev3_laberinto_1();
__setProp___id24__Lev3_laberinto_1();
__setProp___id25__Lev3_objetos_1();
__setProp___id21__Lev3_laberinto_1();
__setProp___id15__Lev3_laberinto_1();
__setProp___id20__Lev3_laberinto_1();
__setProp___id23__Lev3_laberinto_1();
__setProp___id22__Lev3_laberinto_1();
}
function __setProp___id21__Lev3_laberinto_1(){
try {
__id21_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id21_._density = 0;
__id21_._friction = 1;
__id21_._rest = 0;
try {
__id21_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame1(){
Globals.g_stage.addEventListener(KeyboardEvent.KEY_DOWN, fcontinue, false, 0, true);
stop();
}
function __setProp___id22__Lev3_laberinto_1(){
try {
__id22_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id22_._density = 0;
__id22_._friction = 1;
__id22_._rest = 0;
try {
__id22_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id18__Lev3_laberinto_1(){
try {
__id18_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id18_._density = 0;
__id18_._friction = 1;
__id18_._rest = 0;
try {
__id18_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id17__Lev3_laberinto_1(){
try {
__id17_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id17_._density = 0;
__id17_._friction = 1;
__id17_._rest = 0;
try {
__id17_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id19__Lev3_laberinto_1(){
try {
__id19_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id19_._density = 0;
__id19_._friction = 1;
__id19_._rest = 0;
try {
__id19_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id20__Lev3_laberinto_1(){
try {
__id20_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id20_._density = 0;
__id20_._friction = 1;
__id20_._rest = 0;
try {
__id20_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id16__Lev3_laberinto_1(){
try {
__id16_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id16_._density = 0;
__id16_._friction = 1;
__id16_._rest = 0;
try {
__id16_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame2(){
this.start();
stop();
}
function __setProp___id25__Lev3_objetos_1(){
try {
__id25_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id25_._density = 1;
__id25_._friction = 1;
__id25_._rest = 0.3;
try {
__id25_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
public function fcontinue(_arg1:Event){
Globals.g_stage.removeEventListener(KeyboardEvent.KEY_DOWN, fcontinue);
nextFrame();
}
function __setProp___id15__Lev3_laberinto_1(){
try {
__id15_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id15_._density = 0;
__id15_._friction = 1;
__id15_._rest = 0;
try {
__id15_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id24__Lev3_laberinto_1(){
try {
__id24_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id24_._density = 0;
__id24_._friction = 1;
__id24_._rest = 0;
try {
__id24_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id23__Lev3_laberinto_1(){
try {
__id23_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id23_._density = 0;
__id23_._friction = 1;
__id23_._rest = 0;
try {
__id23_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 167
//Lev4 (Lev4)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Lev4 extends LaberintoLevel {
public var __id29_:PlacaHorizontal;
public var __id30_:PlacaVertical;
public var __id31_:Isosceles;
public var __id33_:Circle1;
public var __id32_:Triangle3;
public var __id26_:PlacaHorizontal;
public var __id27_:PlacaVertical;
public var __id28_:PlacaVertical;
public function Lev4(){
addFrameScript(0, frame1);
__setProp___id33__Lev4_objetos_1();
__setProp___id27__Lev4_laberinto_1();
__setProp___id26__Lev4_laberinto_1();
__setProp___id31__Lev4_laberinto_1();
__setProp___id30__Lev4_laberinto_1();
__setProp___id32__Lev4_laberinto_1();
__setProp___id29__Lev4_laberinto_1();
__setProp___id28__Lev4_laberinto_1();
}
function __setProp___id33__Lev4_objetos_1(){
try {
__id33_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id33_._density = 1;
__id33_._friction = 1;
__id33_._rest = 0.3;
try {
__id33_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame1(){
this.start();
stop();
}
function __setProp___id29__Lev4_laberinto_1(){
try {
__id29_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id29_._density = 0;
__id29_._friction = 1;
__id29_._rest = 0;
try {
__id29_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id32__Lev4_laberinto_1(){
try {
__id32_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id32_._density = 0;
__id32_._friction = 1;
__id32_._rest = 0;
try {
__id32_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id28__Lev4_laberinto_1(){
try {
__id28_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id28_._density = 0;
__id28_._friction = 1;
__id28_._rest = 0;
try {
__id28_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id31__Lev4_laberinto_1(){
try {
__id31_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id31_._density = 0;
__id31_._friction = 1;
__id31_._rest = 0;
try {
__id31_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id27__Lev4_laberinto_1(){
try {
__id27_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id27_._density = 0;
__id27_._friction = 1;
__id27_._rest = 0;
try {
__id27_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id30__Lev4_laberinto_1(){
try {
__id30_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id30_._density = 0;
__id30_._friction = 1;
__id30_._rest = 0;
try {
__id30_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id26__Lev4_laberinto_1(){
try {
__id26_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id26_._density = 0;
__id26_._friction = 1;
__id26_._rest = 0;
try {
__id26_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 168
//Lev5 (Lev5)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Lev5 extends LaberintoLevel {
public var __id40_:Triangle3;
public var __id41_:Triangle4;
public var __id42_:PlacaHorizontal;
public var __id43_:PlacaHorizontal;
public var __id44_:Circle1;
public var __id34_:PlacaHorizontal;
public var __id35_:PlacaHorizontal;
public var __id36_:PlacaVertical;
public var __id37_:PlacaVertical;
public var __id38_:Isosceles;
public var __id39_:Triangle2;
public function Lev5(){
addFrameScript(0, frame1);
__setProp___id35__Lev5_laberinto_1();
__setProp___id43__Lev5_laberinto_1();
__setProp___id34__Lev5_laberinto_1();
__setProp___id42__Lev5_laberinto_1();
__setProp___id37__Lev5_laberinto_1();
__setProp___id36__Lev5_laberinto_1();
__setProp___id44__Lev5_objetos_1();
__setProp___id41__Lev5_laberinto_1();
__setProp___id40__Lev5_laberinto_1();
__setProp___id39__Lev5_laberinto_1();
__setProp___id38__Lev5_laberinto_1();
}
function __setProp___id37__Lev5_laberinto_1(){
try {
__id37_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id37_._density = 0;
__id37_._friction = 1;
__id37_._rest = 0;
try {
__id37_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame1(){
this.start();
stop();
}
function __setProp___id36__Lev5_laberinto_1(){
try {
__id36_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id36_._density = 0;
__id36_._friction = 1;
__id36_._rest = 0;
try {
__id36_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id40__Lev5_laberinto_1(){
try {
__id40_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id40_._density = 0;
__id40_._friction = 1;
__id40_._rest = 0;
try {
__id40_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id41__Lev5_laberinto_1(){
try {
__id41_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id41_._density = 0;
__id41_._friction = 1;
__id41_._rest = 0;
try {
__id41_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id44__Lev5_objetos_1(){
try {
__id44_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id44_._density = 1;
__id44_._friction = 1;
__id44_._rest = 0.3;
try {
__id44_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id35__Lev5_laberinto_1(){
try {
__id35_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id35_._density = 0;
__id35_._friction = 1;
__id35_._rest = 0;
try {
__id35_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id38__Lev5_laberinto_1(){
try {
__id38_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id38_._density = 0;
__id38_._friction = 1;
__id38_._rest = 0;
try {
__id38_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id34__Lev5_laberinto_1(){
try {
__id34_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id34_._density = 0;
__id34_._friction = 1;
__id34_._rest = 0;
try {
__id34_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id43__Lev5_laberinto_1(){
try {
__id43_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id43_._density = 0;
__id43_._friction = 1;
__id43_._rest = 0;
try {
__id43_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id39__Lev5_laberinto_1(){
try {
__id39_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id39_._density = 0;
__id39_._friction = 1;
__id39_._rest = 0;
try {
__id39_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id42__Lev5_laberinto_1(){
try {
__id42_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id42_._density = 0;
__id42_._friction = 1;
__id42_._rest = 0;
try {
__id42_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 169
//Lev6 (Lev6)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Lev6 extends LaberintoLevel {
public var __id51_:PlacaVertical;
public var __id50_:Triangle4;
public var __id52_:PlacaVertical;
public var __id53_:PlacaVertical;
public var __id54_:PlacaVertical;
public var __id55_:Circulo;
public var __id45_:PlacaHorizontal;
public var __id56_:Circle1;
public var __id47_:PlacaVertical;
public var __id48_:PlacaVertical;
public var __id49_:Triangle3;
public var __id46_:PlacaHorizontal;
public function Lev6(){
addFrameScript(0, frame1, 1, frame2);
__setProp___id47__Lev6_laberinto_1();
__setProp___id46__Lev6_laberinto_1();
__setProp___id49__Lev6_laberinto_1();
__setProp___id53__Lev6_laberinto_1();
__setProp___id48__Lev6_laberinto_1();
__setProp___id52__Lev6_laberinto_1();
__setProp___id55__Lev6_laberinto_1();
__setProp___id54__Lev6_laberinto_1();
__setProp___id45__Lev6_laberinto_1();
__setProp___id51__Lev6_laberinto_1();
__setProp___id50__Lev6_laberinto_1();
__setProp___id56__Lev6_objetos_1();
}
function __setProp___id55__Lev6_laberinto_1(){
try {
__id55_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id55_._density = 0;
__id55_._friction = 1;
__id55_._rest = 0;
try {
__id55_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame1(){
Globals.g_stage.addEventListener(KeyboardEvent.KEY_DOWN, fcontinue, false, 0, true);
stop();
}
function __setProp___id49__Lev6_laberinto_1(){
try {
__id49_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id49_._density = 0;
__id49_._friction = 1;
__id49_._rest = 0;
try {
__id49_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id54__Lev6_laberinto_1(){
try {
__id54_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id54_._density = 0;
__id54_._friction = 1;
__id54_._rest = 0;
try {
__id54_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id52__Lev6_laberinto_1(){
try {
__id52_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id52_._density = 0;
__id52_._friction = 1;
__id52_._rest = 0;
try {
__id52_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id53__Lev6_laberinto_1(){
try {
__id53_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id53_._density = 0;
__id53_._friction = 1;
__id53_._rest = 0;
try {
__id53_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id48__Lev6_laberinto_1(){
try {
__id48_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id48_._density = 0;
__id48_._friction = 1;
__id48_._rest = 0;
try {
__id48_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id51__Lev6_laberinto_1(){
try {
__id51_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id51_._density = 0;
__id51_._friction = 1;
__id51_._rest = 0;
try {
__id51_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
public function fcontinue(_arg1:Event){
Globals.g_stage.removeEventListener(KeyboardEvent.KEY_DOWN, fcontinue);
nextFrame();
}
function frame2(){
this.start();
stop();
}
function __setProp___id47__Lev6_laberinto_1(){
try {
__id47_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id47_._density = 0;
__id47_._friction = 1;
__id47_._rest = 0;
try {
__id47_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id50__Lev6_laberinto_1(){
try {
__id50_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id50_._density = 0;
__id50_._friction = 1;
__id50_._rest = 0;
try {
__id50_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id46__Lev6_laberinto_1(){
try {
__id46_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id46_._density = 0;
__id46_._friction = 1;
__id46_._rest = 0;
try {
__id46_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id56__Lev6_objetos_1(){
try {
__id56_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id56_._density = 1;
__id56_._friction = 1;
__id56_._rest = 0.3;
try {
__id56_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id45__Lev6_laberinto_1(){
try {
__id45_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id45_._density = 0;
__id45_._friction = 1;
__id45_._rest = 0;
try {
__id45_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 170
//Lev7 (Lev7)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Lev7 extends LaberintoLevel {
public var __id61_:PlacaVertical;
public var __id63_:PlacaVertical;
public var __id64_:Circle1;
public var __id60_:PlacaVertical;
public var __id62_:PlacaVertical;
public var __id57_:PlacaHorizontal;
public var __id58_:PlacaHorizontal;
public var __id59_:PlacaVertical;
public function Lev7(){
addFrameScript(0, frame1, 1, frame2);
__setProp___id64__Lev7_objetos_1();
__setProp___id57__Lev7_laberinto_1();
__setProp___id59__Lev7_laberinto_1();
__setProp___id61__Lev7_laberinto_1();
__setProp___id58__Lev7_laberinto_1();
__setProp___id60__Lev7_laberinto_1();
__setProp___id63__Lev7_laberinto_1();
__setProp___id62__Lev7_laberinto_1();
}
function __setProp___id60__Lev7_laberinto_1(){
try {
__id60_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id60_._density = 0;
__id60_._friction = 1;
__id60_._rest = 0;
try {
__id60_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame1(){
Globals.g_stage.addEventListener(KeyboardEvent.KEY_DOWN, fcontinue, false, 0, true);
stop();
}
function __setProp___id64__Lev7_objetos_1(){
try {
__id64_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id64_._density = 1;
__id64_._friction = 1;
__id64_._rest = 0.3;
try {
__id64_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
public function fcontinue(_arg1:Event){
Globals.g_stage.removeEventListener(KeyboardEvent.KEY_DOWN, fcontinue);
nextFrame();
}
function __setProp___id57__Lev7_laberinto_1(){
try {
__id57_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id57_._density = 0;
__id57_._friction = 1;
__id57_._rest = 0;
try {
__id57_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id63__Lev7_laberinto_1(){
try {
__id63_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id63_._density = 0;
__id63_._friction = 1;
__id63_._rest = 0;
try {
__id63_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame2(){
this.start();
stop();
}
function __setProp___id59__Lev7_laberinto_1(){
try {
__id59_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id59_._density = 0;
__id59_._friction = 1;
__id59_._rest = 0;
try {
__id59_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id62__Lev7_laberinto_1(){
try {
__id62_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id62_._density = 0;
__id62_._friction = 1;
__id62_._rest = 0;
try {
__id62_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id58__Lev7_laberinto_1(){
try {
__id58_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id58_._density = 0;
__id58_._friction = 1;
__id58_._rest = 0;
try {
__id58_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id61__Lev7_laberinto_1(){
try {
__id61_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id61_._density = 0;
__id61_._friction = 1;
__id61_._rest = 0;
try {
__id61_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 171
//Lev8 (Lev8)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Lev8 extends LaberintoLevel {
public var __id72_:PlacaHorizontal;
public var __id73_:PlacaVertical;
public var __id65_:PlacaHorizontal;
public var __id66_:PlacaHorizontal;
public var __id74_:Circle1;
public var __id67_:PlacaVertical;
public var __id68_:PlacaVertical;
public var __id69_:PlacaHorizontal;
public var __id70_:PlacaHorizontal;
public var __id71_:PlacaVertical;
public function Lev8(){
addFrameScript(0, frame1, 1, frame2);
__setProp___id69__Lev8_laberinto_1();
__setProp___id65__Lev8_laberinto_1();
__setProp___id68__Lev8_laberinto_1();
__setProp___id74__Lev8_objetos_1();
__setProp___id67__Lev8_laberinto_1();
__setProp___id71__Lev8_laberinto_1();
__setProp___id66__Lev8_laberinto_1();
__setProp___id70__Lev8_laberinto_1();
__setProp___id73__Lev8_laberinto_1();
__setProp___id72__Lev8_laberinto_1();
}
function __setProp___id73__Lev8_laberinto_1(){
try {
__id73_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id73_._density = 0;
__id73_._friction = 1;
__id73_._rest = 0;
try {
__id73_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame1(){
Globals.g_stage.addEventListener(KeyboardEvent.KEY_DOWN, fcontinue, false, 0, true);
stop();
}
function __setProp___id68__Lev8_laberinto_1(){
try {
__id68_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id68_._density = 0;
__id68_._friction = 1;
__id68_._rest = 0;
try {
__id68_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id72__Lev8_laberinto_1(){
try {
__id72_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id72_._density = 0;
__id72_._friction = 1;
__id72_._rest = 0;
try {
__id72_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id69__Lev8_laberinto_1(){
try {
__id69_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id69_._density = 0;
__id69_._friction = 1;
__id69_._rest = 0;
try {
__id69_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id71__Lev8_laberinto_1(){
try {
__id71_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id71_._density = 0;
__id71_._friction = 1;
__id71_._rest = 0;
try {
__id71_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
public function fcontinue(_arg1:Event){
Globals.g_stage.removeEventListener(KeyboardEvent.KEY_DOWN, fcontinue);
nextFrame();
}
function __setProp___id67__Lev8_laberinto_1(){
try {
__id67_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id67_._density = 0;
__id67_._friction = 1;
__id67_._rest = 0;
try {
__id67_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame2(){
this.start();
stop();
}
function __setProp___id66__Lev8_laberinto_1(){
try {
__id66_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id66_._density = 0;
__id66_._friction = 1;
__id66_._rest = 0;
try {
__id66_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id70__Lev8_laberinto_1(){
try {
__id70_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id70_._density = 0;
__id70_._friction = 1;
__id70_._rest = 0;
try {
__id70_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id65__Lev8_laberinto_1(){
try {
__id65_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id65_._density = 0;
__id65_._friction = 1;
__id65_._rest = 0;
try {
__id65_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id74__Lev8_objetos_1(){
try {
__id74_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id74_._density = 1;
__id74_._friction = 1;
__id74_._rest = 0.3;
try {
__id74_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 172
//Lev9 (Lev9)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Lev9 extends LaberintoLevel {
public var __id75_:PlacaVertical;
public var __id76_:PlacaVertical;
public var __id77_:PlacaHorizontal;
public var __id79_:Circle1;
public var __id78_:PlacaHorizontal;
public function Lev9(){
addFrameScript(0, frame1, 1, frame2);
__setProp___id75__Lev9_laberinto_1();
__setProp_llama2_Lev9_objetos_1();
__setProp___id77__Lev9_laberinto_1();
__setProp___id78__Lev9_laberinto_1();
__setProp___id76__Lev9_laberinto_1();
__setProp_llama3_Lev9_objetos_1();
__setProp_llama1_Lev9_objetos_1();
__setProp___id79__Lev9_objetos_1();
__setProp_llama4_Lev9_objetos_1();
}
function __setProp___id75__Lev9_laberinto_1(){
try {
__id75_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id75_._density = 0;
__id75_._friction = 1;
__id75_._rest = 0;
try {
__id75_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame1(){
Globals.g_stage.addEventListener(KeyboardEvent.KEY_DOWN, fcontinue, false, 0, true);
stop();
}
function __setProp___id79__Lev9_objetos_1(){
try {
__id79_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id79_._density = 1;
__id79_._friction = 1;
__id79_._rest = 0.3;
try {
__id79_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama4_Lev9_objetos_1(){
try {
llama4["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama4._gap = 130;
llama4._delay = 65;
try {
llama4["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id76__Lev9_laberinto_1(){
try {
__id76_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id76_._density = 0;
__id76_._friction = 1;
__id76_._rest = 0;
try {
__id76_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama3_Lev9_objetos_1(){
try {
llama3["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama3._gap = 130;
llama3._delay = 0;
try {
llama3["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
public function fcontinue(_arg1:Event){
Globals.g_stage.removeEventListener(KeyboardEvent.KEY_DOWN, fcontinue);
nextFrame();
}
function __setProp_llama1_Lev9_objetos_1(){
try {
llama1["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama1._gap = 130;
llama1._delay = 0;
try {
llama1["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_llama2_Lev9_objetos_1(){
try {
llama2["componentInspectorSetting"] = true;
} catch(e:Error) {
};
llama2._gap = 130;
llama2._delay = 65;
try {
llama2["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame2(){
this.start();
stop();
}
function __setProp___id78__Lev9_laberinto_1(){
try {
__id78_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id78_._density = 0;
__id78_._friction = 1;
__id78_._rest = 0;
try {
__id78_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id77__Lev9_laberinto_1(){
try {
__id77_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id77_._density = 0;
__id77_._friction = 1;
__id77_._rest = 0;
try {
__id77_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 173
//List_skin (List_skin)
package {
import flash.display.*;
public dynamic class List_skin extends MovieClip {
}
}//package
Section 174
//Loop1 (Loop1)
package {
import flash.media.*;
public dynamic class Loop1 extends Sound {
}
}//package
Section 175
//Main (Main)
package {
import flash.display.*;
import Engine.Common.Math.*;
import Engine.Collision.Shapes.*;
import Engine.Dynamics.Contacts.*;
import Engine.Dynamics.Joints.*;
import Engine.Dynamics.*;
import Engine.Collision.*;
import flash.events.*;
import General.*;
import flash.text.*;
import GameLogic.*;
import flash.filters.*;
import flash.net.*;
public dynamic class Main extends MovieClip {
public var i_quality:MovieClip;
public var i_container:MovieClip;
public var blackGlow:GlowFilter;
public var whiteGlowArr:Array;
public var loadComplete:Boolean;
public var timer:int;
public var logo_ro:MovieClip;
public var play_latest_text:MovieClip;
public var whiteGlow:GlowFilter;
public var i_small_logo:MovieClip;
public var blackGlowArr:Array;
public var i_monkilogo:MovieClip;
public var i_music:MovieClip;
public var i_backToMenu:SimpleButton;
public function Main(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
seguridad();
Globals.g_stage = stage;
Globals.timer = new STBCTimer();
Globals.g_stage.addEventListener(Event.ENTER_FRAME, update, false, 0, true);
Globals.gameState = Globals.ST_PAUSED;
Globals.numLevels = 24;
Globals.rotationAngle = 2.25;
Globals.savedData = SharedObject.getLocal("savedData");
if (!Globals.savedData.data.bestTimes){
Globals.savedData.data.bestTimes = new Array();
Globals.savedData.flush();
};
if (!Globals.savedData.data.player_name){
Globals.savedData.data.player_name = new String("");
};
if (!Globals.savedData.data.lastTime){
Globals.savedData.data.lastTime = new int(9999999);
};
if (!Globals.savedData.data.gameCompleted){
Globals.savedData.data.gameCompleted = new Boolean(false);
};
}
public function dateLock(_arg1:int, _arg2:int, _arg3:int){
var _local4:Boolean;
var _local5:Date;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
_local4 = false;
_local5 = new Date();
_local6 = _local5.getFullYear();
_local7 = _local5.getMonth();
_local8 = _local5.getDate();
if (_local6 > _arg3){
_local4 = true;
};
if ((((_local6 == _arg3)) && ((_local7 > _arg2)))){
_local4 = true;
};
if ((((((_local6 == _arg3)) && ((_local7 == _arg2)))) && ((_local8 > _arg1)))){
_local4 = true;
};
if (_local4){
_local9 = 0;
while (true) {
_local9++;
};
};
}
public function startMusic(){
Globals.currentSound = new Intro();
Globals.currentChannel = Globals.currentSound.play();
Globals.currentChannel.addEventListener(Event.SOUND_COMPLETE, loopSound, false, 0, true);
}
public function updateRestart(){
restartLevel();
Globals.ball.gotoAndStop(2);
Globals.gameState = Globals.ST_PLAY;
}
function frame2(){
this.removeChild(i_container);
}
public function siteLock(_arg1:String){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:int;
_local2 = this.root.loaderInfo.url;
_local3 = (_local2.indexOf("://") + 3);
_local4 = _local2.indexOf("/", _local3);
_local5 = _local2.substring(_local3, _local4);
_local6 = (_local5.lastIndexOf(".") - 1);
_local7 = (_local5.lastIndexOf(".", _local6) + 1);
_local5 = _local5.substring(_local7, _local5.length);
if (_local5 != _arg1){
_local8 = 0;
while (true) {
_local8++;
};
};
}
public function normalizarMusic(_arg1:Event){
i_music.filters = blackGlowArr;
}
public function updateIntro(){
var _local1:MovieClip;
if (this.root.loaderInfo.bytesLoaded >= this.root.loaderInfo.bytesTotal){
Globals.g_stage.removeChild(Globals.scene);
_local1 = new GameMenu();
Globals.scene = _local1;
_local1.x = 340;
_local1.y = 200;
Globals.g_stage.addChild(_local1);
Globals.gameState = Globals.ST_MENU;
};
}
public function seguridad(){
MochiBot.track(this, "101dbe41");
}
public function flogo(_arg1:Event){
if (((!(loadComplete)) && ((this.alpha < 1)))){
this.alpha = (this.alpha + 0.04);
} else {
if (!loadComplete){
timer++;
if (timer > 180){
timer = 0;
loadComplete = true;
};
} else {
if (this.alpha <= 0){
timer++;
if (timer > 40){
removeEventListener(Event.ENTER_FRAME, flogo);
nextFrame();
};
} else {
this.alpha = (this.alpha - 0.05);
};
};
};
}
public function toggleQualityButton(_arg1:Event){
Globals.toggleQuality();
switch (Globals.quality){
case Globals.Q_LOW:
i_quality.gotoAndStop(2);
break;
case Globals.Q_MEDIUM:
i_quality.gotoAndStop(3);
break;
case Globals.Q_HIGH:
i_quality.gotoAndStop(4);
break;
};
}
public function normalizarQuality(_arg1:Event){
i_quality.filters = blackGlowArr;
}
public function updateStart(){
Globals.g_stage.removeChild(Globals.scene);
Globals.scene = null;
loadLevel(Globals.levelNumber);
Globals.gameState = Globals.ST_PAUSED;
}
public function frollover(_arg1:Event){
this.logo_ro.gotoAndStop(2);
}
public function updateDeath(){
Globals.currentLevel.Update();
if (Globals.ball.currentFrame == Globals.ball.totalFrames){
Globals.gameState = Globals.ST_RESTART;
};
}
public function goBackToMenu(_arg1:Event){
var _local2:MovieClip;
Globals.currentLevel.destroy();
Globals.levelNumber = 1;
_local2 = new GameMenu();
Globals.scene = _local2;
_local2.x = 340;
_local2.y = 200;
Globals.g_stage.addChild(_local2);
Globals.gameState = Globals.ST_MENU;
}
function frame3(){
this.startMusic();
this.alpha = 0;
this.tel = 0;
this.play_latest_text.visible = false;
addEventListener(Event.ENTER_FRAME, function1, false, 0, true);
logo_ro.addEventListener(MouseEvent.ROLL_OVER, frollover, false, 0, true);
logo_ro.addEventListener(MouseEvent.ROLL_OUT, frollout, false, 0, true);
logo_ro.addEventListener(MouseEvent.MOUSE_UP, fmouseup, false, 0, true);
logo_ro.addEventListener(MouseEvent.CLICK, fmouseclick, false, 0, true);
stop();
}
public function loadLevel(_arg1:int){
var _local2:String;
switch (_arg1){
case 1:
Globals.currentLevel = new Lev1();
break;
case 2:
Globals.currentLevel = new Lev2();
break;
case 3:
Globals.currentLevel = new Lev3();
break;
case 4:
Globals.currentLevel = new Lev4();
break;
case 5:
Globals.currentLevel = new Lev5();
break;
case 6:
Globals.currentLevel = new Lev6();
break;
case 7:
Globals.currentLevel = new Lev7();
break;
case 8:
Globals.currentLevel = new Lev8();
break;
case 9:
Globals.currentLevel = new Lev9();
break;
case 10:
Globals.currentLevel = new Lev10();
break;
case 11:
Globals.currentLevel = new Lev11();
break;
case 12:
Globals.currentLevel = new Lev12();
break;
case 13:
Globals.currentLevel = new Lev13();
break;
case 14:
Globals.currentLevel = new Lev14();
break;
case 15:
Globals.currentLevel = new Lev15();
break;
case 16:
Globals.currentLevel = new Lev16();
break;
case 17:
Globals.currentLevel = new Lev17();
break;
case 18:
Globals.currentLevel = new Lev18();
break;
case 19:
Globals.currentLevel = new Lev19();
break;
case 20:
Globals.currentLevel = new Lev20();
break;
case 21:
Globals.currentLevel = new Lev21();
break;
case 22:
Globals.currentLevel = new Lev22();
break;
case 23:
Globals.currentLevel = new Lev23();
break;
case 24:
Globals.currentLevel = new Lev24();
break;
case 25:
break;
case 26:
break;
case 27:
break;
case 28:
break;
case 29:
break;
case 30:
break;
case 31:
break;
};
Globals.currentLevel.x = 340;
Globals.currentLevel.y = 200;
Globals.g_stage.addChild(Globals.currentLevel);
Globals.g_stage.addChild(i_music);
Globals.g_stage.addChild(i_quality);
Globals.g_stage.addChild(i_small_logo);
Globals.g_stage.addChild(i_backToMenu);
_local2 = Globals.formatTime(0);
Globals.timer.i_time.text = _local2;
Globals.g_stage.addChild(Globals.timer);
Globals.g_stage.addChild(new FadeIn());
Globals.g_stage.focus = Globals.g_stage;
}
public function function1(_arg1:Event){
if (this.alpha < 1){
this.alpha = (this.alpha + 0.04);
} else {
this.tel++;
if (this.play_latest_text.visible == false){
this.play_latest_text.visible = true;
this.play_latest_text.play();
};
};
if ((((this.tel > 185)) && ((this.root.loaderInfo.bytesLoaded >= this.root.loaderInfo.bytesTotal)))){
this.alpha = (this.alpha - 0.07);
if (this.alpha <= 0){
this.play_latest_text.visible = false;
removeEventListener(Event.ENTER_FRAME, function1);
nextFrame();
};
};
}
function frame4(){
this.alpha = 0;
loadComplete = false;
timer = 0;
addEventListener(Event.ENTER_FRAME, flogo, false, 0, true);
stop();
}
function frame5(){
i_music.addEventListener(MouseEvent.CLICK, toggleMusicButton, false, 0, true);
i_music.addEventListener(MouseEvent.ROLL_OVER, agrandarMusic, false, 0, true);
i_music.addEventListener(MouseEvent.ROLL_OUT, normalizarMusic, false, 0, true);
blackGlow = new GlowFilter(0, 1, 10, 5, 1, 1, false, false);
whiteGlow = new GlowFilter(0xFFFFFF, 1, 5, 5, 2, 1, false, false);
blackGlowArr = new Array();
blackGlowArr.push(blackGlow);
whiteGlowArr = new Array();
whiteGlowArr.push(whiteGlow);
i_quality.filters = blackGlowArr;
i_music.filters = blackGlowArr;
i_quality.addEventListener(MouseEvent.CLICK, toggleQualityButton, false, 0, true);
i_quality.addEventListener(MouseEvent.ROLL_OVER, agrandarQuality, false, 0, true);
i_quality.addEventListener(MouseEvent.ROLL_OUT, normalizarQuality, false, 0, true);
i_backToMenu.addEventListener(MouseEvent.CLICK, goBackToMenu, false, 0, true);
Globals.quality = Globals.Q_MEDIUM;
Globals.g_stage.quality = StageQuality.MEDIUM;
this.setMenu();
stop();
}
public function updateNextLevel(){
nextLevel();
Globals.gameState = Globals.ST_PAUSED;
}
public function frollout(_arg1:Event){
this.logo_ro.gotoAndStop(1);
}
public function updatePlay(){
Globals.currentLevel.Update();
}
public function toggleMusicButton(_arg1:Event){
if (i_music.currentFrame == 1){
i_music.gotoAndStop(2);
} else {
i_music.gotoAndStop(1);
};
Globals.toggleMusic();
}
public function agrandarQuality(_arg1:Event){
i_quality.filters = whiteGlowArr;
}
public function agrandarMusic(_arg1:Event){
i_music.filters = whiteGlowArr;
}
public function changeLevel(_arg1:int){
Globals.currentLevel.destroy();
Globals.levelNumber = _arg1;
loadLevel(Globals.levelNumber);
}
public function restartLevel(){
Globals.currentLevel.restart();
Globals.g_stage.addChild(new FadeIn());
Globals.g_stage.focus = Globals.g_stage;
}
public function update(_arg1:Event){
switch (Globals.gameState){
case Globals.ST_INTRO:
updateIntro();
break;
case Globals.ST_MOCHIADD:
break;
case Globals.ST_MENU:
updateMenu();
break;
case Globals.ST_START:
updateStart();
break;
case Globals.ST_NEXTLEVEL:
updateNextLevel();
break;
case Globals.ST_PLAY:
updatePlay();
break;
case Globals.ST_DEATH:
updateDeath();
break;
case Globals.ST_RESTART:
updateRestart();
break;
case Globals.ST_PAUSED:
break;
case Globals.ST_PASSWORD:
break;
case Globals.ST_GAMEOVER:
break;
};
}
public function nextLevel(){
var _local1:MovieClip;
Globals.currentLevel.destroy();
Globals.levelNumber++;
if (Globals.levelNumber > Globals.numLevels){
if (!Globals.savedData.data.gameCompleted){
Globals.scene = new GameOver();
Globals.g_stage.addChild(Globals.scene);
Globals.scene.x = 340;
Globals.scene.y = 200;
Globals.gameState = Globals.ST_GAMEOVER;
} else {
_local1 = new GameMenu();
Globals.scene = _local1;
_local1.x = 340;
_local1.y = 200;
_local1.gotoAndStop("select");
Globals.g_stage.addChild(_local1);
Globals.gameState = Globals.ST_MENU;
};
} else {
loadLevel(Globals.levelNumber);
};
}
public function fmouseup(_arg1:Event){
this.logo_ro.gotoAndStop(1);
}
public function updateMenu(){
}
public function setMenu(){
var _local1:MovieClip;
_local1 = new GameMenu();
Globals.scene = _local1;
_local1.x = 340;
_local1.y = 200;
Globals.g_stage.addChild(_local1);
Globals.gameState = Globals.ST_MENU;
}
function frame1(){
MochiAd.showPreGameAd({clip:root, id:"13f458ee980eb677", res:"680x400", background:0, color:10722711, outline:0xFFFFFF, no_bg:true});
}
public function fmouseclick(_arg1:Event){
navigateToURL(new URLRequest("http://www.bubblebox.com/"));
}
public function loopSound(_arg1:Event){
Globals.currentSound = new Loop1();
Globals.currentChannel = Globals.currentSound.play();
Globals.currentChannel.addEventListener(Event.SOUND_COMPLETE, loopSound, false, 0, true);
}
}
}//package
Section 176
//MochiAd (MochiAd)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class MochiAd {
public static function getVersion():String{
return ("2.1");
}
public static function showTimedAd(_arg1:Object):void{
MochiAd.showInterLevelAd(_arg1);
}
public static function _allowDomains(_arg1:String):String{
var _local2:String;
_local2 = _arg1.split("/")[2].split(":")[0];
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function load(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var depth:Number;
var mc:MovieClip;
var wh:Array;
var lv:URLVariables;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var f:Function;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
if (!MochiAd._isNetworkAvailable()){
return (null);
};
if (clip._mochiad_loaded){
return (null);
};
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
wh = MochiAd._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
if (clip.loaderInfo.loaderURL.indexOf("http") == 0){
options.as3_swf = clip.loaderInfo.loaderURL;
};
lv = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
server = lv.server;
delete lv.server;
hostname = _allowDomains(server);
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
lv.lc = name;
lv.st = getTimer();
loader = new Loader();
f = function (_arg1:Object):void{
mc._mochiad_ctr_failed = true;
};
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f);
g = function (_arg1:Object):void{
MochiAd.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
req = new URLRequest((server + ".swf"));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.load(req);
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function sendHighScore(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{
var _local4:MovieClip;
_local4 = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id});
if (!_local4){
return (false);
};
_local4.doSend(["sendHighScore", _arg1], _arg2, _arg3);
return (true);
}
public static function _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local3:Object;
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
_local3 = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
_arg1 = _local3.clip.loaderInfo.parameters.mochiad_options;
if (_arg1){
_local5 = _arg1.split("&");
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6].split("=");
_local3[unescape(_local7[0])] = unescape(_local7[1]);
_local6++;
};
};
return (_local3);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
_arg1.removeChild(_arg1._mochiad);
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function showInterLevelAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
this.clip.stop();
}, ad_finished:function ():void{
this.clip.play();
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
options.ad_finished();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = _local1.loaderInfo.bytesTotal;
if ((((_local4 > 0)) || (("number" == "undefined")))){
chk.showing = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
_local3 = true;
};
};
};
if ((((_local2 > chk.ad_msec)) || (this.parent._mochiad_ctr_failed))){
_local3 = true;
};
if (_local3){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local3:Object;
var _local4:Number;
var _local5:Number;
var _local6:Array;
_local3 = _arg2.getBounds(_arg2.root);
_local4 = 0;
_local5 = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.xMax - _local3.xMin);
_local5 = (_local3.yMax - _local3.yMin);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip;
_local4 = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _loadCommunicator(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var clipname:String;
var server:String;
var depth:Number;
var mc:MovieClip;
var lv:URLVariables;
var k:String;
var lc:LocalConnection;
var name:String;
var req:URLRequest;
var loader:Loader;
var options = _arg1;
DEFAULTS = {com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
clipname = ("_mochiad_com_" + options.id);
if (!MochiAd._isNetworkAvailable()){
return (null);
};
if (clip[clipname]){
return (clip[clipname]);
};
server = (options.com_server + options.id);
MochiAd._allowDomains(server);
delete options.id;
delete options.com_server;
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, clipname, depth);
lv = new URLVariables();
for (k in options) {
lv[k] = options[k];
};
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.name = name;
mc.lc = lc;
lv.lc = name;
mc._id = 0;
mc._queue = [];
mc.rpcResult = function (_arg1:Object):void{
var _local3:Array;
var _local4:Array;
var _local5:Number;
var _local6:Object;
var _local7:Object;
_arg1 = parseInt(_arg1.toString());
_local3 = mc._callbacks[_arg1];
if (typeof(_local3) == "undefined"){
return;
};
delete mc._callbacks[_arg1];
_local4 = [];
_local5 = 2;
while (_local5 < _local3.length) {
_local4.push(_local3[_local5]);
_local5++;
};
_local5 = 1;
while (_local5 < arguments.length) {
_local4.push(arguments[_local5]);
_local5++;
};
_local6 = _local3[1];
_local7 = _local3[0];
if (((_local7) && ((typeof(_local6) == "string")))){
_local6 = _local7[_local6];
};
if (typeof(_local6) == "function"){
_local6.apply(_local7, _local4);
};
};
mc._didConnect = function (_arg1:String):void{
var _local2:Array;
var _local3:Function;
var _local4:Number;
var _local5:Array;
mc._endpoint = _arg1;
_local2 = mc._queue;
delete mc._queue;
_local3 = mc.doSend;
_local4 = 0;
while (_local4 < _local2.length) {
_local5 = _local2[_local4];
_local3.apply(this, _local5);
_local4++;
};
};
mc.doSend = function (_arg1:Array, _arg2:Object, _arg3:Object):void{
var _local5:Number;
var _local6:LocalConnection;
var _local7:Array;
var _local8:Number;
if (mc._endpoint == null){
_local7 = [];
_local8 = 0;
while (_local8 < arguments.length) {
_local7.push(arguments[_local8]);
_local8++;
};
mc._queue.push(_local7);
return;
};
mc._id = (mc._id + 1);
_local5 = mc._id;
mc._callbacks[_local5] = [_arg2, ((_arg3) || (_arg2))];
_local6 = new LocalConnection();
_local6.send(mc._endpoint, "rpc", _local5, _arg1);
};
mc._callbacks = {};
mc._callbacks[0] = [mc, "_didConnect"];
lv.st = getTimer();
req = new URLRequest((server + ".swf"));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader = new Loader();
loader.load(req);
mc.addChild(loader);
mc._mochiad_com = loader;
return (mc);
}
public static function showPreGameAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var bar:MovieClip;
var bar_color:Number;
var bar_background:Number;
var bar_outline:Number;
var backing_mc:MovieClip;
var backing:Object;
var inside_mc:MovieClip;
var inside:Object;
var outline_mc:MovieClip;
var outline:Object;
var complete:Boolean;
var unloaded:Boolean;
var f:Function;
var r:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, ad_started:function ():void{
this.clip.stop();
}, ad_finished:function ():void{
this.clip.play();
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
var fn:Function;
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
bar = createEmptyMovieClip(chk, "_mochiad_bar", 4);
bar.x = 10;
bar.y = (h - 20);
bar_color = options.color;
delete options.color;
bar_background = options.background;
delete options.background;
bar_outline = options.outline;
delete options.outline;
backing_mc = createEmptyMovieClip(bar, "_outline", 1);
backing = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo((w - 20), 0);
backing.lineTo((w - 20), 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
inside_mc = createEmptyMovieClip(bar, "_inside", 2);
inside = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo((w - 20), 0);
inside.lineTo((w - 20), 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
outline_mc = createEmptyMovieClip(bar, "_outline", 3);
outline = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo((w - 20), 0);
outline.lineTo((w - 20), 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
f = function (_arg1:Event):void{
complete = true;
if (unloaded){
MochiAd.unload(clip);
};
};
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
};
};
mc.unloadAd = function ():void{
unloaded = true;
if (complete){
MochiAd.unload(clip);
};
};
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Object;
var _local3:Number;
var _local4:Boolean;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Object;
var _local10:Number;
var _local11:Number;
if (!this.parent.parent){
delete this["onEnterFrame"];
return;
};
_local1 = this.parent.parent.root;
_local2 = this.parent._mochiad_ctr;
_local3 = (getTimer() - this.started);
_local4 = false;
_local5 = _local1.loaderInfo.bytesTotal;
_local6 = _local1.loaderInfo.bytesLoaded;
_local7 = ((100 * _local6) / _local5);
_local8 = ((100 * _local3) / chk.ad_msec);
_local9 = this._mochiad_bar._inside;
_local10 = Math.min(100, Math.min(((_local7) || (0)), _local8));
_local10 = Math.max(this.last_pcnt, _local10);
this.last_pcnt = _local10;
_local9.scaleX = (_local10 * 0.01);
if (!chk.showing){
_local11 = _local2.loaderInfo.bytesTotal;
if ((((_local11 > 0)) || (("number" == "undefined")))){
chk.showing = true;
chk.started = getTimer();
} else {
if (_local3 > chk.ad_timeout){
_local4 = true;
};
};
};
if ((((_local3 > chk.ad_msec)) || (this.parent._mochiad_ctr_failed))){
_local4 = true;
};
if (((complete) && (_local4))){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function showPreloaderAd(_arg1:Object):void{
MochiAd.showPreGameAd(_arg1);
}
public static function fetchHighScores(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{
var _local4:MovieClip;
_local4 = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id});
if (!_local4){
return (false);
};
_local4.doSend(["fetchHighScores", _arg1], _arg2, _arg3);
return (true);
}
public static function doOnEnterFrame(_arg1:MovieClip):void{
var f:Function;
var mc = _arg1;
f = function (_arg1:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
mc.removeEventListener(Event.ENTER_FRAME, f);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package
Section 177
//PlacaHorizontal (PlacaHorizontal)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class PlacaHorizontal extends Box {
public function PlacaHorizontal(){
addFrameScript(0, frame1);
}
function frame1(){
this.createBody(this._density, this._friction, this._rest);
parent.removeChild(this);
}
}
}//package
Section 178
//PlacaVertical (PlacaVertical)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class PlacaVertical extends Box {
public function PlacaVertical(){
addFrameScript(0, frame1);
}
function frame1(){
this.createBody(this._density, this._friction, this._rest);
parent.removeChild(this);
}
}
}//package
Section 179
//PRevoluteJoint (PRevoluteJoint)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class PRevoluteJoint extends RevoluteJoint {
public function PRevoluteJoint(){
addFrameScript(0, frame1);
}
function frame1(){
this.createJoint(this._torque, this._speed);
this.visible = false;
}
}
}//package
Section 180
//RedVertex (RedVertex)
package {
import GameLogic.*;
public dynamic class RedVertex extends Vertex {
}
}//package
Section 181
//ReplayQuestion (ReplayQuestion)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class ReplayQuestion extends MovieClip {
public var whiteGlowArr:Array;
public var blackGlow:GlowFilter;
public var whiteGlow:GlowFilter;
public var b_replay:SimpleButton;
public var i_lasttime:TextField;
public var blackGlowArr:Array;
public var i_sendscore:MovieClip;
public var i_besttime:TextField;
public var b_nextlevel:SimpleButton;
public var replay:Boolean;
public function ReplayQuestion(){
addFrameScript(0, frame1);
}
public function removeListeners(){
b_nextlevel.removeEventListener(MouseEvent.MOUSE_OVER, nextlevelover);
b_replay.removeEventListener(MouseEvent.MOUSE_OVER, replayover);
b_nextlevel.removeEventListener(MouseEvent.CLICK, fnextlevel);
b_replay.removeEventListener(MouseEvent.CLICK, freplay);
Globals.g_stage.removeEventListener(KeyboardEvent.KEY_UP, fkeyhandle);
}
public function replayover(_arg1:Event){
b_replay.filters = whiteGlowArr;
b_nextlevel.filters = blackGlowArr;
replay = true;
}
function frame1(){
b_nextlevel.addEventListener(MouseEvent.MOUSE_OVER, nextlevelover, false, 0, true);
b_replay.addEventListener(MouseEvent.MOUSE_OVER, replayover, false, 0, true);
b_nextlevel.addEventListener(MouseEvent.CLICK, fnextlevel, false, 0, true);
b_replay.addEventListener(MouseEvent.CLICK, freplay, false, 0, true);
Globals.g_stage.addEventListener(KeyboardEvent.KEY_UP, fkeyhandle, false, 0, true);
blackGlow = new GlowFilter(0, 1, 10, 5, 1, 1, false, false);
whiteGlow = new GlowFilter(0xFFFFFF, 1, 5, 5, 2, 1, false, false);
blackGlowArr = new Array();
blackGlowArr.push(blackGlow);
whiteGlowArr = new Array();
whiteGlowArr.push(whiteGlow);
replay = false;
b_nextlevel.filters = whiteGlowArr;
b_replay.filters = blackGlowArr;
i_sendscore.visible = false;
if (Globals.savedData.data.gameCompleted){
if (formatScore() < Globals.savedData.data.lastTime){
i_sendscore.visible = true;
};
};
stop();
}
public function fkeyhandle(_arg1:KeyboardEvent){
if (_arg1.keyCode == Keyboard.UP){
nextlevelover(new Event(MouseEvent.MOUSE_OVER));
} else {
if (_arg1.keyCode == Keyboard.DOWN){
replayover(new Event(MouseEvent.MOUSE_OVER));
} else {
if (_arg1.keyCode == Keyboard.ENTER){
if (replay){
removeListeners();
Globals.gameState = Globals.ST_RESTART;
Globals.removeFromStage(this);
} else {
removeListeners();
Globals.gameState = Globals.ST_NEXTLEVEL;
Globals.removeFromStage(this);
};
};
};
};
}
public function nextlevelover(_arg1:Event){
b_nextlevel.filters = whiteGlowArr;
b_replay.filters = blackGlowArr;
replay = false;
}
public function freplay(_arg1:Event){
removeListeners();
Globals.gameState = Globals.ST_RESTART;
Globals.removeFromStage(this);
}
public function fnextlevel(_arg1:Event){
removeListeners();
Globals.gameState = Globals.ST_NEXTLEVEL;
Globals.removeFromStage(this);
}
public function formatScore():Number{
var _local1:int;
var _local2:int;
var _local3:String;
var _local4:int;
var _local5:int;
_local1 = 0;
_local2 = 1;
while (_local2 <= (Globals.savedData.data.bestTimes.length - 1)) {
_local1 = (_local1 + Globals.savedData.data.bestTimes[_local2]);
_local2++;
};
_local3 = "";
_local4 = 0;
_local5 = 0;
_local5 = Math.floor((_local1 / 3600));
_local1 = (_local1 - (_local5 * 3600));
_local4 = Math.floor((_local1 / 60));
_local1 = (_local1 - (_local4 * 60));
_local3 = (_local3 + _local5);
if (_local4 < 10){
_local3 = (_local3 + ("0" + _local4));
} else {
_local3 = (_local3 + _local4);
};
return (Number(_local3));
}
}
}//package
Section 182
//RevJoint1 (RevJoint1)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class RevJoint1 extends RevoluteJoint {
public function RevJoint1(){
addFrameScript(0, frame1);
}
function frame1(){
this.createJoint(this._torque, this._speed);
parent.removeChild(this);
}
}
}//package
Section 183
//ScrollArrowDown_disabledSkin (ScrollArrowDown_disabledSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_disabledSkin extends MovieClip {
}
}//package
Section 184
//ScrollArrowDown_downSkin (ScrollArrowDown_downSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_downSkin extends MovieClip {
}
}//package
Section 185
//ScrollArrowDown_overSkin (ScrollArrowDown_overSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_overSkin extends MovieClip {
}
}//package
Section 186
//ScrollArrowDown_upSkin (ScrollArrowDown_upSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_upSkin extends MovieClip {
}
}//package
Section 187
//ScrollArrowUp_disabledSkin (ScrollArrowUp_disabledSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_disabledSkin extends MovieClip {
}
}//package
Section 188
//ScrollArrowUp_downSkin (ScrollArrowUp_downSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_downSkin extends MovieClip {
}
}//package
Section 189
//ScrollArrowUp_overSkin (ScrollArrowUp_overSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_overSkin extends MovieClip {
}
}//package
Section 190
//ScrollArrowUp_upSkin (ScrollArrowUp_upSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_upSkin extends MovieClip {
}
}//package
Section 191
//ScrollBar_thumbIcon (ScrollBar_thumbIcon)
package {
import flash.display.*;
public dynamic class ScrollBar_thumbIcon extends MovieClip {
}
}//package
Section 192
//ScrollThumb_downSkin (ScrollThumb_downSkin)
package {
import flash.display.*;
public dynamic class ScrollThumb_downSkin extends MovieClip {
}
}//package
Section 193
//ScrollThumb_overSkin (ScrollThumb_overSkin)
package {
import flash.display.*;
public dynamic class ScrollThumb_overSkin extends MovieClip {
}
}//package
Section 194
//ScrollThumb_upSkin (ScrollThumb_upSkin)
package {
import flash.display.*;
public dynamic class ScrollThumb_upSkin extends MovieClip {
}
}//package
Section 195
//ScrollTrack_skin (ScrollTrack_skin)
package {
import flash.display.*;
public dynamic class ScrollTrack_skin extends MovieClip {
}
}//package
Section 196
//SliderThumb_disabledSkin (SliderThumb_disabledSkin)
package {
import flash.display.*;
public dynamic class SliderThumb_disabledSkin extends MovieClip {
}
}//package
Section 197
//SliderThumb_downSkin (SliderThumb_downSkin)
package {
import flash.display.*;
public dynamic class SliderThumb_downSkin extends MovieClip {
}
}//package
Section 198
//SliderThumb_overSkin (SliderThumb_overSkin)
package {
import flash.display.*;
public dynamic class SliderThumb_overSkin extends MovieClip {
}
}//package
Section 199
//SliderThumb_upSkin (SliderThumb_upSkin)
package {
import flash.display.*;
public dynamic class SliderThumb_upSkin extends MovieClip {
}
}//package
Section 200
//SliderTick_skin (SliderTick_skin)
package {
import flash.display.*;
public dynamic class SliderTick_skin extends MovieClip {
}
}//package
Section 201
//SliderTrack_disabledSkin (SliderTrack_disabledSkin)
package {
import flash.display.*;
public dynamic class SliderTrack_disabledSkin extends MovieClip {
}
}//package
Section 202
//SliderTrack_skin (SliderTrack_skin)
package {
import flash.display.*;
public dynamic class SliderTrack_skin extends MovieClip {
}
}//package
Section 203
//STBCTimer (STBCTimer)
package {
import flash.display.*;
import flash.text.*;
public dynamic class STBCTimer extends MovieClip {
public var i_time:TextField;
}
}//package
Section 204
//Triangle2 (Triangle2)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Triangle2 extends Triangle {
public function Triangle2(){
addFrameScript(0, frame1);
}
function frame1(){
this.createBody(this._density, this._friction, this._rest);
parent.removeChild(this);
}
}
}//package
Section 205
//Triangle3 (Triangle3)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Triangle3 extends Triangle {
public function Triangle3(){
addFrameScript(0, frame1);
}
function frame1(){
this.createBody(this._density, this._friction, this._rest);
parent.removeChild(this);
}
}
}//package
Section 206
//Triangle4 (Triangle4)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import GameLogic.*;
import flash.media.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Triangle4 extends Triangle {
public function Triangle4(){
addFrameScript(0, frame1);
}
function frame1(){
this.createBody(this._density, this._friction, this._rest);
parent.removeChild(this);
}
}
}//package