Section 1
//b2CircleDef (Box2D.Collision.Shapes.b2CircleDef)
package Box2D.Collision.Shapes {
import Box2D.Common.Math.*;
public class b2CircleDef extends b2ShapeDef {
public var
:b2Vec2;
public var :Number;
public function b2CircleDef(){
= new b2Vec2(0, 0);
super();
type = b2Shape.e_circleShape;
= 1;
}
}
}//package Box2D.Collision.Shapes
Section 2
//b2CircleShape (Box2D.Collision.Shapes.b2CircleShape)
package Box2D.Collision.Shapes {
import Box2D.Common.Math.*;
import Box2D.Collision.*;
import Box2D.Common.*;
public class b2CircleShape extends b2Shape {
public var m_radius:Number;
public var m_localPosition:b2Vec2;
public function b2CircleShape(_arg1:b2ShapeDef){
var _local2:b2CircleDef;
m_localPosition = new b2Vec2();
super(_arg1);
_local2 = (_arg1 as b2CircleDef);
m_type = e_circleShape;
m_localPosition.SetV(_local2.
);
m_radius = _local2.;
}
override public function TestPoint(_arg1:b2XForm, _arg2:b2Vec2):Boolean{
var _local3:b2Mat22;
var _local4:Number;
var _local5:Number;
_local3 = _arg1.R;
_local4 = (_arg1.position.x + ((_local3.col1.x * m_localPosition.x) + (_local3.col2.x * m_localPosition.y)));
_local5 = (_arg1.position.y + ((_local3.col1.y * m_localPosition.x) + (_local3.col2.y * m_localPosition.y)));
_local4 = (_arg2.x - _local4);
_local5 = (_arg2.y - _local5);
return ((((_local4 * _local4) + (_local5 * _local5)) <= (m_radius * m_radius)));
}
public function ():b2Vec2{
return (m_localPosition);
}
override public function TestSegment(_arg1:b2XForm, _arg2:Array, _arg3:b2Vec2, _arg4:b2Segment, _arg5:Number):Boolean{
var _local6:b2Mat22;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
_local6 = _arg1.R;
_local7 = (_arg1.position.x + ((_local6.col1.x * m_localPosition.x) + (_local6.col2.x * m_localPosition.y)));
_local8 = (_arg1.position.x + ((_local6.col1.y * m_localPosition.x) + (_local6.col2.y * m_localPosition.y)));
_local9 = (_arg4.p1.x - _local7);
_local10 = (_arg4.p1.y - _local8);
_local11 = (((_local9 * _local9) + (_local10 * _local10)) - (m_radius * m_radius));
if (_local11 < 0){
return (false);
};
_local12 = (_arg4.p2.x - _arg4.p1.x);
_local13 = (_arg4.p2.y - _arg4.p1.y);
_local14 = ((_local9 * _local12) + (_local10 * _local13));
_local15 = ((_local12 * _local12) + (_local13 * _local13));
_local16 = ((_local14 * _local14) - (_local15 * _local11));
if ((((_local16 < 0)) || ((_local15 < Number.MIN_VALUE)))){
return (false);
};
_local17 = -((_local14 + Math.sqrt(_local16)));
if ((((0 <= _local17)) && ((_local17 <= (_arg5 * _local15))))){
_local17 = (_local17 / _local15);
_arg2[0] = _local17;
_arg3.x = (_local9 + (_local17 * _local12));
_arg3.y = (_local10 + (_local17 * _local13));
_arg3.Normalize();
return (true);
};
return (false);
}
override public function ComputeMass(_arg1:b2MassData):void{
_arg1.mass = (((m_density * b2Settings.b2_pi) * m_radius) * m_radius);
_arg1.center.SetV(m_localPosition);
_arg1.I = (_arg1.mass * (((0.5 * m_radius) * m_radius) + ((m_localPosition.x * m_localPosition.x) + (m_localPosition.y * m_localPosition.y))));
}
override public function ComputeSweptAABB(_arg1:b2AABB, _arg2:b2XForm, _arg3:b2XForm):void{
var _local4:b2Mat22;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local4 = _arg2.R;
_local5 = (_arg2.position.x + ((_local4.col1.x * m_localPosition.x) + (_local4.col2.x * m_localPosition.y)));
_local6 = (_arg2.position.y + ((_local4.col1.y * m_localPosition.x) + (_local4.col2.y * m_localPosition.y)));
_local4 = _arg3.R;
_local7 = (_arg3.position.x + ((_local4.col1.x * m_localPosition.x) + (_local4.col2.x * m_localPosition.y)));
_local8 = (_arg3.position.y + ((_local4.col1.y * m_localPosition.x) + (_local4.col2.y * m_localPosition.y)));
_arg1.lowerBound.Set((((_local5 < _local7)) ? _local5 : _local7 - m_radius), (((_local6 < _local8)) ? _local6 : _local8 - m_radius));
_arg1.upperBound.Set((((_local5 > _local7)) ? _local5 : _local7 + m_radius), (((_local6 > _local8)) ? _local6 : _local8 + m_radius));
}
public function ():Number{
return (m_radius);
}
override public function UpdateSweepRadius(_arg1:b2Vec2):void{
var _local2:Number;
var _local3:Number;
_local2 = (m_localPosition.x - _arg1.x);
_local3 = (m_localPosition.y - _arg1.y);
_local2 = Math.sqrt(((_local2 * _local2) + (_local3 * _local3)));
m_sweepRadius = ((_local2 + m_radius) - b2Settings.b2_toiSlop);
}
override public function ComputeAABB(_arg1:b2AABB, _arg2:b2XForm):void{
var _local3:b2Mat22;
var _local4:Number;
var _local5:Number;
_local3 = _arg2.R;
_local4 = (_arg2.position.x + ((_local3.col1.x * m_localPosition.x) + (_local3.col2.x * m_localPosition.y)));
_local5 = (_arg2.position.y + ((_local3.col1.y * m_localPosition.x) + (_local3.col2.y * m_localPosition.y)));
_arg1.lowerBound.Set((_local4 - m_radius), (_local5 - m_radius));
_arg1.upperBound.Set((_local4 + m_radius), (_local5 + m_radius));
}
}
}//package Box2D.Collision.Shapes
Section 3
//b2FilterData (Box2D.Collision.Shapes.b2FilterData)
package Box2D.Collision.Shapes {
public class b2FilterData {
public var maskBits:uint;// = 0xFFFF
public var groupIndex:int;// = 0
public var categoryBits:uint;// = 1
public function b2FilterData(){
categoryBits = 1;
maskBits = 0xFFFF;
groupIndex = 0;
super();
}
public function Copy():b2FilterData{
var _local1:b2FilterData;
_local1 = new b2FilterData();
_local1.categoryBits = categoryBits;
_local1.maskBits = maskBits;
_local1.groupIndex = groupIndex;
return (_local1);
}
}
}//package Box2D.Collision.Shapes
Section 4
//b2MassData (Box2D.Collision.Shapes.b2MassData)
package Box2D.Collision.Shapes {
import Box2D.Common.Math.*;
public class b2MassData {
public var mass:Number;// = 0
public var center:b2Vec2;
public var I:Number;// = 0
public function b2MassData(){
mass = 0;
center = new b2Vec2(0, 0);
I = 0;
super();
}
}
}//package Box2D.Collision.Shapes
Section 5
//b2PolygonDef (Box2D.Collision.Shapes.b2PolygonDef)
package Box2D.Collision.Shapes {
import Box2D.Common.Math.*;
import Box2D.Common.*;
public class b2PolygonDef extends b2ShapeDef {
public var :int;
public var :Array;
private static var s_mat:b2Mat22 = new b2Mat22();
public function b2PolygonDef(){
var _local1:int;
= new Array(b2Settings.b2_maxPolygonVertices);
super();
type = b2Shape.e_polygonShape;
= 0;
_local1 = 0;
while (_local1 < b2Settings.b2_maxPolygonVertices) {
[_local1] = new b2Vec2();
_local1++;
};
}
public function (_arg1:Number, _arg2:Number, _arg3:b2Vec2=null, _arg4:Number=0):void{
var _local5:b2Vec2;
var _local6:b2Mat22;
var _local7:int;
= 4;
[0].Set(-(_arg1), -(_arg2));
[1].Set(_arg1, -(_arg2));
[2].Set(_arg1, _arg2);
[3].Set(-(_arg1), _arg2);
if (_arg3){
_local5 = _arg3;
_local6 = s_mat;
_local6.Set(_arg4);
_local7 = 0;
while (_local7 < ) {
_arg3 = [_local7];
_arg1 = (_local5.x + ((_local6.col1.x * _arg3.x) + (_local6.col2.x * _arg3.y)));
_arg3.y = (_local5.y + ((_local6.col1.y * _arg3.x) + (_local6.col2.y * _arg3.y)));
_arg3.x = _arg1;
_local7++;
};
};
}
public function (_arg1:Number, _arg2:Number):void{
= 4;
[0].Set(-(_arg1), -(_arg2));
[1].Set(_arg1, -(_arg2));
[2].Set(_arg1, _arg2);
[3].Set(-(_arg1), _arg2);
}
}
}//package Box2D.Collision.Shapes
Section 6
//b2PolygonShape (Box2D.Collision.Shapes.b2PolygonShape)
package Box2D.Collision.Shapes {
import Box2D.Dynamics.*;
import Box2D.Common.Math.*;
import Box2D.Collision.*;
import Box2D.Common.*;
public class b2PolygonShape extends b2Shape {
public var
:Array;
public var
:Array;
private var
:b2Vec2;
public var
:b2OBB;
public var
:Array;
public var
:b2Vec2;
public var
:int;
private static var s_computeMat:b2Mat22 = new b2Mat22();
private static var s_sweptAABB1:b2AABB = new b2AABB();
private static var s_sweptAABB2:b2AABB = new b2AABB();
public function b2PolygonShape(_arg1:b2ShapeDef){
var _local2:b2PolygonDef;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
= new b2Vec2();
= new b2OBB();
= new Array(b2Settings.b2_maxPolygonVertices);
= new Array(b2Settings.b2_maxPolygonVertices);
= new Array(b2Settings.b2_maxPolygonVertices);
super(_arg1);
m_type = e_polygonShape;
_local2 = (_arg1 as b2PolygonDef);
= _local2.;
_local4 = _local3;
_local5 = _local3;
_local3 = 0;
while (_local3 <
) {
[_local3] = _local2.[_local3].Copy();
_local3++;
};
_local3 = 0;
while (_local3 <
) {
_local4 = _local3;
_local5 = (((_local3 + 1) <
)) ? (_local3 + 1) : 0;
_local6 = (
[_local5].x -
[_local4].x);
_local7 = (
[_local5].y -
[_local4].y);
_local8 = Math.sqrt(((_local6 * _local6) + (_local7 * _local7)));
[_local3] = new b2Vec2((_local7 / _local8), (-(_local6) / _local8));
_local3++;
};
= ComputeCentroid(_local2., _local2.);
ComputeOBB(
,
,
);
_local3 = 0;
while (_local3 <
) {
_local4 = (((_local3 - 1) >= 0)) ? (_local3 - 1) : (
- 1);
_local5 = _local3;
_local9 =
[_local4].x;
_local10 =
[_local4].y;
_local11 =
[_local5].x;
_local12 =
[_local5].y;
_local13 = (
[_local3].x -
.x);
_local14 = (
[_local3].y -
.y);
_local15 = (((_local9 * _local13) + (_local10 * _local14)) - b2Settings.b2_toiSlop);
_local16 = (((_local11 * _local13) + (_local12 * _local14)) - b2Settings.b2_toiSlop);
_local17 = (1 / ((_local9 * _local12) - (_local10 * _local11)));
[_local3] = new b2Vec2(((_local17 * ((_local12 * _local15) - (_local10 * _local16))) +
.x), ((_local17 * ((_local9 * _local16) - (_local11 * _local15))) +
.y));
_local3++;
};
}
override public function TestPoint(_arg1:b2XForm, _arg2:b2Vec2):Boolean{
var _local3:b2Vec2;
var _local4:b2Mat22;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:int;
var _local10:Number;
_local4 = _arg1.R;
_local5 = (_arg2.x - _arg1.position.x);
_local6 = (_arg2.y - _arg1.position.y);
_local7 = ((_local5 * _local4.col1.x) + (_local6 * _local4.col1.y));
_local8 = ((_local5 * _local4.col2.x) + (_local6 * _local4.col2.y));
_local9 = 0;
while (_local9 <
) {
_local3 =
[_local9];
_local5 = (_local7 - _local3.x);
_local6 = (_local8 - _local3.y);
_local3 =
[_local9];
_local10 = ((_local3.x * _local5) + (_local3.y * _local6));
if (_local10 > 0){
return (false);
};
_local9++;
};
return (true);
}
public function GetCoreVertices():Array{
return (
);
}
override public function TestSegment(_arg1:b2XForm, _arg2:Array, _arg3:b2Vec2, _arg4:b2Segment, _arg5:Number):Boolean{
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:b2Mat22;
var _local11:b2Vec2;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:int;
var _local19:int;
var _local20:Number;
var _local21:Number;
_local6 = 0;
_local7 = _arg5;
_local8 = (_arg4.p1.x - _arg1.position.x);
_local9 = (_arg4.p1.y - _arg1.position.y);
_local10 = _arg1.R;
_local12 = ((_local8 * _local10.col1.x) + (_local9 * _local10.col1.y));
_local13 = ((_local8 * _local10.col2.x) + (_local9 * _local10.col2.y));
_local8 = (_arg4.p2.x - _arg1.position.x);
_local9 = (_arg4.p2.y - _arg1.position.y);
_local10 = _arg1.R;
_local14 = ((_local8 * _local10.col1.x) + (_local9 * _local10.col1.y));
_local15 = ((_local8 * _local10.col2.x) + (_local9 * _local10.col2.y));
_local16 = (_local14 - _local12);
_local17 = (_local15 - _local13);
_local18 = -1;
_local19 = 0;
while (_local19 <
) {
_local11 =
[_local19];
_local8 = (_local11.x - _local12);
_local9 = (_local11.y - _local13);
_local11 =
[_local19];
_local20 = ((_local11.x * _local8) + (_local11.y * _local9));
_local21 = ((_local11.x * _local16) + (_local11.y * _local17));
if ((((_local21 < 0)) && ((_local20 < (_local6 * _local21))))){
_local6 = (_local20 / _local21);
_local18 = _local19;
} else {
if ((((_local21 > 0)) && ((_local20 < (_local7 * _local21))))){
_local7 = (_local20 / _local21);
};
};
if (_local7 < _local6){
return (false);
};
_local19++;
};
if (_local18 >= 0){
_arg2[0] = _local6;
_local10 = _arg1.R;
_local11 =
[_local18];
_arg3.x = ((_local10.col1.x * _local11.x) + (_local10.col2.x * _local11.y));
_arg3.y = ((_local10.col1.y * _local11.x) + (_local10.col2.y * _local11.y));
return (true);
};
return (false);
}
public function
():b2Vec2{
return (
);
}
override public function ComputeMass(_arg1:b2MassData):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:int;
var _local10:b2Vec2;
var _local11:b2Vec2;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
_local2 = 0;
_local3 = 0;
_local4 = 0;
_local5 = 0;
_local6 = 0;
_local7 = 0;
_local8 = (1 / 3);
_local9 = 0;
while (_local9 <
) {
_local10 =
[_local9];
_local11 = (((_local9 + 1) <
)) ?
[int((_local9 + 1))] :
[0];
_local12 = (_local10.x - _local6);
_local13 = (_local10.y - _local7);
_local14 = (_local11.x - _local6);
_local15 = (_local11.y - _local7);
_local16 = ((_local12 * _local15) - (_local13 * _local14));
_local17 = (0.5 * _local16);
_local4 = (_local4 + _local17);
_local2 = (_local2 + ((_local17 * _local8) * ((_local6 + _local10.x) + _local11.x)));
_local3 = (_local3 + ((_local17 * _local8) * ((_local7 + _local10.y) + _local11.y)));
_local18 = _local6;
_local19 = _local7;
_local20 = _local12;
_local21 = _local13;
_local22 = _local14;
_local23 = _local15;
_local24 = ((_local8 * ((0.25 * (((_local20 * _local20) + (_local22 * _local20)) + (_local22 * _local22))) + ((_local18 * _local20) + (_local18 * _local22)))) + ((0.5 * _local18) * _local18));
_local25 = ((_local8 * ((0.25 * (((_local21 * _local21) + (_local23 * _local21)) + (_local23 * _local23))) + ((_local19 * _local21) + (_local19 * _local23)))) + ((0.5 * _local19) * _local19));
_local5 = (_local5 + (_local16 * (_local24 + _local25)));
_local9++;
};
_arg1.mass = (m_density * _local4);
_local2 = (_local2 * (1 / _local4));
_local3 = (_local3 * (1 / _local4));
_arg1.center.Set(_local2, _local3);
_arg1.I = (m_density * _local5);
}
public function Support(_arg1:b2XForm, _arg2:Number, _arg3:Number):b2Vec2{
var _local4:b2Vec2;
var _local5:b2Mat22;
var _local6:Number;
var _local7:Number;
var _local8:int;
var _local9:Number;
var _local10:int;
var _local11:Number;
_local5 = _arg1.R;
_local6 = ((_arg2 * _local5.col1.x) + (_arg3 * _local5.col1.y));
_local7 = ((_arg2 * _local5.col2.x) + (_arg3 * _local5.col2.y));
_local8 = 0;
_local4 =
[0];
_local9 = ((_local4.x * _local6) + (_local4.y * _local7));
_local10 = 1;
while (_local10 <
) {
_local4 =
[_local10];
_local11 = ((_local4.x * _local6) + (_local4.y * _local7));
if (_local11 > _local9){
_local8 = _local10;
_local9 = _local11;
};
_local10++;
};
_local5 = _arg1.R;
_local4 =
[_local8];
.x = (_arg1.position.x + ((_local5.col1.x * _local4.x) + (_local5.col2.x * _local4.y)));
.y = (_arg1.position.y + ((_local5.col1.y * _local4.x) + (_local5.col2.y * _local4.y)));
return (
);
}
public function GetVertexCount():int{
return (
);
}
override public function ComputeSweptAABB(_arg1:b2AABB, _arg2:b2XForm, _arg3:b2XForm):void{
var _local4:b2AABB;
var _local5:b2AABB;
_local4 = s_sweptAABB1;
_local5 = s_sweptAABB2;
ComputeAABB(_local4, _arg2);
ComputeAABB(_local5, _arg3);
_arg1.lowerBound.Set(((_local4.lowerBound.x < _local5.lowerBound.x)) ? _local4.lowerBound.x : _local5.lowerBound.x, ((_local4.lowerBound.y < _local5.lowerBound.y)) ? _local4.lowerBound.y : _local5.lowerBound.y);
_arg1.upperBound.Set(((_local4.upperBound.x > _local5.upperBound.x)) ? _local4.upperBound.x : _local5.upperBound.x, ((_local4.upperBound.y > _local5.upperBound.y)) ? _local4.upperBound.y : _local5.upperBound.y);
}
public function GetVertices():Array{
return (
);
}
public function
():Array{
return (
);
}
public function GetOBB():b2OBB{
return (
);
}
public function GetFirstVertex(_arg1:b2XForm):b2Vec2{
return (b2Math.b2MulX(_arg1,
[0]));
}
public function
(_arg1:b2XForm):b2Vec2{
return (b2Math.b2MulX(_arg1,
));
}
override public function UpdateSweepRadius(_arg1:b2Vec2):void{
var _local2:b2Vec2;
var _local3:int;
var _local4:Number;
var _local5:Number;
m_sweepRadius = 0;
_local3 = 0;
while (_local3 <
) {
_local2 =
[_local3];
_local4 = (_local2.x - _arg1.x);
_local5 = (_local2.y - _arg1.y);
_local4 = Math.sqrt(((_local4 * _local4) + (_local5 * _local5)));
if (_local4 > m_sweepRadius){
m_sweepRadius = _local4;
};
_local3++;
};
}
override public function ComputeAABB(_arg1:b2AABB, _arg2:b2XForm):void{
var _local3:b2Mat22;
var _local4:b2Vec2;
var _local5:b2Mat22;
var _local6:b2Mat22;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
_local5 = s_computeMat;
_local3 = _arg2.R;
_local4 =
.R.col1;
_local5.col1.x = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y));
_local5.col1.y = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y));
_local4 =
.R.col2;
_local5.col2.x = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y));
_local5.col2.y = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y));
_local5.Abs();
_local6 = _local5;
_local4 =
.extents;
_local7 = ((_local6.col1.x * _local4.x) + (_local6.col2.x * _local4.y));
_local8 = ((_local6.col1.y * _local4.x) + (_local6.col2.y * _local4.y));
_local3 = _arg2.R;
_local4 =
.center;
_local9 = (_arg2.position.x + ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y)));
_local10 = (_arg2.position.y + ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y)));
_arg1.lowerBound.Set((_local9 - _local7), (_local10 - _local8));
_arg1.upperBound.Set((_local9 + _local7), (_local10 + _local8));
}
public static function ComputeCentroid(_arg1:Array, _arg2:int):b2Vec2{
var _local3:b2Vec2;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:int;
var _local9:b2Vec2;
var _local10:b2Vec2;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
_local3 = new b2Vec2();
_local4 = 0;
_local5 = 0;
_local6 = 0;
_local7 = (1 / 3);
_local8 = 0;
while (_local8 < _arg2) {
_local9 = _arg1[_local8];
_local10 = (((_local8 + 1) < _arg2)) ? _arg1[int((_local8 + 1))] : _arg1[0];
_local11 = (_local9.x - _local5);
_local12 = (_local9.y - _local6);
_local13 = (_local10.x - _local5);
_local14 = (_local10.y - _local6);
_local15 = ((_local11 * _local14) - (_local12 * _local13));
_local16 = (0.5 * _local15);
_local4 = (_local4 + _local16);
_local3.x = (_local3.x + ((_local16 * _local7) * ((_local5 + _local9.x) + _local10.x)));
_local3.y = (_local3.y + ((_local16 * _local7) * ((_local6 + _local9.y) + _local10.y)));
_local8++;
};
_local3.x = (_local3.x * (1 / _local4));
_local3.y = (_local3.y * (1 / _local4));
return (_local3);
}
public static function ComputeOBB(_arg1:b2OBB, _arg2:Array, _arg3:int):void{
var _local4:int;
var _local5:Array;
var _local6:Number;
var _local7:b2Vec2;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:int;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:b2Mat22;
_local5 = new Array((b2Settings.b2_maxPolygonVertices + 1));
_local4 = 0;
while (_local4 < _arg3) {
_local5[_local4] = _arg2[_local4];
_local4++;
};
_local5[_arg3] = _local5[0];
_local6 = Number.MAX_VALUE;
_local4 = 1;
while (_local4 <= _arg3) {
_local7 = _local5[int((_local4 - 1))];
_local8 = (_local5[_local4].x - _local7.x);
_local9 = (_local5[_local4].y - _local7.y);
_local10 = Math.sqrt(((_local8 * _local8) + (_local9 * _local9)));
_local8 = (_local8 / _local10);
_local9 = (_local9 / _local10);
_local11 = -(_local9);
_local12 = _local8;
_local13 = Number.MAX_VALUE;
_local14 = Number.MAX_VALUE;
_local15 = -(Number.MAX_VALUE);
_local16 = -(Number.MAX_VALUE);
_local17 = 0;
while (_local17 < _arg3) {
_local19 = (_local5[_local17].x - _local7.x);
_local20 = (_local5[_local17].y - _local7.y);
_local21 = ((_local8 * _local19) + (_local9 * _local20));
_local22 = ((_local11 * _local19) + (_local12 * _local20));
if (_local21 < _local13){
_local13 = _local21;
};
if (_local22 < _local14){
_local14 = _local22;
};
if (_local21 > _local15){
_local15 = _local21;
};
if (_local22 > _local16){
_local16 = _local22;
};
_local17++;
};
_local18 = ((_local15 - _local13) * (_local16 - _local14));
if (_local18 < (0.95 * _local6)){
_local6 = _local18;
_arg1.R.col1.x = _local8;
_arg1.R.col1.y = _local9;
_arg1.R.col2.x = _local11;
_arg1.R.col2.y = _local12;
_local23 = (0.5 * (_local13 + _local15));
_local24 = (0.5 * (_local14 + _local16));
_local25 = _arg1.R;
_arg1.center.x = (_local7.x + ((_local25.col1.x * _local23) + (_local25.col2.x * _local24)));
_arg1.center.y = (_local7.y + ((_local25.col1.y * _local23) + (_local25.col2.y * _local24)));
_arg1.extents.x = (0.5 * (_local15 - _local13));
_arg1.extents.y = (0.5 * (_local16 - _local14));
};
_local4++;
};
}
}
}//package Box2D.Collision.Shapes
Section 7
//b2Shape (Box2D.Collision.Shapes.b2Shape)
package Box2D.Collision.Shapes {
import Box2D.Dynamics.*;
import Box2D.Common.Math.*;
import Box2D.Collision.*;
public class b2Shape {
public var m_type:int;
public var m_sweepRadius:Number;
public var m_density:Number;
public var
:b2FilterData;
public var m_friction:Number;
public var m_next:b2Shape;
public var m_restitution:Number;
public var m_userData;
public var :Boolean;
public var :uint;
public var m_body:b2Body;
public static const e_polygonShape:int = 1;
public static const e_unknownShape:int = -1;
public static const e_circleShape:int = 0;
public static const e_shapeTypeCount:int = 2;
private static var s_resetAABB:b2AABB = new b2AABB();
private static var s_syncAABB:b2AABB = new b2AABB();
private static var s_proxyAABB:b2AABB = new b2AABB();
public function b2Shape(_arg1:b2ShapeDef){
m_userData = _arg1.userData;
m_friction = _arg1.friction;
m_restitution = _arg1.restitution;
m_density = _arg1.
;
m_body = null;
m_sweepRadius = 0;
m_next = null;
= b2Pair.b2_nullProxy;
= _arg1.
.Copy();
= _arg1. ;
}
public function TestPoint(_arg1:b2XForm, _arg2:b2Vec2):Boolean{
return (false);
}
public function
():Number{
return (m_sweepRadius);
}
public function GetNext():b2Shape{
return (m_next);
}
public function ComputeSweptAABB(_arg1:b2AABB, _arg2:b2XForm, _arg3:b2XForm):void{
}
public function GetType():int{
return (m_type);
}
public function
():Number{
return (m_restitution);
}
public function
():Number{
return (m_friction);
}
public function GetFilterData():b2FilterData{
return (
.Copy());
}
public function TestSegment(_arg1:b2XForm, _arg2:Array, _arg3:b2Vec2, _arg4:b2Segment, _arg5:Number):Boolean{
return (false);
}
public function RefilterProxy(_arg1:b2BroadPhase, _arg2:b2XForm):void{
var _local3:b2AABB;
var _local4:Boolean;
if ( == b2Pair.b2_nullProxy){
return;
};
_arg1.DestroyProxy();
_local3 = s_resetAABB;
ComputeAABB(_local3, _arg2);
_local4 = _arg1.InRange(_local3);
if (_local4){
= _arg1.CreateProxy(_local3, this);
} else {
= b2Pair.b2_nullProxy;
};
}
public function (_arg1:b2FilterData):void{
= _arg1.Copy();
}
public function GetUserData(){
return (m_userData);
}
public function Synchronize(_arg1:b2BroadPhase, _arg2:b2XForm, _arg3:b2XForm):Boolean{
var _local4:b2AABB;
if ( == b2Pair.b2_nullProxy){
return (false);
};
_local4 = s_syncAABB;
ComputeSweptAABB(_local4, _arg2, _arg3);
if (_arg1.InRange(_local4)){
_arg1.MoveProxy(, _local4);
return (true);
};
return (false);
}
public function ComputeMass(_arg1:b2MassData):void{
}
public function ():Boolean{
return ();
}
public function DestroyProxy(_arg1:b2BroadPhase):void{
if ( != b2Pair.b2_nullProxy){
_arg1.DestroyProxy();
= b2Pair.b2_nullProxy;
};
}
public function UpdateSweepRadius(_arg1:b2Vec2):void{
}
public function ComputeAABB(_arg1:b2AABB, _arg2:b2XForm):void{
}
public function GetBody():b2Body{
return (m_body);
}
public function CreateProxy(_arg1:b2BroadPhase, _arg2:b2XForm):void{
var _local3:b2AABB;
var _local4:Boolean;
_local3 = s_proxyAABB;
ComputeAABB(_local3, _arg2);
_local4 = _arg1.InRange(_local3);
if (_local4){
= _arg1.CreateProxy(_local3, this);
} else {
= b2Pair.b2_nullProxy;
};
}
public function SetUserData(_arg1):void{
m_userData = _arg1;
}
public static function Destroy(_arg1:b2Shape, _arg2):void{
}
public static function Create(_arg1:b2ShapeDef, _arg2):b2Shape{
switch (_arg1.type){
case e_circleShape:
return (new b2CircleShape(_arg1));
case e_polygonShape:
return (new b2PolygonShape(_arg1));
default:
return (null);
};
}
}
}//package Box2D.Collision.Shapes
Section 8
//b2ShapeDef (Box2D.Collision.Shapes.b2ShapeDef)
package Box2D.Collision.Shapes {
public class b2ShapeDef {
public var :Boolean;// = false
public var
:Number;// = 0
public var type:int;
public var restitution:Number;// = 0
public var userData;// = null
public var
:b2FilterData;
public var friction:Number;// = 0.2
public function b2ShapeDef(){
type = b2Shape.e_unknownShape;
userData = null;
friction = 0.2;
restitution = 0;
= 0;
= false;
= new b2FilterData();
super();
}
}
}//package Box2D.Collision.Shapes
Section 9
//b2AABB (Box2D.Collision.b2AABB)
package Box2D.Collision {
import Box2D.Common.Math.*;
public class b2AABB {
public var upperBound:b2Vec2;
public var lowerBound:b2Vec2;
public function b2AABB(){
lowerBound = new b2Vec2();
upperBound = new b2Vec2();
super();
}
public function IsValid():Boolean{
var _local1:Number;
var _local2:Number;
var _local3:Boolean;
_local1 = (upperBound.x - lowerBound.x);
_local2 = (upperBound.y - lowerBound.y);
_local3 = (((_local1 >= 0)) && ((_local2 >= 0)));
_local3 = ((((_local3) && (lowerBound.IsValid()))) && (upperBound.IsValid()));
return (_local3);
}
}
}//package Box2D.Collision
Section 10
//b2Bound (Box2D.Collision.b2Bound)
package Box2D.Collision {
public class b2Bound {
public var proxyId:uint;
public var stabbingCount:uint;
public var value:uint;
public function Swap(_arg1:b2Bound):void{
var _local2:uint;
var _local3:uint;
var _local4:uint;
_local2 = value;
_local3 = proxyId;
_local4 = stabbingCount;
value = _arg1.value;
proxyId = _arg1.proxyId;
stabbingCount = _arg1.stabbingCount;
_arg1.value = _local2;
_arg1.proxyId = _local3;
_arg1.stabbingCount = _local4;
}
public function IsLower():Boolean{
return (((value & 1) == 0));
}
public function IsUpper():Boolean{
return (((value & 1) == 1));
}
}
}//package Box2D.Collision
Section 11
//b2BoundValues (Box2D.Collision.b2BoundValues)
package Box2D.Collision {
public class b2BoundValues {
public var lowerValues:Array;
public var upperValues:Array;
public function b2BoundValues(){
lowerValues = [0, 0];
upperValues = [0, 0];
super();
}
}
}//package Box2D.Collision
Section 12
//b2BroadPhase (Box2D.Collision.b2BroadPhase)
package Box2D.Collision {
import Box2D.Common.Math.*;
import Box2D.Common.*;
public class b2BroadPhase {
public var m_quantizationFactor:b2Vec2;
public var m_worldAABB:b2AABB;
public var m_bounds:Array;
public var :uint;
public var m_proxyCount:int;
public var m_proxyPool:Array;
public var :int;
public var m_pairManager:b2PairManager;
public var :uint;
public var :Array;
public static const b2_nullEdge:uint = b2Settings.USHRT_MAX;
public static const b2_invalid:uint = b2Settings.USHRT_MAX;
public static var s_validate:Boolean = false;
public function b2BroadPhase(_arg1:b2AABB, _arg2:b2PairCallback){
var _local3:int;
var _local4:Number;
var _local5:Number;
var _local6:b2Proxy;
var _local7:int;
m_pairManager = new b2PairManager();
m_proxyPool = new Array(b2Settings.b2_maxPairs);
m_bounds = new Array((2 * b2Settings.b2_maxProxies));
= new Array(b2Settings.b2_maxProxies);
m_quantizationFactor = new b2Vec2();
super();
m_pairManager.Initialize(this, _arg2);
m_worldAABB = _arg1;
m_proxyCount = 0;
_local3 = 0;
while (_local3 < b2Settings.b2_maxProxies) {
[_local3] = 0;
_local3++;
};
m_bounds = new Array(2);
_local3 = 0;
while (_local3 < 2) {
m_bounds[_local3] = new Array((2 * b2Settings.b2_maxProxies));
_local7 = 0;
while (_local7 < (2 * b2Settings.b2_maxProxies)) {
m_bounds[_local3][_local7] = new b2Bound();
_local7++;
};
_local3++;
};
_local4 = (_arg1.upperBound.x - _arg1.lowerBound.x);
_local5 = (_arg1.upperBound.y - _arg1.lowerBound.y);
m_quantizationFactor.x = (b2Settings.USHRT_MAX / _local4);
m_quantizationFactor.y = (b2Settings.USHRT_MAX / _local5);
_local3 = 0;
while (_local3 < (b2Settings.b2_maxProxies - 1)) {
_local6 = new b2Proxy();
m_proxyPool[_local3] = _local6;
_local6.SetNext((_local3 + 1));
_local6.timeStamp = 0;
_local6.overlapCount = b2_invalid;
_local6.userData = null;
_local3++;
};
_local6 = new b2Proxy();
m_proxyPool[int((b2Settings.b2_maxProxies - 1))] = _local6;
_local6.SetNext(b2Pair.b2_nullProxy);
_local6.timeStamp = 0;
_local6.overlapCount = b2_invalid;
_local6.userData = null;
= 0;
= 1;
= 0;
}
public function QueryAABB(_arg1:b2AABB, _arg2, _arg3:int):int{
var _local4:Array;
var _local5:Array;
var _local6:uint;
var _local7:uint;
var _local8:Array;
var _local9:Array;
var _local10:int;
var _local11:int;
var _local12:b2Proxy;
_local4 = new Array();
_local5 = new Array();
(_local4, _local5, _arg1);
_local8 = [_local6];
_local9 = [_local7];
(_local8, _local9, _local4[0], _local5[0], m_bounds[0], (2 * m_proxyCount), 0);
(_local8, _local9, _local4[1], _local5[1], m_bounds[1], (2 * m_proxyCount), 1);
_local10 = 0;
_local11 = 0;
while ((((_local11 < )) && ((_local10 < _arg3)))) {
_local12 = m_proxyPool[[_local11]];
_arg2[_local11] = _local12.userData;
_local11++;
_local10++;
};
= 0;
();
return (_local10);
}
public function Commit():void{
m_pairManager.Commit();
}
public function (_arg1:int):b2Proxy{
var _local2:b2Proxy;
_local2 = m_proxyPool[_arg1];
if ((((_arg1 == b2Pair.b2_nullProxy)) || ((_local2.IsValid() == false)))){
return (null);
};
return (_local2);
}
private function ():void{
var _local1:uint;
if ( == b2Settings.USHRT_MAX){
_local1 = 0;
while (_local1 < b2Settings.b2_maxProxies) {
(m_proxyPool[_local1] as b2Proxy).timeStamp = 0;
_local1++;
};
= 1;
} else {
++;
};
}
private function (_arg1:Array, _arg2:Array, _arg3:uint, _arg4:uint, _arg5:Array, _arg6:uint, _arg7:int):void{
var _local8:uint;
var _local9:uint;
var _local10:b2Bound;
var _local11:uint;
var _local12:int;
var _local13:int;
var _local14:b2Proxy;
_local8 = BinarySearch(_arg5, _arg6, _arg3);
_local9 = BinarySearch(_arg5, _arg6, _arg4);
_local11 = _local8;
while (_local11 < _local9) {
_local10 = _arg5[_local11];
if (_local10.IsLower()){
(_local10.proxyId);
};
_local11++;
};
if (_local8 > 0){
_local12 = (_local8 - 1);
_local10 = _arg5[_local12];
_local13 = _local10.stabbingCount;
while (_local13) {
_local10 = _arg5[_local12];
if (_local10.IsLower()){
_local14 = m_proxyPool[_local10.proxyId];
if (_local8 <= _local14.upperBounds[_arg7]){
(_local10.proxyId);
_local13--;
};
};
_local12--;
};
};
_arg1[0] = _local8;
_arg2[0] = _local9;
}
private function (_arg1:b2Proxy, _arg2:b2Proxy):Boolean{
var _local3:int;
var _local4:Array;
var _local5:b2Bound;
var _local6:b2Bound;
_local3 = 0;
while (_local3 < 2) {
_local4 = m_bounds[_local3];
_local5 = _local4[_arg1.lowerBounds[_local3]];
_local6 = _local4[_arg2.upperBounds[_local3]];
if (_local5.value > _local6.value){
return (false);
};
_local5 = _local4[_arg1.upperBounds[_local3]];
_local6 = _local4[_arg2.lowerBounds[_local3]];
if (_local5.value < _local6.value){
return (false);
};
_local3++;
};
return (true);
}
private function
(_arg1:Array, _arg2:Array, _arg3:b2AABB):void{
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local4 = _arg3.lowerBound.x;
_local5 = _arg3.lowerBound.y;
_local4 = b2Math.b2Min(_local4, m_worldAABB.upperBound.x);
_local5 = b2Math.b2Min(_local5, m_worldAABB.upperBound.y);
_local4 = b2Math.b2Max(_local4, m_worldAABB.lowerBound.x);
_local5 = b2Math.b2Max(_local5, m_worldAABB.lowerBound.y);
_local6 = _arg3.upperBound.x;
_local7 = _arg3.upperBound.y;
_local6 = b2Math.b2Min(_local6, m_worldAABB.upperBound.x);
_local7 = b2Math.b2Min(_local7, m_worldAABB.upperBound.y);
_local6 = b2Math.b2Max(_local6, m_worldAABB.lowerBound.x);
_local7 = b2Math.b2Max(_local7, m_worldAABB.lowerBound.y);
_arg1[0] = (uint((m_quantizationFactor.x * (_local4 - m_worldAABB.lowerBound.x))) & (b2Settings.USHRT_MAX - 1));
_arg2[0] = ((uint((m_quantizationFactor.x * (_local6 - m_worldAABB.lowerBound.x))) & 0xFFFF) | 1);
_arg1[1] = (uint((m_quantizationFactor.y * (_local5 - m_worldAABB.lowerBound.y))) & (b2Settings.USHRT_MAX - 1));
_arg2[1] = ((uint((m_quantizationFactor.y * (_local7 - m_worldAABB.lowerBound.y))) & 0xFFFF) | 1);
}
public function CreateProxy(_arg1:b2AABB, _arg2):uint{
var _local3:uint;
var _local4:b2Proxy;
var _local5:uint;
var _local6:uint;
var _local7:Array;
var _local8:Array;
var _local9:int;
var _local10:int;
var _local11:Array;
var _local12:uint;
var _local13:uint;
var _local14:Array;
var _local15:Array;
var _local16:Array;
var _local17:int;
var _local18:int;
var _local19:b2Bound;
var _local20:b2Bound;
var _local21:b2Bound;
var _local22:int;
var _local23:b2Proxy;
_local5 = ;
_local4 = m_proxyPool[_local5];
= _local4.GetNext();
_local4.overlapCount = 0;
_local4.userData = _arg2;
_local6 = (2 * m_proxyCount);
_local7 = new Array();
_local8 = new Array();
(_local7, _local8, _arg1);
_local9 = 0;
while (_local9 < 2) {
_local11 = m_bounds[_local9];
_local14 = [_local12];
_local15 = [_local13];
(_local14, _local15, _local7[_local9], _local8[_local9], _local11, _local6, _local9);
_local12 = _local14[0];
_local13 = _local15[0];
_local16 = new Array();
_local18 = (_local6 - _local13);
_local17 = 0;
while (_local17 < _local18) {
_local16[_local17] = new b2Bound();
_local19 = _local16[_local17];
_local20 = _local11[int((_local13 + _local17))];
_local19.value = _local20.value;
_local19.proxyId = _local20.proxyId;
_local19.stabbingCount = _local20.stabbingCount;
_local17++;
};
_local18 = _local16.length;
_local22 = (_local13 + 2);
_local17 = 0;
while (_local17 < _local18) {
_local20 = _local16[_local17];
_local19 = _local11[int((_local22 + _local17))];
_local19.value = _local20.value;
_local19.proxyId = _local20.proxyId;
_local19.stabbingCount = _local20.stabbingCount;
_local17++;
};
_local16 = new Array();
_local18 = (_local13 - _local12);
_local17 = 0;
while (_local17 < _local18) {
_local16[_local17] = new b2Bound();
_local19 = _local16[_local17];
_local20 = _local11[int((_local12 + _local17))];
_local19.value = _local20.value;
_local19.proxyId = _local20.proxyId;
_local19.stabbingCount = _local20.stabbingCount;
_local17++;
};
_local18 = _local16.length;
_local22 = (_local12 + 1);
_local17 = 0;
while (_local17 < _local18) {
_local20 = _local16[_local17];
_local19 = _local11[int((_local22 + _local17))];
_local19.value = _local20.value;
_local19.proxyId = _local20.proxyId;
_local19.stabbingCount = _local20.stabbingCount;
_local17++;
};
_local13++;
_local19 = _local11[_local12];
_local20 = _local11[_local13];
_local19.value = _local7[_local9];
_local19.proxyId = _local5;
_local20.value = _local8[_local9];
_local20.proxyId = _local5;
_local21 = _local11[int((_local12 - 1))];
_local19.stabbingCount = ((_local12 == 0)) ? 0 : _local21.stabbingCount;
_local21 = _local11[int((_local13 - 1))];
_local20.stabbingCount = _local21.stabbingCount;
_local3 = _local12;
while (_local3 < _local13) {
_local21 = _local11[_local3];
_local21.stabbingCount++;
_local3++;
};
_local3 = _local12;
while (_local3 < (_local6 + 2)) {
_local19 = _local11[_local3];
_local23 = m_proxyPool[_local19.proxyId];
if (_local19.IsLower()){
_local23.lowerBounds[_local9] = _local3;
} else {
_local23.upperBounds[_local9] = _local3;
};
_local3++;
};
_local9++;
};
m_proxyCount++;
_local10 = 0;
while (_local10 < ) {
m_pairManager.AddBufferedPair(_local5, [_local10]);
_local10++;
};
m_pairManager.Commit();
= 0;
();
return (_local5);
}
public function DestroyProxy(_arg1:uint):void{
var _local2:b2Bound;
var _local3:b2Bound;
var _local4:b2Proxy;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:Array;
var _local9:uint;
var _local10:uint;
var _local11:uint;
var _local12:uint;
var _local13:Array;
var _local14:int;
var _local15:int;
var _local16:int;
var _local17:uint;
var _local18:int;
var _local19:b2Proxy;
_local4 = m_proxyPool[_arg1];
_local5 = (2 * m_proxyCount);
_local6 = 0;
while (_local6 < 2) {
_local8 = m_bounds[_local6];
_local9 = _local4.lowerBounds[_local6];
_local10 = _local4.upperBounds[_local6];
_local2 = _local8[_local9];
_local11 = _local2.value;
_local3 = _local8[_local10];
_local12 = _local3.value;
_local13 = new Array();
_local15 = ((_local10 - _local9) - 1);
_local14 = 0;
while (_local14 < _local15) {
_local13[_local14] = new b2Bound();
_local2 = _local13[_local14];
_local3 = _local8[int(((_local9 + 1) + _local14))];
_local2.value = _local3.value;
_local2.proxyId = _local3.proxyId;
_local2.stabbingCount = _local3.stabbingCount;
_local14++;
};
_local15 = _local13.length;
_local16 = _local9;
_local14 = 0;
while (_local14 < _local15) {
_local3 = _local13[_local14];
_local2 = _local8[int((_local16 + _local14))];
_local2.value = _local3.value;
_local2.proxyId = _local3.proxyId;
_local2.stabbingCount = _local3.stabbingCount;
_local14++;
};
_local13 = new Array();
_local15 = ((_local5 - _local10) - 1);
_local14 = 0;
while (_local14 < _local15) {
_local13[_local14] = new b2Bound();
_local2 = _local13[_local14];
_local3 = _local8[int(((_local10 + 1) + _local14))];
_local2.value = _local3.value;
_local2.proxyId = _local3.proxyId;
_local2.stabbingCount = _local3.stabbingCount;
_local14++;
};
_local15 = _local13.length;
_local16 = (_local10 - 1);
_local14 = 0;
while (_local14 < _local15) {
_local3 = _local13[_local14];
_local2 = _local8[int((_local16 + _local14))];
_local2.value = _local3.value;
_local2.proxyId = _local3.proxyId;
_local2.stabbingCount = _local3.stabbingCount;
_local14++;
};
_local15 = (_local5 - 2);
_local17 = _local9;
while (_local17 < _local15) {
_local2 = _local8[_local17];
_local19 = m_proxyPool[_local2.proxyId];
if (_local2.IsLower()){
_local19.lowerBounds[_local6] = _local17;
} else {
_local19.upperBounds[_local6] = _local17;
};
_local17++;
};
_local15 = (_local10 - 1);
_local18 = _local9;
while (_local18 < _local15) {
_local2 = _local8[_local18];
_local2.stabbingCount--;
_local18++;
};
([0], [0], _local11, _local12, _local8, (_local5 - 2), _local6);
_local6++;
};
_local7 = 0;
while (_local7 < ) {
m_pairManager.RemoveBufferedPair(_arg1, [_local7]);
_local7++;
};
m_pairManager.Commit();
= 0;
();
_local4.userData = null;
_local4.overlapCount = b2_invalid;
_local4.lowerBounds[0] = b2_invalid;
_local4.lowerBounds[1] = b2_invalid;
_local4.upperBounds[0] = b2_invalid;
_local4.upperBounds[1] = b2_invalid;
_local4.SetNext();
= _arg1;
m_proxyCount--;
}
public function (_arg1:b2BoundValues, _arg2:b2Proxy):Boolean{
var _local3:int;
var _local4:Array;
var _local5:b2Bound;
_local3 = 0;
while (_local3 < 2) {
_local4 = m_bounds[_local3];
_local5 = _local4[_arg2.upperBounds[_local3]];
if (_arg1.lowerValues[_local3] > _local5.value){
return (false);
};
_local5 = _local4[_arg2.lowerBounds[_local3]];
if (_arg1.upperValues[_local3] < _local5.value){
return (false);
};
_local3++;
};
return (true);
}
public function Validate():void{
var _local1:b2Pair;
var _local2:b2Proxy;
var _local3:b2Proxy;
var _local4:Boolean;
var _local5:int;
var _local6:b2Bound;
var _local7:uint;
var _local8:uint;
var _local9:uint;
var _local10:b2Bound;
_local5 = 0;
while (_local5 < 2) {
_local6 = m_bounds[_local5];
_local7 = (2 * m_proxyCount);
_local8 = 0;
_local9 = 0;
while (_local9 < _local7) {
_local10 = _local6[_local9];
if (_local10.IsLower() == true){
_local8++;
} else {
_local8--;
};
_local9++;
};
_local5++;
};
}
private function
(_arg1:uint):void{
var _local2:b2Proxy;
_local2 = m_proxyPool[_arg1];
if (_local2.timeStamp < ){
_local2.timeStamp = ;
_local2.overlapCount = 1;
} else {
_local2.overlapCount = 2;
[] = _arg1;
++;
};
}
public function InRange(_arg1:b2AABB):Boolean{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local2 = _arg1.lowerBound.x;
_local3 = _arg1.lowerBound.y;
_local2 = (_local2 - m_worldAABB.upperBound.x);
_local3 = (_local3 - m_worldAABB.upperBound.y);
_local4 = m_worldAABB.lowerBound.x;
_local5 = m_worldAABB.lowerBound.y;
_local4 = (_local4 - _arg1.upperBound.x);
_local5 = (_local5 - _arg1.upperBound.y);
_local2 = b2Math.b2Max(_local2, _local4);
_local3 = b2Math.b2Max(_local3, _local5);
return ((b2Math.b2Max(_local2, _local3) < 0));
}
public function MoveProxy(_arg1:uint, _arg2:b2AABB):void{
var _local3:Array;
var _local4:int;
var _local5:uint;
var _local6:uint;
var _local7:b2Bound;
var _local8:b2Bound;
var _local9:b2Bound;
var _local10:uint;
var _local11:b2Proxy;
var _local12:uint;
var _local13:b2Proxy;
var _local14:b2BoundValues;
var _local15:b2BoundValues;
var _local16:Array;
var _local17:uint;
var _local18:uint;
var _local19:uint;
var _local20:uint;
var _local21:int;
var _local22:int;
var _local23:uint;
var _local24:b2Proxy;
if ((((_arg1 == b2Pair.b2_nullProxy)) || ((b2Settings.b2_maxProxies <= _arg1)))){
return;
};
if (_arg2.IsValid() == false){
return;
};
_local12 = (2 * m_proxyCount);
_local13 = m_proxyPool[_arg1];
_local14 = new b2BoundValues();
(_local14.lowerValues, _local14.upperValues, _arg2);
_local15 = new b2BoundValues();
_local5 = 0;
while (_local5 < 2) {
_local7 = m_bounds[_local5][_local13.lowerBounds[_local5]];
_local15.lowerValues[_local5] = _local7.value;
_local7 = m_bounds[_local5][_local13.upperBounds[_local5]];
_local15.upperValues[_local5] = _local7.value;
_local5++;
};
_local5 = 0;
while (_local5 < 2) {
_local16 = m_bounds[_local5];
_local17 = _local13.lowerBounds[_local5];
_local18 = _local13.upperBounds[_local5];
_local19 = _local14.lowerValues[_local5];
_local20 = _local14.upperValues[_local5];
_local7 = _local16[_local17];
_local21 = (_local19 - _local7.value);
_local7.value = _local19;
_local7 = _local16[_local18];
_local22 = (_local20 - _local7.value);
_local7.value = _local20;
if (_local21 < 0){
_local6 = _local17;
while ((((_local6 > 0)) && ((_local19 < (_local16[int((_local6 - 1))] as b2Bound).value)))) {
_local7 = _local16[_local6];
_local8 = _local16[int((_local6 - 1))];
_local23 = _local8.proxyId;
_local24 = m_proxyPool[_local8.proxyId];
_local8.stabbingCount++;
if (_local8.IsUpper() == true){
if ((_local14, _local24)){
m_pairManager.AddBufferedPair(_arg1, _local23);
};
_local3 = _local24.upperBounds;
_local4 = _local3[_local5];
_local4++;
_local3[_local5] = _local4;
_local7.stabbingCount++;
} else {
_local3 = _local24.lowerBounds;
_local4 = _local3[_local5];
_local4++;
_local3[_local5] = _local4;
_local7.stabbingCount--;
};
_local3 = _local13.lowerBounds;
_local4 = _local3[_local5];
_local4--;
_local3[_local5] = _local4;
_local7.Swap(_local8);
_local6--;
};
};
if (_local22 > 0){
_local6 = _local18;
while ((((_local6 < (_local12 - 1))) && (((_local16[int((_local6 + 1))] as b2Bound).value <= _local20)))) {
_local7 = _local16[_local6];
_local9 = _local16[int((_local6 + 1))];
_local10 = _local9.proxyId;
_local11 = m_proxyPool[_local10];
_local9.stabbingCount++;
if (_local9.IsLower() == true){
if ((_local14, _local11)){
m_pairManager.AddBufferedPair(_arg1, _local10);
};
_local3 = _local11.lowerBounds;
_local4 = _local3[_local5];
_local4--;
_local3[_local5] = _local4;
_local7.stabbingCount++;
} else {
_local3 = _local11.upperBounds;
_local4 = _local3[_local5];
_local4--;
_local3[_local5] = _local4;
_local7.stabbingCount--;
};
_local3 = _local13.upperBounds;
_local4 = _local3[_local5];
_local4++;
_local3[_local5] = _local4;
_local7.Swap(_local9);
_local6++;
};
};
if (_local21 > 0){
_local6 = _local17;
while ((((_local6 < (_local12 - 1))) && (((_local16[int((_local6 + 1))] as b2Bound).value <= _local19)))) {
_local7 = _local16[_local6];
_local9 = _local16[int((_local6 + 1))];
_local10 = _local9.proxyId;
_local11 = m_proxyPool[_local10];
_local9.stabbingCount--;
if (_local9.IsUpper()){
if ((_local15, _local11)){
m_pairManager.RemoveBufferedPair(_arg1, _local10);
};
_local3 = _local11.upperBounds;
_local4 = _local3[_local5];
_local4--;
_local3[_local5] = _local4;
_local7.stabbingCount--;
} else {
_local3 = _local11.lowerBounds;
_local4 = _local3[_local5];
_local4--;
_local3[_local5] = _local4;
_local7.stabbingCount++;
};
_local3 = _local13.lowerBounds;
_local4 = _local3[_local5];
_local4++;
_local3[_local5] = _local4;
_local7.Swap(_local9);
_local6++;
};
};
if (_local22 < 0){
_local6 = _local18;
while ((((_local6 > 0)) && ((_local20 < (_local16[int((_local6 - 1))] as b2Bound).value)))) {
_local7 = _local16[_local6];
_local8 = _local16[int((_local6 - 1))];
_local23 = _local8.proxyId;
_local24 = m_proxyPool[_local23];
_local8.stabbingCount--;
if (_local8.IsLower() == true){
if ((_local15, _local24)){
m_pairManager.RemoveBufferedPair(_arg1, _local23);
};
_local3 = _local24.lowerBounds;
_local4 = _local3[_local5];
_local4++;
_local3[_local5] = _local4;
_local7.stabbingCount--;
} else {
_local3 = _local24.upperBounds;
_local4 = _local3[_local5];
_local4++;
_local3[_local5] = _local4;
_local7.stabbingCount++;
};
_local3 = _local13.upperBounds;
_local4 = _local3[_local5];
_local4--;
_local3[_local5] = _local4;
_local7.Swap(_local8);
_local6--;
};
};
_local5++;
};
}
public static function BinarySearch(_arg1:Array, _arg2:int, _arg3:uint):uint{
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:b2Bound;
_local4 = 0;
_local5 = (_arg2 - 1);
while (_local4 <= _local5) {
_local6 = ((_local4 + _local5) / 2);
_local7 = _arg1[_local6];
if (_local7.value > _arg3){
_local5 = (_local6 - 1);
} else {
if (_local7.value < _arg3){
_local4 = (_local6 + 1);
} else {
return (uint(_local6));
};
};
};
return (uint(_local4));
}
}
}//package Box2D.Collision
Section 13
//b2BufferedPair (Box2D.Collision.b2BufferedPair)
package Box2D.Collision {
public class b2BufferedPair {
public var proxyId1:uint;
public var proxyId2:uint;
}
}//package Box2D.Collision
Section 14
//b2Collision (Box2D.Collision.b2Collision)
package Box2D.Collision {
import Box2D.Collision.Shapes.*;
import Box2D.Common.Math.*;
import Box2D.Common.*;
public class b2Collision {
public static const b2_nullFeature:uint = 0xFF;
private static var b2CollidePolyTempVec:b2Vec2 = new b2Vec2();
public static function EdgeSeparation(_arg1:b2PolygonShape, _arg2:b2XForm, _arg3:int, _arg4:b2PolygonShape, _arg5:b2XForm):Number{
var _local6:int;
var _local7:Array;
var _local8:Array;
var _local9:int;
var _local10:Array;
var _local11:b2Mat22;
var _local12:b2Vec2;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:int;
var _local18:Number;
var _local19:int;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
_local6 = _arg1.
;
_local7 = _arg1.
;
_local8 = _arg1.
;
_local9 = _arg4.
;
_local10 = _arg4.
;
_local11 = _arg2.R;
_local12 = _local8[_arg3];
_local13 = ((_local11.col1.x * _local12.x) + (_local11.col2.x * _local12.y));
_local14 = ((_local11.col1.y * _local12.x) + (_local11.col2.y * _local12.y));
_local11 = _arg5.R;
_local15 = ((_local11.col1.x * _local13) + (_local11.col1.y * _local14));
_local16 = ((_local11.col2.x * _local13) + (_local11.col2.y * _local14));
_local17 = 0;
_local18 = Number.MAX_VALUE;
_local19 = 0;
while (_local19 < _local9) {
_local12 = _local10[_local19];
_local25 = ((_local12.x * _local15) + (_local12.y * _local16));
if (_local25 < _local18){
_local18 = _local25;
_local17 = _local19;
};
_local19++;
};
_local12 = _local7[_arg3];
_local11 = _arg2.R;
_local20 = (_arg2.position.x + ((_local11.col1.x * _local12.x) + (_local11.col2.x * _local12.y)));
_local21 = (_arg2.position.y + ((_local11.col1.y * _local12.x) + (_local11.col2.y * _local12.y)));
_local12 = _local10[_local17];
_local11 = _arg5.R;
_local22 = (_arg5.position.x + ((_local11.col1.x * _local12.x) + (_local11.col2.x * _local12.y)));
_local23 = (_arg5.position.y + ((_local11.col1.y * _local12.x) + (_local11.col2.y * _local12.y)));
_local22 = (_local22 - _local20);
_local23 = (_local23 - _local21);
_local24 = ((_local22 * _local13) + (_local23 * _local14));
return (_local24);
}
public static function b2TestOverlap(_arg1:b2AABB, _arg2:b2AABB):Boolean{
var _local3:b2Vec2;
var _local4:b2Vec2;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local3 = _arg2.lowerBound;
_local4 = _arg1.upperBound;
_local5 = (_local3.x - _local4.x);
_local6 = (_local3.y - _local4.y);
_local3 = _arg1.lowerBound;
_local4 = _arg2.upperBound;
_local7 = (_local3.x - _local4.x);
_local8 = (_local3.y - _local4.y);
if ((((_local5 > 0)) || ((_local6 > 0)))){
return (false);
};
if ((((_local7 > 0)) || ((_local8 > 0)))){
return (false);
};
return (true);
}
public static function FindIncidentEdge(_arg1:Array, _arg2:b2PolygonShape, _arg3:b2XForm, _arg4:int, _arg5:b2PolygonShape, _arg6:b2XForm):void{
var _local7:int;
var _local8:Array;
var _local9:int;
var _local10:Array;
var _local11:Array;
var _local12:b2Mat22;
var _local13:b2Vec2;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:int;
var _local18:Number;
var _local19:int;
var _local20:ClipVertex;
var _local21:int;
var _local22:int;
var _local23:Number;
_local7 = _arg2.
;
_local8 = _arg2.
;
_local9 = _arg5.
;
_local10 = _arg5.
;
_local11 = _arg5.
;
_local12 = _arg3.R;
_local13 = _local8[_arg4];
_local14 = ((_local12.col1.x * _local13.x) + (_local12.col2.x * _local13.y));
_local15 = ((_local12.col1.y * _local13.x) + (_local12.col2.y * _local13.y));
_local12 = _arg6.R;
_local16 = ((_local12.col1.x * _local14) + (_local12.col1.y * _local15));
_local15 = ((_local12.col2.x * _local14) + (_local12.col2.y * _local15));
_local14 = _local16;
_local17 = 0;
_local18 = Number.MAX_VALUE;
_local19 = 0;
while (_local19 < _local9) {
_local13 = _local11[_local19];
_local23 = ((_local14 * _local13.x) + (_local15 * _local13.y));
if (_local23 < _local18){
_local18 = _local23;
_local17 = _local19;
};
_local19++;
};
_local21 = _local17;
_local22 = (((_local21 + 1) < _local9)) ? (_local21 + 1) : 0;
_local20 = _arg1[0];
_local13 = _local10[_local21];
_local12 = _arg6.R;
_local20.
.x = (_arg6.position.x + ((_local12.col1.x * _local13.x) + (_local12.col2.x * _local13.y)));
_local20.
.y = (_arg6.position.y + ((_local12.col1.y * _local13.x) + (_local12.col2.y * _local13.y)));
_local20.id.
.referenceEdge = _arg4;
_local20.id.
.incidentEdge = _local21;
_local20.id.
.incidentVertex = 0;
_local20 = _arg1[1];
_local13 = _local10[_local22];
_local12 = _arg6.R;
_local20.
.x = (_arg6.position.x + ((_local12.col1.x * _local13.x) + (_local12.col2.x * _local13.y)));
_local20.
.y = (_arg6.position.y + ((_local12.col1.y * _local13.x) + (_local12.col2.y * _local13.y)));
_local20.id.
.referenceEdge = _arg4;
_local20.id.
.incidentEdge = _local22;
_local20.id.
.incidentVertex = 1;
}
public static function b2CollidePolygons(_arg1:b2Manifold, _arg2:b2PolygonShape, _arg3:b2XForm, _arg4:b2PolygonShape, _arg5:b2XForm):void{
var _local6:ClipVertex;
var _local7:int;
var _local8:Array;
var _local9:Number;
var _local10:int;
var _local11:Array;
var _local12:Number;
var _local13:b2PolygonShape;
var _local14:b2PolygonShape;
var _local15:b2XForm;
var _local16:b2XForm;
var _local17:int;
var _local18:uint;
var _local19:Number;
var _local20:Number;
var _local21:Array;
var _local22:int;
var _local23:Array;
var _local24:b2Vec2;
var _local25:b2Vec2;
var _local26:b2Vec2;
var _local27:b2Vec2;
var _local28:b2Vec2;
var _local29:Number;
var _local30:Number;
var _local31:Number;
var _local32:Array;
var _local33:Array;
var _local34:int;
var _local35:int;
var _local36:int;
var _local37:b2Vec2;
var _local38:Number;
var _local39:b2ManifoldPoint;
_arg1.pointCount = 0;
_local7 = 0;
_local8 = [_local7];
_local9 = FindMaxSeparation(_local8, _arg2, _arg3, _arg4, _arg5);
_local7 = _local8[0];
if (_local9 > 0){
return;
};
_local10 = 0;
_local11 = [_local10];
_local12 = FindMaxSeparation(_local11, _arg4, _arg5, _arg2, _arg3);
_local10 = _local11[0];
if (_local12 > 0){
return;
};
_local15 = new b2XForm();
_local16 = new b2XForm();
_local19 = 0.98;
_local20 = 0.001;
if (_local12 > ((_local19 * _local9) + _local20)){
_local13 = _arg4;
_local14 = _arg2;
_local15.Set(_arg5);
_local16.Set(_arg3);
_local17 = _local10;
_local18 = 1;
} else {
_local13 = _arg2;
_local14 = _arg4;
_local15.Set(_arg3);
_local16.Set(_arg5);
_local17 = _local7;
_local18 = 0;
};
_local21 = [new ClipVertex(), new ClipVertex()];
FindIncidentEdge(_local21, _local13, _local15, _local17, _local14, _local16);
_local22 = _local13.
;
_local23 = _local13.
;
_local24 = _local23[_local17];
_local25 = _local24.Copy();
if ((_local17 + 1) < _local22){
_local24 = _local23[int((_local17 + 1))];
_local37 = _local24.Copy();
} else {
_local24 = _local23[0];
_local37 = _local24.Copy();
};
_local26 = b2Math.SubtractVV(_local37, _local25);
_local27 = b2Math.b2MulMV(_local15.R, b2Math.SubtractVV(_local37, _local25));
_local27.Normalize();
_local28 = b2Math.b2CrossVF(_local27, 1);
_local25 = b2Math.b2MulX(_local15, _local25);
_local37 = b2Math.b2MulX(_local15, _local37);
_local29 = b2Math.b2Dot(_local28, _local25);
_local30 = -(b2Math.b2Dot(_local27, _local25));
_local31 = b2Math.b2Dot(_local27, _local37);
_local32 = [new ClipVertex(), new ClipVertex()];
_local33 = [new ClipVertex(), new ClipVertex()];
_local34 = ClipSegmentToLine(_local32, _local21, _local27.
(), _local30);
if (_local34 < 2){
return;
};
_local34 = ClipSegmentToLine(_local33, _local32, _local27, _local31);
if (_local34 < 2){
return;
};
_arg1.normal = (_local18) ? _local28.
() : _local28.Copy();
_local35 = 0;
_local36 = 0;
while (_local36 < b2Settings.b2_maxManifoldPoints) {
_local6 = _local33[_local36];
_local38 = (b2Math.b2Dot(_local28, _local6.
) - _local29);
if (_local38 <= 0){
_local39 = _arg1.points[_local35];
_local39.separation = _local38;
_local39.localPoint1 = b2Math.b2MulXT(_arg3, _local6.
);
_local39.localPoint2 = b2Math.b2MulXT(_arg5, _local6.
);
_local39.id.key = _local6.id._key;
_local39.id.
.flip = _local18;
_local35++;
};
_local36++;
};
_arg1.pointCount = _local35;
}
public static function FindMaxSeparation(_arg1:Array, _arg2:b2PolygonShape, _arg3:b2XForm, _arg4:b2PolygonShape, _arg5:b2XForm):Number{
var _local6:int;
var _local7:Array;
var _local8:b2Vec2;
var _local9:b2Mat22;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:int;
var _local15:Number;
var _local16:int;
var _local17:Number;
var _local18:int;
var _local19:Number;
var _local20:int;
var _local21:Number;
var _local22:int;
var _local23:Number;
var _local24:int;
var _local25:Number;
_local6 = _arg2.
;
_local7 = _arg2.
;
_local9 = _arg5.R;
_local8 = _arg4.
;
_local10 = (_arg5.position.x + ((_local9.col1.x * _local8.x) + (_local9.col2.x * _local8.y)));
_local11 = (_arg5.position.y + ((_local9.col1.y * _local8.x) + (_local9.col2.y * _local8.y)));
_local9 = _arg3.R;
_local8 = _arg2.
;
_local10 = (_local10 - (_arg3.position.x + ((_local9.col1.x * _local8.x) + (_local9.col2.x * _local8.y))));
_local11 = (_local11 - (_arg3.position.y + ((_local9.col1.y * _local8.x) + (_local9.col2.y * _local8.y))));
_local12 = ((_local10 * _arg3.R.col1.x) + (_local11 * _arg3.R.col1.y));
_local13 = ((_local10 * _arg3.R.col2.x) + (_local11 * _arg3.R.col2.y));
_local14 = 0;
_local15 = -(Number.MAX_VALUE);
_local16 = 0;
while (_local16 < _local6) {
_local8 = _local7[_local16];
_local25 = ((_local8.x * _local12) + (_local8.y * _local13));
if (_local25 > _local15){
_local15 = _local25;
_local14 = _local16;
};
_local16++;
};
_local17 = EdgeSeparation(_arg2, _arg3, _local14, _arg4, _arg5);
if (_local17 > 0){
return (_local17);
};
_local18 = (((_local14 - 1) >= 0)) ? (_local14 - 1) : (_local6 - 1);
_local19 = EdgeSeparation(_arg2, _arg3, _local18, _arg4, _arg5);
if (_local19 > 0){
return (_local19);
};
_local20 = (((_local14 + 1) < _local6)) ? (_local14 + 1) : 0;
_local21 = EdgeSeparation(_arg2, _arg3, _local20, _arg4, _arg5);
if (_local21 > 0){
return (_local21);
};
if ((((_local19 > _local17)) && ((_local19 > _local21)))){
_local24 = -1;
_local22 = _local18;
_local23 = _local19;
} else {
if (_local21 > _local17){
_local24 = 1;
_local22 = _local20;
_local23 = _local21;
} else {
_arg1[0] = _local14;
return (_local17);
};
};
while (true) {
if (_local24 == -1){
_local14 = (((_local22 - 1) >= 0)) ? (_local22 - 1) : (_local6 - 1);
} else {
_local14 = (((_local22 + 1) < _local6)) ? (_local22 + 1) : 0;
};
_local17 = EdgeSeparation(_arg2, _arg3, _local14, _arg4, _arg5);
if (_local17 > 0){
return (_local17);
};
if (_local17 > _local23){
_local22 = _local14;
_local23 = _local17;
} else {
break;
};
};
_arg1[0] = _local22;
return (_local23);
}
public static function ClipSegmentToLine(_arg1:Array, _arg2:Array, _arg3:b2Vec2, _arg4:Number):int{
var _local5:ClipVertex;
var _local6:int;
var _local7:b2Vec2;
var _local8:b2Vec2;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:b2Vec2;
var _local13:ClipVertex;
_local6 = 0;
_local5 = _arg2[0];
_local7 = _local5.
;
_local5 = _arg2[1];
_local8 = _local5.
;
_local9 = (b2Math.b2Dot(_arg3, _local7) - _arg4);
_local10 = (b2Math.b2Dot(_arg3, _local8) - _arg4);
if (_local9 <= 0){
var _temp1 = _local6;
_local6 = (_local6 + 1);
var _local14 = _temp1;
_arg1[_local14] = _arg2[0];
};
if (_local10 <= 0){
var _temp2 = _local6;
_local6 = (_local6 + 1);
_local14 = _temp2;
_arg1[_local14] = _arg2[1];
};
if ((_local9 * _local10) < 0){
_local11 = (_local9 / (_local9 - _local10));
_local5 = _arg1[_local6];
_local12 = _local5.
;
_local12.x = (_local7.x + (_local11 * (_local8.x - _local7.x)));
_local12.y = (_local7.y + (_local11 * (_local8.y - _local7.y)));
_local5 = _arg1[_local6];
if (_local9 > 0){
_local13 = _arg2[0];
_local5.id = _local13.id;
} else {
_local13 = _arg2[1];
_local5.id = _local13.id;
};
_local6++;
};
return (_local6);
}
public static function b2CollideCircles(_arg1:b2Manifold, _arg2:b2CircleShape, _arg3:b2XForm, _arg4:b2CircleShape, _arg5:b2XForm):void{
var _local6:b2Mat22;
var _local7:b2Vec2;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:b2ManifoldPoint;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
_arg1.pointCount = 0;
_local6 = _arg3.R;
_local7 = _arg2.m_localPosition;
_local8 = (_arg3.position.x + ((_local6.col1.x * _local7.x) + (_local6.col2.x * _local7.y)));
_local9 = (_arg3.position.y + ((_local6.col1.y * _local7.x) + (_local6.col2.y * _local7.y)));
_local6 = _arg5.R;
_local7 = _arg4.m_localPosition;
_local10 = (_arg5.position.x + ((_local6.col1.x * _local7.x) + (_local6.col2.x * _local7.y)));
_local11 = (_arg5.position.y + ((_local6.col1.y * _local7.x) + (_local6.col2.y * _local7.y)));
_local12 = (_local10 - _local8);
_local13 = (_local11 - _local9);
_local14 = ((_local12 * _local12) + (_local13 * _local13));
_local15 = _arg2.m_radius;
_local16 = _arg4.m_radius;
_local17 = (_local15 + _local16);
if (_local14 > (_local17 * _local17)){
return;
};
if (_local14 < Number.MIN_VALUE){
_local18 = -(_local17);
_arg1.normal.Set(0, 1);
} else {
_local24 = Math.sqrt(_local14);
_local18 = (_local24 - _local17);
_local25 = (1 / _local24);
_arg1.normal.x = (_local25 * _local12);
_arg1.normal.y = (_local25 * _local13);
};
_arg1.pointCount = 1;
_local19 = _arg1.points[0];
_local19.id.key = 0;
_local19.separation = _local18;
_local8 = (_local8 + (_local15 * _arg1.normal.x));
_local9 = (_local9 + (_local15 * _arg1.normal.y));
_local10 = (_local10 - (_local16 * _arg1.normal.x));
_local11 = (_local11 - (_local16 * _arg1.normal.y));
_local20 = (0.5 * (_local8 + _local10));
_local21 = (0.5 * (_local9 + _local11));
_local22 = (_local20 - _arg3.position.x);
_local23 = (_local21 - _arg3.position.y);
_local19.localPoint1.x = ((_local22 * _arg3.R.col1.x) + (_local23 * _arg3.R.col1.y));
_local19.localPoint1.y = ((_local22 * _arg3.R.col2.x) + (_local23 * _arg3.R.col2.y));
_local22 = (_local20 - _arg5.position.x);
_local23 = (_local21 - _arg5.position.y);
_local19.localPoint2.x = ((_local22 * _arg5.R.col1.x) + (_local23 * _arg5.R.col1.y));
_local19.localPoint2.y = ((_local22 * _arg5.R.col2.x) + (_local23 * _arg5.R.col2.y));
}
public static function b2CollidePolygonAndCircle(_arg1:b2Manifold, _arg2:b2PolygonShape, _arg3:b2XForm, _arg4:b2CircleShape, _arg5:b2XForm):void{
var _local6:b2ManifoldPoint;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:b2Vec2;
var _local12:b2Mat22;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:int;
var _local19:Number;
var _local20:Number;
var _local21:int;
var _local22:Array;
var _local23:Array;
var _local24:int;
var _local25:int;
var _local26:int;
var _local27:b2Vec2;
var _local28:Number;
var _local29:Number;
var _local30:Number;
var _local31:Number;
var _local32:Number;
var _local33:Number;
var _local34:Number;
_arg1.pointCount = 0;
_local12 = _arg5.R;
_local11 = _arg4.m_localPosition;
_local13 = (_arg5.position.x + ((_local12.col1.x * _local11.x) + (_local12.col2.x * _local11.y)));
_local14 = (_arg5.position.y + ((_local12.col1.y * _local11.x) + (_local12.col2.y * _local11.y)));
_local7 = (_local13 - _arg3.position.x);
_local8 = (_local14 - _arg3.position.y);
_local12 = _arg3.R;
_local15 = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y));
_local16 = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y));
_local18 = 0;
_local19 = -(Number.MAX_VALUE);
_local20 = _arg4.m_radius;
_local21 = _arg2.
;
_local22 = _arg2.
;
_local23 = _arg2.
;
_local24 = 0;
while (_local24 < _local21) {
_local11 = _local22[_local24];
_local7 = (_local15 - _local11.x);
_local8 = (_local16 - _local11.y);
_local11 = _local23[_local24];
_local34 = ((_local11.x * _local7) + (_local11.y * _local8));
if (_local34 > _local20){
return;
};
if (_local34 > _local19){
_local19 = _local34;
_local18 = _local24;
};
_local24++;
};
if (_local19 < Number.MIN_VALUE){
_arg1.pointCount = 1;
_local11 = _local23[_local18];
_local12 = _arg3.R;
_arg1.normal.x = ((_local12.col1.x * _local11.x) + (_local12.col2.x * _local11.y));
_arg1.normal.y = ((_local12.col1.y * _local11.x) + (_local12.col2.y * _local11.y));
_local6 = _arg1.points[0];
_local6.id.
.incidentEdge = _local18;
_local6.id.
.incidentVertex = b2_nullFeature;
_local6.id.
.referenceEdge = 0;
_local6.id.
.flip = 0;
_local9 = (_local13 - (_local20 * _arg1.normal.x));
_local10 = (_local14 - (_local20 * _arg1.normal.y));
_local7 = (_local9 - _arg3.position.x);
_local8 = (_local10 - _arg3.position.y);
_local12 = _arg3.R;
_local6.localPoint1.x = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y));
_local6.localPoint1.y = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y));
_local7 = (_local9 - _arg5.position.x);
_local8 = (_local10 - _arg5.position.y);
_local12 = _arg5.R;
_local6.localPoint2.x = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y));
_local6.localPoint2.y = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y));
_local6.separation = (_local19 - _local20);
return;
};
_local25 = _local18;
_local26 = (((_local25 + 1) < _local21)) ? (_local25 + 1) : 0;
_local11 = _local22[_local25];
_local27 = _local22[_local26];
_local28 = (_local27.x - _local11.x);
_local29 = (_local27.y - _local11.y);
_local30 = Math.sqrt(((_local28 * _local28) + (_local29 * _local29)));
_local28 = (_local28 / _local30);
_local29 = (_local29 / _local30);
_local7 = (_local15 - _local11.x);
_local8 = (_local16 - _local11.y);
_local31 = ((_local7 * _local28) + (_local8 * _local29));
_local6 = _arg1.points[0];
if (_local31 <= 0){
_local32 = _local11.x;
_local33 = _local11.y;
_local6.id.
.incidentEdge = b2_nullFeature;
_local6.id.
.incidentVertex = _local25;
} else {
if (_local31 >= _local30){
_local32 = _local27.x;
_local33 = _local27.y;
_local6.id.
.incidentEdge = b2_nullFeature;
_local6.id.
.incidentVertex = _local26;
} else {
_local32 = ((_local28 * _local31) + _local11.x);
_local33 = ((_local29 * _local31) + _local11.y);
_local6.id.
.incidentEdge = _local18;
_local6.id.
.incidentVertex = 0;
};
};
_local7 = (_local15 - _local32);
_local8 = (_local16 - _local33);
_local17 = Math.sqrt(((_local7 * _local7) + (_local8 * _local8)));
_local7 = (_local7 / _local17);
_local8 = (_local8 / _local17);
if (_local17 > _local20){
return;
};
_arg1.pointCount = 1;
_local12 = _arg3.R;
_arg1.normal.x = ((_local12.col1.x * _local7) + (_local12.col2.x * _local8));
_arg1.normal.y = ((_local12.col1.y * _local7) + (_local12.col2.y * _local8));
_local9 = (_local13 - (_local20 * _arg1.normal.x));
_local10 = (_local14 - (_local20 * _arg1.normal.y));
_local7 = (_local9 - _arg3.position.x);
_local8 = (_local10 - _arg3.position.y);
_local12 = _arg3.R;
_local6.localPoint1.x = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y));
_local6.localPoint1.y = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y));
_local7 = (_local9 - _arg5.position.x);
_local8 = (_local10 - _arg5.position.y);
_local12 = _arg5.R;
_local6.localPoint2.x = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y));
_local6.localPoint2.y = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y));
_local6.separation = (_local17 - _local20);
_local6.id.
.referenceEdge = 0;
_local6.id.
.flip = 0;
}
}
}//package Box2D.Collision
Section 15
//b2ContactID (Box2D.Collision.b2ContactID)
package Box2D.Collision {
public class b2ContactID {
public var _key:uint;
public var
:Features;
public function b2ContactID(){
= new Features();
super();
.
= this;
}
public function Set(_arg1:b2ContactID):void{
key = _arg1._key;
}
public function Copy():b2ContactID{
var _local1:b2ContactID;
_local1 = new b2ContactID();
_local1.key = key;
return (_local1);
}
public function get key():uint{
return (_key);
}
public function set key(_arg1:uint):void{
_key = _arg1;
.
= (_key & 0xFF);
.
= (((_key & 0xFF00) >> 8) & 0xFF);
.
= (((_key & 0xFF0000) >> 16) & 0xFF);
.
= (((_key & 4278190080) >> 24) & 0xFF);
}
}
}//package Box2D.Collision
Section 16
//b2ContactPoint (Box2D.Collision.b2ContactPoint)
package Box2D.Collision {
import Box2D.Collision.Shapes.*;
import Box2D.Common.Math.*;
public class b2ContactPoint {
public var separation:Number;
public var normal:b2Vec2;
public var position:b2Vec2;
public var restitution:Number;
public var shape1:b2Shape;
public var shape2:b2Shape;
public var id:b2ContactID;
public var friction:Number;
public var velocity:b2Vec2;
public function b2ContactPoint(){
position = new b2Vec2();
velocity = new b2Vec2();
normal = new b2Vec2();
id = new b2ContactID();
super();
}
}
}//package Box2D.Collision
Section 17
//b2Distance (Box2D.Collision.b2Distance)
package Box2D.Collision {
import Box2D.Collision.Shapes.*;
import Box2D.Common.Math.*;
import Box2D.Common.*;
public class b2Distance {
private static var s_p2s:Array = [new b2Vec2(), new b2Vec2(), new b2Vec2()];
private static var s_p1s:Array = [new b2Vec2(), new b2Vec2(), new b2Vec2()];
private static var s_points:Array = [new b2Vec2(), new b2Vec2(), new b2Vec2()];
private static var gPoint:b2Point = new b2Point();
public static var g_GJK_Iterations:int = 0;
public static function InPoints(_arg1:b2Vec2, _arg2:Array, _arg3:int):Boolean{
var _local4:Number;
var _local5:int;
var _local6:b2Vec2;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
_local4 = (100 * Number.MIN_VALUE);
_local5 = 0;
while (_local5 < _arg3) {
_local6 = _arg2[_local5];
_local7 = Math.abs((_arg1.x - _local6.x));
_local8 = Math.abs((_arg1.y - _local6.y));
_local9 = Math.max(Math.abs(_arg1.x), Math.abs(_local6.x));
_local10 = Math.max(Math.abs(_arg1.y), Math.abs(_local6.y));
if ((((_local7 < (_local4 * (_local9 + 1)))) && ((_local8 < (_local4 * (_local10 + 1)))))){
return (true);
};
_local5++;
};
return (false);
}
public static function DistanceGeneric(_arg1:b2Vec2, _arg2:b2Vec2, _arg3, _arg4:b2XForm, _arg5, _arg6:b2XForm):Number{
var _local7:b2Vec2;
var _local8:Array;
var _local9:Array;
var _local10:Array;
var _local11:int;
var _local12:Number;
var _local13:int;
var _local14:int;
var _local15:Number;
var _local16:Number;
var _local17:b2Vec2;
var _local18:b2Vec2;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:int;
_local8 = s_p1s;
_local9 = s_p2s;
_local10 = s_points;
_local11 = 0;
_arg1.SetV(_arg3.GetFirstVertex(_arg4));
_arg2.SetV(_arg5.GetFirstVertex(_arg6));
_local12 = 0;
_local13 = 20;
_local14 = 0;
while (_local14 < _local13) {
_local15 = (_arg2.x - _arg1.x);
_local16 = (_arg2.y - _arg1.y);
_local17 = _arg3.Support(_arg4, _local15, _local16);
_local18 = _arg5.Support(_arg6, -(_local15), -(_local16));
_local12 = ((_local15 * _local15) + (_local16 * _local16));
_local19 = (_local18.x - _local17.x);
_local20 = (_local18.y - _local17.y);
_local21 = ((_local15 * _local19) + (_local16 * _local20));
if ((_local12 - ((_local15 * _local19) + (_local16 * _local20))) <= (0.01 * _local12)){
if (_local11 == 0){
_arg1.SetV(_local17);
_arg2.SetV(_local18);
};
g_GJK_Iterations = _local14;
return (Math.sqrt(_local12));
};
switch (_local11){
case 0:
_local7 = _local8[0];
_local7.SetV(_local17);
_local7 = _local9[0];
_local7.SetV(_local18);
_local7 = _local10[0];
_local7.x = _local19;
_local7.y = _local20;
_arg1.SetV(_local8[0]);
_arg2.SetV(_local9[0]);
_local11++;
break;
case 1:
_local7 = _local8[1];
_local7.SetV(_local17);
_local7 = _local9[1];
_local7.SetV(_local18);
_local7 = _local10[1];
_local7.x = _local19;
_local7.y = _local20;
_local11 = ProcessTwo(_arg1, _arg2, _local8, _local9, _local10);
break;
case 2:
_local7 = _local8[2];
_local7.SetV(_local17);
_local7 = _local9[2];
_local7.SetV(_local18);
_local7 = _local10[2];
_local7.x = _local19;
_local7.y = _local20;
_local11 = ProcessThree(_arg1, _arg2, _local8, _local9, _local10);
break;
};
if (_local11 == 3){
g_GJK_Iterations = _local14;
return (0);
};
_local22 = -(Number.MAX_VALUE);
_local23 = 0;
while (_local23 < _local11) {
_local7 = _local10[_local23];
_local22 = b2Math.b2Max(_local22, ((_local7.x * _local7.x) + (_local7.y * _local7.y)));
_local23++;
};
if ((((_local11 == 3)) || ((_local12 <= ((100 * Number.MIN_VALUE) * _local22))))){
g_GJK_Iterations = _local14;
_local15 = (_arg2.x - _arg1.x);
_local16 = (_arg2.y - _arg1.y);
_local12 = ((_local15 * _local15) + (_local16 * _local16));
return (Math.sqrt(_local12));
};
_local14++;
};
g_GJK_Iterations = _local13;
return (Math.sqrt(_local12));
}
public static function DistanceCC(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2CircleShape, _arg4:b2XForm, _arg5:b2CircleShape, _arg6:b2XForm):Number{
var _local7:b2Mat22;
var _local8:b2Vec2;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
_local7 = _arg4.R;
_local8 = _arg3.m_localPosition;
_local9 = (_arg4.position.x + ((_local7.col1.x * _local8.x) + (_local7.col2.x * _local8.y)));
_local10 = (_arg4.position.y + ((_local7.col1.y * _local8.x) + (_local7.col2.y * _local8.y)));
_local7 = _arg6.R;
_local8 = _arg5.m_localPosition;
_local11 = (_arg6.position.x + ((_local7.col1.x * _local8.x) + (_local7.col2.x * _local8.y)));
_local12 = (_arg6.position.y + ((_local7.col1.y * _local8.x) + (_local7.col2.y * _local8.y)));
_local13 = (_local11 - _local9);
_local14 = (_local12 - _local10);
_local15 = ((_local13 * _local13) + (_local14 * _local14));
_local16 = (_arg3.m_radius - b2Settings.b2_toiSlop);
_local17 = (_arg5.m_radius - b2Settings.b2_toiSlop);
_local18 = (_local16 + _local17);
if (_local15 > (_local18 * _local18)){
_local19 = Math.sqrt(((_local13 * _local13) + (_local14 * _local14)));
_local13 = (_local13 / _local19);
_local14 = (_local14 / _local19);
_local20 = (_local19 - _local18);
_arg1.x = (_local9 + (_local16 * _local13));
_arg1.y = (_local10 + (_local16 * _local14));
_arg2.x = (_local11 - (_local17 * _local13));
_arg2.y = (_local12 - (_local17 * _local14));
return (_local20);
};
if (_local15 > (Number.MIN_VALUE * Number.MIN_VALUE)){
_local19 = Math.sqrt(((_local13 * _local13) + (_local14 * _local14)));
_local13 = (_local13 / _local19);
_local14 = (_local14 / _local19);
_arg1.x = (_local9 + (_local16 * _local13));
_arg1.y = (_local10 + (_local16 * _local14));
_arg2.x = _arg1.x;
_arg2.y = _arg1.y;
return (0);
};
_arg1.x = _local9;
_arg1.y = _local10;
_arg2.x = _arg1.x;
_arg2.y = _arg1.y;
return (0);
}
public static function ProcessThree(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:Array, _arg4:Array, _arg5:Array):int{
var _local6:b2Vec2;
var _local7:b2Vec2;
var _local8:b2Vec2;
var _local9:b2Vec2;
var _local10:b2Vec2;
var _local11:b2Vec2;
var _local12:b2Vec2;
var _local13:b2Vec2;
var _local14:b2Vec2;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
var _local26:Number;
var _local27:Number;
var _local28:Number;
var _local29:Number;
var _local30:Number;
var _local31:Number;
var _local32:Number;
var _local33:Number;
var _local34:Number;
var _local35:Number;
var _local36:Number;
var _local37:Number;
var _local38:Number;
var _local39:Number;
var _local40:Number;
var _local41:Number;
_local6 = _arg5[0];
_local7 = _arg5[1];
_local8 = _arg5[2];
_local9 = _arg3[0];
_local10 = _arg3[1];
_local11 = _arg3[2];
_local12 = _arg4[0];
_local13 = _arg4[1];
_local14 = _arg4[2];
_local15 = _local6.x;
_local16 = _local6.y;
_local17 = _local7.x;
_local18 = _local7.y;
_local19 = _local8.x;
_local20 = _local8.y;
_local21 = (_local17 - _local15);
_local22 = (_local18 - _local16);
_local23 = (_local19 - _local15);
_local24 = (_local20 - _local16);
_local25 = (_local19 - _local17);
_local26 = (_local20 - _local18);
_local27 = -(((_local15 * _local21) + (_local16 * _local22)));
_local28 = ((_local17 * _local21) + (_local18 * _local22));
_local29 = -(((_local15 * _local23) + (_local16 * _local24)));
_local30 = ((_local19 * _local23) + (_local20 * _local24));
_local31 = -(((_local17 * _local25) + (_local18 * _local26)));
_local32 = ((_local19 * _local25) + (_local20 * _local26));
if ((((_local30 <= 0)) && ((_local32 <= 0)))){
_arg1.SetV(_local11);
_arg2.SetV(_local14);
_local9.SetV(_local11);
_local12.SetV(_local14);
_local6.SetV(_local8);
return (1);
};
_local33 = ((_local21 * _local24) - (_local22 * _local23));
_local34 = (_local33 * ((_local15 * _local18) - (_local16 * _local17)));
_local36 = (_local33 * ((_local17 * _local20) - (_local18 * _local19)));
if ((((((((_local36 <= 0)) && ((_local31 >= 0)))) && ((_local32 >= 0)))) && (((_local31 + _local32) > 0)))){
_local35 = (_local31 / (_local31 + _local32));
_arg1.x = (_local10.x + (_local35 * (_local11.x - _local10.x)));
_arg1.y = (_local10.y + (_local35 * (_local11.y - _local10.y)));
_arg2.x = (_local13.x + (_local35 * (_local14.x - _local13.x)));
_arg2.y = (_local13.y + (_local35 * (_local14.y - _local13.y)));
_local9.SetV(_local11);
_local12.SetV(_local14);
_local6.SetV(_local8);
return (2);
};
_local37 = (_local33 * ((_local19 * _local16) - (_local20 * _local15)));
if ((((((((_local37 <= 0)) && ((_local29 >= 0)))) && ((_local30 >= 0)))) && (((_local29 + _local30) > 0)))){
_local35 = (_local29 / (_local29 + _local30));
_arg1.x = (_local9.x + (_local35 * (_local11.x - _local9.x)));
_arg1.y = (_local9.y + (_local35 * (_local11.y - _local9.y)));
_arg2.x = (_local12.x + (_local35 * (_local14.x - _local12.x)));
_arg2.y = (_local12.y + (_local35 * (_local14.y - _local12.y)));
_local10.SetV(_local11);
_local13.SetV(_local14);
_local7.SetV(_local8);
return (2);
};
_local38 = ((_local36 + _local37) + _local34);
_local38 = (1 / _local38);
_local39 = (_local36 * _local38);
_local40 = (_local37 * _local38);
_local41 = ((1 - _local39) - _local40);
_arg1.x = (((_local39 * _local9.x) + (_local40 * _local10.x)) + (_local41 * _local11.x));
_arg1.y = (((_local39 * _local9.y) + (_local40 * _local10.y)) + (_local41 * _local11.y));
_arg2.x = (((_local39 * _local12.x) + (_local40 * _local13.x)) + (_local41 * _local14.x));
_arg2.y = (((_local39 * _local12.y) + (_local40 * _local13.y)) + (_local41 * _local14.y));
return (3);
}
public static function DistancePC(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2PolygonShape, _arg4:b2XForm, _arg5:b2CircleShape, _arg6:b2XForm):Number{
var _local7:b2Mat22;
var _local8:b2Vec2;
var _local9:b2Point;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
_local9 = gPoint;
_local8 = _arg5.m_localPosition;
_local7 = _arg6.R;
_local9..x = (_arg6.position.x + ((_local7.col1.x * _local8.x) + (_local7.col2.x * _local8.y)));
_local9..y = (_arg6.position.y + ((_local7.col1.y * _local8.x) + (_local7.col2.y * _local8.y)));
_local10 = DistanceGeneric(_arg1, _arg2, _arg3, _arg4, _local9, b2Math.b2XForm_identity);
_local11 = (_arg5.m_radius - b2Settings.b2_toiSlop);
if (_local10 > _local11){
_local10 = (_local10 - _local11);
_local12 = (_arg2.x - _arg1.x);
_local13 = (_arg2.y - _arg1.y);
_local14 = Math.sqrt(((_local12 * _local12) + (_local13 * _local13)));
_local12 = (_local12 / _local14);
_local13 = (_local13 / _local14);
_arg2.x = (_arg2.x - (_local11 * _local12));
_arg2.y = (_arg2.y - (_local11 * _local13));
} else {
_local10 = 0;
_arg2.x = _arg1.x;
_arg2.y = _arg1.y;
};
return (_local10);
}
public static function Distance(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Shape, _arg4:b2XForm, _arg5:b2Shape, _arg6:b2XForm):Number{
var _local7:int;
var _local8:int;
_local7 = _arg3.m_type;
_local8 = _arg5.m_type;
if ((((_local7 == b2Shape.e_circleShape)) && ((_local8 == b2Shape.e_circleShape)))){
return (DistanceCC(_arg1, _arg2, (_arg3 as b2CircleShape), _arg4, (_arg5 as b2CircleShape), _arg6));
};
if ((((_local7 == b2Shape.e_polygonShape)) && ((_local8 == b2Shape.e_circleShape)))){
return (DistancePC(_arg1, _arg2, (_arg3 as b2PolygonShape), _arg4, (_arg5 as b2CircleShape), _arg6));
};
if ((((_local7 == b2Shape.e_circleShape)) && ((_local8 == b2Shape.e_polygonShape)))){
return (DistancePC(_arg2, _arg1, (_arg5 as b2PolygonShape), _arg6, (_arg3 as b2CircleShape), _arg4));
};
if ((((_local7 == b2Shape.e_polygonShape)) && ((_local8 == b2Shape.e_polygonShape)))){
return (DistanceGeneric(_arg1, _arg2, (_arg3 as b2PolygonShape), _arg4, (_arg5 as b2PolygonShape), _arg6));
};
return (0);
}
public static function ProcessTwo(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:Array, _arg4:Array, _arg5:Array):int{
var _local6:b2Vec2;
var _local7:b2Vec2;
var _local8:b2Vec2;
var _local9:b2Vec2;
var _local10:b2Vec2;
var _local11:b2Vec2;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
_local6 = _arg5[0];
_local7 = _arg5[1];
_local8 = _arg3[0];
_local9 = _arg3[1];
_local10 = _arg4[0];
_local11 = _arg4[1];
_local12 = -(_local7.x);
_local13 = -(_local7.y);
_local14 = (_local6.x - _local7.x);
_local15 = (_local6.y - _local7.y);
_local16 = Math.sqrt(((_local14 * _local14) + (_local15 * _local15)));
_local14 = (_local14 / _local16);
_local15 = (_local15 / _local16);
_local17 = ((_local12 * _local14) + (_local13 * _local15));
if ((((_local17 <= 0)) || ((_local16 < Number.MIN_VALUE)))){
_arg1.SetV(_local9);
_arg2.SetV(_local11);
_local8.SetV(_local9);
_local10.SetV(_local11);
_local6.SetV(_local7);
return (1);
};
_local17 = (_local17 / _local16);
_arg1.x = (_local9.x + (_local17 * (_local8.x - _local9.x)));
_arg1.y = (_local9.y + (_local17 * (_local8.y - _local9.y)));
_arg2.x = (_local11.x + (_local17 * (_local10.x - _local11.x)));
_arg2.y = (_local11.y + (_local17 * (_local10.y - _local11.y)));
return (2);
}
}
}//package Box2D.Collision
Section 18
//b2Manifold (Box2D.Collision.b2Manifold)
package Box2D.Collision {
import Box2D.Common.Math.*;
import Box2D.Common.*;
public class b2Manifold {
public var points:Array;
public var pointCount:int;// = 0
public var normal:b2Vec2;
public function b2Manifold(){
var _local1:int;
pointCount = 0;
super();
points = new Array(b2Settings.b2_maxManifoldPoints);
_local1 = 0;
while (_local1 < b2Settings.b2_maxManifoldPoints) {
points[_local1] = new b2ManifoldPoint();
_local1++;
};
normal = new b2Vec2();
}
public function Set(_arg1:b2Manifold):void{
var _local2:int;
pointCount = _arg1.pointCount;
_local2 = 0;
while (_local2 < b2Settings.b2_maxManifoldPoints) {
(points[_local2] as b2ManifoldPoint).Set(_arg1.points[_local2]);
_local2++;
};
normal.SetV(_arg1.normal);
}
public function Reset():void{
var _local1:int;
_local1 = 0;
while (_local1 < b2Settings.b2_maxManifoldPoints) {
(points[_local1] as b2ManifoldPoint).Reset();
_local1++;
};
normal.SetZero();
pointCount = 0;
}
}
}//package Box2D.Collision
Section 19
//b2ManifoldPoint (Box2D.Collision.b2ManifoldPoint)
package Box2D.Collision {
import Box2D.Common.Math.*;
public class b2ManifoldPoint {
public var separation:Number;
public var localPoint2:b2Vec2;
public var normalImpulse:Number;
public var tangentImpulse:Number;
public var localPoint1:b2Vec2;
public var id:b2ContactID;
public function b2ManifoldPoint(){
localPoint1 = new b2Vec2();
localPoint2 = new b2Vec2();
id = new b2ContactID();
super();
}
public function Set(_arg1:b2ManifoldPoint):void{
localPoint1.SetV(_arg1.localPoint1);
localPoint2.SetV(_arg1.localPoint2);
separation = _arg1.separation;
normalImpulse = _arg1.normalImpulse;
tangentImpulse = _arg1.tangentImpulse;
id.key = _arg1.id.key;
}
public function Reset():void{
localPoint1.SetZero();
localPoint2.SetZero();
separation = 0;
normalImpulse = 0;
tangentImpulse = 0;
id.key = 0;
}
}
}//package Box2D.Collision
Section 20
//b2OBB (Box2D.Collision.b2OBB)
package Box2D.Collision {
import Box2D.Common.Math.*;
public class b2OBB {
public var R:b2Mat22;
public var center:b2Vec2;
public var extents:b2Vec2;
public function b2OBB(){
R = new b2Mat22();
center = new b2Vec2();
extents = new b2Vec2();
super();
}
}
}//package Box2D.Collision
Section 21
//b2Pair (Box2D.Collision.b2Pair)
package Box2D.Collision {
import Box2D.Common.*;
public class b2Pair {
public var userData;// = null
public var proxyId1:uint;
public var proxyId2:uint;
public var status:uint;
public var next:uint;
public static var e_pairFinal:uint = 4;
public static var b2_tableMask:int = (b2_tableCapacity - 1);
public static var e_pairRemoved:uint = 2;
public static var b2_nullPair:uint = b2Settings.USHRT_MAX;
public static var e_pairBuffered:uint = 1;
public static var b2_nullProxy:uint = b2Settings.USHRT_MAX;
public static var b2_tableCapacity:int = b2Settings.b2_maxPairs;
public function b2Pair(){
userData = null;
super();
}
public function SetBuffered():void{
status = (status | e_pairBuffered);
}
public function IsBuffered():Boolean{
return (((status & e_pairBuffered) == e_pairBuffered));
}
public function IsFinal():Boolean{
return (((status & e_pairFinal) == e_pairFinal));
}
public function ClearRemoved():void{
status = (status & ~(e_pairRemoved));
}
public function SetFinal():void{
status = (status | e_pairFinal);
}
public function IsRemoved():Boolean{
return (((status & e_pairRemoved) == e_pairRemoved));
}
public function ClearBuffered():void{
status = (status & ~(e_pairBuffered));
}
public function SetRemoved():void{
status = (status | e_pairRemoved);
}
}
}//package Box2D.Collision
Section 22
//b2PairCallback (Box2D.Collision.b2PairCallback)
package Box2D.Collision {
public class b2PairCallback {
public function PairRemoved(_arg1, _arg2, _arg3):void{
}
public function PairAdded(_arg1, _arg2){
return (null);
}
}
}//package Box2D.Collision
Section 23
//b2PairManager (Box2D.Collision.b2PairManager)
package Box2D.Collision {
import Box2D.Common.Math.*;
import Box2D.Common.*;
public class b2PairManager {
public var m_pairCount:int;
public var :Array;
public var :b2PairCallback;
public var m_pairs:Array;
public var :int;
public var m_hashTable:Array;
public var m_broadPhase:b2BroadPhase;
public var
:uint;
public function b2PairManager(){
var _local1:uint;
super();
m_hashTable = new Array(b2Pair.b2_tableCapacity);
_local1 = 0;
while (_local1 < b2Pair.b2_tableCapacity) {
m_hashTable[_local1] = b2Pair.b2_nullPair;
_local1++;
};
m_pairs = new Array(b2Settings.b2_maxPairs);
_local1 = 0;
while (_local1 < b2Settings.b2_maxPairs) {
m_pairs[_local1] = new b2Pair();
_local1++;
};
= new Array(b2Settings.b2_maxPairs);
_local1 = 0;
while (_local1 < b2Settings.b2_maxPairs) {
[_local1] = new b2BufferedPair();
_local1++;
};
_local1 = 0;
while (_local1 < b2Settings.b2_maxPairs) {
m_pairs[_local1].proxyId1 = b2Pair.b2_nullProxy;
m_pairs[_local1].proxyId2 = b2Pair.b2_nullProxy;
m_pairs[_local1].userData = null;
m_pairs[_local1].status = 0;
m_pairs[_local1].next = (_local1 + 1);
_local1++;
};
m_pairs[int((b2Settings.b2_maxPairs - 1))].next = b2Pair.b2_nullPair;
m_pairCount = 0;
= 0;
}
private function (_arg1:uint, _arg2:uint, _arg3:uint):b2Pair{
var _local4:b2Pair;
var _local5:uint;
_local5 = m_hashTable[_arg3];
_local4 = m_pairs[_local5];
while (((!((_local5 == b2Pair.b2_nullPair))) && ((Equals(_local4, _arg1, _arg2) == false)))) {
_local5 = _local4.next;
_local4 = m_pairs[_local5];
};
if (_local5 == b2Pair.b2_nullPair){
return (null);
};
return (_local4);
}
private function (_arg1:uint, _arg2:uint):b2Pair{
var _local3:uint;
var _local4:uint;
if (_arg1 > _arg2){
_local4 = _arg1;
_arg1 = _arg2;
_arg2 = _local4;
};
_local3 = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask);
return ( (_arg1, _arg2, _local3));
}
private function ():void{
}
public function Commit():void{
var _local1:b2BufferedPair;
var _local2:int;
var _local3:int;
var _local4:Array;
var _local5:b2Pair;
var _local6:b2Proxy;
var _local7:b2Proxy;
_local3 = 0;
_local4 = m_broadPhase.m_proxyPool;
_local2 = 0;
while (_local2 < ) {
_local1 = [_local2];
_local5 = (_local1.proxyId1, _local1.proxyId2);
_local5.ClearBuffered();
_local6 = _local4[_local5.proxyId1];
_local7 = _local4[_local5.proxyId2];
if (_local5.IsRemoved()){
if (_local5.IsFinal() == true){
.PairRemoved(_local6.userData, _local7.userData, _local5.userData);
};
_local1 = [_local3];
_local1.proxyId1 = _local5.proxyId1;
_local1.proxyId2 = _local5.proxyId2;
_local3++;
} else {
if (_local5.IsFinal() == false){
_local5.userData = .PairAdded(_local6.userData, _local7.userData);
_local5.SetFinal();
};
};
_local2++;
};
_local2 = 0;
while (_local2 < _local3) {
_local1 = [_local2];
(_local1.proxyId1, _local1.proxyId2);
_local2++;
};
= 0;
if (b2BroadPhase.s_validate){
();
};
}
public function RemoveBufferedPair(_arg1:int, _arg2:int):void{
var _local3:b2BufferedPair;
var _local4:b2Pair;
_local4 = (_arg1, _arg2);
if (_local4 == null){
return;
};
if (_local4.IsBuffered() == false){
_local4.SetBuffered();
_local3 = [ ];
_local3.proxyId1 = _local4.proxyId1;
_local3.proxyId2 = _local4.proxyId2;
++;
};
_local4.SetRemoved();
if (b2BroadPhase.s_validate){
();
};
}
private function (_arg1:uint, _arg2:uint){
var _local3:b2Pair;
var _local4:uint;
var _local5:uint;
var _local6:b2Pair;
var _local7:uint;
var _local8:uint;
var _local9:*;
if (_arg1 > _arg2){
_local7 = _arg1;
_arg1 = _arg2;
_arg2 = _local7;
};
_local4 = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask);
_local5 = m_hashTable[_local4];
_local6 = null;
while (_local5 != b2Pair.b2_nullPair) {
if (Equals(m_pairs[_local5], _arg1, _arg2)){
_local8 = _local5;
_local3 = m_pairs[_local5];
if (_local6){
_local6.next = _local3.next;
} else {
m_hashTable[_local4] = _local3.next;
};
_local3 = m_pairs[_local8];
_local9 = _local3.userData;
_local3.next =
;
_local3.proxyId1 = b2Pair.b2_nullProxy;
_local3.proxyId2 = b2Pair.b2_nullProxy;
_local3.userData = null;
_local3.status = 0;
= _local8;
m_pairCount--;
return (_local9);
} else {
_local6 = m_pairs[_local5];
_local5 = _local6.next;
};
};
return (null);
}
public function Initialize(_arg1:b2BroadPhase, _arg2:b2PairCallback):void{
m_broadPhase = _arg1;
= _arg2;
}
public function AddBufferedPair(_arg1:int, _arg2:int):void{
var _local3:b2BufferedPair;
var _local4:b2Pair;
_local4 = (_arg1, _arg2);
if (_local4.IsBuffered() == false){
_local4.SetBuffered();
_local3 = [ ];
_local3.proxyId1 = _local4.proxyId1;
_local3.proxyId2 = _local4.proxyId2;
++;
};
_local4.ClearRemoved();
if (b2BroadPhase.s_validate){
();
};
}
private function (_arg1:uint, _arg2:uint):b2Pair{
var _local3:uint;
var _local4:b2Pair;
var _local5:uint;
var _local6:uint;
if (_arg1 > _arg2){
_local6 = _arg1;
_arg1 = _arg2;
_arg2 = _local6;
};
_local3 = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask);
_local4 = (_arg1, _arg2, _local3);
if (_local4 != null){
return (_local4);
};
_local5 =
;
_local4 = m_pairs[_local5];
= _local4.next;
_local4.proxyId1 = _arg1;
_local4.proxyId2 = _arg2;
_local4.status = 0;
_local4.userData = null;
_local4.next = m_hashTable[_local3];
m_hashTable[_local3] = _local5;
m_pairCount++;
return (_local4);
}
private function ():void{
}
public static function EqualsPair(_arg1:b2BufferedPair, _arg2:b2BufferedPair):Boolean{
return ((((_arg1.proxyId1 == _arg2.proxyId1)) && ((_arg1.proxyId2 == _arg2.proxyId2))));
}
public static function Hash(_arg1:uint, _arg2:uint):uint{
var _local3:uint;
_local3 = (((_arg2 << 16) & 4294901760) | _arg1);
_local3 = (~(_local3) + ((_local3 << 15) & 4294934528));
_local3 = (_local3 ^ ((_local3 >> 12) & 1048575));
_local3 = (_local3 + ((_local3 << 2) & 4294967292));
_local3 = (_local3 ^ ((_local3 >> 4) & 268435455));
_local3 = (_local3 * 2057);
_local3 = (_local3 ^ ((_local3 >> 16) & 0xFFFF));
return (_local3);
}
public static function Equals(_arg1:b2Pair, _arg2:uint, _arg3:uint):Boolean{
return ((((_arg1.proxyId1 == _arg2)) && ((_arg1.proxyId2 == _arg3))));
}
}
}//package Box2D.Collision
Section 24
//b2Point (Box2D.Collision.b2Point)
package Box2D.Collision {
import Box2D.Common.Math.*;
public class b2Point {
public var :b2Vec2;
public function b2Point(){
= new b2Vec2();
super();
}
public function GetFirstVertex(_arg1:b2XForm):b2Vec2{
return ();
}
public function Support(_arg1:b2XForm, _arg2:Number, _arg3:Number):b2Vec2{
return ();
}
}
}//package Box2D.Collision
Section 25
//b2Proxy (Box2D.Collision.b2Proxy)
package Box2D.Collision {
public class b2Proxy {
public var overlapCount:uint;
public var lowerBounds:Array;
public var upperBounds:Array;
public var userData;// = null
public var timeStamp:uint;
public function b2Proxy(){
lowerBounds = [uint(0), uint(0)];
upperBounds = [uint(0), uint(0)];
userData = null;
super();
}
public function GetNext():uint{
return (lowerBounds[0]);
}
public function IsValid():Boolean{
return (!((overlapCount == b2BroadPhase.b2_invalid)));
}
public function SetNext(_arg1:uint):void{
lowerBounds[0] = (_arg1 & 0xFFFF);
}
}
}//package Box2D.Collision
Section 26
//b2Segment (Box2D.Collision.b2Segment)
package Box2D.Collision {
import Box2D.Common.Math.*;
public class b2Segment {
public var p1:b2Vec2;
public var p2:b2Vec2;
public function b2Segment(){
p1 = new b2Vec2();
p2 = new b2Vec2();
super();
}
public function TestSegment(_arg1:Array, _arg2:b2Vec2, _arg3:b2Segment, _arg4:Number):Boolean{
var _local5:b2Vec2;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
_local5 = _arg3.p1;
_local6 = (_arg3.p2.x - _local5.x);
_local7 = (_arg3.p2.y - _local5.y);
_local8 = (p2.x - p1.x);
_local9 = (p2.y - p1.y);
_local10 = _local9;
_local11 = -(_local8);
_local12 = (100 * Number.MIN_VALUE);
_local13 = -(((_local6 * _local10) + (_local7 * _local11)));
if (_local13 > _local12){
_local14 = (_local5.x - p1.x);
_local15 = (_local5.y - p1.y);
_local16 = ((_local14 * _local10) + (_local15 * _local11));
if ((((0 <= _local16)) && ((_local16 <= (_arg4 * _local13))))){
_local17 = ((-(_local7) * _local15) + (_local7 * _local14));
if (((((-(_local12) * _local13) <= _local17)) && ((_local17 <= (_local13 * (1 + _local12)))))){
_local16 = (_local16 / _local13);
_local18 = Math.sqrt(((_local10 * _local10) + (_local11 * _local11)));
_local10 = (_local10 / _local18);
_local11 = (_local11 / _local18);
_arg1[0] = _local16;
_arg2.Set(_local10, _local11);
return (true);
};
};
};
return (false);
}
}
}//package Box2D.Collision
Section 27
//b2TimeOfImpact (Box2D.Collision.b2TimeOfImpact)
package Box2D.Collision {
import Box2D.Collision.Shapes.*;
import Box2D.Common.Math.*;
import Box2D.Common.*;
public class b2TimeOfImpact {
public static var s_xf1:b2XForm = new b2XForm();
public static var s_xf2:b2XForm = new b2XForm();
public static var s_p1:b2Vec2 = new b2Vec2();
public static var s_p2:b2Vec2 = new b2Vec2();
public static function TimeOfImpact(_arg1:b2Shape, _arg2:b2Sweep, _arg3:b2Shape, _arg4:b2Sweep):Number{
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:b2Vec2;
var _local18:b2Vec2;
var _local19:int;
var _local20:int;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
var _local26:b2XForm;
var _local27:b2XForm;
var _local28:Number;
var _local29:Number;
var _local30:Number;
var _local31:Number;
_local7 = _arg1.m_sweepRadius;
_local8 = _arg3.m_sweepRadius;
_local9 = _arg2.t0;
_local10 = (_arg2.c.x - _arg2.c0.x);
_local11 = (_arg2.c.y - _arg2.c0.y);
_local12 = (_arg4.c.x - _arg4.c0.x);
_local13 = (_arg4.c.y - _arg4.c0.y);
_local14 = (_arg2.a - _arg2.a0);
_local15 = (_arg4.a - _arg4.a0);
_local16 = 0;
_local17 = s_p1;
_local18 = s_p2;
_local19 = 20;
_local20 = 0;
_local21 = 0;
_local22 = 0;
_local23 = 0;
_local24 = 0;
while (true) {
_local25 = (((1 - _local16) * _local9) + _local16);
_local26 = s_xf1;
_local27 = s_xf2;
_arg2.GetXForm(_local26, _local25);
_arg4.GetXForm(_local27, _local25);
_local23 = b2Distance.Distance(_local17, _local18, _arg1, _local26, _arg3, _local27);
if (_local20 == 0){
if (_local23 > (2 * b2Settings.b2_toiSlop)){
_local24 = (1.5 * b2Settings.b2_toiSlop);
} else {
_local5 = (0.05 * b2Settings.b2_toiSlop);
_local6 = (_local23 - (0.5 * b2Settings.b2_toiSlop));
_local24 = ((_local5 > _local6)) ? _local5 : _local6;
};
};
if (((((_local23 - _local24) < (0.05 * b2Settings.b2_toiSlop))) || ((_local20 == _local19)))){
break;
};
_local21 = (_local18.x - _local17.x);
_local22 = (_local18.y - _local17.y);
_local28 = Math.sqrt(((_local21 * _local21) + (_local22 * _local22)));
_local21 = (_local21 / _local28);
_local22 = (_local22 / _local28);
_local29 = ((((_local21 * (_local10 - _local12)) + (_local22 * (_local11 - _local13))) + (((_local14 < 0)) ? -(_local14) : _local14 * _local7)) + (((_local15 < 0)) ? -(_local15) : _local15 * _local8));
if (_local29 == 0){
_local16 = 1;
break;
};
_local30 = ((_local23 - _local24) / _local29);
_local31 = (_local16 + _local30);
if ((((_local31 < 0)) || ((1 < _local31)))){
_local16 = 1;
break;
};
if (_local31 < ((1 + (100 * Number.MIN_VALUE)) * _local16)){
break;
};
_local16 = _local31;
_local20++;
};
return (_local16);
}
}
}//package Box2D.Collision
Section 28
//ClipVertex (Box2D.Collision.ClipVertex)
package Box2D.Collision {
import Box2D.Common.Math.*;
public class ClipVertex {
public var
:b2Vec2;
public var id:b2ContactID;
public function ClipVertex(){
= new b2Vec2();
id = new b2ContactID();
super();
}
}
}//package Box2D.Collision
Section 29
//Features (Box2D.Collision.Features)
package Box2D.Collision {
public class Features {
public var
:int;
public var
:int;
public var
:int;
public var
:int;
public var
:b2ContactID;
public function get referenceEdge():int{
return (
);
}
public function set incidentVertex(_arg1:int):void{
= _arg1;
._key = ((
._key & 4278255615) | ((
<< 16) & 0xFF0000));
}
public function get flip():int{
return (
);
}
public function get incidentEdge():int{
return (
);
}
public function set referenceEdge(_arg1:int):void{
= _arg1;
._key = ((
._key & 4294967040) | (
& 0xFF));
}
public function set flip(_arg1:int):void{
= _arg1;
._key = ((
._key & 0xFFFFFF) | ((
<< 24) & 4278190080));
}
public function get incidentVertex():int{
return (
);
}
public function set incidentEdge(_arg1:int):void{
= _arg1;
._key = ((
._key & 4294902015) | ((
<< 8) & 0xFF00));
}
}
}//package Box2D.Collision
Section 30
//b2Mat22 (Box2D.Common.Math.b2Mat22)
package Box2D.Common.Math {
public class b2Mat22 {
public var col1:b2Vec2;
public var col2:b2Vec2;
public function b2Mat22(_arg1:Number=0, _arg2:b2Vec2=null, _arg3:b2Vec2=null){
var _local4:Number;
var _local5:Number;
col1 = new b2Vec2();
col2 = new b2Vec2();
super();
if (((!((_arg2 == null))) && (!((_arg3 == null))))){
col1.SetV(_arg2);
col2.SetV(_arg3);
} else {
_local4 = Math.cos(_arg1);
_local5 = Math.sin(_arg1);
col1.x = _local4;
col2.x = -(_local5);
col1.y = _local5;
col2.y = _local4;
};
}
public function SetIdentity():void{
col1.x = 1;
col2.x = 0;
col1.y = 0;
col2.y = 1;
}
public function Set(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
_local2 = Math.cos(_arg1);
_local3 = Math.sin(_arg1);
col1.x = _local2;
col2.x = -(_local3);
col1.y = _local3;
col2.y = _local2;
}
public function
(_arg1:b2Vec2, _arg2:b2Vec2):void{
col1.SetV(_arg1);
col2.SetV(_arg2);
}
public function SetZero():void{
col1.x = 0;
col2.x = 0;
col1.y = 0;
col2.y = 0;
}
public function SetM(_arg1:b2Mat22):void{
col1.SetV(_arg1.col1);
col2.SetV(_arg1.col2);
}
public function AddM(_arg1:b2Mat22):void{
col1.x = (col1.x + _arg1.col1.x);
col1.y = (col1.y + _arg1.col1.y);
col2.x = (col2.x + _arg1.col2.x);
col2.y = (col2.y + _arg1.col2.y);
}
public function Abs():void{
col1.Abs();
col2.Abs();
}
public function Copy():b2Mat22{
return (new b2Mat22(0, col1, col2));
}
public function Invert(_arg1:b2Mat22):b2Mat22{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
_local2 = col1.x;
_local3 = col2.x;
_local4 = col1.y;
_local5 = col2.y;
_local6 = ((_local2 * _local5) - (_local3 * _local4));
_local6 = (1 / _local6);
_arg1.col1.x = (_local6 * _local5);
_arg1.col2.x = (-(_local6) * _local3);
_arg1.col1.y = (-(_local6) * _local4);
_arg1.col2.y = (_local6 * _local2);
return (_arg1);
}
public function GetAngle():Number{
return (Math.atan2(col1.y, col1.x));
}
public function Solve(_arg1:b2Vec2, _arg2:Number, _arg3:Number):b2Vec2{
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local4 = col1.x;
_local5 = col2.x;
_local6 = col1.y;
_local7 = col2.y;
_local8 = ((_local4 * _local7) - (_local5 * _local6));
_local8 = (1 / _local8);
_arg1.x = (_local8 * ((_local7 * _arg2) - (_local5 * _arg3)));
_arg1.y = (_local8 * ((_local4 * _arg3) - (_local6 * _arg2)));
return (_arg1);
}
}
}//package Box2D.Common.Math
Section 31
//b2Math (Box2D.Common.Math.b2Math)
package Box2D.Common.Math {
public class b2Math {
public static const b2Mat22_identity:b2Mat22 = new b2Mat22(0, new b2Vec2(1, 0), new b2Vec2(0, 1));
public static const b2XForm_identity:b2XForm = new b2XForm(b2Vec2_zero, b2Mat22_identity);
public static const b2Vec2_zero:b2Vec2 = new b2Vec2(0, 0);
public static function b2CrossVF(_arg1:b2Vec2, _arg2:Number):b2Vec2{
var _local3:b2Vec2;
_local3 = new b2Vec2((_arg2 * _arg1.y), (-(_arg2) * _arg1.x));
return (_local3);
}
public static function AddVV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2;
_local3 = new b2Vec2((_arg1.x + _arg2.x), (_arg1.y + _arg2.y));
return (_local3);
}
public static function b2IsValid(_arg1:Number):Boolean{
return (isFinite(_arg1));
}
public static function b2MinV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2;
_local3 = new b2Vec2(b2Min(_arg1.x, _arg2.x), b2Min(_arg1.y, _arg2.y));
return (_local3);
}
public static function b2MulX(_arg1:b2XForm, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2;
_local3 = b2MulMV(_arg1.R, _arg2);
_local3.x = (_local3.x + _arg1.position.x);
_local3.y = (_local3.y + _arg1.position.y);
return (_local3);
}
public static function b2DistanceSquared(_arg1:b2Vec2, _arg2:b2Vec2):Number{
var _local3:Number;
var _local4:Number;
_local3 = (_arg1.x - _arg2.x);
_local4 = (_arg1.y - _arg2.y);
return (((_local3 * _local3) + (_local4 * _local4)));
}
public static function b2Swap(_arg1:Array, _arg2:Array):void{
var _local3:*;
_local3 = _arg1[0];
_arg1[0] = _arg2[0];
_arg2[0] = _local3;
}
public static function b2AbsM(_arg1:b2Mat22):b2Mat22{
var _local2:b2Mat22;
_local2 = new b2Mat22(0, b2AbsV(_arg1.col1), b2AbsV(_arg1.col2));
return (_local2);
}
public static function SubtractVV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2;
_local3 = new b2Vec2((_arg1.x - _arg2.x), (_arg1.y - _arg2.y));
return (_local3);
}
public static function b2MulXT(_arg1:b2XForm, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2;
var _local4:Number;
_local3 = SubtractVV(_arg2, _arg1.position);
_local4 = ((_local3.x * _arg1.R.col1.x) + (_local3.y * _arg1.R.col1.y));
_local3.y = ((_local3.x * _arg1.R.col2.x) + (_local3.y * _arg1.R.col2.y));
_local3.x = _local4;
return (_local3);
}
public static function b2Abs(_arg1:Number):Number{
return (((_arg1 > 0)) ? _arg1 : -(_arg1));
}
public static function b2Clamp(_arg1:Number, _arg2:Number, _arg3:Number):Number{
return (b2Max(_arg2, b2Min(_arg1, _arg3)));
}
public static function b2AbsV(_arg1:b2Vec2):b2Vec2{
var _local2:b2Vec2;
_local2 = new b2Vec2(b2Abs(_arg1.x), b2Abs(_arg1.y));
return (_local2);
}
public static function MulFV(_arg1:Number, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2;
_local3 = new b2Vec2((_arg1 * _arg2.x), (_arg1 * _arg2.y));
return (_local3);
}
public static function b2CrossVV(_arg1:b2Vec2, _arg2:b2Vec2):Number{
return (((_arg1.x * _arg2.y) - (_arg1.y * _arg2.x)));
}
public static function b2Dot(_arg1:b2Vec2, _arg2:b2Vec2):Number{
return (((_arg1.x * _arg2.x) + (_arg1.y * _arg2.y)));
}
public static function b2CrossFV(_arg1:Number, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2;
_local3 = new b2Vec2((-(_arg1) * _arg2.y), (_arg1 * _arg2.x));
return (_local3);
}
public static function AddMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{
var _local3:b2Mat22;
_local3 = new b2Mat22(0, AddVV(_arg1.col1, _arg2.col1), AddVV(_arg1.col2, _arg2.col2));
return (_local3);
}
public static function b2Distance(_arg1:b2Vec2, _arg2:b2Vec2):Number{
var _local3:Number;
var _local4:Number;
_local3 = (_arg1.x - _arg2.x);
_local4 = (_arg1.y - _arg2.y);
return (Math.sqrt(((_local3 * _local3) + (_local4 * _local4))));
}
public static function b2MulTMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{
var _local3:b2Vec2;
var _local4:b2Vec2;
var _local5:b2Mat22;
_local3 = new b2Vec2(b2Dot(_arg1.col1, _arg2.col1), b2Dot(_arg1.col2, _arg2.col1));
_local4 = new b2Vec2(b2Dot(_arg1.col1, _arg2.col2), b2Dot(_arg1.col2, _arg2.col2));
_local5 = new b2Mat22(0, _local3, _local4);
return (_local5);
}
public static function b2MaxV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2;
_local3 = new b2Vec2(b2Max(_arg1.x, _arg2.x), b2Max(_arg1.y, _arg2.y));
return (_local3);
}
public static function b2IsPowerOfTwo(_arg1:uint):Boolean{
var _local2:Boolean;
_local2 = (((_arg1 > 0)) && (((_arg1 & (_arg1 - 1)) == 0)));
return (_local2);
}
public static function b2ClampV(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Vec2):b2Vec2{
return (b2MaxV(_arg2, b2MinV(_arg1, _arg3)));
}
public static function b2RandomRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = Math.random();
_local3 = (((_arg2 - _arg1) * _local3) + _arg1);
return (_local3);
}
public static function b2MulTMV(_arg1:b2Mat22, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2;
_local3 = new b2Vec2(b2Dot(_arg2, _arg1.col1), b2Dot(_arg2, _arg1.col2));
return (_local3);
}
public static function b2Min(_arg1:Number, _arg2:Number):Number{
return (((_arg1 < _arg2)) ? _arg1 : _arg2);
}
public static function b2Random():Number{
return (((Math.random() * 2) - 1));
}
public static function b2MulMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{
var _local3:b2Mat22;
_local3 = new b2Mat22(0, b2MulMV(_arg1, _arg2.col1), b2MulMV(_arg1, _arg2.col2));
return (_local3);
}
public static function b2NextPowerOfTwo(_arg1:uint):uint{
_arg1 = (_arg1 | ((_arg1 >> 1) & 2147483647));
_arg1 = (_arg1 | ((_arg1 >> 2) & 1073741823));
_arg1 = (_arg1 | ((_arg1 >> 4) & 268435455));
_arg1 = (_arg1 | ((_arg1 >> 8) & 0xFFFFFF));
_arg1 = (_arg1 | ((_arg1 >> 16) & 0xFFFF));
return ((_arg1 + 1));
}
public static function b2Max(_arg1:Number, _arg2:Number):Number{
return (((_arg1 > _arg2)) ? _arg1 : _arg2);
}
public static function b2MulMV(_arg1:b2Mat22, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2;
_local3 = new b2Vec2(((_arg1.col1.x * _arg2.x) + (_arg1.col2.x * _arg2.y)), ((_arg1.col1.y * _arg2.x) + (_arg1.col2.y * _arg2.y)));
return (_local3);
}
}
}//package Box2D.Common.Math
Section 32
//b2Sweep (Box2D.Common.Math.b2Sweep)
package Box2D.Common.Math {
public class b2Sweep {
public var localCenter:b2Vec2;
public var c:b2Vec2;
public var a:Number;
public var c0:b2Vec2;
public var a0:Number;
public var t0:Number;
public function b2Sweep(){
localCenter = new b2Vec2();
c0 = new b2Vec2();
c = new b2Vec2();
super();
}
public function Advance(_arg1:Number):void{
var _local2:Number;
if ((((t0 < _arg1)) && (((1 - t0) > Number.MIN_VALUE)))){
_local2 = ((_arg1 - t0) / (1 - t0));
c0.x = (((1 - _local2) * c0.x) + (_local2 * c.x));
c0.y = (((1 - _local2) * c0.y) + (_local2 * c.y));
a0 = (((1 - _local2) * a0) + (_local2 * a));
t0 = _arg1;
};
}
public function GetXForm(_arg1:b2XForm, _arg2:Number):void{
var _local3:b2Mat22;
var _local4:Number;
var _local5:Number;
if ((1 - t0) > Number.MIN_VALUE){
_local4 = ((_arg2 - t0) / (1 - t0));
_arg1.position.x = (((1 - _local4) * c0.x) + (_local4 * c.x));
_arg1.position.y = (((1 - _local4) * c0.y) + (_local4 * c.y));
_local5 = (((1 - _local4) * a0) + (_local4 * a));
_arg1.R.Set(_local5);
} else {
_arg1.position.SetV(c);
_arg1.R.Set(a);
};
_local3 = _arg1.R;
_arg1.position.x = (_arg1.position.x - ((_local3.col1.x * localCenter.x) + (_local3.col2.x * localCenter.y)));
_arg1.position.y = (_arg1.position.y - ((_local3.col1.y * localCenter.x) + (_local3.col2.y * localCenter.y)));
}
}
}//package Box2D.Common.Math
Section 33
//b2Vec2 (Box2D.Common.Math.b2Vec2)
package Box2D.Common.Math {
public class b2Vec2 {
public var x:Number;
public var y:Number;
public function b2Vec2(_arg1:Number=0, _arg2:Number=0):void{
x = _arg1;
y = _arg2;
}
public function Set(_arg1:Number=0, _arg2:Number=0):void{
x = _arg1;
y = _arg2;
}
public function Multiply(_arg1:Number):void{
x = (x * _arg1);
y = (y * _arg1);
}
public function Length():Number{
return (Math.sqrt(((x * x) + (y * y))));
}
public function LengthSquared():Number{
return (((x * x) + (y * y)));
}
public function SetZero():void{
x = 0;
y = 0;
}
public function Add(_arg1:b2Vec2):void{
x = (x + _arg1.x);
y = (y + _arg1.y);
}
public function (_arg1:b2Vec2):void{
x = ((x > _arg1.x)) ? x : _arg1.x;
y = ((y > _arg1.y)) ? y : _arg1.y;
}
public function SetV(_arg1:b2Vec2):void{
x = _arg1.x;
y = _arg1.y;
}
public function
():b2Vec2{
return (new b2Vec2(-(x), -(y)));
}
public function (_arg1:Number):void{
var _local2:Number;
_local2 = x;
x = (_arg1 * y);
y = (-(_arg1) * _local2);
}
public function Abs():void{
if (x < 0){
x = -(x);
};
if (y < 0){
y = -(y);
};
}
public function Copy():b2Vec2{
return (new b2Vec2(x, y));
}
public function (_arg1:b2Mat22):void{
var _local2:Number;
_local2 = b2Math.b2Dot(this, _arg1.col1);
y = b2Math.b2Dot(this, _arg1.col2);
x = _local2;
}
public function IsValid():Boolean{
return (((b2Math.b2IsValid(x)) && (b2Math.b2IsValid(y))));
}
public function (_arg1:b2Vec2):void{
x = ((x < _arg1.x)) ? x : _arg1.x;
y = ((y < _arg1.y)) ? y : _arg1.y;
}
public function (_arg1:b2Mat22):void{
var _local2:Number;
_local2 = x;
x = ((_arg1.col1.x * _local2) + (_arg1.col2.x * y));
y = ((_arg1.col1.y * _local2) + (_arg1.col2.y * y));
}
public function Normalize():Number{
var _local1:Number;
var _local2:Number;
_local1 = Math.sqrt(((x * x) + (y * y)));
if (_local1 < Number.MIN_VALUE){
return (0);
};
_local2 = (1 / _local1);
x = (x * _local2);
y = (y * _local2);
return (_local1);
}
public function (_arg1:b2Vec2):void{
x = (x - _arg1.x);
y = (y - _arg1.y);
}
public function (_arg1:Number):void{
var _local2:Number;
_local2 = x;
x = (-(_arg1) * y);
y = (_arg1 * _local2);
}
public static function Make(_arg1:Number, _arg2:Number):b2Vec2{
return (new b2Vec2(_arg1, _arg2));
}
}
}//package Box2D.Common.Math
Section 34
//b2XForm (Box2D.Common.Math.b2XForm)
package Box2D.Common.Math {
public class b2XForm {
public var R:b2Mat22;
public var position:b2Vec2;
public function b2XForm(_arg1:b2Vec2=null, _arg2:b2Mat22=null):void{
position = new b2Vec2();
R = new b2Mat22();
super();
if (_arg1){
position.SetV(_arg1);
R.SetM(_arg2);
};
}
public function Initialize(_arg1:b2Vec2, _arg2:b2Mat22):void{
position.SetV(_arg1);
R.SetM(_arg2);
}
public function Set(_arg1:b2XForm):void{
position.SetV(_arg1.position);
R.SetM(_arg1.R);
}
public function SetIdentity():void{
position.SetZero();
R.SetIdentity();
}
}
}//package Box2D.Common.Math
Section 35
//b2Color (Box2D.Common.b2Color)
package Box2D.Common {
import Box2D.Common.Math.*;
public class b2Color {
private var :uint;// = 0
private var :uint;// = 0
private var :uint;// = 0
public function b2Color(_arg1:Number, _arg2:Number, _arg3:Number){
= 0;
= 0;
= 0;
super();
= uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1)));
= uint((0xFF * b2Math.b2Clamp(_arg2, 0, 1)));
= uint((0xFF * b2Math.b2Clamp(_arg3, 0, 1)));
}
public function Set(_arg1:Number, _arg2:Number, _arg3:Number):void{
= uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1)));
= uint((0xFF * b2Math.b2Clamp(_arg2, 0, 1)));
= uint((0xFF * b2Math.b2Clamp(_arg3, 0, 1)));
}
public function get color():uint{
return ((( | ( << 8)) | ( << 16)));
}
public function set r(_arg1:Number):void{
= uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1)));
}
public function set b(_arg1:Number):void{
= uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1)));
}
public function set g(_arg1:Number):void{
= uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1)));
}
}
}//package Box2D.Common
Section 36
//b2Settings (Box2D.Common.b2Settings)
package Box2D.Common {
import Box2D.Common.Math.*;
public class b2Settings {
public static const b2_angularSleepTolerance:Number = 0.0111111111111111;
public static const b2_linearSleepTolerance:Number = 0.01;
public static const b2_angularSlop:Number = 0.0349065850398866;
public static const b2_linearSlop:Number = 0.005;
public static const b2_pi:Number = 3.14159265358979;
public static const b2_maxProxies:int = 0x0200;
public static const b2_maxAngularVelocitySquared:Number = 62500;
public static const b2_maxPolygonVertices:int = 8;
public static const b2_velocityThreshold:Number = 1;
public static const b2_contactBaumgarte:Number = 0.2;
public static const b2_maxPairs:int = 4096;
public static const b2_maxTOIContactsPerIsland:int = 32;
public static const b2_timeToSleep:Number = 0.5;
public static const b2_maxManifoldPoints:int = 2;
public static const b2_maxAngularVelocity:Number = 250;
public static const b2_maxAngularCorrection:Number = 0.139626340159546;
public static const USHRT_MAX:int = 0xFFFF;
public static const b2_maxLinearVelocity:Number = 200;
public static const b2_maxLinearCorrection:Number = 0.2;
public static const b2_toiSlop:Number = 0.04;
public static const b2_maxLinearVelocitySquared:Number = 40000;
public static function b2Assert(_arg1:Boolean):void{
var _local2:b2Vec2;
if (!_arg1){
_local2.x++;
};
}
}
}//package Box2D.Common
Section 37
//b2CircleContact (Box2D.Dynamics.Contacts.b2CircleContact)
package Box2D.Dynamics.Contacts {
import Box2D.Dynamics.*;
import Box2D.Collision.Shapes.*;
import Box2D.Common.Math.*;
import Box2D.Collision.*;
public class b2CircleContact extends b2Contact {
private var :Array;
private var :b2Manifold;
public var m_manifold:b2Manifold;
private static const s_evalCP:b2ContactPoint = new b2ContactPoint();
public function b2CircleContact(_arg1:b2Shape, _arg2:b2Shape){
var _local3:b2ManifoldPoint;
= [new b2Manifold()];
= new b2Manifold();
super(_arg1, _arg2);
m_manifold = [0];
m_manifold.pointCount = 0;
_local3 = m_manifold.points[0];
_local3.normalImpulse = 0;
_local3.tangentImpulse = 0;
}
override public function GetManifolds():Array{
return ();
}
override public function Evaluate(_arg1:b2ContactListener):void{
var _local2:b2Vec2;
var _local3:b2Vec2;
var _local4:b2ManifoldPoint;
var _local5:b2Body;
var _local6:b2Body;
var _local7:b2ContactPoint;
var _local8:b2ManifoldPoint;
_local5 = m_shape1.m_body;
_local6 = m_shape2.m_body;
.Set(m_manifold);
b2Collision.b2CollideCircles(m_manifold, (m_shape1 as b2CircleShape), _local5.m_xf, (m_shape2 as b2CircleShape), _local6.m_xf);
_local7 = s_evalCP;
_local7.shape1 = m_shape1;
_local7.shape2 = m_shape2;
_local7.friction = m_friction;
_local7.restitution = m_restitution;
if (m_manifold.pointCount > 0){
m_manifoldCount = 1;
_local8 = m_manifold.points[0];
if ( .pointCount == 0){
_local8.normalImpulse = 0;
_local8.tangentImpulse = 0;
if (_arg1){
_local7.position = _local5.GetWorldPoint(_local8.localPoint1);
_local2 = _local5.GetLinearVelocityFromLocalPoint(_local8.localPoint1);
_local3 = _local6.GetLinearVelocityFromLocalPoint(_local8.localPoint2);
_local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y));
_local7.normal.SetV(m_manifold.normal);
_local7.separation = _local8.separation;
_local7.id.key = _local8.id._key;
_arg1.Add(_local7);
};
} else {
_local4 = .points[0];
_local8.normalImpulse = _local4.normalImpulse;
_local8.tangentImpulse = _local4.tangentImpulse;
if (_arg1){
_local7.position = _local5.GetWorldPoint(_local8.localPoint1);
_local2 = _local5.GetLinearVelocityFromLocalPoint(_local8.localPoint1);
_local3 = _local6.GetLinearVelocityFromLocalPoint(_local8.localPoint2);
_local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y));
_local7.normal.SetV(m_manifold.normal);
_local7.separation = _local8.separation;
_local7.id.key = _local8.id._key;
_arg1.Persist(_local7);
};
};
} else {
m_manifoldCount = 0;
if (((( .pointCount > 0)) && (_arg1))){
_local4 = .points[0];
_local7.position = _local5.GetWorldPoint(_local4.localPoint1);
_local2 = _local5.GetLinearVelocityFromLocalPoint(_local4.localPoint1);
_local3 = _local6.GetLinearVelocityFromLocalPoint(_local4.localPoint2);
_local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y));
_local7.normal.SetV( .normal);
_local7.separation = _local4.separation;
_local7.id.key = _local4.id._key;
_arg1.Remove(_local7);
};
};
}
public static function Destroy(_arg1:b2Contact, _arg2):void{
}
public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{
return (new b2CircleContact(_arg1, _arg2));
}
}
}//package Box2D.Dynamics.Contacts
Section 38
//b2Contact (Box2D.Dynamics.Contacts.b2Contact)
package Box2D.Dynamics.Contacts {
import Box2D.Dynamics.*;
import Box2D.Collision.Shapes.*;
import Box2D.Common.Math.*;
import Box2D.Collision.*;
import Box2D.Common.*;
public class b2Contact {
public var m_shape1:b2Shape;
public var m_shape2:b2Shape;
public var m_prev:b2Contact;
public var m_toi:Number;
public var m_next:b2Contact;
public var m_friction:Number;
public var m_manifoldCount:int;
public var m_node1:b2ContactEdge;
public var m_node2:b2ContactEdge;
public var m_restitution:Number;
public var m_flags:uint;
public static var e_toiFlag:uint = 8;
public static var e_nonSolidFlag:uint = 1;
public static var e_slowFlag:uint = 2;
public static var e_islandFlag:uint = 4;
public static var s_registers:Array;
public static var s_initialized:Boolean = false;
public function b2Contact(_arg1:b2Shape=null, _arg2:b2Shape=null){
m_node1 = new b2ContactEdge();
m_node2 = new b2ContactEdge();
super();
m_flags = 0;
if (((!(_arg1)) || (!(_arg2)))){
m_shape1 = null;
m_shape2 = null;
return;
};
if (((_arg1.()) || (_arg2.()))){
m_flags = (m_flags | e_nonSolidFlag);
};
m_shape1 = _arg1;
m_shape2 = _arg2;
m_manifoldCount = 0;
m_friction = Math.sqrt((m_shape1.m_friction * m_shape2.m_friction));
m_restitution = b2Math.b2Max(m_shape1.m_restitution, m_shape2.m_restitution);
m_prev = null;
m_next = null;
m_node1.contact = null;
m_node1.prev = null;
m_node1.next = null;
m_node1.other = null;
m_node2.contact = null;
m_node2.prev = null;
m_node2.next = null;
m_node2.other = null;
}
public function ():b2Shape{
return (m_shape1);
}
public function ():Boolean{
return (((m_flags & e_nonSolidFlag) == 0));
}
public function GetNext():b2Contact{
return (m_next);
}
public function GetManifolds():Array{
return (null);
}
public function ():b2Shape{
return (m_shape2);
}
public function ():int{
return (m_manifoldCount);
}
public function Update(_arg1:b2ContactListener):void{
var _local2:int;
var _local3:int;
var _local4:b2Body;
var _local5:b2Body;
_local2 = m_manifoldCount;
Evaluate(_arg1);
_local3 = m_manifoldCount;
_local4 = m_shape1.m_body;
_local5 = m_shape2.m_body;
if ((((_local3 == 0)) && ((_local2 > 0)))){
_local4.WakeUp();
_local5.WakeUp();
};
if (((((((_local4.IsStatic()) || (_local4.IsBullet()))) || (_local5.IsStatic()))) || (_local5.IsBullet()))){
m_flags = (m_flags & ~(e_slowFlag));
} else {
m_flags = (m_flags | e_slowFlag);
};
}
public function Evaluate(_arg1:b2ContactListener):void{
}
public static function InitializeRegisters():void{
var _local1:int;
var _local2:int;
s_registers = new Array(b2Shape.e_shapeTypeCount);
_local1 = 0;
while (_local1 < b2Shape.e_shapeTypeCount) {
s_registers[_local1] = new Array(b2Shape.e_shapeTypeCount);
_local2 = 0;
while (_local2 < b2Shape.e_shapeTypeCount) {
s_registers[_local1][_local2] = new b2ContactRegister();
_local2++;
};
_local1++;
};
AddType(b2CircleContact.Create, b2CircleContact.Destroy, b2Shape.e_circleShape, b2Shape.e_circleShape);
AddType(b2PolyAndCircleContact.Create, b2PolyAndCircleContact.Destroy, b2Shape.e_polygonShape, b2Shape.e_circleShape);
AddType(b2PolygonContact.Create, b2PolygonContact.Destroy, b2Shape.e_polygonShape, b2Shape.e_polygonShape);
}
public static function Destroy(_arg1:b2Contact, _arg2):void{
var _local3:int;
var _local4:int;
var _local5:b2ContactRegister;
var _local6:Function;
if (_arg1.m_manifoldCount > 0){
_arg1.m_shape1.m_body.WakeUp();
_arg1.m_shape2.m_body.WakeUp();
};
_local3 = _arg1.m_shape1.m_type;
_local4 = _arg1.m_shape2.m_type;
_local5 = s_registers[_local3][_local4];
_local6 = _local5.destroyFcn;
_local6(_arg1, _arg2);
}
public static function AddType(_arg1:Function, _arg2:Function, _arg3:int, _arg4:int):void{
s_registers[_arg3][_arg4].createFcn = _arg1;
s_registers[_arg3][_arg4].destroyFcn = _arg2;
s_registers[_arg3][_arg4].primary = true;
if (_arg3 != _arg4){
s_registers[_arg4][_arg3].createFcn = _arg1;
s_registers[_arg4][_arg3].destroyFcn = _arg2;
s_registers[_arg4][_arg3].primary = false;
};
}
public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{
var _local4:int;
var _local5:int;
var _local6:b2ContactRegister;
var _local7:Function;
var _local8:b2Contact;
var _local9:int;
var _local10:b2Manifold;
if (s_initialized == false){
InitializeRegisters();
s_initialized = true;
};
_local4 = _arg1.m_type;
_local5 = _arg2.m_type;
_local6 = s_registers[_local4][_local5];
_local7 = _local6.createFcn;
if (_local7 != null){
if (_local6.primary){
return (_local7(_arg1, _arg2, _arg3));
};
_local8 = _local7(_arg2, _arg1, _arg3);
_local9 = 0;
while (_local9 < _local8.m_manifoldCount) {
_local10 = _local8.GetManifolds()[_local9];
_local8.GetManifolds()[_local9].normal = _local10.normal.
();
_local9++;
};
return (_local8);
//unresolved jump
};
return (null);
}
}
}//package Box2D.Dynamics.Contacts
Section 39
//b2ContactConstraint (Box2D.Dynamics.Contacts.b2ContactConstraint)
package Box2D.Dynamics.Contacts {
import Box2D.Dynamics.*;
import Box2D.Common.Math.*;
import Box2D.Collision.*;
import Box2D.Common.*;
public class b2ContactConstraint {
public var points:Array;
public var restitution:Number;
public var body1:b2Body;
public var manifold:b2Manifold;
public var normal:b2Vec2;
public var body2:b2Body;
public var friction:Number;
public var pointCount:int;
public function b2ContactConstraint(){
var _local1:int;
normal = new b2Vec2();
super();
points = new Array(b2Settings.b2_maxManifoldPoints);
_local1 = 0;
while (_local1 < b2Settings.b2_maxManifoldPoints) {
points[_local1] = new b2ContactConstraintPoint();
_local1++;
};
}
}
}//package Box2D.Dynamics.Contacts
Section 40
//b2ContactConstraintPoint (Box2D.Dynamics.Contacts.b2ContactConstraintPoint)
package Box2D.Dynamics.Contacts {
import Box2D.Common.Math.*;
public class b2ContactConstraintPoint {
public var r2:b2Vec2;
public var separation:Number;
public var positionImpulse:Number;
public var normalImpulse:Number;
public var equalizedMass:Number;
public var tangentMass:Number;
public var tangentImpulse:Number;
public var localAnchor1:b2Vec2;
public var localAnchor2:b2Vec2;
public var normalMass:Number;
public var velocityBias:Number;
public var r1:b2Vec2;
public function b2ContactConstraintPoint(){
localAnchor1 = new b2Vec2();
localAnchor2 = new b2Vec2();
r1 = new b2Vec2();
r2 = new b2Vec2();
super();
}
}
}//package Box2D.Dynamics.Contacts
Section 41
//b2ContactEdge (Box2D.Dynamics.Contacts.b2ContactEdge)
package Box2D.Dynamics.Contacts {
import Box2D.Dynamics.*;
public class b2ContactEdge {
public var next:b2ContactEdge;
public var other:b2Body;
public var contact:b2Contact;
public var prev:b2ContactEdge;
}
}//package Box2D.Dynamics.Contacts
Section 42
//b2ContactRegister (Box2D.Dynamics.Contacts.b2ContactRegister)
package Box2D.Dynamics.Contacts {
public class b2ContactRegister {
public var primary:Boolean;
public var createFcn:Function;
public var destroyFcn:Function;
}
}//package Box2D.Dynamics.Contacts
Section 43
//b2ContactResult (Box2D.Dynamics.Contacts.b2ContactResult)
package Box2D.Dynamics.Contacts {
import Box2D.Collision.Shapes.*;
import Box2D.Common.Math.*;
import Box2D.Collision.*;
public class b2ContactResult {
public var normal:b2Vec2;
public var position:b2Vec2;
public var shape1:b2Shape;
public var shape2:b2Shape;
public var normalImpulse:Number;
public var tangentImpulse:Number;
public var id:b2ContactID;
public function b2ContactResult(){
position = new b2Vec2();
normal = new b2Vec2();
id = new b2ContactID();
super();
}
}
}//package Box2D.Dynamics.Contacts
Section 44
//b2ContactSolver (Box2D.Dynamics.Contacts.b2ContactSolver)
package Box2D.Dynamics.Contacts {
import Box2D.Dynamics.*;
import Box2D.Common.Math.*;
import Box2D.Collision.*;
import Box2D.Common.*;
public class b2ContactSolver {
public var :int;
public var m_constraints:Array;
public var m_allocator;
public var :b2TimeStep;
public function b2ContactSolver(_arg1:b2TimeStep, _arg2:Array, _arg3:int, _arg4){
var _local5:b2Contact;
var _local6:int;
var _local7:b2Vec2;
var _local8:b2Mat22;
var _local9:int;
var _local10:b2Body;
var _local11:b2Body;
var _local12:int;
var _local13:Array;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:int;
var _local23:b2Manifold;
var _local24:Number;
var _local25:Number;
var _local26:b2ContactConstraint;
var _local27:uint;
var _local28:b2ManifoldPoint;
var _local29:b2ContactConstraintPoint;
var _local30:Number;
var _local31:Number;
var _local32:Number;
var _local33:Number;
var _local34:Number;
var _local35:Number;
var _local36:Number;
var _local37:Number;
var _local38:Number;
var _local39:Number;
var _local40:Number;
var _local41:Number;
var _local42:Number;
var _local43:Number;
var _local44:Number;
var _local45:Number;
var _local46:Number;
var _local47:Number;
= new b2TimeStep();
m_constraints = new Array();
super();
.dt = _arg1.dt;
.inv_dt = _arg1.inv_dt;
.maxIterations = _arg1.maxIterations;
m_allocator = _arg4;
= 0;
_local6 = 0;
while (_local6 < _arg3) {
_local5 = _arg2[_local6];
= ( + _local5.m_manifoldCount);
_local6++;
};
_local6 = 0;
while (_local6 < ) {
m_constraints[_local6] = new b2ContactConstraint();
_local6++;
};
_local9 = 0;
_local6 = 0;
while (_local6 < _arg3) {
_local5 = _arg2[_local6];
_local10 = _local5.m_shape1.m_body;
_local11 = _local5.m_shape2.m_body;
_local12 = _local5.m_manifoldCount;
_local13 = _local5.GetManifolds();
_local14 = _local5.m_friction;
_local15 = _local5.m_restitution;
_local16 = _local10.m_linearVelocity.x;
_local17 = _local10.m_linearVelocity.y;
_local18 = _local11.m_linearVelocity.x;
_local19 = _local11.m_linearVelocity.y;
_local20 = _local10.m_angularVelocity;
_local21 = _local11.m_angularVelocity;
_local22 = 0;
while (_local22 < _local12) {
_local23 = _local13[_local22];
_local24 = _local23.normal.x;
_local25 = _local23.normal.y;
_local26 = m_constraints[_local9];
_local26.body1 = _local10;
_local26.body2 = _local11;
_local26.manifold = _local23;
_local26.normal.x = _local24;
_local26.normal.y = _local25;
_local26.pointCount = _local23.pointCount;
_local26.friction = _local14;
_local26.restitution = _local15;
_local27 = 0;
while (_local27 < _local26.pointCount) {
_local28 = _local23.points[_local27];
_local29 = _local26.points[_local27];
_local29.normalImpulse = _local28.normalImpulse;
_local29.tangentImpulse = _local28.tangentImpulse;
_local29.separation = _local28.separation;
_local29.positionImpulse = 0;
_local29.localAnchor1.SetV(_local28.localPoint1);
_local29.localAnchor2.SetV(_local28.localPoint2);
_local8 = _local10.m_xf.R;
_local32 = (_local28.localPoint1.x - _local10.m_sweep.localCenter.x);
_local33 = (_local28.localPoint1.y - _local10.m_sweep.localCenter.y);
_local30 = ((_local8.col1.x * _local32) + (_local8.col2.x * _local33));
_local33 = ((_local8.col1.y * _local32) + (_local8.col2.y * _local33));
_local32 = _local30;
_local29.r1.Set(_local32, _local33);
_local8 = _local11.m_xf.R;
_local34 = (_local28.localPoint2.x - _local11.m_sweep.localCenter.x);
_local35 = (_local28.localPoint2.y - _local11.m_sweep.localCenter.y);
_local30 = ((_local8.col1.x * _local34) + (_local8.col2.x * _local35));
_local35 = ((_local8.col1.y * _local34) + (_local8.col2.y * _local35));
_local34 = _local30;
_local29.r2.Set(_local34, _local35);
_local36 = ((_local32 * _local32) + (_local33 * _local33));
_local37 = ((_local34 * _local34) + (_local35 * _local35));
_local38 = ((_local32 * _local24) + (_local33 * _local25));
_local39 = ((_local34 * _local24) + (_local35 * _local25));
_local40 = (_local10.m_invMass + _local11.m_invMass);
_local40 = (_local40 + ((_local10.m_invI * (_local36 - (_local38 * _local38))) + (_local11.m_invI * (_local37 - (_local39 * _local39)))));
_local29.normalMass = (1 / _local40);
_local41 = ((_local10.m_mass * _local10.m_invMass) + (_local11.m_mass * _local11.m_invMass));
_local41 = (_local41 + (((_local10.m_mass * _local10.m_invI) * (_local36 - (_local38 * _local38))) + ((_local11.m_mass * _local11.m_invI) * (_local37 - (_local39 * _local39)))));
_local29.equalizedMass = (1 / _local41);
_local42 = _local25;
_local43 = -(_local24);
_local44 = ((_local32 * _local42) + (_local33 * _local43));
_local45 = ((_local34 * _local42) + (_local35 * _local43));
_local46 = (_local10.m_invMass + _local11.m_invMass);
_local46 = (_local46 + ((_local10.m_invI * (_local36 - (_local44 * _local44))) + (_local11.m_invI * (_local37 - (_local45 * _local45)))));
_local29.tangentMass = (1 / _local46);
_local29.velocityBias = 0;
if (_local29.separation > 0){
_local29.velocityBias = (-60 * _local29.separation);
};
_local30 = (((_local18 + (-(_local21) * _local35)) - _local16) - (-(_local20) * _local33));
_local31 = (((_local19 + (_local21 * _local34)) - _local17) - (_local20 * _local32));
_local47 = ((_local26.normal.x * _local30) + (_local26.normal.y * _local31));
if (_local47 < -(b2Settings.b2_velocityThreshold)){
_local29.velocityBias = (_local29.velocityBias + (-(_local26.restitution) * _local47));
};
_local27++;
};
_local9++;
_local22++;
};
_local6++;
};
}
public function InitVelocityConstraints(_arg1:b2TimeStep):void{
var _local2:b2Vec2;
var _local3:b2Vec2;
var _local4:b2Mat22;
var _local5:int;
var _local6:b2ContactConstraint;
var _local7:b2Body;
var _local8:b2Body;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:int;
var _local19:int;
var _local20:b2ContactConstraintPoint;
var _local21:Number;
var _local22:Number;
var _local23:b2ContactConstraintPoint;
_local5 = 0;
while (_local5 < ) {
_local6 = m_constraints[_local5];
_local7 = _local6.body1;
_local8 = _local6.body2;
_local9 = _local7.m_invMass;
_local10 = _local7.m_invI;
_local11 = _local8.m_invMass;
_local12 = _local8.m_invI;
_local13 = _local6.normal.x;
_local14 = _local6.normal.y;
_local15 = _local14;
_local16 = -(_local13);
if (_arg1.warmStarting){
_local19 = _local6.pointCount;
_local18 = 0;
while (_local18 < _local19) {
_local20 = _local6.points[_local18];
_local6.points[_local18].normalImpulse = (_local20.normalImpulse * _arg1.dtRatio);
_local20.tangentImpulse = (_local20.tangentImpulse * _arg1.dtRatio);
_local21 = ((_local20.normalImpulse * _local13) + (_local20.tangentImpulse * _local15));
_local22 = ((_local20.normalImpulse * _local14) + (_local20.tangentImpulse * _local16));
_local7.m_angularVelocity = (_local7.m_angularVelocity - (_local10 * ((_local20.r1.x * _local22) - (_local20.r1.y * _local21))));
_local7.m_linearVelocity.x = (_local7.m_linearVelocity.x - (_local9 * _local21));
_local7.m_linearVelocity.y = (_local7.m_linearVelocity.y - (_local9 * _local22));
_local8.m_angularVelocity = (_local8.m_angularVelocity + (_local12 * ((_local20.r2.x * _local22) - (_local20.r2.y * _local21))));
_local8.m_linearVelocity.x = (_local8.m_linearVelocity.x + (_local11 * _local21));
_local8.m_linearVelocity.y = (_local8.m_linearVelocity.y + (_local11 * _local22));
_local18++;
};
} else {
_local19 = _local6.pointCount;
_local18 = 0;
while (_local18 < _local19) {
_local23 = _local6.points[_local18];
_local23.normalImpulse = 0;
_local23.tangentImpulse = 0;
_local18++;
};
};
_local5++;
};
}
public function SolvePositionConstraints(_arg1:Number):Boolean{
var _local2:Number;
var _local3:b2Mat22;
var _local4:b2Vec2;
var _local5:int;
var _local6:b2ContactConstraint;
var _local7:b2Body;
var _local8:b2Body;
var _local9:b2Vec2;
var _local10:Number;
var _local11:b2Vec2;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:int;
var _local20:int;
var _local21:b2ContactConstraintPoint;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
var _local26:Number;
var _local27:Number;
var _local28:Number;
var _local29:Number;
var _local30:Number;
var _local31:Number;
var _local32:Number;
var _local33:Number;
var _local34:Number;
var _local35:Number;
var _local36:Number;
var _local37:Number;
var _local38:Number;
_local2 = 0;
_local5 = 0;
while (_local5 < ) {
_local6 = m_constraints[_local5];
_local7 = _local6.body1;
_local8 = _local6.body2;
_local9 = _local7.m_sweep.c;
_local10 = _local7.m_sweep.a;
_local11 = _local8.m_sweep.c;
_local12 = _local8.m_sweep.a;
_local13 = (_local7.m_mass * _local7.m_invMass);
_local14 = (_local7.m_mass * _local7.m_invI);
_local15 = (_local8.m_mass * _local8.m_invMass);
_local16 = (_local8.m_mass * _local8.m_invI);
_local17 = _local6.normal.x;
_local18 = _local6.normal.y;
_local19 = _local6.pointCount;
_local20 = 0;
while (_local20 < _local19) {
_local21 = _local6.points[_local20];
_local3 = _local7.m_xf.R;
_local4 = _local7.m_sweep.localCenter;
_local22 = (_local21.localAnchor1.x - _local4.x);
_local23 = (_local21.localAnchor1.y - _local4.y);
_local26 = ((_local3.col1.x * _local22) + (_local3.col2.x * _local23));
_local23 = ((_local3.col1.y * _local22) + (_local3.col2.y * _local23));
_local22 = _local26;
_local3 = _local8.m_xf.R;
_local4 = _local8.m_sweep.localCenter;
_local24 = (_local21.localAnchor2.x - _local4.x);
_local25 = (_local21.localAnchor2.y - _local4.y);
_local26 = ((_local3.col1.x * _local24) + (_local3.col2.x * _local25));
_local25 = ((_local3.col1.y * _local24) + (_local3.col2.y * _local25));
_local24 = _local26;
_local27 = (_local9.x + _local22);
_local28 = (_local9.y + _local23);
_local29 = (_local11.x + _local24);
_local30 = (_local11.y + _local25);
_local31 = (_local29 - _local27);
_local32 = (_local30 - _local28);
_local33 = (((_local31 * _local17) + (_local32 * _local18)) + _local21.separation);
_local2 = b2Math.b2Min(_local2, _local33);
_local34 = (_arg1 * b2Math.b2Clamp((_local33 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0));
_local35 = (-(_local21.equalizedMass) * _local34);
_local36 = _local21.positionImpulse;
_local21.positionImpulse = b2Math.b2Max((_local36 + _local35), 0);
_local35 = (_local21.positionImpulse - _local36);
_local37 = (_local35 * _local17);
_local38 = (_local35 * _local18);
_local9.x = (_local9.x - (_local13 * _local37));
_local9.y = (_local9.y - (_local13 * _local38));
_local10 = (_local10 - (_local14 * ((_local22 * _local38) - (_local23 * _local37))));
_local7.m_sweep.a = _local10;
_local7.SynchronizeTransform();
_local11.x = (_local11.x + (_local15 * _local37));
_local11.y = (_local11.y + (_local15 * _local38));
_local12 = (_local12 + (_local16 * ((_local24 * _local38) - (_local25 * _local37))));
_local8.m_sweep.a = _local12;
_local8.SynchronizeTransform();
_local20++;
};
_local5++;
};
return ((_local2 >= (-1.5 * b2Settings.b2_linearSlop)));
}
public function SolveVelocityConstraints():void{
var _local1:int;
var _local2:b2ContactConstraintPoint;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:b2Mat22;
var _local18:b2Vec2;
var _local19:int;
var _local20:b2ContactConstraint;
var _local21:b2Body;
var _local22:b2Body;
var _local23:Number;
var _local24:Number;
var _local25:b2Vec2;
var _local26:b2Vec2;
var _local27:Number;
var _local28:Number;
var _local29:Number;
var _local30:Number;
var _local31:Number;
var _local32:Number;
var _local33:Number;
var _local34:Number;
var _local35:Number;
var _local36:Number;
var _local37:int;
var _local38:Number;
_local19 = 0;
while (_local19 < ) {
_local20 = m_constraints[_local19];
_local21 = _local20.body1;
_local22 = _local20.body2;
_local23 = _local21.m_angularVelocity;
_local24 = _local22.m_angularVelocity;
_local25 = _local21.m_linearVelocity;
_local26 = _local22.m_linearVelocity;
_local27 = _local21.m_invMass;
_local28 = _local21.m_invI;
_local29 = _local22.m_invMass;
_local30 = _local22.m_invI;
_local31 = _local20.normal.x;
_local32 = _local20.normal.y;
_local33 = _local32;
_local34 = -(_local31);
_local35 = _local20.friction;
_local37 = _local20.pointCount;
_local1 = 0;
while (_local1 < _local37) {
_local2 = _local20.points[_local1];
_local7 = (((_local26.x + (-(_local24) * _local2.r2.y)) - _local25.x) - (-(_local23) * _local2.r1.y));
_local8 = (((_local26.y + (_local24 * _local2.r2.x)) - _local25.y) - (_local23 * _local2.r1.x));
_local9 = ((_local7 * _local31) + (_local8 * _local32));
_local11 = (-(_local2.normalMass) * (_local9 - _local2.velocityBias));
_local10 = ((_local7 * _local33) + (_local8 * _local34));
_local12 = (_local2.tangentMass * -(_local10));
_local13 = b2Math.b2Max((_local2.normalImpulse + _local11), 0);
_local11 = (_local13 - _local2.normalImpulse);
_local38 = (_local35 * _local2.normalImpulse);
_local14 = b2Math.b2Clamp((_local2.tangentImpulse + _local12), -(_local38), _local38);
_local12 = (_local14 - _local2.tangentImpulse);
_local15 = ((_local11 * _local31) + (_local12 * _local33));
_local16 = ((_local11 * _local32) + (_local12 * _local34));
_local25.x = (_local25.x - (_local27 * _local15));
_local25.y = (_local25.y - (_local27 * _local16));
_local23 = (_local23 - (_local28 * ((_local2.r1.x * _local16) - (_local2.r1.y * _local15))));
_local26.x = (_local26.x + (_local29 * _local15));
_local26.y = (_local26.y + (_local29 * _local16));
_local24 = (_local24 + (_local30 * ((_local2.r2.x * _local16) - (_local2.r2.y * _local15))));
_local2.normalImpulse = _local13;
_local2.tangentImpulse = _local14;
_local1++;
};
_local21.m_angularVelocity = _local23;
_local22.m_angularVelocity = _local24;
_local19++;
};
}
public function FinalizeVelocityConstraints():void{
var _local1:int;
var _local2:b2ContactConstraint;
var _local3:b2Manifold;
var _local4:int;
var _local5:b2ManifoldPoint;
var _local6:b2ContactConstraintPoint;
_local1 = 0;
while (_local1 < ) {
_local2 = m_constraints[_local1];
_local3 = _local2.manifold;
_local4 = 0;
while (_local4 < _local2.pointCount) {
_local5 = _local3.points[_local4];
_local6 = _local2.points[_local4];
_local5.normalImpulse = _local6.normalImpulse;
_local5.tangentImpulse = _local6.tangentImpulse;
_local4++;
};
_local1++;
};
}
}
}//package Box2D.Dynamics.Contacts
Section 45
//b2NullContact (Box2D.Dynamics.Contacts.b2NullContact)
package Box2D.Dynamics.Contacts {
import Box2D.Dynamics.*;
public class b2NullContact extends b2Contact {
override public function GetManifolds():Array{
return (null);
}
override public function Evaluate(_arg1:b2ContactListener):void{
}
}
}//package Box2D.Dynamics.Contacts
Section 46
//b2PolyAndCircleContact (Box2D.Dynamics.Contacts.b2PolyAndCircleContact)
package Box2D.Dynamics.Contacts {
import Box2D.Dynamics.*;
import Box2D.Collision.Shapes.*;
import Box2D.Common.Math.*;
import Box2D.Collision.*;
import Box2D.Common.*;
public class b2PolyAndCircleContact extends b2Contact {
private var :Array;
private var :b2Manifold;
public var m_manifold:b2Manifold;
private static const s_evalCP:b2ContactPoint = new b2ContactPoint();
public function b2PolyAndCircleContact(_arg1:b2Shape, _arg2:b2Shape){
var _local3:b2ManifoldPoint;
= [new b2Manifold()];
= new b2Manifold();
super(_arg1, _arg2);
m_manifold = [0];
b2Settings.b2Assert((m_shape1.m_type == b2Shape.e_polygonShape));
b2Settings.b2Assert((m_shape2.m_type == b2Shape.e_circleShape));
m_manifold.pointCount = 0;
_local3 = m_manifold.points[0];
_local3.normalImpulse = 0;
_local3.tangentImpulse = 0;
}
override public function GetManifolds():Array{
return ();
}
override public function Evaluate(_arg1:b2ContactListener):void{
var _local2:int;
var _local3:b2Vec2;
var _local4:b2Vec2;
var _local5:b2ManifoldPoint;
var _local6:b2Body;
var _local7:b2Body;
var _local8:Array;
var _local9:b2ContactPoint;
var _local10:b2ManifoldPoint;
var _local11:Boolean;
var _local12:uint;
var _local13:int;
_local6 = m_shape1.m_body;
_local7 = m_shape2.m_body;
.Set(m_manifold);
b2Collision.b2CollidePolygonAndCircle(m_manifold, (m_shape1 as b2PolygonShape), _local6.m_xf, (m_shape2 as b2CircleShape), _local7.m_xf);
_local8 = [false, false];
_local9 = s_evalCP;
_local9.shape1 = m_shape1;
_local9.shape2 = m_shape2;
_local9.friction = m_friction;
_local9.restitution = m_restitution;
if (m_manifold.pointCount > 0){
_local2 = 0;
while (_local2 < m_manifold.pointCount) {
_local10 = m_manifold.points[_local2];
_local10.normalImpulse = 0;
_local10.tangentImpulse = 0;
_local11 = false;
_local12 = _local10.id._key;
_local13 = 0;
while (_local13 < .pointCount) {
if (_local8[_local13] == true){
} else {
_local5 = .points[_local13];
if (_local5.id._key == _local12){
_local8[_local13] = true;
_local10.normalImpulse = _local5.normalImpulse;
_local10.tangentImpulse = _local5.tangentImpulse;
_local11 = true;
if (_arg1 != null){
_local9.position = _local6.GetWorldPoint(_local10.localPoint1);
_local3 = _local6.GetLinearVelocityFromLocalPoint(_local10.localPoint1);
_local4 = _local7.GetLinearVelocityFromLocalPoint(_local10.localPoint2);
_local9.velocity.Set((_local4.x - _local3.x), (_local4.y - _local3.y));
_local9.normal.SetV(m_manifold.normal);
_local9.separation = _local10.separation;
_local9.id.key = _local12;
_arg1.Persist(_local9);
};
break;
};
};
_local13++;
};
if ((((_local11 == false)) && (!((_arg1 == null))))){
_local9.position = _local6.GetWorldPoint(_local10.localPoint1);
_local3 = _local6.GetLinearVelocityFromLocalPoint(_local10.localPoint1);
_local4 = _local7.GetLinearVelocityFromLocalPoint(_local10.localPoint2);
_local9.velocity.Set((_local4.x - _local3.x), (_local4.y - _local3.y));
_local9.normal.SetV(m_manifold.normal);
_local9.separation = _local10.separation;
_local9.id.key = _local12;
_arg1.Add(_local9);
};
_local2++;
};
m_manifoldCount = 1;
} else {
m_manifoldCount = 0;
};
if (_arg1 == null){
return;
};
_local2 = 0;
while (_local2 < .pointCount) {
if (_local8[_local2]){
} else {
_local5 = .points[_local2];
_local9.position = _local6.GetWorldPoint(_local5.localPoint1);
_local3 = _local6.GetLinearVelocityFromLocalPoint(_local5.localPoint1);
_local4 = _local7.GetLinearVelocityFromLocalPoint(_local5.localPoint2);
_local9.velocity.Set((_local4.x - _local3.x), (_local4.y - _local3.y));
_local9.normal.SetV( .normal);
_local9.separation = _local5.separation;
_local9.id.key = _local5.id._key;
_arg1.Remove(_local9);
};
_local2++;
};
}
public static function Destroy(_arg1:b2Contact, _arg2):void{
}
public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{
return (new b2PolyAndCircleContact(_arg1, _arg2));
}
}
}//package Box2D.Dynamics.Contacts
Section 47
//b2PolygonContact (Box2D.Dynamics.Contacts.b2PolygonContact)
package Box2D.Dynamics.Contacts {
import Box2D.Dynamics.*;
import Box2D.Collision.Shapes.*;
import Box2D.Common.Math.*;
import Box2D.Collision.*;
public class b2PolygonContact extends b2Contact {
private var :Array;
private var :b2Manifold;
public var m_manifold:b2Manifold;
private static const s_evalCP:b2ContactPoint = new b2ContactPoint();
public function b2PolygonContact(_arg1:b2Shape, _arg2:b2Shape):void{
= new b2Manifold();
= [new b2Manifold()];
super(_arg1, _arg2);
m_manifold = [0];
m_manifold.pointCount = 0;
}
override public function GetManifolds():Array{
return ();
}
override public function Evaluate(_arg1:b2ContactListener):void{
var _local2:b2Vec2;
var _local3:b2Vec2;
var _local4:b2ManifoldPoint;
var _local5:b2Body;
var _local6:b2Body;
var _local7:b2ContactPoint;
var _local8:int;
var _local9:Array;
var _local10:b2ManifoldPoint;
var _local11:Boolean;
var _local12:uint;
var _local13:int;
_local5 = m_shape1.m_body;
_local6 = m_shape2.m_body;
.Set(m_manifold);
b2Collision.b2CollidePolygons(m_manifold, (m_shape1 as b2PolygonShape), _local5.m_xf, (m_shape2 as b2PolygonShape), _local6.m_xf);
_local9 = [false, false];
_local7 = s_evalCP;
_local7.shape1 = m_shape1;
_local7.shape2 = m_shape2;
_local7.friction = m_friction;
_local7.restitution = m_restitution;
if (m_manifold.pointCount > 0){
_local8 = 0;
while (_local8 < m_manifold.pointCount) {
_local10 = m_manifold.points[_local8];
_local10.normalImpulse = 0;
_local10.tangentImpulse = 0;
_local11 = false;
_local12 = _local10.id._key;
_local13 = 0;
while (_local13 < .pointCount) {
if (_local9[_local13] == true){
} else {
_local4 = .points[_local13];
if (_local4.id._key == _local12){
_local9[_local13] = true;
_local10.normalImpulse = _local4.normalImpulse;
_local10.tangentImpulse = _local4.tangentImpulse;
_local11 = true;
if (_arg1 != null){
_local7.position = _local5.GetWorldPoint(_local10.localPoint1);
_local2 = _local5.GetLinearVelocityFromLocalPoint(_local10.localPoint1);
_local3 = _local6.GetLinearVelocityFromLocalPoint(_local10.localPoint2);
_local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y));
_local7.normal.SetV(m_manifold.normal);
_local7.separation = _local10.separation;
_local7.id.key = _local12;
_arg1.Persist(_local7);
};
break;
};
};
_local13++;
};
if ((((_local11 == false)) && (!((_arg1 == null))))){
_local7.position = _local5.GetWorldPoint(_local10.localPoint1);
_local2 = _local5.GetLinearVelocityFromLocalPoint(_local10.localPoint1);
_local3 = _local6.GetLinearVelocityFromLocalPoint(_local10.localPoint2);
_local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y));
_local7.normal.SetV(m_manifold.normal);
_local7.separation = _local10.separation;
_local7.id.key = _local12;
_arg1.Add(_local7);
};
_local8++;
};
m_manifoldCount = 1;
} else {
m_manifoldCount = 0;
};
if (_arg1 == null){
return;
};
_local8 = 0;
while (_local8 < .pointCount) {
if (_local9[_local8]){
} else {
_local4 = .points[_local8];
_local7.position = _local5.GetWorldPoint(_local4.localPoint1);
_local2 = _local5.GetLinearVelocityFromLocalPoint(_local4.localPoint1);
_local3 = _local6.GetLinearVelocityFromLocalPoint(_local4.localPoint2);
_local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y));
_local7.normal.SetV( .normal);
_local7.separation = _local4.separation;
_local7.id.key = _local4.id._key;
_arg1.Remove(_local7);
};
_local8++;
};
}
public static function Destroy(_arg1:b2Contact, _arg2):void{
}
public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{
return (new b2PolygonContact(_arg1, _arg2));
}
}
}//package Box2D.Dynamics.Contacts
Section 48
//b2DistanceJoint (Box2D.Dynamics.Joints.b2DistanceJoint)
package Box2D.Dynamics.Joints {
import Box2D.Dynamics.*;
import Box2D.Common.Math.*;
import Box2D.Common.*;
public class b2DistanceJoint extends b2Joint {
public var m_mass:Number;
public var :b2Vec2;
public var m_impulse:Number;
public var :Number;
public var :Number;
public var m_localAnchor2:b2Vec2;
public var m_localAnchor1:b2Vec2;
public var
:Number;
public var m_gamma:Number;
public var :Number;
public function b2DistanceJoint(_arg1:b2DistanceJointDef){
var _local2:b2Mat22;
var _local3:Number;
var _local4:Number;
m_localAnchor1 = new b2Vec2();
m_localAnchor2 = new b2Vec2();
= new b2Vec2();
super(_arg1);
m_localAnchor1.SetV(_arg1.localAnchor1);
m_localAnchor2.SetV(_arg1.localAnchor2);
= _arg1.length;
= _arg1.frequencyHz;
= _arg1.dampingRatio;
m_impulse = 0;
m_gamma = 0;
= 0;
m_inv_dt = 0;
}
override public function GetAnchor1():b2Vec2{
return (m_body1.GetWorldPoint(m_localAnchor1));
}
override public function GetAnchor2():b2Vec2{
return (m_body2.GetWorldPoint(m_localAnchor2));
}
override public function GetReactionForce():b2Vec2{
var _local1:b2Vec2;
_local1 = new b2Vec2();
_local1.SetV();
_local1.Multiply((m_inv_dt * m_impulse));
return (_local1);
}
override public function SolvePositionConstraints():Boolean{
var _local1:b2Mat22;
var _local2:b2Body;
var _local3:b2Body;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
if ( > 0){
return (true);
};
_local2 = m_body1;
_local3 = m_body2;
_local1 = _local2.m_xf.R;
_local4 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x);
_local5 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y);
_local6 = ((_local1.col1.x * _local4) + (_local1.col2.x * _local5));
_local5 = ((_local1.col1.y * _local4) + (_local1.col2.y * _local5));
_local4 = _local6;
_local1 = _local3.m_xf.R;
_local7 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x);
_local8 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y);
_local6 = ((_local1.col1.x * _local7) + (_local1.col2.x * _local8));
_local8 = ((_local1.col1.y * _local7) + (_local1.col2.y * _local8));
_local7 = _local6;
_local9 = (((_local3.m_sweep.c.x + _local7) - _local2.m_sweep.c.x) - _local4);
_local10 = (((_local3.m_sweep.c.y + _local8) - _local2.m_sweep.c.y) - _local5);
_local11 = Math.sqrt(((_local9 * _local9) + (_local10 * _local10)));
_local9 = (_local9 / _local11);
_local10 = (_local10 / _local11);
_local12 = (_local11 - );
_local12 = b2Math.b2Clamp(_local12, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection);
_local13 = (-(m_mass) * _local12);
.Set(_local9, _local10);
_local14 = (_local13 * .x);
_local15 = (_local13 * .y);
_local2.m_sweep.c.x = (_local2.m_sweep.c.x - (_local2.m_invMass * _local14));
_local2.m_sweep.c.y = (_local2.m_sweep.c.y - (_local2.m_invMass * _local15));
_local2.m_sweep.a = (_local2.m_sweep.a - (_local2.m_invI * ((_local4 * _local15) - (_local5 * _local14))));
_local3.m_sweep.c.x = (_local3.m_sweep.c.x + (_local3.m_invMass * _local14));
_local3.m_sweep.c.y = (_local3.m_sweep.c.y + (_local3.m_invMass * _local15));
_local3.m_sweep.a = (_local3.m_sweep.a + (_local3.m_invI * ((_local7 * _local15) - (_local8 * _local14))));
_local2.SynchronizeTransform();
_local3.SynchronizeTransform();
return ((b2Math.b2Abs(_local12) < b2Settings.b2_linearSlop));
}
override public function InitVelocityConstraints(_arg1:b2TimeStep):void{
var _local2:b2Mat22;
var _local3:Number;
var _local4:b2Body;
var _local5:b2Body;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
m_inv_dt = _arg1.inv_dt;
_local4 = m_body1;
_local5 = m_body2;
_local2 = _local4.m_xf.R;
_local6 = (m_localAnchor1.x - _local4.m_sweep.localCenter.x);
_local7 = (m_localAnchor1.y - _local4.m_sweep.localCenter.y);
_local3 = ((_local2.col1.x * _local6) + (_local2.col2.x * _local7));
_local7 = ((_local2.col1.y * _local6) + (_local2.col2.y * _local7));
_local6 = _local3;
_local2 = _local5.m_xf.R;
_local8 = (m_localAnchor2.x - _local5.m_sweep.localCenter.x);
_local9 = (m_localAnchor2.y - _local5.m_sweep.localCenter.y);
_local3 = ((_local2.col1.x * _local8) + (_local2.col2.x * _local9));
_local9 = ((_local2.col1.y * _local8) + (_local2.col2.y * _local9));
_local8 = _local3;
.x = (((_local5.m_sweep.c.x + _local8) - _local4.m_sweep.c.x) - _local6);
.y = (((_local5.m_sweep.c.y + _local9) - _local4.m_sweep.c.y) - _local7);
_local10 = Math.sqrt(((.x * .x) + (.y * .y)));
if (_local10 > b2Settings.b2_linearSlop){
.Multiply((1 / _local10));
} else {
.SetZero();
};
_local11 = ((_local6 * .y) - (_local7 * .x));
_local12 = ((_local8 * .y) - (_local9 * .x));
_local13 = (((_local4.m_invMass + ((_local4.m_invI * _local11) * _local11)) + _local5.m_invMass) + ((_local5.m_invI * _local12) * _local12));
m_mass = (1 / _local13);
if ( > 0){
_local14 = (_local10 - );
_local15 = ((2 * Math.PI) * );
_local16 = (((2 * m_mass) * ) * _local15);
_local17 = ((m_mass * _local15) * _local15);
m_gamma = (1 / (_arg1.dt * (_local16 + (_arg1.dt * _local17))));
= (((_local14 * _arg1.dt) * _local17) * m_gamma);
m_mass = (1 / (_local13 + m_gamma));
};
if (_arg1.warmStarting){
m_impulse = (m_impulse * _arg1.dtRatio);
_local18 = (m_impulse * .x);
_local19 = (m_impulse * .y);
_local4.m_linearVelocity.x = (_local4.m_linearVelocity.x - (_local4.m_invMass * _local18));
_local4.m_linearVelocity.y = (_local4.m_linearVelocity.y - (_local4.m_invMass * _local19));
_local4.m_angularVelocity = (_local4.m_angularVelocity - (_local4.m_invI * ((_local6 * _local19) - (_local7 * _local18))));
_local5.m_linearVelocity.x = (_local5.m_linearVelocity.x + (_local5.m_invMass * _local18));
_local5.m_linearVelocity.y = (_local5.m_linearVelocity.y + (_local5.m_invMass * _local19));
_local5.m_angularVelocity = (_local5.m_angularVelocity + (_local5.m_invI * ((_local8 * _local19) - (_local9 * _local18))));
} else {
m_impulse = 0;
};
}
override public function GetReactionTorque():Number{
return (0);
}
override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{
var _local2:b2Mat22;
var _local3:b2Body;
var _local4:b2Body;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
_local3 = m_body1;
_local4 = m_body2;
_local2 = _local3.m_xf.R;
_local5 = (m_localAnchor1.x - _local3.m_sweep.localCenter.x);
_local6 = (m_localAnchor1.y - _local3.m_sweep.localCenter.y);
_local7 = ((_local2.col1.x * _local5) + (_local2.col2.x * _local6));
_local6 = ((_local2.col1.y * _local5) + (_local2.col2.y * _local6));
_local5 = _local7;
_local2 = _local4.m_xf.R;
_local8 = (m_localAnchor2.x - _local4.m_sweep.localCenter.x);
_local9 = (m_localAnchor2.y - _local4.m_sweep.localCenter.y);
_local7 = ((_local2.col1.x * _local8) + (_local2.col2.x * _local9));
_local9 = ((_local2.col1.y * _local8) + (_local2.col2.y * _local9));
_local8 = _local7;
_local10 = (_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local6));
_local11 = (_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local5));
_local12 = (_local4.m_linearVelocity.x + (-(_local4.m_angularVelocity) * _local9));
_local13 = (_local4.m_linearVelocity.y + (_local4.m_angularVelocity * _local8));
_local14 = ((.x * (_local12 - _local10)) + (.y * (_local13 - _local11)));
_local15 = (-(m_mass) * ((_local14 +
) + (m_gamma * m_impulse)));
m_impulse = (m_impulse + _local15);
_local16 = (_local15 * .x);
_local17 = (_local15 * .y);
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x - (_local3.m_invMass * _local16));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y - (_local3.m_invMass * _local17));
_local3.m_angularVelocity = (_local3.m_angularVelocity - (_local3.m_invI * ((_local5 * _local17) - (_local6 * _local16))));
_local4.m_linearVelocity.x = (_local4.m_linearVelocity.x + (_local4.m_invMass * _local16));
_local4.m_linearVelocity.y = (_local4.m_linearVelocity.y + (_local4.m_invMass * _local17));
_local4.m_angularVelocity = (_local4.m_angularVelocity + (_local4.m_invI * ((_local8 * _local17) - (_local9 * _local16))));
}
}
}//package Box2D.Dynamics.Joints
Section 49
//b2DistanceJointDef (Box2D.Dynamics.Joints.b2DistanceJointDef)
package Box2D.Dynamics.Joints {
import Box2D.Dynamics.*;
import Box2D.Common.Math.*;
public class b2DistanceJointDef extends b2JointDef {
public var length:Number;
public var dampingRatio:Number;
public var frequencyHz:Number;
public var localAnchor2:b2Vec2;
public var localAnchor1:b2Vec2;
public function b2DistanceJointDef(){
localAnchor1 = new b2Vec2();
localAnchor2 = new b2Vec2();
super();
type = b2Joint.e_distanceJoint;
length = 1;
frequencyHz = 0;
dampingRatio = 0;
}
public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2, _arg4:b2Vec2):void{
var _local5:Number;
var _local6:Number;
body1 = _arg1;
body2 = _arg2;
localAnchor1.SetV(body1.GetLocalPoint(_arg3));
localAnchor2.SetV(body2.GetLocalPoint(_arg4));
_local5 = (_arg4.x - _arg3.x);
_local6 = (_arg4.y - _arg3.y);
length = Math.sqrt(((_local5 * _local5) + (_local6 * _local6)));
frequencyHz = 0;
dampingRatio = 0;
}
}
}//package Box2D.Dynamics.Joints
Section 50
//b2GearJoint (Box2D.Dynamics.Joints.b2GearJoint)
package Box2D.Dynamics.Joints {
import Box2D.Dynamics.*;
import Box2D.Common.Math.*;
import Box2D.Common.*;
public class b2GearJoint extends b2Joint {
public var m_force:Number;
public var m_mass:Number;
public var
:b2PrismaticJoint;
public var
:b2PrismaticJoint;
public var
:b2Body;
public var
:b2Body;
public var m_constant:Number;
public var
:b2RevoluteJoint;
public var
: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 :b2Jacobian;
public function b2GearJoint(_arg1:b2GearJointDef){
var _local2:int;
var _local3:int;
var _local4:Number;
var _local5:Number;
m_groundAnchor1 = new b2Vec2();
m_groundAnchor2 = new b2Vec2();
m_localAnchor1 = new b2Vec2();
m_localAnchor2 = new b2Vec2();
= new b2Jacobian();
super(_arg1);
_local2 = _arg1.
.m_type;
_local3 = _arg1..m_type;
= null;
= null;
= null;
= null;
= _arg1.
.m_body1;
m_body1 = _arg1.
.m_body2;
if (_local2 == b2Joint.e_revoluteJoint){
= (_arg1.
as b2RevoluteJoint);
m_groundAnchor1.SetV(
.m_localAnchor1);
m_localAnchor1.SetV(
.m_localAnchor2);
_local4 =
.GetJointAngle();
} else {
= (_arg1.
as b2PrismaticJoint);
m_groundAnchor1.SetV(
.m_localAnchor1);
m_localAnchor1.SetV(
.m_localAnchor2);
_local4 =
.GetJointTranslation();
};
= _arg1..m_body1;
m_body2 = _arg1..m_body2;
if (_local3 == b2Joint.e_revoluteJoint){
= (_arg1. as b2RevoluteJoint);
m_groundAnchor2.SetV(
.m_localAnchor1);
m_localAnchor2.SetV(
.m_localAnchor2);
_local5 =
.GetJointAngle();
} else {
= (_arg1. as b2PrismaticJoint);
m_groundAnchor2.SetV(
.m_localAnchor1);
m_localAnchor2.SetV(
.m_localAnchor2);
_local5 =
.GetJointTranslation();
};
m_ratio = _arg1.ratio;
m_constant = (_local4 + (m_ratio * _local5));
m_force = 0;
}
override public function GetAnchor1():b2Vec2{
return (m_body1.GetWorldPoint(m_localAnchor1));
}
override public function GetAnchor2():b2Vec2{
return (m_body2.GetWorldPoint(m_localAnchor2));
}
override public function GetReactionForce():b2Vec2{
var _local1:b2Vec2;
_local1 = new b2Vec2((m_force * .linear2.x), (m_force * .linear2.y));
return (_local1);
}
override public function SolvePositionConstraints():Boolean{
var _local1:Number;
var _local2:b2Body;
var _local3:b2Body;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local1 = 0;
_local2 = m_body1;
_local3 = m_body2;
if (
){
_local4 =
.GetJointAngle();
} else {
_local4 =
.GetJointTranslation();
};
if (
){
_local5 =
.GetJointAngle();
} else {
_local5 =
.GetJointTranslation();
};
_local6 = (m_constant - (_local4 + (m_ratio * _local5)));
_local7 = (-(m_mass) * _local6);
_local2.m_sweep.c.x = (_local2.m_sweep.c.x + ((_local2.m_invMass * _local7) * .linear1.x));
_local2.m_sweep.c.y = (_local2.m_sweep.c.y + ((_local2.m_invMass * _local7) * .linear1.y));
_local2.m_sweep.a = (_local2.m_sweep.a + ((_local2.m_invI * _local7) * .angular1));
_local3.m_sweep.c.x = (_local3.m_sweep.c.x + ((_local3.m_invMass * _local7) * .linear2.x));
_local3.m_sweep.c.y = (_local3.m_sweep.c.y + ((_local3.m_invMass * _local7) * .linear2.y));
_local3.m_sweep.a = (_local3.m_sweep.a + ((_local3.m_invI * _local7) * .angular2));
_local2.SynchronizeTransform();
_local3.SynchronizeTransform();
return ((_local1 < b2Settings.b2_linearSlop));
}
override public function InitVelocityConstraints(_arg1:b2TimeStep):void{
var _local2:b2Body;
var _local3:b2Body;
var _local4:b2Body;
var _local5:b2Body;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:b2Mat22;
var _local11:b2Vec2;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
_local2 =
;
_local3 =
;
_local4 = m_body1;
_local5 = m_body2;
_local14 = 0;
.SetZero();
if (
){
.angular1 = -1;
_local14 = (_local14 + _local4.m_invI);
} else {
_local10 = _local2.m_xf.R;
_local11 =
.m_localXAxis1;
_local6 = ((_local10.col1.x * _local11.x) + (_local10.col2.x * _local11.y));
_local7 = ((_local10.col1.y * _local11.x) + (_local10.col2.y * _local11.y));
_local10 = _local4.m_xf.R;
_local8 = (m_localAnchor1.x - _local4.m_sweep.localCenter.x);
_local9 = (m_localAnchor1.y - _local4.m_sweep.localCenter.y);
_local13 = ((_local10.col1.x * _local8) + (_local10.col2.x * _local9));
_local9 = ((_local10.col1.y * _local8) + (_local10.col2.y * _local9));
_local8 = _local13;
_local12 = ((_local8 * _local7) - (_local9 * _local6));
.linear1.Set(-(_local6), -(_local7));
.angular1 = -(_local12);
_local14 = (_local14 + (_local4.m_invMass + ((_local4.m_invI * _local12) * _local12)));
};
if (
){
.angular2 = -(m_ratio);
_local14 = (_local14 + ((m_ratio * m_ratio) * _local5.m_invI));
} else {
_local10 = _local3.m_xf.R;
_local11 =
.m_localXAxis1;
_local6 = ((_local10.col1.x * _local11.x) + (_local10.col2.x * _local11.y));
_local7 = ((_local10.col1.y * _local11.x) + (_local10.col2.y * _local11.y));
_local10 = _local5.m_xf.R;
_local8 = (m_localAnchor2.x - _local5.m_sweep.localCenter.x);
_local9 = (m_localAnchor2.y - _local5.m_sweep.localCenter.y);
_local13 = ((_local10.col1.x * _local8) + (_local10.col2.x * _local9));
_local9 = ((_local10.col1.y * _local8) + (_local10.col2.y * _local9));
_local8 = _local13;
_local12 = ((_local8 * _local7) - (_local9 * _local6));
.linear2.Set((-(m_ratio) * _local6), (-(m_ratio) * _local7));
.angular2 = (-(m_ratio) * _local12);
_local14 = (_local14 + ((m_ratio * m_ratio) * (_local5.m_invMass + ((_local5.m_invI * _local12) * _local12))));
};
m_mass = (1 / _local14);
if (_arg1.warmStarting){
_local15 = (_arg1.dt * m_force);
_local4.m_linearVelocity.x = (_local4.m_linearVelocity.x + ((_local4.m_invMass * _local15) * .linear1.x));
_local4.m_linearVelocity.y = (_local4.m_linearVelocity.y + ((_local4.m_invMass * _local15) * .linear1.y));
_local4.m_angularVelocity = (_local4.m_angularVelocity + ((_local4.m_invI * _local15) * .angular1));
_local5.m_linearVelocity.x = (_local5.m_linearVelocity.x + ((_local5.m_invMass * _local15) * .linear2.x));
_local5.m_linearVelocity.y = (_local5.m_linearVelocity.y + ((_local5.m_invMass * _local15) * .linear2.y));
_local5.m_angularVelocity = (_local5.m_angularVelocity + ((_local5.m_invI * _local15) * .angular2));
} else {
m_force = 0;
};
}
override public function GetReactionTorque():Number{
var _local1:b2Mat22;
var _local2:Number;
var _local3:Number;
var _local4:Number;
_local1 = m_body2.m_xf.R;
_local2 = (m_localAnchor1.x - m_body2.m_sweep.localCenter.x);
_local3 = (m_localAnchor1.y - m_body2.m_sweep.localCenter.y);
_local4 = ((_local1.col1.x * _local2) + (_local1.col2.x * _local3));
_local3 = ((_local1.col1.y * _local2) + (_local1.col2.y * _local3));
_local2 = _local4;
_local4 = ((m_force * .angular2) - ((_local2 * (m_force * .linear2.y)) - (_local3 * (m_force * .linear2.x))));
return (_local4);
}
public function GetRatio():Number{
return (m_ratio);
}
override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{
var _local2:b2Body;
var _local3:b2Body;
var _local4:Number;
var _local5:Number;
var _local6:Number;
_local2 = m_body1;
_local3 = m_body2;
_local4 = .Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity);
_local5 = ((-(_arg1.inv_dt) * m_mass) * _local4);
m_force = (m_force + _local5);
_local6 = (_arg1.dt * _local5);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local2.m_invMass * _local6) * .linear1.x));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local2.m_invMass * _local6) * .linear1.y));
_local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local2.m_invI * _local6) * .angular1));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local3.m_invMass * _local6) * .linear2.x));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local3.m_invMass * _local6) * .linear2.y));
_local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local3.m_invI * _local6) * .angular2));
}
}
}//package Box2D.Dynamics.Joints
Section 51
//b2GearJointDef (Box2D.Dynamics.Joints.b2GearJointDef)
package Box2D.Dynamics.Joints {
public class b2GearJointDef extends b2JointDef {
public var :b2Joint;
public var
:b2Joint;
public var ratio:Number;
public function b2GearJointDef(){
type = b2Joint.e_gearJoint;
= null;
= null;
ratio = 1;
}
}
}//package Box2D.Dynamics.Joints
Section 52
//b2Jacobian (Box2D.Dynamics.Joints.b2Jacobian)
package Box2D.Dynamics.Joints {
import Box2D.Common.Math.*;
public class b2Jacobian {
public var linear1:b2Vec2;
public var linear2:b2Vec2;
public var angular2:Number;
public var angular1:Number;
public function b2Jacobian(){
linear1 = new b2Vec2();
linear2 = new b2Vec2();
super();
}
public function Set(_arg1:b2Vec2, _arg2:Number, _arg3:b2Vec2, _arg4:Number):void{
linear1.SetV(_arg1);
angular1 = _arg2;
linear2.SetV(_arg3);
angular2 = _arg4;
}
public function SetZero():void{
linear1.SetZero();
angular1 = 0;
linear2.SetZero();
angular2 = 0;
}
public function Compute(_arg1:b2Vec2, _arg2:Number, _arg3:b2Vec2, _arg4:Number):Number{
return ((((((linear1.x * _arg1.x) + (linear1.y * _arg1.y)) + (angular1 * _arg2)) + ((linear2.x * _arg3.x) + (linear2.y * _arg3.y))) + (angular2 * _arg4)));
}
}
}//package Box2D.Dynamics.Joints
Section 53
//b2Joint (Box2D.Dynamics.Joints.b2Joint)
package Box2D.Dynamics.Joints {
import Box2D.Dynamics.*;
import Box2D.Common.Math.*;
public class b2Joint {
public var m_islandFlag:Boolean;
public var m_body1:b2Body;
public var m_prev:b2Joint;
public var m_next:b2Joint;
public var m_type:int;
public var m_collideConnected:Boolean;
public var m_node1:b2JointEdge;
public var m_node2:b2JointEdge;
public var m_inv_dt:Number;
public var m_userData;
public var m_body2:b2Body;
public static const e_unknownJoint:int = 0;
public static const e_inactiveLimit:int = 0;
public static const e_atUpperLimit:int = 2;
public static const e_atLowerLimit:int = 1;
public static const e_gearJoint:int = 6;
public static const e_revoluteJoint:int = 1;
public static const e_equalLimits:int = 3;
public static const e_distanceJoint:int = 3;
public static const e_pulleyJoint:int = 4;
public static const e_prismaticJoint:int = 2;
public static const e_mouseJoint:int = 5;
public function b2Joint(_arg1:b2JointDef){
m_node1 = new b2JointEdge();
m_node2 = new b2JointEdge();
super();
m_type = _arg1.type;
m_prev = null;
m_next = null;
m_body1 = _arg1.body1;
m_body2 = _arg1.body2;
m_collideConnected = _arg1.collideConnected;
m_islandFlag = false;
m_userData = _arg1.userData;
}
public function GetAnchor1():b2Vec2{
return (null);
}
public function GetAnchor2():b2Vec2{
return (null);
}
public function InitVelocityConstraints(_arg1:b2TimeStep):void{
}
public function GetType():int{
return (m_type);
}
public function ():b2Body{
return (m_body2);
}
public function GetNext():b2Joint{
return (m_next);
}
public function GetReactionTorque():Number{
return (0);
}
public function GetUserData(){
return (m_userData);
}
public function GetReactionForce():b2Vec2{
return (null);
}
public function SolvePositionConstraints():Boolean{
return (false);
}
public function SetUserData(_arg1):void{
m_userData = _arg1;
}
public function ():b2Body{
return (m_body1);
}
public function SolveVelocityConstraints(_arg1:b2TimeStep):void{
}
public function InitPositionConstraints():void{
}
public static function Destroy(_arg1:b2Joint, _arg2):void{
}
public static function Create(_arg1:b2JointDef, _arg2):b2Joint{
var _local3:b2Joint;
_local3 = null;
switch (_arg1.type){
case e_distanceJoint:
_local3 = new b2DistanceJoint((_arg1 as b2DistanceJointDef));
break;
case e_mouseJoint:
_local3 = new b2MouseJoint((_arg1 as b2MouseJointDef));
break;
case e_prismaticJoint:
_local3 = new b2PrismaticJoint((_arg1 as b2PrismaticJointDef));
break;
case e_revoluteJoint:
_local3 = new b2RevoluteJoint((_arg1 as b2RevoluteJointDef));
break;
case e_pulleyJoint:
_local3 = new b2PulleyJoint((_arg1 as b2PulleyJointDef));
break;
case e_gearJoint:
_local3 = new b2GearJoint((_arg1 as b2GearJointDef));
break;
default:
break;
};
return (_local3);
}
}
}//package Box2D.Dynamics.Joints
Section 54
//b2JointDef (Box2D.Dynamics.Joints.b2JointDef)
package Box2D.Dynamics.Joints {
import Box2D.Dynamics.*;
public class b2JointDef {
public var collideConnected:Boolean;
public var body1:b2Body;
public var body2:b2Body;
public var userData;
public var type:int;
public function b2JointDef(){
type = b2Joint.e_unknownJoint;
userData = null;
body1 = null;
body2 = null;
collideConnected = false;
}
}
}//package Box2D.Dynamics.Joints
Section 55
//b2JointEdge (Box2D.Dynamics.Joints.b2JointEdge)
package Box2D.Dynamics.Joints {
import Box2D.Dynamics.*;
public class b2JointEdge {
public var joint:b2Joint;
public var other:b2Body;
public var next:b2JointEdge;
public var prev:b2JointEdge;
}
}//package Box2D.Dynamics.Joints
Section 56
//b2MouseJoint (Box2D.Dynamics.Joints.b2MouseJoint)
package Box2D.Dynamics.Joints {
import Box2D.Dynamics.*;
import Box2D.Common.Math.*;
import Box2D.Common.*;
public class b2MouseJoint extends b2Joint {
public var
:Number;
public var m_mass:b2Mat22;
public var :b2Vec2;
public var m_impulse:b2Vec2;
public var :b2Vec2;
private var :b2Mat22;
private var :b2Mat22;
private var :b2Mat22;
public var m_gamma:Number;
public var :b2Vec2;
public var :Number;
public function b2MouseJoint(_arg1:b2MouseJointDef){
var _local2:Number;
var _local3:Number;
var _local4:b2Mat22;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
= new b2Mat22();
= new b2Mat22();
= new b2Mat22();
= new b2Vec2();
= new b2Vec2();
m_impulse = new b2Vec2();
m_mass = new b2Mat22();
= new b2Vec2();
super(_arg1);
.SetV(_arg1.target);
_local2 = (.x - m_body2.m_xf.position.x);
_local3 = (.y - m_body2.m_xf.position.y);
_local4 = m_body2.m_xf.R;
.x = ((_local2 * _local4.col1.x) + (_local3 * _local4.col1.y));
.y = ((_local2 * _local4.col2.x) + (_local3 * _local4.col2.y));
= _arg1.;
m_impulse.SetZero();
_local5 = m_body2.m_mass;
_local6 = ((2 * b2Settings.b2_pi) * _arg1.frequencyHz);
_local7 = (((2 * _local5) * _arg1.dampingRatio) * _local6);
_local8 = ((_arg1.
* _local5) * (_local6 * _local6));
m_gamma = (1 / (_local7 + _local8));
= (_local8 / (_local7 + _local8));
}
override public function GetAnchor1():b2Vec2{
return ();
}
override public function GetAnchor2():b2Vec2{
return (m_body2.GetWorldPoint());
}
override public function GetReactionForce():b2Vec2{
return (m_impulse);
}
override public function SolvePositionConstraints():Boolean{
return (true);
}
override public function InitVelocityConstraints(_arg1:b2TimeStep):void{
var _local2:b2Body;
var _local3:b2Mat22;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
_local2 = m_body2;
_local3 = _local2.m_xf.R;
_local4 = (.x - _local2.m_sweep.localCenter.x);
_local5 = (.y - _local2.m_sweep.localCenter.y);
_local6 = ((_local3.col1.x * _local4) + (_local3.col2.x * _local5));
_local5 = ((_local3.col1.y * _local4) + (_local3.col2.y * _local5));
_local4 = _local6;
_local7 = _local2.m_invMass;
_local8 = _local2.m_invI;
.col1.x = _local7;
.col2.x = 0;
.col1.y = 0;
.col2.y = _local7;
.col1.x = ((_local8 * _local5) * _local5);
.col2.x = ((-(_local8) * _local4) * _local5);
.col1.y = ((-(_local8) * _local4) * _local5);
.col2.y = ((_local8 * _local4) * _local4);
.SetM();
.AddM();
.col1.x = (.col1.x + m_gamma);
.col2.y = (.col2.y + m_gamma);
.Invert(m_mass);
.x = ((_local2.m_sweep.c.x + _local4) - .x);
.y = ((_local2.m_sweep.c.y + _local5) - .y);
_local2.m_angularVelocity = (_local2.m_angularVelocity * 0.98);
_local9 = (_arg1.dt * m_impulse.x);
_local10 = (_arg1.dt * m_impulse.y);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local7 * _local9));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local7 * _local10));
_local2.m_angularVelocity = (_local2.m_angularVelocity + (_local8 * ((_local4 * _local10) - (_local5 * _local9))));
}
override public function GetReactionTorque():Number{
return (0);
}
public function (_arg1:b2Vec2):void{
if (m_body2.IsSleeping()){
m_body2.WakeUp();
};
= _arg1;
}
override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{
var _local2:b2Body;
var _local3:b2Mat22;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
_local2 = m_body2;
_local3 = _local2.m_xf.R;
_local6 = (.x - _local2.m_sweep.localCenter.x);
_local7 = (.y - _local2.m_sweep.localCenter.y);
_local4 = ((_local3.col1.x * _local6) + (_local3.col2.x * _local7));
_local7 = ((_local3.col1.y * _local6) + (_local3.col2.y * _local7));
_local6 = _local4;
_local8 = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local7));
_local9 = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local6));
_local3 = m_mass;
_local4 = ((_local8 + ((
* _arg1.inv_dt) * .x)) + ((m_gamma * _arg1.dt) * m_impulse.x));
_local5 = ((_local9 + ((
* _arg1.inv_dt) * .y)) + ((m_gamma * _arg1.dt) * m_impulse.y));
_local10 = (-(_arg1.inv_dt) * ((_local3.col1.x * _local4) + (_local3.col2.x * _local5)));
_local11 = (-(_arg1.inv_dt) * ((_local3.col1.y * _local4) + (_local3.col2.y * _local5)));
_local12 = m_impulse.x;
_local13 = m_impulse.y;
m_impulse.x = (m_impulse.x + _local10);
m_impulse.y = (m_impulse.y + _local11);
_local14 = m_impulse.Length();
if (_local14 > ){
m_impulse.Multiply(( / _local14));
};
_local10 = (m_impulse.x - _local12);
_local11 = (m_impulse.y - _local13);
_local15 = (_arg1.dt * _local10);
_local16 = (_arg1.dt * _local11);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local15));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local16));
_local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local6 * _local16) - (_local7 * _local15))));
}
}
}//package Box2D.Dynamics.Joints
Section 57
//b2MouseJointDef (Box2D.Dynamics.Joints.b2MouseJointDef)
package Box2D.Dynamics.Joints {
import Box2D.Common.Math.*;
public class b2MouseJointDef extends b2JointDef {
public var frequencyHz:Number;
public var dampingRatio:Number;
public var :Number;
public var target:b2Vec2;
public var
:Number;
public function b2MouseJointDef(){
target = new b2Vec2();
super();
type = b2Joint.e_mouseJoint;
= 0;
frequencyHz = 5;
dampingRatio = 0.7;
= (1 / 60);
}
}
}//package Box2D.Dynamics.Joints
Section 58
//b2PrismaticJoint (Box2D.Dynamics.Joints.b2PrismaticJoint)
package Box2D.Dynamics.Joints {
import Box2D.Dynamics.*;
import Box2D.Common.Math.*;
import Box2D.Common.*;
public class b2PrismaticJoint extends b2Joint {
public var m_limitForce:Number;
public var :Number;
public var
:Number;
public var m_localXAxis1:b2Vec2;
public var m_torque:Number;
public var m_enableLimit:Boolean;
public var m_motorForce:Number;
public var m_force:Number;
public var :b2Vec2;
public var m_motorMass:Number;
public var
:Number;
public var m_localAnchor1:b2Vec2;
public var m_localAnchor2:b2Vec2;
public var
:Number;
public var m_limitState:int;
public var
:Number;
public var
:Number;
public var
:b2Jacobian;
public var m_limitPositionImpulse:Number;
public var m_motorSpeed:Number;
public var
:b2Jacobian;
public var m_enableMotor:Boolean;
public function b2PrismaticJoint(_arg1:b2PrismaticJointDef){
var _local2:b2Mat22;
var _local3:Number;
var _local4:Number;
m_localAnchor1 = new b2Vec2();
m_localAnchor2 = new b2Vec2();
m_localXAxis1 = new b2Vec2();
= new b2Vec2();
= new b2Jacobian();
= new b2Jacobian();
super(_arg1);
m_localAnchor1.SetV(_arg1.localAnchor1);
m_localAnchor2.SetV(_arg1.localAnchor2);
m_localXAxis1.SetV(_arg1.);
.x = -(m_localXAxis1.y);
.y = m_localXAxis1.x;
= _arg1.referenceAngle;
.SetZero();
= 0;
m_force = 0;
= 0;
m_torque = 0;
.SetZero();
m_motorMass = 0;
m_motorForce = 0;
m_limitForce = 0;
m_limitPositionImpulse = 0;
= _arg1.;
= _arg1.;
= _arg1.;
m_motorSpeed = _arg1.motorSpeed;
m_enableLimit = _arg1.enableLimit;
m_enableMotor = _arg1.enableMotor;
}
override public function GetAnchor1():b2Vec2{
return (m_body1.GetWorldPoint(m_localAnchor1));
}
override public function GetAnchor2():b2Vec2{
return (m_body2.GetWorldPoint(m_localAnchor2));
}
public function EnableMotor(_arg1:Boolean):void{
m_enableMotor = _arg1;
}
public function GetUpperLimit():Number{
return (
);
}
public function GetLowerLimit():Number{
return (
);
}
public function GetJointTranslation():Number{
var _local1:b2Body;
var _local2:b2Body;
var _local3:b2Mat22;
var _local4:b2Vec2;
var _local5:b2Vec2;
var _local6:Number;
var _local7:Number;
var _local8:b2Vec2;
var _local9:Number;
_local1 = m_body1;
_local2 = m_body2;
_local4 = _local1.GetWorldPoint(m_localAnchor1);
_local5 = _local2.GetWorldPoint(m_localAnchor2);
_local6 = (_local5.x - _local4.x);
_local7 = (_local5.y - _local4.y);
_local8 = _local1.GetWorldVector(m_localXAxis1);
_local9 = ((_local8.x * _local6) + (_local8.y * _local7));
return (_local9);
}
public function SetLimits(_arg1:Number, _arg2:Number):void{
= _arg1;
= _arg2;
}
public function GetMotorSpeed():Number{
return (m_motorSpeed);
}
override public function GetReactionForce():b2Vec2{
var _local1:b2Mat22;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local1 = m_body1.m_xf.R;
_local2 = (m_limitForce * ((_local1.col1.x * m_localXAxis1.x) + (_local1.col2.x * m_localXAxis1.y)));
_local3 = (m_limitForce * ((_local1.col1.y * m_localXAxis1.x) + (_local1.col2.y * m_localXAxis1.y)));
_local4 = (m_force * ((_local1.col1.x * .x) + (_local1.col2.x * .y)));
_local5 = (m_force * ((_local1.col1.y * .x) + (_local1.col2.y * .y)));
return (new b2Vec2(((m_limitForce * _local2) + (m_force * _local4)), ((m_limitForce * _local3) + (m_force * _local5))));
}
override public function SolvePositionConstraints():Boolean{
var _local1:Number;
var _local2:Number;
var _local3:b2Body;
var _local4:b2Body;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:b2Mat22;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
var _local26:Number;
var _local27:Number;
var _local28:Number;
var _local29:Number;
var _local30:Number;
var _local31:Number;
var _local32:Number;
_local3 = m_body1;
_local4 = m_body2;
_local5 = _local3.m_invMass;
_local6 = _local4.m_invMass;
_local7 = _local3.m_invI;
_local8 = _local4.m_invI;
_local9 = _local3.m_xf.R;
_local11 = (m_localAnchor1.x - _local3.m_sweep.localCenter.x);
_local12 = (m_localAnchor1.y - _local3.m_sweep.localCenter.y);
_local10 = ((_local9.col1.x * _local11) + (_local9.col2.x * _local12));
_local12 = ((_local9.col1.y * _local11) + (_local9.col2.y * _local12));
_local11 = _local10;
_local9 = _local4.m_xf.R;
_local13 = (m_localAnchor2.x - _local4.m_sweep.localCenter.x);
_local14 = (m_localAnchor2.y - _local4.m_sweep.localCenter.y);
_local10 = ((_local9.col1.x * _local13) + (_local9.col2.x * _local14));
_local14 = ((_local9.col1.y * _local13) + (_local9.col2.y * _local14));
_local13 = _local10;
_local15 = (_local3.m_sweep.c.x + _local11);
_local16 = (_local3.m_sweep.c.y + _local12);
_local17 = (_local4.m_sweep.c.x + _local13);
_local18 = (_local4.m_sweep.c.y + _local14);
_local19 = (_local17 - _local15);
_local20 = (_local18 - _local16);
_local9 = _local3.m_xf.R;
_local21 = ((_local9.col1.x * .x) + (_local9.col2.x * .y));
_local22 = ((_local9.col1.y * .x) + (_local9.col2.y * .y));
_local23 = ((_local21 * _local19) + (_local22 * _local20));
_local23 = b2Math.b2Clamp(_local23, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection);
_local24 = (-(
) * _local23);
_local3.m_sweep.c.x = (_local3.m_sweep.c.x + ((_local5 * _local24) *
.linear1.x));
_local3.m_sweep.c.y = (_local3.m_sweep.c.y + ((_local5 * _local24) *
.linear1.y));
_local3.m_sweep.a = (_local3.m_sweep.a + ((_local7 * _local24) *
.angular1));
_local4.m_sweep.c.x = (_local4.m_sweep.c.x + ((_local6 * _local24) *
.linear2.x));
_local4.m_sweep.c.y = (_local4.m_sweep.c.y + ((_local6 * _local24) *
.linear2.y));
_local4.m_sweep.a = (_local4.m_sweep.a + ((_local8 * _local24) *
.angular2));
_local25 = b2Math.b2Abs(_local23);
_local26 = ((_local4.m_sweep.a - _local3.m_sweep.a) - );
_local26 = b2Math.b2Clamp(_local26, -(b2Settings.b2_maxAngularCorrection), b2Settings.b2_maxAngularCorrection);
_local27 = (-(
) * _local26);
_local3.m_sweep.a = (_local3.m_sweep.a - (_local3.m_invI * _local27));
_local4.m_sweep.a = (_local4.m_sweep.a + (_local4.m_invI * _local27));
_local3.SynchronizeTransform();
_local4.SynchronizeTransform();
_local28 = b2Math.b2Abs(_local26);
if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){
_local9 = _local3.m_xf.R;
_local11 = (m_localAnchor1.x - _local3.m_sweep.localCenter.x);
_local12 = (m_localAnchor1.y - _local3.m_sweep.localCenter.y);
_local10 = ((_local9.col1.x * _local11) + (_local9.col2.x * _local12));
_local12 = ((_local9.col1.y * _local11) + (_local9.col2.y * _local12));
_local11 = _local10;
_local9 = _local4.m_xf.R;
_local13 = (m_localAnchor2.x - _local4.m_sweep.localCenter.x);
_local14 = (m_localAnchor2.y - _local4.m_sweep.localCenter.y);
_local10 = ((_local9.col1.x * _local13) + (_local9.col2.x * _local14));
_local14 = ((_local9.col1.y * _local13) + (_local9.col2.y * _local14));
_local13 = _local10;
_local15 = (_local3.m_sweep.c.x + _local11);
_local16 = (_local3.m_sweep.c.y + _local12);
_local17 = (_local4.m_sweep.c.x + _local13);
_local18 = (_local4.m_sweep.c.y + _local14);
_local19 = (_local17 - _local15);
_local20 = (_local18 - _local16);
_local9 = _local3.m_xf.R;
_local29 = ((_local9.col1.x * m_localXAxis1.x) + (_local9.col2.x * m_localXAxis1.y));
_local30 = ((_local9.col1.y * m_localXAxis1.x) + (_local9.col2.y * m_localXAxis1.y));
_local31 = ((_local29 * _local19) + (_local30 * _local20));
_local32 = 0;
if (m_limitState == e_equalLimits){
_local1 = b2Math.b2Clamp(_local31, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection);
_local32 = (-(m_motorMass) * _local1);
_local25 = b2Math.b2Max(_local25, b2Math.b2Abs(_local26));
} else {
if (m_limitState == e_atLowerLimit){
_local1 = (_local31 -
);
_local25 = b2Math.b2Max(_local25, -(_local1));
_local1 = b2Math.b2Clamp((_local1 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0);
_local32 = (-(m_motorMass) * _local1);
_local2 = m_limitPositionImpulse;
m_limitPositionImpulse = b2Math.b2Max((m_limitPositionImpulse + _local32), 0);
_local32 = (m_limitPositionImpulse - _local2);
} else {
if (m_limitState == e_atUpperLimit){
_local1 = (_local31 -
);
_local25 = b2Math.b2Max(_local25, _local1);
_local1 = b2Math.b2Clamp((_local1 - b2Settings.b2_linearSlop), 0, b2Settings.b2_maxLinearCorrection);
_local32 = (-(m_motorMass) * _local1);
_local2 = m_limitPositionImpulse;
m_limitPositionImpulse = b2Math.b2Min((m_limitPositionImpulse + _local32), 0);
_local32 = (m_limitPositionImpulse - _local2);
};
};
};
_local3.m_sweep.c.x = (_local3.m_sweep.c.x + ((_local5 * _local32) *
.linear1.x));
_local3.m_sweep.c.y = (_local3.m_sweep.c.y + ((_local5 * _local32) *
.linear1.y));
_local3.m_sweep.a = (_local3.m_sweep.a + ((_local7 * _local32) *
.angular1));
_local4.m_sweep.c.x = (_local4.m_sweep.c.x + ((_local6 * _local32) *
.linear2.x));
_local4.m_sweep.c.y = (_local4.m_sweep.c.y + ((_local6 * _local32) *
.linear2.y));
_local4.m_sweep.a = (_local4.m_sweep.a + ((_local8 * _local32) *
.angular2));
_local3.SynchronizeTransform();
_local4.SynchronizeTransform();
};
return ((((_local25 <= b2Settings.b2_linearSlop)) && ((_local28 <= b2Settings.b2_angularSlop))));
}
public function GetJointSpeed():Number{
var _local1:b2Body;
var _local2:b2Body;
var _local3:b2Mat22;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:b2Vec2;
var _local16:b2Vec2;
var _local17:b2Vec2;
var _local18:Number;
var _local19:Number;
var _local20:Number;
_local1 = m_body1;
_local2 = m_body2;
_local3 = _local1.m_xf.R;
_local4 = (m_localAnchor1.x - _local1.m_sweep.localCenter.x);
_local5 = (m_localAnchor1.y - _local1.m_sweep.localCenter.y);
_local6 = ((_local3.col1.x * _local4) + (_local3.col2.x * _local5));
_local5 = ((_local3.col1.y * _local4) + (_local3.col2.y * _local5));
_local4 = _local6;
_local3 = _local2.m_xf.R;
_local7 = (m_localAnchor2.x - _local2.m_sweep.localCenter.x);
_local8 = (m_localAnchor2.y - _local2.m_sweep.localCenter.y);
_local6 = ((_local3.col1.x * _local7) + (_local3.col2.x * _local8));
_local8 = ((_local3.col1.y * _local7) + (_local3.col2.y * _local8));
_local7 = _local6;
_local9 = (_local1.m_sweep.c.x + _local4);
_local10 = (_local1.m_sweep.c.y + _local5);
_local11 = (_local2.m_sweep.c.x + _local7);
_local12 = (_local2.m_sweep.c.y + _local8);
_local13 = (_local11 - _local9);
_local14 = (_local12 - _local10);
_local15 = _local1.GetWorldVector(m_localXAxis1);
_local16 = _local1.m_linearVelocity;
_local17 = _local2.m_linearVelocity;
_local18 = _local1.m_angularVelocity;
_local19 = _local2.m_angularVelocity;
_local20 = (((_local13 * (-(_local18) * _local15.y)) + (_local14 * (_local18 * _local15.x))) + ((_local15.x * (((_local17.x + (-(_local19) * _local8)) - _local16.x) - (-(_local18) * _local5))) + (_local15.y * (((_local17.y + (_local19 * _local7)) - _local16.y) - (_local18 * _local4)))));
return (_local20);
}
public function SetMotorSpeed(_arg1:Number):void{
m_motorSpeed = _arg1;
}
override public function InitVelocityConstraints(_arg1:b2TimeStep):void{
var _local2:b2Body;
var _local3:b2Body;
var _local4:b2Mat22;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
var _local26:Number;
var _local27:Number;
var _local28:Number;
_local2 = m_body1;
_local3 = m_body2;
_local4 = _local2.m_xf.R;
_local6 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x);
_local7 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y);
_local5 = ((_local4.col1.x * _local6) + (_local4.col2.x * _local7));
_local7 = ((_local4.col1.y * _local6) + (_local4.col2.y * _local7));
_local6 = _local5;
_local4 = _local3.m_xf.R;
_local8 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x);
_local9 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y);
_local5 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9));
_local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9));
_local8 = _local5;
_local10 = _local2.m_invMass;
_local11 = _local3.m_invMass;
_local12 = _local2.m_invI;
_local13 = _local3.m_invI;
_local4 = _local2.m_xf.R;
_local14 = ((_local4.col1.x * .x) + (_local4.col2.x * .y));
_local15 = ((_local4.col1.y * .x) + (_local4.col2.y * .y));
_local16 = ((_local3.m_sweep.c.x + _local8) - _local2.m_sweep.c.x);
_local17 = ((_local3.m_sweep.c.y + _local9) - _local2.m_sweep.c.y);
.linear1.x = -(_local14);
.linear1.y = -(_local15);
.linear2.x = _local14;
.linear2.y = _local15;
.angular1 = -(((_local16 * _local15) - (_local17 * _local14)));
.angular2 = ((_local8 * _local15) - (_local9 * _local14));
= (((_local10 + ((_local12 *
.angular1) *
.angular1)) + _local11) + ((_local13 *
.angular2) *
.angular2));
= (1 /
);
= (_local12 + _local13);
if (
> Number.MIN_VALUE){
= (1 /
);
};
if (((m_enableLimit) || (m_enableMotor))){
_local4 = _local2.m_xf.R;
_local18 = ((_local4.col1.x * m_localXAxis1.x) + (_local4.col2.x * m_localXAxis1.y));
_local19 = ((_local4.col1.y * m_localXAxis1.x) + (_local4.col2.y * m_localXAxis1.y));
.linear1.x = -(_local18);
.linear1.y = -(_local19);
.linear2.x = _local18;
.linear2.y = _local19;
.angular1 = -(((_local16 * _local19) - (_local17 * _local18)));
.angular2 = ((_local8 * _local19) - (_local9 * _local18));
m_motorMass = (((_local10 + ((_local12 *
.angular1) *
.angular1)) + _local11) + ((_local13 *
.angular2) *
.angular2));
m_motorMass = (1 / m_motorMass);
if (m_enableLimit){
_local20 = (_local16 - _local6);
_local21 = (_local17 - _local7);
_local22 = ((_local18 * _local20) + (_local19 * _local21));
if (b2Math.b2Abs((
-
)) < (2 * b2Settings.b2_linearSlop)){
m_limitState = e_equalLimits;
} else {
if (_local22 <=
){
if (m_limitState != e_atLowerLimit){
m_limitForce = 0;
};
m_limitState = e_atLowerLimit;
} else {
if (_local22 >=
){
if (m_limitState != e_atUpperLimit){
m_limitForce = 0;
};
m_limitState = e_atUpperLimit;
} else {
m_limitState = e_inactiveLimit;
m_limitForce = 0;
};
};
};
};
};
if (m_enableMotor == false){
m_motorForce = 0;
};
if (m_enableLimit == false){
m_limitForce = 0;
};
if (_arg1.warmStarting){
_local23 = (_arg1.dt * ((m_force *
.linear1.x) + ((m_motorForce + m_limitForce) *
.linear1.x)));
_local24 = (_arg1.dt * ((m_force *
.linear1.y) + ((m_motorForce + m_limitForce) *
.linear1.y)));
_local25 = (_arg1.dt * ((m_force *
.linear2.x) + ((m_motorForce + m_limitForce) *
.linear2.x)));
_local26 = (_arg1.dt * ((m_force *
.linear2.y) + ((m_motorForce + m_limitForce) *
.linear2.y)));
_local27 = (_arg1.dt * (((m_force *
.angular1) - m_torque) + ((m_motorForce + m_limitForce) *
.angular1)));
_local28 = (_arg1.dt * (((m_force *
.angular2) + m_torque) + ((m_motorForce + m_limitForce) *
.angular2)));
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local10 * _local23));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local10 * _local24));
_local2.m_angularVelocity = (_local2.m_angularVelocity + (_local12 * _local27));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local11 * _local25));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local11 * _local26));
_local3.m_angularVelocity = (_local3.m_angularVelocity + (_local13 * _local28));
} else {
m_force = 0;
m_torque = 0;
m_limitForce = 0;
m_motorForce = 0;
};
m_limitPositionImpulse = 0;
}
public function
():Number{
return (m_motorForce);
}
public function
(_arg1:Number):void{
= _arg1;
}
public function EnableLimit(_arg1:Boolean):void{
m_enableLimit = _arg1;
}
override public function GetReactionTorque():Number{
return (m_torque);
}
public function IsLimitEnabled():Boolean{
return (m_enableLimit);
}
public function IsMotorEnabled():Boolean{
return (m_enableMotor);
}
override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{
var _local2:b2Body;
var _local3:b2Body;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
_local2 = m_body1;
_local3 = m_body2;
_local4 = _local2.m_invMass;
_local5 = _local3.m_invMass;
_local6 = _local2.m_invI;
_local7 = _local3.m_invI;
_local9 =
.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity);
_local10 = ((-(_arg1.inv_dt) *
) * _local9);
m_force = (m_force + _local10);
_local11 = (_arg1.dt * _local10);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local4 * _local11) *
.linear1.x));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local4 * _local11) *
.linear1.y));
_local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local6 * _local11) *
.angular1));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local5 * _local11) *
.linear2.x));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local5 * _local11) *
.linear2.y));
_local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local7 * _local11) *
.angular2));
_local12 = (_local3.m_angularVelocity - _local2.m_angularVelocity);
_local13 = ((-(_arg1.inv_dt) *
) * _local12);
m_torque = (m_torque + _local13);
_local14 = (_arg1.dt * _local13);
_local2.m_angularVelocity = (_local2.m_angularVelocity - (_local6 * _local14));
_local3.m_angularVelocity = (_local3.m_angularVelocity + (_local7 * _local14));
if (((m_enableMotor) && (!((m_limitState == e_equalLimits))))){
_local15 = (
.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity) - m_motorSpeed);
_local16 = ((-(_arg1.inv_dt) * m_motorMass) * _local15);
_local17 = m_motorForce;
m_motorForce = b2Math.b2Clamp((m_motorForce + _local16), -(
),
);
_local16 = (m_motorForce - _local17);
_local11 = (_arg1.dt * _local16);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local4 * _local11) *
.linear1.x));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local4 * _local11) *
.linear1.y));
_local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local6 * _local11) *
.angular1));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local5 * _local11) *
.linear2.x));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local5 * _local11) *
.linear2.y));
_local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local7 * _local11) *
.angular2));
};
if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){
_local18 =
.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity);
_local19 = ((-(_arg1.inv_dt) * m_motorMass) * _local18);
if (m_limitState == e_equalLimits){
m_limitForce = (m_limitForce + _local19);
} else {
if (m_limitState == e_atLowerLimit){
_local8 = m_limitForce;
m_limitForce = b2Math.b2Max((m_limitForce + _local19), 0);
_local19 = (m_limitForce - _local8);
} else {
if (m_limitState == e_atUpperLimit){
_local8 = m_limitForce;
m_limitForce = b2Math.b2Min((m_limitForce + _local19), 0);
_local19 = (m_limitForce - _local8);
};
};
};
_local11 = (_arg1.dt * _local19);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local4 * _local11) *
.linear1.x));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local4 * _local11) *
.linear1.y));
_local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local6 * _local11) *
.angular1));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local5 * _local11) *
.linear2.x));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local5 * _local11) *
.linear2.y));
_local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local7 * _local11) *
.angular2));
};
}
}
}//package Box2D.Dynamics.Joints
Section 59
//b2PrismaticJointDef (Box2D.Dynamics.Joints.b2PrismaticJointDef)
package Box2D.Dynamics.Joints {
import Box2D.Dynamics.*;
import Box2D.Common.Math.*;
public class b2PrismaticJointDef extends b2JointDef {
public var :b2Vec2;
public var referenceAngle:Number;
public var :Number;
public var motorSpeed:Number;
public var :Number;
public var localAnchor1:b2Vec2;
public var localAnchor2:b2Vec2;
public var enableLimit:Boolean;
public var enableMotor:Boolean;
public var :Number;
public function b2PrismaticJointDef(){
localAnchor1 = new b2Vec2();
localAnchor2 = new b2Vec2();
= new b2Vec2();
super();
type = b2Joint.e_prismaticJoint;
.Set(1, 0);
referenceAngle = 0;
enableLimit = false;
= 0;
= 0;
enableMotor = false;
= 0;
motorSpeed = 0;
}
public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2, _arg4:b2Vec2):void{
body1 = _arg1;
body2 = _arg2;
localAnchor1 = body1.GetLocalPoint(_arg3);
localAnchor2 = body2.GetLocalPoint(_arg3);
= body1.GetLocalVector(_arg4);
referenceAngle = (body2.GetAngle() - body1.GetAngle());
}
}
}//package Box2D.Dynamics.Joints
Section 60
//b2PulleyJoint (Box2D.Dynamics.Joints.b2PulleyJoint)
package Box2D.Dynamics.Joints {
import Box2D.Dynamics.*;
import Box2D.Common.Math.*;
import Box2D.Common.*;
public class b2PulleyJoint extends b2Joint {
public var :b2Body;
public var :Number;
public var
:Number;
public var :Number;
public var :int;
public var :int;
public var :Number;
public var m_force:Number;
public var :Number;
public var m_constant:Number;
public var :int;
public var m_ratio:Number;
public var m_groundAnchor1:b2Vec2;
public var m_groundAnchor2:b2Vec2;
public var m_localAnchor1:b2Vec2;
public var m_localAnchor2:b2Vec2;
public var
:Number;
public var :Number;
public var :Number;
public var
:Number;
public var :b2Vec2;
public var :b2Vec2;
public var :Number;
public static const b2_minPulleyLength:Number = 2;
public function b2PulleyJoint(_arg1:b2PulleyJointDef){
var _local2:b2Mat22;
var _local3:Number;
var _local4:Number;
m_groundAnchor1 = new b2Vec2();
m_groundAnchor2 = new b2Vec2();
m_localAnchor1 = new b2Vec2();
m_localAnchor2 = new b2Vec2();
= new b2Vec2();
= new b2Vec2();
super(_arg1);
= m_body1.m_world.
;
m_groundAnchor1.x = (_arg1..x - .m_xf.position.x);
m_groundAnchor1.y = (_arg1..y - .m_xf.position.y);
m_groundAnchor2.x = (_arg1..x - .m_xf.position.x);
m_groundAnchor2.y = (_arg1..y - .m_xf.position.y);
m_localAnchor1.SetV(_arg1.localAnchor1);
m_localAnchor2.SetV(_arg1.localAnchor2);
m_ratio = _arg1.ratio;
m_constant = (_arg1.
+ (m_ratio * _arg1.));
= b2Math.b2Min(_arg1., (m_constant - (m_ratio * b2_minPulleyLength)));
= b2Math.b2Min(_arg1., ((m_constant - b2_minPulleyLength) / m_ratio));
m_force = 0;
= 0;
= 0;
}
public function GetGroundAnchor2():b2Vec2{
var _local1:b2Vec2;
_local1 = .m_xf.position.Copy();
_local1.Add(m_groundAnchor2);
return (_local1);
}
override public function GetAnchor1():b2Vec2{
return (m_body1.GetWorldPoint(m_localAnchor1));
}
override public function GetAnchor2():b2Vec2{
return (m_body2.GetWorldPoint(m_localAnchor2));
}
override public function GetReactionForce():b2Vec2{
var _local1:b2Vec2;
_local1 = .Copy();
_local1.Multiply(m_force);
return (_local1);
}
override public function SolvePositionConstraints():Boolean{
var _local1:b2Body;
var _local2:b2Body;
var _local3:b2Mat22;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
_local1 = m_body1;
_local2 = m_body2;
_local4 = (.m_xf.position.x + m_groundAnchor1.x);
_local5 = (.m_xf.position.y + m_groundAnchor1.y);
_local6 = (.m_xf.position.x + m_groundAnchor2.x);
_local7 = (.m_xf.position.y + m_groundAnchor2.y);
_local23 = 0;
if ( == e_atUpperLimit){
_local3 = _local1.m_xf.R;
_local8 = (m_localAnchor1.x - _local1.m_sweep.localCenter.x);
_local9 = (m_localAnchor1.y - _local1.m_sweep.localCenter.y);
_local22 = ((_local3.col1.x * _local8) + (_local3.col2.x * _local9));
_local9 = ((_local3.col1.y * _local8) + (_local3.col2.y * _local9));
_local8 = _local22;
_local3 = _local2.m_xf.R;
_local10 = (m_localAnchor2.x - _local2.m_sweep.localCenter.x);
_local11 = (m_localAnchor2.y - _local2.m_sweep.localCenter.y);
_local22 = ((_local3.col1.x * _local10) + (_local3.col2.x * _local11));
_local11 = ((_local3.col1.y * _local10) + (_local3.col2.y * _local11));
_local10 = _local22;
_local12 = (_local1.m_sweep.c.x + _local8);
_local13 = (_local1.m_sweep.c.y + _local9);
_local14 = (_local2.m_sweep.c.x + _local10);
_local15 = (_local2.m_sweep.c.y + _local11);
.Set((_local12 - _local4), (_local13 - _local5));
.Set((_local14 - _local6), (_local15 - _local7));
_local16 = .Length();
_local17 = .Length();
if (_local16 > b2Settings.b2_linearSlop){
.Multiply((1 / _local16));
} else {
.SetZero();
};
if (_local17 > b2Settings.b2_linearSlop){
.Multiply((1 / _local17));
} else {
.SetZero();
};
_local18 = ((m_constant - _local16) - (m_ratio * _local17));
_local23 = b2Math.b2Max(_local23, -(_local18));
_local18 = b2Math.b2Clamp((_local18 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0);
_local19 = (-(
) * _local18);
_local20 =
;
= b2Math.b2Max(0, (
+ _local19));
_local19 = (
- _local20);
_local12 = (-(_local19) * .x);
_local13 = (-(_local19) * .y);
_local14 = ((-(m_ratio) * _local19) * .x);
_local15 = ((-(m_ratio) * _local19) * .y);
_local1.m_sweep.c.x = (_local1.m_sweep.c.x + (_local1.m_invMass * _local12));
_local1.m_sweep.c.y = (_local1.m_sweep.c.y + (_local1.m_invMass * _local13));
_local1.m_sweep.a = (_local1.m_sweep.a + (_local1.m_invI * ((_local8 * _local13) - (_local9 * _local12))));
_local2.m_sweep.c.x = (_local2.m_sweep.c.x + (_local2.m_invMass * _local14));
_local2.m_sweep.c.y = (_local2.m_sweep.c.y + (_local2.m_invMass * _local15));
_local2.m_sweep.a = (_local2.m_sweep.a + (_local2.m_invI * ((_local10 * _local15) - (_local11 * _local14))));
_local1.SynchronizeTransform();
_local2.SynchronizeTransform();
};
if ( == e_atUpperLimit){
_local3 = _local1.m_xf.R;
_local8 = (m_localAnchor1.x - _local1.m_sweep.localCenter.x);
_local9 = (m_localAnchor1.y - _local1.m_sweep.localCenter.y);
_local22 = ((_local3.col1.x * _local8) + (_local3.col2.x * _local9));
_local9 = ((_local3.col1.y * _local8) + (_local3.col2.y * _local9));
_local8 = _local22;
_local12 = (_local1.m_sweep.c.x + _local8);
_local13 = (_local1.m_sweep.c.y + _local9);
.Set((_local12 - _local4), (_local13 - _local5));
_local16 = .Length();
if (_local16 > b2Settings.b2_linearSlop){
.x = (.x * (1 / _local16));
.y = (.y * (1 / _local16));
} else {
.SetZero();
};
_local18 = ( - _local16);
_local23 = b2Math.b2Max(_local23, -(_local18));
_local18 = b2Math.b2Clamp((_local18 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0);
_local19 = (-() * _local18);
_local21 = ;
= b2Math.b2Max(0, ( + _local19));
_local19 = ( - _local21);
_local12 = (-(_local19) * .x);
_local13 = (-(_local19) * .y);
_local1.m_sweep.c.x = (_local1.m_sweep.c.x + (_local1.m_invMass * _local12));
_local1.m_sweep.c.y = (_local1.m_sweep.c.y + (_local1.m_invMass * _local13));
_local1.m_sweep.a = (_local1.m_sweep.a + (_local1.m_invI * ((_local8 * _local13) - (_local9 * _local12))));
_local1.SynchronizeTransform();
};
if ( == e_atUpperLimit){
_local3 = _local2.m_xf.R;
_local10 = (m_localAnchor2.x - _local2.m_sweep.localCenter.x);
_local11 = (m_localAnchor2.y - _local2.m_sweep.localCenter.y);
_local22 = ((_local3.col1.x * _local10) + (_local3.col2.x * _local11));
_local11 = ((_local3.col1.y * _local10) + (_local3.col2.y * _local11));
_local10 = _local22;
_local14 = (_local2.m_sweep.c.x + _local10);
_local15 = (_local2.m_sweep.c.y + _local11);
.Set((_local14 - _local6), (_local15 - _local7));
_local17 = .Length();
if (_local17 > b2Settings.b2_linearSlop){
.x = (.x * (1 / _local17));
.y = (.y * (1 / _local17));
} else {
.SetZero();
};
_local18 = ( - _local17);
_local23 = b2Math.b2Max(_local23, -(_local18));
_local18 = b2Math.b2Clamp((_local18 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0);
_local19 = (-() * _local18);
_local21 = ;
= b2Math.b2Max(0, ( + _local19));
_local19 = ( - _local21);
_local14 = (-(_local19) * .x);
_local15 = (-(_local19) * .y);
_local2.m_sweep.c.x = (_local2.m_sweep.c.x + (_local2.m_invMass * _local14));
_local2.m_sweep.c.y = (_local2.m_sweep.c.y + (_local2.m_invMass * _local15));
_local2.m_sweep.a = (_local2.m_sweep.a + (_local2.m_invI * ((_local10 * _local15) - (_local11 * _local14))));
_local2.SynchronizeTransform();
};
return ((_local23 < b2Settings.b2_linearSlop));
}
override public function InitVelocityConstraints(_arg1:b2TimeStep):void{
var _local2:b2Body;
var _local3:b2Body;
var _local4:b2Mat22;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
var _local26:Number;
_local2 = m_body1;
_local3 = m_body2;
_local4 = _local2.m_xf.R;
_local5 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x);
_local6 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y);
_local7 = ((_local4.col1.x * _local5) + (_local4.col2.x * _local6));
_local6 = ((_local4.col1.y * _local5) + (_local4.col2.y * _local6));
_local5 = _local7;
_local4 = _local3.m_xf.R;
_local8 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x);
_local9 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y);
_local7 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9));
_local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9));
_local8 = _local7;
_local10 = (_local2.m_sweep.c.x + _local5);
_local11 = (_local2.m_sweep.c.y + _local6);
_local12 = (_local3.m_sweep.c.x + _local8);
_local13 = (_local3.m_sweep.c.y + _local9);
_local14 = (.m_xf.position.x + m_groundAnchor1.x);
_local15 = (.m_xf.position.y + m_groundAnchor1.y);
_local16 = (.m_xf.position.x + m_groundAnchor2.x);
_local17 = (.m_xf.position.y + m_groundAnchor2.y);
.Set((_local10 - _local14), (_local11 - _local15));
.Set((_local12 - _local16), (_local13 - _local17));
_local18 = .Length();
_local19 = .Length();
if (_local18 > b2Settings.b2_linearSlop){
.Multiply((1 / _local18));
} else {
.SetZero();
};
if (_local19 > b2Settings.b2_linearSlop){
.Multiply((1 / _local19));
} else {
.SetZero();
};
_local20 = ((m_constant - _local18) - (m_ratio * _local19));
if (_local20 > 0){
= e_inactiveLimit;
m_force = 0;
} else {
= e_atUpperLimit;
= 0;
};
if (_local18 < ){
= e_inactiveLimit;
= 0;
} else {
= e_atUpperLimit;
= 0;
};
if (_local19 < ){
= e_inactiveLimit;
= 0;
} else {
= e_atUpperLimit;
= 0;
};
_local21 = ((_local5 * .y) - (_local6 * .x));
_local22 = ((_local8 * .y) - (_local9 * .x));
= (_local2.m_invMass + ((_local2.m_invI * _local21) * _local21));
= (_local3.m_invMass + ((_local3.m_invI * _local22) * _local22));
= ( + ((m_ratio * m_ratio) * ));
= (1 / );
= (1 / );
= (1 /
);
if (_arg1.warmStarting){
_local23 = ((_arg1.dt * (-(m_force) -
)) * .x);
_local24 = ((_arg1.dt * (-(m_force) -
)) * .y);
_local25 = ((_arg1.dt * ((-(m_ratio) * m_force) - )) * .x);
_local26 = ((_arg1.dt * ((-(m_ratio) * m_force) - )) * .y);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local23));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local24));
_local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local5 * _local24) - (_local6 * _local23))));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local3.m_invMass * _local25));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local3.m_invMass * _local26));
_local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * ((_local8 * _local26) - (_local9 * _local25))));
} else {
m_force = 0;
= 0;
= 0;
};
}
override public function GetReactionTorque():Number{
return (0);
}
public function GetRatio():Number{
return (m_ratio);
}
public function ():Number{
var _local1:b2Vec2;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local1 = m_body2.GetWorldPoint(m_localAnchor2);
_local2 = (.m_xf.position.x + m_groundAnchor2.x);
_local3 = (.m_xf.position.y + m_groundAnchor2.y);
_local4 = (_local1.x - _local2);
_local5 = (_local1.y - _local3);
return (Math.sqrt(((_local4 * _local4) + (_local5 * _local5))));
}
override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{
var _local2:b2Body;
var _local3:b2Body;
var _local4:b2Mat22;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
_local2 = m_body1;
_local3 = m_body2;
_local4 = _local2.m_xf.R;
_local5 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x);
_local6 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y);
_local7 = ((_local4.col1.x * _local5) + (_local4.col2.x * _local6));
_local6 = ((_local4.col1.y * _local5) + (_local4.col2.y * _local6));
_local5 = _local7;
_local4 = _local3.m_xf.R;
_local8 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x);
_local9 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y);
_local7 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9));
_local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9));
_local8 = _local7;
if ( == e_atUpperLimit){
_local10 = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local6));
_local11 = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local5));
_local12 = (_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local9));
_local13 = (_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local8));
_local18 = (-(((.x * _local10) + (.y * _local11))) - (m_ratio * ((.x * _local12) + (.y * _local13))));
_local19 = ((-(_arg1.inv_dt) *
) * _local18);
_local20 = m_force;
m_force = b2Math.b2Max(0, (m_force + _local19));
_local19 = (m_force - _local20);
_local14 = ((-(_arg1.dt) * _local19) * .x);
_local15 = ((-(_arg1.dt) * _local19) * .y);
_local16 = (((-(_arg1.dt) * m_ratio) * _local19) * .x);
_local17 = (((-(_arg1.dt) * m_ratio) * _local19) * .y);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local14));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local15));
_local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local5 * _local15) - (_local6 * _local14))));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local3.m_invMass * _local16));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local3.m_invMass * _local17));
_local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * ((_local8 * _local17) - (_local9 * _local16))));
};
if ( == e_atUpperLimit){
_local10 = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local6));
_local11 = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local5));
_local18 = -(((.x * _local10) + (.y * _local11)));
_local19 = ((-(_arg1.inv_dt) * ) * _local18);
_local20 =
;
= b2Math.b2Max(0, (
+ _local19));
_local19 = (
- _local20);
_local14 = ((-(_arg1.dt) * _local19) * .x);
_local15 = ((-(_arg1.dt) * _local19) * .y);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local14));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local15));
_local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local5 * _local15) - (_local6 * _local14))));
};
if ( == e_atUpperLimit){
_local12 = (_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local9));
_local13 = (_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local8));
_local18 = -(((.x * _local12) + (.y * _local13)));
_local19 = ((-(_arg1.inv_dt) * ) * _local18);
_local20 = ;
= b2Math.b2Max(0, ( + _local19));
_local19 = ( - _local20);
_local16 = ((-(_arg1.dt) * _local19) * .x);
_local17 = ((-(_arg1.dt) * _local19) * .y);
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local3.m_invMass * _local16));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local3.m_invMass * _local17));
_local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * ((_local8 * _local17) - (_local9 * _local16))));
};
}
public function ():Number{
var _local1:b2Vec2;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local1 = m_body1.GetWorldPoint(m_localAnchor1);
_local2 = (.m_xf.position.x + m_groundAnchor1.x);
_local3 = (.m_xf.position.y + m_groundAnchor1.y);
_local4 = (_local1.x - _local2);
_local5 = (_local1.y - _local3);
return (Math.sqrt(((_local4 * _local4) + (_local5 * _local5))));
}
public function GetGroundAnchor1():b2Vec2{
var _local1:b2Vec2;
_local1 = .m_xf.position.Copy();
_local1.Add(m_groundAnchor1);
return (_local1);
}
}
}//package Box2D.Dynamics.Joints
Section 61
//b2PulleyJointDef (Box2D.Dynamics.Joints.b2PulleyJointDef)
package Box2D.Dynamics.Joints {
import Box2D.Dynamics.*;
import Box2D.Common.Math.*;
public class b2PulleyJointDef extends b2JointDef {
public var :Number;
public var
:Number;
public var :Number;
public var :Number;
public var ratio:Number;
public var :b2Vec2;
public var :b2Vec2;
public var localAnchor1:b2Vec2;
public var localAnchor2:b2Vec2;
public function b2PulleyJointDef(){
= new b2Vec2();
= new b2Vec2();
localAnchor1 = new b2Vec2();
localAnchor2 = new b2Vec2();
super();
type = b2Joint.e_pulleyJoint;
.Set(-1, 1);
.Set(1, 1);
localAnchor1.Set(-1, 0);
localAnchor2.Set(1, 0);
= 0;
= 0;
= 0;
= 0;
ratio = 1;
collideConnected = true;
}
public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2, _arg4:b2Vec2, _arg5:b2Vec2, _arg6:b2Vec2, _arg7:Number):void{
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
body1 = _arg1;
body2 = _arg2;
.SetV(_arg3);
.SetV(_arg4);
localAnchor1 = body1.GetLocalPoint(_arg5);
localAnchor2 = body2.GetLocalPoint(_arg6);
_local8 = (_arg5.x - _arg3.x);
_local9 = (_arg5.y - _arg3.y);
= Math.sqrt(((_local8 * _local8) + (_local9 * _local9)));
_local10 = (_arg6.x - _arg4.x);
_local11 = (_arg6.y - _arg4.y);
= Math.sqrt(((_local10 * _local10) + (_local11 * _local11)));
ratio = _arg7;
_local12 = (
+ (ratio * ));
= (_local12 - (ratio * b2PulleyJoint.b2_minPulleyLength));
= ((_local12 - b2PulleyJoint.b2_minPulleyLength) / ratio);
}
}
}//package Box2D.Dynamics.Joints
Section 62
//b2RevoluteJoint (Box2D.Dynamics.Joints.b2RevoluteJoint)
package Box2D.Dynamics.Joints {
import Box2D.Dynamics.*;
import Box2D.Common.Math.*;
import Box2D.Common.*;
public class b2RevoluteJoint extends b2Joint {
public var m_limitForce:Number;
public var m_motorForce:Number;
public var :b2Mat22;
public var m_enableLimit:Boolean;
public var m_limitState:int;
public var m_motorMass:Number;
public var m_localAnchor1:b2Vec2;
public var m_localAnchor2:b2Vec2;
private var :b2Mat22;
private var :b2Mat22;
private var
:b2Mat22;
private var :b2Mat22;
public var :b2Vec2;
public var m_motorSpeed:Number;
public var m_enableMotor:Boolean;
public var m_limitPositionImpulse:Number;
public var :Number;
public var :Number;
public var :Number;
public var :Number;
public static var tImpulse:b2Vec2 = new b2Vec2();
public function b2RevoluteJoint(_arg1:b2RevoluteJointDef){
= new b2Mat22();
= new b2Mat22();
= new b2Mat22();
= new b2Mat22();
m_localAnchor1 = new b2Vec2();
m_localAnchor2 = new b2Vec2();
= new b2Vec2();
= new b2Mat22();
super(_arg1);
m_localAnchor1.SetV(_arg1.localAnchor1);
m_localAnchor2.SetV(_arg1.localAnchor2);
= _arg1.referenceAngle;
.Set(0, 0);
m_motorForce = 0;
m_limitForce = 0;
m_limitPositionImpulse = 0;
= _arg1.;
= _arg1.;
= _arg1.;
m_motorSpeed = _arg1.motorSpeed;
m_enableLimit = _arg1.enableLimit;
m_enableMotor = _arg1.enableMotor;
}
override public function GetAnchor1():b2Vec2{
return (m_body1.GetWorldPoint(m_localAnchor1));
}
override public function GetAnchor2():b2Vec2{
return (m_body2.GetWorldPoint(m_localAnchor2));
}
public function EnableMotor(_arg1:Boolean):void{
m_enableMotor = _arg1;
}
public function GetUpperLimit():Number{
return ( );
}
public function GetLowerLimit():Number{
return ( );
}
public function SetLimits(_arg1:Number, _arg2:Number):void{
= _arg1;
= _arg2;
}
public function GetMotorSpeed():Number{
return (m_motorSpeed);
}
override public function GetReactionForce():b2Vec2{
return ();
}
override public function SolvePositionConstraints():Boolean{
var _local1:Number;
var _local2:Number;
var _local3:b2Body;
var _local4:b2Body;
var _local5:Number;
var _local6:b2Mat22;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
var _local26:Number;
_local3 = m_body1;
_local4 = m_body2;
_local5 = 0;
_local6 = _local3.m_xf.R;
_local7 = (m_localAnchor1.x - _local3.m_sweep.localCenter.x);
_local8 = (m_localAnchor1.y - _local3.m_sweep.localCenter.y);
_local9 = ((_local6.col1.x * _local7) + (_local6.col2.x * _local8));
_local8 = ((_local6.col1.y * _local7) + (_local6.col2.y * _local8));
_local7 = _local9;
_local6 = _local4.m_xf.R;
_local10 = (m_localAnchor2.x - _local4.m_sweep.localCenter.x);
_local11 = (m_localAnchor2.y - _local4.m_sweep.localCenter.y);
_local9 = ((_local6.col1.x * _local10) + (_local6.col2.x * _local11));
_local11 = ((_local6.col1.y * _local10) + (_local6.col2.y * _local11));
_local10 = _local9;
_local12 = (_local3.m_sweep.c.x + _local7);
_local13 = (_local3.m_sweep.c.y + _local8);
_local14 = (_local4.m_sweep.c.x + _local10);
_local15 = (_local4.m_sweep.c.y + _local11);
_local16 = (_local14 - _local12);
_local17 = (_local15 - _local13);
_local5 = Math.sqrt(((_local16 * _local16) + (_local17 * _local17)));
_local18 = _local3.m_invMass;
_local19 = _local4.m_invMass;
_local20 = _local3.m_invI;
_local21 = _local4.m_invI;
.col1.x = (_local18 + _local19);
.col2.x = 0;
.col1.y = 0;
.col2.y = (_local18 + _local19);
.col1.x = ((_local20 * _local8) * _local8);
.col2.x = ((-(_local20) * _local7) * _local8);
.col1.y = ((-(_local20) * _local7) * _local8);
.col2.y = ((_local20 * _local7) * _local7);
.col1.x = ((_local21 * _local11) * _local11);
.col2.x = ((-(_local21) * _local10) * _local11);
.col1.y = ((-(_local21) * _local10) * _local11);
.col2.y = ((_local21 * _local10) * _local10);
.SetM();
.AddM();
.AddM(
);
.Solve(tImpulse, -(_local16), -(_local17));
_local22 = tImpulse.x;
_local23 = tImpulse.y;
_local3.m_sweep.c.x = (_local3.m_sweep.c.x - (_local3.m_invMass * _local22));
_local3.m_sweep.c.y = (_local3.m_sweep.c.y - (_local3.m_invMass * _local23));
_local3.m_sweep.a = (_local3.m_sweep.a - (_local3.m_invI * ((_local7 * _local23) - (_local8 * _local22))));
_local4.m_sweep.c.x = (_local4.m_sweep.c.x + (_local4.m_invMass * _local22));
_local4.m_sweep.c.y = (_local4.m_sweep.c.y + (_local4.m_invMass * _local23));
_local4.m_sweep.a = (_local4.m_sweep.a + (_local4.m_invI * ((_local10 * _local23) - (_local11 * _local22))));
_local3.SynchronizeTransform();
_local4.SynchronizeTransform();
_local24 = 0;
if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){
_local25 = ((_local4.m_sweep.a - _local3.m_sweep.a) - );
_local26 = 0;
if (m_limitState == e_equalLimits){
_local2 = b2Math.b2Clamp(_local25, -(b2Settings.b2_maxAngularCorrection), b2Settings.b2_maxAngularCorrection);
_local26 = (-(m_motorMass) * _local2);
_local24 = b2Math.b2Abs(_local2);
} else {
if (m_limitState == e_atLowerLimit){
_local2 = (_local25 - );
_local24 = b2Math.b2Max(0, -(_local2));
_local2 = b2Math.b2Clamp((_local2 + b2Settings.b2_angularSlop), -(b2Settings.b2_maxAngularCorrection), 0);
_local26 = (-(m_motorMass) * _local2);
_local1 = m_limitPositionImpulse;
m_limitPositionImpulse = b2Math.b2Max((m_limitPositionImpulse + _local26), 0);
_local26 = (m_limitPositionImpulse - _local1);
} else {
if (m_limitState == e_atUpperLimit){
_local2 = (_local25 - );
_local24 = b2Math.b2Max(0, _local2);
_local2 = b2Math.b2Clamp((_local2 - b2Settings.b2_angularSlop), 0, b2Settings.b2_maxAngularCorrection);
_local26 = (-(m_motorMass) * _local2);
_local1 = m_limitPositionImpulse;
m_limitPositionImpulse = b2Math.b2Min((m_limitPositionImpulse + _local26), 0);
_local26 = (m_limitPositionImpulse - _local1);
};
};
};
_local3.m_sweep.a = (_local3.m_sweep.a - (_local3.m_invI * _local26));
_local4.m_sweep.a = (_local4.m_sweep.a + (_local4.m_invI * _local26));
_local3.SynchronizeTransform();
_local4.SynchronizeTransform();
};
return ((((_local5 <= b2Settings.b2_linearSlop)) && ((_local24 <= b2Settings.b2_angularSlop))));
}
public function GetJointSpeed():Number{
return ((m_body2.m_angularVelocity - m_body1.m_angularVelocity));
}
public function SetMotorSpeed(_arg1:Number):void{
m_motorSpeed = _arg1;
}
public function (_arg1:Number):void{
= _arg1;
}
public function GetJointAngle():Number{
return (((m_body2.m_sweep.a - m_body1.m_sweep.a) - ));
}
override public function InitVelocityConstraints(_arg1:b2TimeStep):void{
var _local2:b2Body;
var _local3:b2Body;
var _local4:b2Mat22;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
_local2 = m_body1;
_local3 = m_body2;
_local4 = _local2.m_xf.R;
_local6 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x);
_local7 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y);
_local5 = ((_local4.col1.x * _local6) + (_local4.col2.x * _local7));
_local7 = ((_local4.col1.y * _local6) + (_local4.col2.y * _local7));
_local6 = _local5;
_local4 = _local3.m_xf.R;
_local8 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x);
_local9 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y);
_local5 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9));
_local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9));
_local8 = _local5;
_local10 = _local2.m_invMass;
_local11 = _local3.m_invMass;
_local12 = _local2.m_invI;
_local13 = _local3.m_invI;
.col1.x = (_local10 + _local11);
.col2.x = 0;
.col1.y = 0;
.col2.y = (_local10 + _local11);
.col1.x = ((_local12 * _local7) * _local7);
.col2.x = ((-(_local12) * _local6) * _local7);
.col1.y = ((-(_local12) * _local6) * _local7);
.col2.y = ((_local12 * _local6) * _local6);
.col1.x = ((_local13 * _local9) * _local9);
.col2.x = ((-(_local13) * _local8) * _local9);
.col1.y = ((-(_local13) * _local8) * _local9);
.col2.y = ((_local13 * _local8) * _local8);
.SetM();
.AddM();
.AddM(
);
.Invert();
m_motorMass = (1 / (_local12 + _local13));
if (m_enableMotor == false){
m_motorForce = 0;
};
if (m_enableLimit){
_local14 = ((_local3.m_sweep.a - _local2.m_sweep.a) - );
if (b2Math.b2Abs(( - )) < (2 * b2Settings.b2_angularSlop)){
m_limitState = e_equalLimits;
} else {
if (_local14 <= ){
if (m_limitState != e_atLowerLimit){
m_limitForce = 0;
};
m_limitState = e_atLowerLimit;
} else {
if (_local14 >= ){
if (m_limitState != e_atUpperLimit){
m_limitForce = 0;
};
m_limitState = e_atUpperLimit;
} else {
m_limitState = e_inactiveLimit;
m_limitForce = 0;
};
};
};
} else {
m_limitForce = 0;
};
if (_arg1.warmStarting){
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x - ((_arg1.dt * _local10) * .x));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y - ((_arg1.dt * _local10) * .y));
_local2.m_angularVelocity = (_local2.m_angularVelocity - ((_arg1.dt * _local12) * ((((_local6 * .y) - (_local7 * .x)) + m_motorForce) + m_limitForce)));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_arg1.dt * _local11) * .x));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_arg1.dt * _local11) * .y));
_local3.m_angularVelocity = (_local3.m_angularVelocity + ((_arg1.dt * _local13) * ((((_local8 * .y) - (_local9 * .x)) + m_motorForce) + m_limitForce)));
} else {
.SetZero();
m_motorForce = 0;
m_limitForce = 0;
};
m_limitPositionImpulse = 0;
}
public function EnableLimit(_arg1:Boolean):void{
m_enableLimit = _arg1;
}
public function ():Number{
return (m_motorForce);
}
override public function GetReactionTorque():Number{
return (m_limitForce);
}
public function IsLimitEnabled():Boolean{
return (m_enableLimit);
}
public function IsMotorEnabled():Boolean{
return (m_enableMotor);
}
override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{
var _local2:b2Body;
var _local3:b2Body;
var _local4:b2Mat22;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
_local2 = m_body1;
_local3 = m_body2;
_local4 = _local2.m_xf.R;
_local6 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x);
_local7 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y);
_local5 = ((_local4.col1.x * _local6) + (_local4.col2.x * _local7));
_local7 = ((_local4.col1.y * _local6) + (_local4.col2.y * _local7));
_local6 = _local5;
_local4 = _local3.m_xf.R;
_local8 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x);
_local9 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y);
_local5 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9));
_local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9));
_local8 = _local5;
_local11 = (((_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local9)) - _local2.m_linearVelocity.x) - (-(_local2.m_angularVelocity) * _local7));
_local12 = (((_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local8)) - _local2.m_linearVelocity.y) - (_local2.m_angularVelocity * _local6));
_local13 = (-(_arg1.inv_dt) * ((.col1.x * _local11) + (.col2.x * _local12)));
_local14 = (-(_arg1.inv_dt) * ((.col1.y * _local11) + (.col2.y * _local12)));
.x = (.x + _local13);
.y = (.y + _local14);
_local15 = (_arg1.dt * _local13);
_local16 = (_arg1.dt * _local14);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x - (_local2.m_invMass * _local15));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y - (_local2.m_invMass * _local16));
_local2.m_angularVelocity = (_local2.m_angularVelocity - (_local2.m_invI * ((_local6 * _local16) - (_local7 * _local15))));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local3.m_invMass * _local15));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local3.m_invMass * _local16));
_local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * ((_local8 * _local16) - (_local9 * _local15))));
if (((m_enableMotor) && (!((m_limitState == e_equalLimits))))){
_local17 = ((_local3.m_angularVelocity - _local2.m_angularVelocity) - m_motorSpeed);
_local18 = ((-(_arg1.inv_dt) * m_motorMass) * _local17);
_local19 = m_motorForce;
m_motorForce = b2Math.b2Clamp((m_motorForce + _local18), -( ), );
_local18 = (m_motorForce - _local19);
_local2.m_angularVelocity = (_local2.m_angularVelocity - ((_local2.m_invI * _arg1.dt) * _local18));
_local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local3.m_invI * _arg1.dt) * _local18));
};
if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){
_local20 = (_local3.m_angularVelocity - _local2.m_angularVelocity);
_local21 = ((-(_arg1.inv_dt) * m_motorMass) * _local20);
if (m_limitState == e_equalLimits){
m_limitForce = (m_limitForce + _local21);
} else {
if (m_limitState == e_atLowerLimit){
_local10 = m_limitForce;
m_limitForce = b2Math.b2Max((m_limitForce + _local21), 0);
_local21 = (m_limitForce - _local10);
} else {
if (m_limitState == e_atUpperLimit){
_local10 = m_limitForce;
m_limitForce = b2Math.b2Min((m_limitForce + _local21), 0);
_local21 = (m_limitForce - _local10);
};
};
};
_local2.m_angularVelocity = (_local2.m_angularVelocity - ((_local2.m_invI * _arg1.dt) * _local21));
_local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local3.m_invI * _arg1.dt) * _local21));
};
}
}
}//package Box2D.Dynamics.Joints
Section 63
//b2RevoluteJointDef (Box2D.Dynamics.Joints.b2RevoluteJointDef)
package Box2D.Dynamics.Joints {
import Box2D.Dynamics.*;
import Box2D.Common.Math.*;
public class b2RevoluteJointDef extends b2JointDef {
public var referenceAngle:Number;
public var :Number;
public var :Number;
public var motorSpeed:Number;
public var :Number;
public var localAnchor1:b2Vec2;
public var localAnchor2:b2Vec2;
public var enableLimit:Boolean;
public var enableMotor:Boolean;
public function b2RevoluteJointDef(){
localAnchor1 = new b2Vec2();
localAnchor2 = new b2Vec2();
super();
type = b2Joint.e_revoluteJoint;
localAnchor1.Set(0, 0);
localAnchor2.Set(0, 0);
referenceAngle = 0;
= 0;
= 0;
= 0;
motorSpeed = 0;
enableLimit = false;
enableMotor = false;
}
public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2):void{
body1 = _arg1;
body2 = _arg2;
localAnchor1 = body1.GetLocalPoint(_arg3);
localAnchor2 = body2.GetLocalPoint(_arg3);
referenceAngle = (body2.GetAngle() - body1.GetAngle());
}
}
}//package Box2D.Dynamics.Joints
Section 64
//b2Body (Box2D.Dynamics.b2Body)
package Box2D.Dynamics {
import Box2D.Collision.Shapes.*;
import Box2D.Common.Math.*;
import Box2D.Dynamics.Joints.*;
import Box2D.Dynamics.Contacts.*;
public class b2Body {
public var m_next:b2Body;
public var m_contactList:b2ContactEdge;
public var m_angularVelocity:Number;
public var m_shapeList:b2Shape;
public var m_force:b2Vec2;
public var m_mass:Number;
public var m_sweep:b2Sweep;
public var m_xf:b2XForm;
public var m_torque:Number;
public var m_userData;
public var m_flags:uint;
public var m_world:b2World;
public var m_prev:b2Body;
public var m_invMass:Number;
public var m_type:int;
public var m_linearDamping:Number;
public var m_angularDamping:Number;
public var m_invI:Number;
public var m_linearVelocity:b2Vec2;
public var m_sleepTime:Number;
public var m_shapeCount:int;
public var m_jointList:b2JointEdge;
public var :Number;
public static var e_fixedRotationFlag:uint = 64;
public static var e_frozenFlag:uint = 2;
public static var e_maxTypes:uint = 3;
public static var e_sleepFlag:uint = 8;
private static var s_massData:b2MassData = new b2MassData();
public static var e_bulletFlag:uint = 32;
public static var e_staticType:uint = 1;
public static var e_islandFlag:uint = 4;
public static var e_allowSleepFlag:uint = 16;
private static var s_xf1:b2XForm = new b2XForm();
public static var e_dynamicType:uint = 2;
public function b2Body(_arg1:b2BodyDef, _arg2:b2World){
var _local3:b2Mat22;
var _local4:b2Vec2;
m_xf = new b2XForm();
m_sweep = new b2Sweep();
m_linearVelocity = new b2Vec2();
m_force = new b2Vec2();
super();
m_flags = 0;
if (_arg1.){
m_flags = (m_flags | e_bulletFlag);
};
if (_arg1.){
m_flags = (m_flags | e_fixedRotationFlag);
};
if (_arg1.
){
m_flags = (m_flags | e_allowSleepFlag);
};
if (_arg1.
){
m_flags = (m_flags | e_sleepFlag);
};
m_world = _arg2;
m_xf.position.SetV(_arg1.position);
m_xf.R.Set(_arg1.);
m_sweep.localCenter.SetV(_arg1..center);
m_sweep.t0 = 1;
m_sweep.a0 = (m_sweep.a = _arg1.);
_local3 = m_xf.R;
_local4 = m_sweep.localCenter;
m_sweep.c.x = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y));
m_sweep.c.y = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y));
m_sweep.c.x = (m_sweep.c.x + m_xf.position.x);
m_sweep.c.y = (m_sweep.c.y + m_xf.position.y);
m_sweep.c0.SetV(m_sweep.c);
m_jointList = null;
m_contactList = null;
m_prev = null;
m_next = null;
m_linearDamping = _arg1.;
m_angularDamping = _arg1.;
m_force.Set(0, 0);
m_torque = 0;
m_linearVelocity.SetZero();
m_angularVelocity = 0;
m_sleepTime = 0;
m_invMass = 0;
= 0;
m_invI = 0;
m_mass = _arg1..mass;
if (m_mass > 0){
m_invMass = (1 / m_mass);
};
if ((m_flags & b2Body.e_fixedRotationFlag) == 0){
= _arg1..I;
};
if ( > 0){
m_invI = (1 / );
};
if ((((m_invMass == 0)) && ((m_invI == 0)))){
m_type = e_staticType;
} else {
m_type = e_dynamicType;
};
m_userData = _arg1.userData;
m_shapeList = null;
m_shapeCount = 0;
}
public function (_arg1:b2Vec2):b2Vec2{
return (new b2Vec2((m_linearVelocity.x + (m_angularVelocity * (_arg1.y - m_sweep.c.y))), (m_linearVelocity.x - (m_angularVelocity * (_arg1.x - m_sweep.c.x)))));
}
public function (_arg1:b2Vec2):void{
m_linearVelocity.SetV(_arg1);
}
public function WakeUp():void{
m_flags = (m_flags & ~(e_sleepFlag));
m_sleepTime = 0;
}
public function ():b2Vec2{
return (m_sweep.localCenter);
}
public function (_arg1:Number):void{
if (IsSleeping()){
WakeUp();
};
m_torque = (m_torque + _arg1);
}
public function ():Boolean{
return (((m_flags & e_frozenFlag) == e_frozenFlag));
}
public function ():Boolean{
return ((m_type == e_dynamicType));
}
public function GetLinearVelocity():b2Vec2{
return (m_linearVelocity);
}
public function SynchronizeTransform():void{
var _local1:b2Mat22;
var _local2:b2Vec2;
m_xf.R.Set(m_sweep.a);
_local1 = m_xf.R;
_local2 = m_sweep.localCenter;
m_xf.position.x = (m_sweep.c.x - ((_local1.col1.x * _local2.x) + (_local1.col2.x * _local2.y)));
m_xf.position.y = (m_sweep.c.y - ((_local1.col1.y * _local2.x) + (_local1.col2.y * _local2.y)));
}
public function ():Number{
return ();
}
public function IsSleeping():Boolean{
return (((m_flags & e_sleepFlag) == e_sleepFlag));
}
public function ():void{
var _local1:b2Shape;
var _local2:Number;
var _local3:Number;
var _local4:b2MassData;
var _local5:b2Mat22;
var _local6:b2Vec2;
var _local7:int;
if (m_world.m_lock == true){
return;
};
m_mass = 0;
m_invMass = 0;
= 0;
m_invI = 0;
_local2 = 0;
_local3 = 0;
_local4 = s_massData;
_local1 = m_shapeList;
while (_local1) {
_local1.ComputeMass(_local4);
m_mass = (m_mass + _local4.mass);
_local2 = (_local2 + (_local4.mass * _local4.center.x));
_local3 = (_local3 + (_local4.mass * _local4.center.y));
= ( + _local4.I);
_local1 = _local1.m_next;
};
if (m_mass > 0){
m_invMass = (1 / m_mass);
_local2 = (_local2 * m_invMass);
_local3 = (_local3 * m_invMass);
};
if (((( > 0)) && (((m_flags & e_fixedRotationFlag) == 0)))){
= ( - (m_mass * ((_local2 * _local2) + (_local3 * _local3))));
m_invI = (1 / );
} else {
= 0;
m_invI = 0;
};
m_sweep.localCenter.Set(_local2, _local3);
_local5 = m_xf.R;
_local6 = m_sweep.localCenter;
m_sweep.c.x = ((_local5.col1.x * _local6.x) + (_local5.col2.x * _local6.y));
m_sweep.c.y = ((_local5.col1.y * _local6.x) + (_local5.col2.y * _local6.y));
m_sweep.c.x = (m_sweep.c.x + m_xf.position.x);
m_sweep.c.y = (m_sweep.c.y + m_xf.position.y);
m_sweep.c0.SetV(m_sweep.c);
_local1 = m_shapeList;
while (_local1) {
_local1.UpdateSweepRadius(m_sweep.localCenter);
_local1 = _local1.m_next;
};
_local7 = m_type;
if ((((m_invMass == 0)) && ((m_invI == 0)))){
m_type = e_staticType;
} else {
m_type = e_dynamicType;
};
if (_local7 != m_type){
_local1 = m_shapeList;
while (_local1) {
_local1.RefilterProxy(m_world.m_broadPhase, m_xf);
_local1 = _local1.m_next;
};
};
}
public function
():void{
m_flags = (m_flags | e_sleepFlag);
m_sleepTime = 0;
m_linearVelocity.SetZero();
m_angularVelocity = 0;
m_force.SetZero();
m_torque = 0;
}
public function GetJointList():b2JointEdge{
return (m_jointList);
}
public function
(_arg1:b2Vec2, _arg2:Number):Boolean{
var _local3:b2Shape;
var _local4:b2Mat22;
var _local5:b2Vec2;
var _local6:Boolean;
var _local7:Boolean;
if (m_world.m_lock == true){
return (true);
};
if (()){
return (false);
};
m_xf.R.Set(_arg2);
m_xf.position.SetV(_arg1);
_local4 = m_xf.R;
_local5 = m_sweep.localCenter;
m_sweep.c.x = ((_local4.col1.x * _local5.x) + (_local4.col2.x * _local5.y));
m_sweep.c.y = ((_local4.col1.y * _local5.x) + (_local4.col2.y * _local5.y));
m_sweep.c.x = (m_sweep.c.x + m_xf.position.x);
m_sweep.c.y = (m_sweep.c.y + m_xf.position.y);
m_sweep.c0.SetV(m_sweep.c);
m_sweep.a0 = (m_sweep.a = _arg2);
_local6 = false;
_local3 = m_shapeList;
while (_local3) {
_local7 = _local3.Synchronize(m_world.m_broadPhase, m_xf, m_xf);
if (_local7 == false){
_local6 = true;
break;
};
_local3 = _local3.m_next;
};
if (_local6 == true){
m_flags = (m_flags | e_frozenFlag);
m_linearVelocity.SetZero();
m_angularVelocity = 0;
_local3 = m_shapeList;
while (_local3) {
_local3.DestroyProxy(m_world.m_broadPhase);
_local3 = _local3.m_next;
};
return (false);
};
m_world.m_broadPhase.Commit();
return (true);
}
public function GetLocalPoint(_arg1:b2Vec2):b2Vec2{
return (b2Math.b2MulXT(m_xf, _arg1));
}
public function ApplyForce(_arg1:b2Vec2, _arg2:b2Vec2):void{
if (IsSleeping()){
WakeUp();
};
m_force.x = (m_force.x + _arg1.x);
m_force.y = (m_force.y + _arg1.y);
m_torque = (m_torque + (((_arg2.x - m_sweep.c.x) * _arg1.y) - ((_arg2.y - m_sweep.c.y) * _arg1.x)));
}
public function SynchronizeShapes():Boolean{
var _local1:b2XForm;
var _local2:b2Mat22;
var _local3:b2Vec2;
var _local4:b2Shape;
var _local5:Boolean;
_local1 = s_xf1;
_local1.R.Set(m_sweep.a0);
_local2 = _local1.R;
_local3 = m_sweep.localCenter;
_local1.position.x = (m_sweep.c0.x - ((_local2.col1.x * _local3.x) + (_local2.col2.x * _local3.y)));
_local1.position.y = (m_sweep.c0.y - ((_local2.col1.y * _local3.x) + (_local2.col2.y * _local3.y)));
_local5 = true;
_local4 = m_shapeList;
while (_local4) {
_local5 = _local4.Synchronize(m_world.m_broadPhase, _local1, m_xf);
if (_local5 == false){
break;
};
_local4 = _local4.m_next;
};
if (_local5 == false){
m_flags = (m_flags | e_frozenFlag);
m_linearVelocity.SetZero();
m_angularVelocity = 0;
_local4 = m_shapeList;
while (_local4) {
_local4.DestroyProxy(m_world.m_broadPhase);
_local4 = _local4.m_next;
};
return (false);
};
return (true);
}
public function GetAngle():Number{
return (m_sweep.a);
}
public function GetXForm():b2XForm{
return (m_xf);
}
public function (_arg1:b2Vec2, _arg2:b2Vec2):void{
if (IsSleeping()){
WakeUp();
};
m_linearVelocity.x = (m_linearVelocity.x + (m_invMass * _arg1.x));
m_linearVelocity.y = (m_linearVelocity.y + (m_invMass * _arg1.y));
m_angularVelocity = (m_angularVelocity + (m_invI * (((_arg2.x - m_sweep.c.x) * _arg1.y) - ((_arg2.y - m_sweep.c.y) * _arg1.x))));
}
public function GetNext():b2Body{
return (m_next);
}
public function ():Number{
return (m_mass);
}
public function GetLinearVelocityFromLocalPoint(_arg1:b2Vec2):b2Vec2{
var _local2:b2Mat22;
var _local3:b2Vec2;
_local2 = m_xf.R;
_local3 = new b2Vec2(((_local2.col1.x * _arg1.x) + (_local2.col2.x * _arg1.y)), ((_local2.col1.y * _arg1.x) + (_local2.col2.y * _arg1.y)));
_local3.x = (_local3.x + m_xf.position.x);
_local3.y = (_local3.y + m_xf.position.y);
return (new b2Vec2((m_linearVelocity.x + (m_angularVelocity * (_local3.y - m_sweep.c.y))), (m_linearVelocity.x - (m_angularVelocity * (_local3.x - m_sweep.c.x)))));
}
public function GetAngularVelocity():Number{
return (m_angularVelocity);
}
public function
(_arg1:Number):void{
m_angularVelocity = _arg1;
}
public function (_arg1:b2MassData):void{
var _local2:b2Shape;
var _local3:b2Mat22;
var _local4:b2Vec2;
var _local5:int;
if (m_world.m_lock == true){
return;
};
m_invMass = 0;
= 0;
m_invI = 0;
m_mass = _arg1.mass;
if (m_mass > 0){
m_invMass = (1 / m_mass);
};
if ((m_flags & b2Body.e_fixedRotationFlag) == 0){
= _arg1.I;
};
if ( > 0){
m_invI = (1 / );
};
m_sweep.localCenter.SetV(_arg1.center);
_local3 = m_xf.R;
_local4 = m_sweep.localCenter;
m_sweep.c.x = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y));
m_sweep.c.y = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y));
m_sweep.c.x = (m_sweep.c.x + m_xf.position.x);
m_sweep.c.y = (m_sweep.c.y + m_xf.position.y);
m_sweep.c0.SetV(m_sweep.c);
_local2 = m_shapeList;
while (_local2) {
_local2.UpdateSweepRadius(m_sweep.localCenter);
_local2 = _local2.m_next;
};
_local5 = m_type;
if ((((m_invMass == 0)) && ((m_invI == 0)))){
m_type = e_staticType;
} else {
m_type = e_dynamicType;
};
if (_local5 != m_type){
_local2 = m_shapeList;
while (_local2) {
_local2.RefilterProxy(m_world.m_broadPhase, m_xf);
_local2 = _local2.m_next;
};
};
}
public function IsStatic():Boolean{
return ((m_type == e_staticType));
}
public function GetWorldVector(_arg1:b2Vec2):b2Vec2{
return (b2Math.b2MulMV(m_xf.R, _arg1));
}
public function GetShapeList():b2Shape{
return (m_shapeList);
}
public function Advance(_arg1:Number):void{
m_sweep.Advance(_arg1);
m_sweep.c.SetV(m_sweep.c0);
m_sweep.a = m_sweep.a0;
SynchronizeTransform();
}
public function (_arg1:Boolean):void{
if (_arg1){
m_flags = (m_flags | e_bulletFlag);
} else {
m_flags = (m_flags & ~(e_bulletFlag));
};
}
public function (_arg1:b2ShapeDef):b2Shape{
var _local2:b2Shape;
if (m_world.m_lock == true){
return (null);
};
_local2 = b2Shape.Create(_arg1, m_world.m_blockAllocator);
_local2.m_next = m_shapeList;
m_shapeList = _local2;
m_shapeCount++;
_local2.m_body = this;
_local2.CreateProxy(m_world.m_broadPhase, m_xf);
_local2.UpdateSweepRadius(m_sweep.localCenter);
return (_local2);
}
public function IsConnected(_arg1:b2Body):Boolean{
var _local2:b2JointEdge;
_local2 = m_jointList;
while (_local2) {
if (_local2.other == _arg1){
return ((_local2.joint.m_collideConnected == false));
};
_local2 = _local2.next;
};
return (false);
}
public function (_arg1:b2Shape):void{
var _local2:b2Shape;
var _local3:b2Shape;
var _local4:Boolean;
if (m_world.m_lock == true){
return;
};
_arg1.DestroyProxy(m_world.m_broadPhase);
_local2 = m_shapeList;
_local3 = null;
_local4 = false;
while (_local2 != null) {
if (_local2 == _arg1){
if (_local3){
_local3.m_next = _arg1.m_next;
} else {
m_shapeList = _arg1.m_next;
};
_local4 = true;
break;
};
_local3 = _local2;
_local2 = _local2.m_next;
};
_arg1.m_body = null;
_arg1.m_next = null;
m_shapeCount--;
b2Shape.Destroy(_arg1, m_world.m_blockAllocator);
}
public function GetUserData(){
return (m_userData);
}
public function IsBullet():Boolean{
return (((m_flags & e_bulletFlag) == e_bulletFlag));
}
public function GetWorldCenter():b2Vec2{
return (m_sweep.c);
}
public function (_arg1:Boolean):void{
if (_arg1){
m_flags = (m_flags | e_allowSleepFlag);
} else {
m_flags = (m_flags & ~(e_allowSleepFlag));
WakeUp();
};
}
public function SetUserData(_arg1):void{
m_userData = _arg1;
}
public function GetLocalVector(_arg1:b2Vec2):b2Vec2{
return (b2Math.b2MulTMV(m_xf.R, _arg1));
}
public function GetWorldPoint(_arg1:b2Vec2):b2Vec2{
var _local2:b2Mat22;
var _local3:b2Vec2;
_local2 = m_xf.R;
_local3 = new b2Vec2(((_local2.col1.x * _arg1.x) + (_local2.col2.x * _arg1.y)), ((_local2.col1.y * _arg1.x) + (_local2.col2.y * _arg1.y)));
_local3.x = (_local3.x + m_xf.position.x);
_local3.y = (_local3.y + m_xf.position.y);
return (_local3);
}
public function ():b2World{
return (m_world);
}
public function GetPosition():b2Vec2{
return (m_xf.position);
}
}
}//package Box2D.Dynamics
Section 65
//b2BodyDef (Box2D.Dynamics.b2BodyDef)
package Box2D.Dynamics {
import Box2D.Collision.Shapes.*;
import Box2D.Common.Math.*;
public class b2BodyDef {
public var
:Boolean;
public var position:b2Vec2;
public var :Boolean;
public var
:Boolean;
public var userData;
public var :Number;
public var :Boolean;
public var :Number;
public var :Number;
public var :b2MassData;
public function b2BodyDef(){
= new b2MassData();
position = new b2Vec2();
super();
.center.SetZero();
.mass = 0;
.I = 0;
userData = null;
position.Set(0, 0);
= 0;
= 0;
= 0;
= true;
= false;
= false;
= false;
}
}
}//package Box2D.Dynamics
Section 66
//b2BoundaryListener (Box2D.Dynamics.b2BoundaryListener)
package Box2D.Dynamics {
public class b2BoundaryListener {
public function Violation(_arg1:b2Body):void{
}
}
}//package Box2D.Dynamics
Section 67
//b2ContactFilter (Box2D.Dynamics.b2ContactFilter)
package Box2D.Dynamics {
import Box2D.Collision.Shapes.*;
public class b2ContactFilter {
public static var b2_defaultFilter:b2ContactFilter = new (b2ContactFilter);
;
public function ShouldCollide(_arg1:b2Shape, _arg2:b2Shape):Boolean{
var _local3:b2FilterData;
var _local4:b2FilterData;
var _local5:Boolean;
_local3 = _arg1.GetFilterData();
_local4 = _arg2.GetFilterData();
if ((((_local3.groupIndex == _local4.groupIndex)) && (!((_local3.groupIndex == 0))))){
return ((_local3.groupIndex > 0));
};
_local5 = ((!(((_local3.maskBits & _local4.categoryBits) == 0))) && (!(((_local3.categoryBits & _local4.maskBits) == 0))));
return (_local5);
}
}
}//package Box2D.Dynamics
Section 68
//b2ContactListener (Box2D.Dynamics.b2ContactListener)
package Box2D.Dynamics {
import Box2D.Collision.*;
import Box2D.Dynamics.Contacts.*;
public class b2ContactListener {
public function Add(_arg1:b2ContactPoint):void{
}
public function Remove(_arg1:b2ContactPoint):void{
}
public function Persist(_arg1:b2ContactPoint):void{
}
public function Result(_arg1:b2ContactResult):void{
}
}
}//package Box2D.Dynamics
Section 69
//b2ContactManager (Box2D.Dynamics.b2ContactManager)
package Box2D.Dynamics {
import Box2D.Collision.Shapes.*;
import Box2D.Common.Math.*;
import Box2D.Collision.*;
import Box2D.Dynamics.Contacts.*;
public class b2ContactManager extends b2PairCallback {
public var m_world:b2World;
public var :Boolean;
public var :b2NullContact;
private static const s_evalCP:b2ContactPoint = new b2ContactPoint();
public function b2ContactManager(){
= new b2NullContact();
super();
m_world = null;
= false;
}
override public function PairAdded(_arg1, _arg2){
var _local3:b2Shape;
var _local4:b2Shape;
var _local5:b2Body;
var _local6:b2Body;
var _local7:b2Contact;
_local3 = (_arg1 as b2Shape);
_local4 = (_arg2 as b2Shape);
_local5 = _local3.m_body;
_local6 = _local4.m_body;
if (((_local5.IsStatic()) && (_local6.IsStatic()))){
return ();
};
if (_local3.m_body == _local4.m_body){
return ();
};
if (_local6.IsConnected(_local5)){
return ();
};
if (((!((m_world.m_contactFilter == null))) && ((m_world.m_contactFilter.ShouldCollide(_local3, _local4) == false)))){
return ();
};
_local7 = b2Contact.Create(_local3, _local4, m_world.m_blockAllocator);
if (_local7 == null){
return ();
};
_local3 = _local7.m_shape1;
_local4 = _local7.m_shape2;
_local5 = _local3.m_body;
_local6 = _local4.m_body;
_local7.m_prev = null;
_local7.m_next = m_world.m_contactList;
if (m_world.m_contactList != null){
m_world.m_contactList.m_prev = _local7;
};
m_world.m_contactList = _local7;
_local7.m_node1.contact = _local7;
_local7.m_node1.other = _local6;
_local7.m_node1.prev = null;
_local7.m_node1.next = _local5.m_contactList;
if (_local5.m_contactList != null){
_local5.m_contactList.prev = _local7.m_node1;
};
_local5.m_contactList = _local7.m_node1;
_local7.m_node2.contact = _local7;
_local7.m_node2.other = _local5;
_local7.m_node2.prev = null;
_local7.m_node2.next = _local6.m_contactList;
if (_local6.m_contactList != null){
_local6.m_contactList.prev = _local7.m_node2;
};
_local6.m_contactList = _local7.m_node2;
m_world.m_contactCount++;
return (_local7);
}
override public function PairRemoved(_arg1, _arg2, _arg3):void{
var _local4:b2Contact;
if (_arg3 == null){
return;
};
_local4 = (_arg3 as b2Contact);
if (_local4 == ){
return;
};
Destroy(_local4);
}
public function Destroy(_arg1:b2Contact):void{
var _local2:b2Shape;
var _local3:b2Shape;
var _local4:int;
var _local5:b2Body;
var _local6:b2Body;
var _local7:b2Body;
var _local8:b2Body;
var _local9:Array;
var _local10:b2ContactPoint;
var _local11:int;
var _local12:b2Manifold;
var _local13:int;
var _local14:b2ManifoldPoint;
var _local15:b2Vec2;
var _local16:b2Vec2;
_local2 = _arg1.m_shape1;
_local3 = _arg1.m_shape2;
_local4 = _arg1.m_manifoldCount;
if ((((_local4 > 0)) && (m_world.m_contactListener))){
_local7 = _local2.m_body;
_local8 = _local3.m_body;
_local9 = _arg1.GetManifolds();
_local10 = s_evalCP;
_local10.shape1 = _arg1.m_shape1;
_local10.shape2 = _arg1.m_shape1;
_local10.friction = _arg1.m_friction;
_local10.restitution = _arg1.m_restitution;
_local11 = 0;
while (_local11 < _local4) {
_local12 = _local9[_local11];
_local10.normal.SetV(_local12.normal);
_local13 = 0;
while (_local13 < _local12.pointCount) {
_local14 = _local12.points[_local13];
_local10.position = _local7.GetWorldPoint(_local14.localPoint1);
_local15 = _local7.GetLinearVelocityFromLocalPoint(_local14.localPoint1);
_local16 = _local8.GetLinearVelocityFromLocalPoint(_local14.localPoint2);
_local10.velocity.Set((_local16.x - _local15.x), (_local16.y - _local15.y));
_local10.separation = _local14.separation;
_local10.id.key = _local14.id._key;
m_world.m_contactListener.Remove(_local10);
_local13++;
};
_local11++;
};
};
if (_arg1.m_prev){
_arg1.m_prev.m_next = _arg1.m_next;
};
if (_arg1.m_next){
_arg1.m_next.m_prev = _arg1.m_prev;
};
if (_arg1 == m_world.m_contactList){
m_world.m_contactList = _arg1.m_next;
};
_local5 = _local2.m_body;
_local6 = _local3.m_body;
if (_arg1.m_node1.prev){
_arg1.m_node1.prev.next = _arg1.m_node1.next;
};
if (_arg1.m_node1.next){
_arg1.m_node1.next.prev = _arg1.m_node1.prev;
};
if (_arg1.m_node1 == _local5.m_contactList){
_local5.m_contactList = _arg1.m_node1.next;
};
if (_arg1.m_node2.prev){
_arg1.m_node2.prev.next = _arg1.m_node2.next;
};
if (_arg1.m_node2.next){
_arg1.m_node2.next.prev = _arg1.m_node2.prev;
};
if (_arg1.m_node2 == _local6.m_contactList){
_local6.m_contactList = _arg1.m_node2.next;
};
b2Contact.Destroy(_arg1, m_world.m_blockAllocator);
m_world.m_contactCount--;
}
public function Collide():void{
var _local1:b2Contact;
var _local2:b2Body;
var _local3:b2Body;
_local1 = m_world.m_contactList;
while (_local1) {
_local2 = _local1.m_shape1.m_body;
_local3 = _local1.m_shape2.m_body;
if (((_local2.IsSleeping()) && (_local3.IsSleeping()))){
} else {
_local1.Update(m_world.m_contactListener);
};
_local1 = _local1.m_next;
};
}
}
}//package Box2D.Dynamics
Section 70
//b2DebugDraw (Box2D.Dynamics.b2DebugDraw)
package Box2D.Dynamics {
import flash.display.*;
import Box2D.Collision.Shapes.*;
import Box2D.Common.Math.*;
import Box2D.Collision.*;
import Box2D.Common.*;
import Box2D.Dynamics.Contacts.*;
public class b2DebugDraw {
public var :Number;// = 1
public var :Number;// = 1
public var :Number;// = 1
public var :Number;// = 1
public var :uint;
public var m_sprite:Sprite;
public var :Number;// = 1
public static var e_coreShapeBit:uint = 4;
public static var e_shapeBit:uint = 1;
public static var e_centerOfMassBit:uint = 64;
public static var e_aabbBit:uint = 8;
public static var e_obbBit:uint = 16;
public static var e_pairBit:uint = 32;
public static var e_jointBit:uint = 2;
public function b2DebugDraw(){
= 1;
= 1;
= 1;
= 1;
= 1;
super();
= 0;
}
public function DrawSolidPolygon(_arg1:Array, _arg2:int, _arg3:b2Color):void{
var _local4:int;
m_sprite.graphics.lineStyle(, _arg3.color, );
m_sprite.graphics.moveTo((_arg1[0].x * ), (_arg1[0].y * ));
m_sprite.graphics.beginFill(_arg3.color, );
_local4 = 1;
while (_local4 < _arg2) {
m_sprite.graphics.lineTo((_arg1[_local4].x * ), (_arg1[_local4].y * ));
_local4++;
};
m_sprite.graphics.lineTo((_arg1[0].x * ), (_arg1[0].y * ));
m_sprite.graphics.endFill();
}
public function DrawCircle(_arg1:b2Vec2, _arg2:Number, _arg3:b2Color):void{
m_sprite.graphics.lineStyle(, _arg3.color, );
m_sprite.graphics.drawCircle((_arg1.x * ), (_arg1.y * ), (_arg2 * ));
}
public function DrawXForm(_arg1:b2XForm):void{
m_sprite.graphics.lineStyle(, 0xFF0000, );
m_sprite.graphics.moveTo((_arg1.position.x * ), (_arg1.position.y * ));
m_sprite.graphics.lineTo(((_arg1.position.x + ( * _arg1.R.col1.x)) * ), ((_arg1.position.y + ( * _arg1.R.col1.y)) * ));
m_sprite.graphics.lineStyle(, 0xFF00, );
m_sprite.graphics.moveTo((_arg1.position.x * ), (_arg1.position.y * ));
m_sprite.graphics.lineTo(((_arg1.position.x + ( * _arg1.R.col2.x)) * ), ((_arg1.position.y + ( * _arg1.R.col2.y)) * ));
}
public function (_arg1:uint):void{
= ( & ~(_arg1));
}
public function DrawSolidCircle(_arg1:b2Vec2, _arg2:Number, _arg3:b2Vec2, _arg4:b2Color):void{
m_sprite.graphics.lineStyle(, _arg4.color, );
m_sprite.graphics.moveTo(0, 0);
m_sprite.graphics.beginFill(_arg4.color, );
m_sprite.graphics.drawCircle((_arg1.x * ), (_arg1.y * ), (_arg2 * ));
m_sprite.graphics.endFill();
m_sprite.graphics.moveTo((_arg1.x * ), (_arg1.y * ));
m_sprite.graphics.lineTo(((_arg1.x + (_arg3.x * _arg2)) * ), ((_arg1.y + (_arg3.y * _arg2)) * ));
}
public function (_arg1:uint):void{
= _arg1;
}
public function (_arg1:uint):void{
= ( | _arg1);
}
public function DrawSegment(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Color):void{
m_sprite.graphics.lineStyle(, _arg3.color, );
m_sprite.graphics.moveTo((_arg1.x * ), (_arg1.y * ));
m_sprite.graphics.lineTo((_arg2.x * ), (_arg2.y * ));
}
public function GetFlags():uint{
return ( );
}
public function DrawPolygon(_arg1:Array, _arg2:int, _arg3:b2Color):void{
var _local4:int;
m_sprite.graphics.lineStyle(, _arg3.color, );
m_sprite.graphics.moveTo((_arg1[0].x * ), (_arg1[0].y * ));
_local4 = 1;
while (_local4 < _arg2) {
m_sprite.graphics.lineTo((_arg1[_local4].x * ), (_arg1[_local4].y * ));
_local4++;
};
m_sprite.graphics.lineTo((_arg1[0].x * ), (_arg1[0].y * ));
}
}
}//package Box2D.Dynamics
Section 71
//b2DestructionListener (Box2D.Dynamics.b2DestructionListener)
package Box2D.Dynamics {
import Box2D.Collision.Shapes.*;
import Box2D.Dynamics.Joints.*;
public class b2DestructionListener {
public function SayGoodbyeJoint(_arg1:b2Joint):void{
}
public function SayGoodbyeShape(_arg1:b2Shape):void{
}
}
}//package Box2D.Dynamics
Section 72
//b2Island (Box2D.Dynamics.b2Island)
package Box2D.Dynamics {
import Box2D.Common.Math.*;
import Box2D.Dynamics.Joints.*;
import Box2D.Collision.*;
import Box2D.Common.*;
import Box2D.Dynamics.Contacts.*;
public class b2Island {
public var :Array;
public var :b2ContactListener;
public var m_positionIterationCount:int;
public var
:int;
public var m_bodies:Array;
public var :int;
public var m_contactCount:int;
public var m_contacts:Array;
public var m_contactCapacity:int;
public var m_jointCount:int;
public var m_allocator;
public var m_bodyCount:int;
private static var s_reportCR:b2ContactResult = new b2ContactResult();
public function b2Island(_arg1:int, _arg2:int, _arg3:int, _arg4, _arg5:b2ContactListener){
var _local6:int;
super();
= _arg1;
m_contactCapacity = _arg2;
= _arg3;
m_bodyCount = 0;
m_contactCount = 0;
m_jointCount = 0;
m_allocator = _arg4;
= _arg5;
m_bodies = new Array(_arg1);
_local6 = 0;
while (_local6 < _arg1) {
m_bodies[_local6] = null;
_local6++;
};
m_contacts = new Array(_arg2);
_local6 = 0;
while (_local6 < _arg2) {
m_contacts[_local6] = null;
_local6++;
};
= new Array(_arg3);
_local6 = 0;
while (_local6 < _arg3) {
[_local6] = null;
_local6++;
};
m_positionIterationCount = 0;
}
public function AddBody(_arg1:b2Body):void{
var _local2 = m_bodyCount++;
m_bodies[_local2] = _arg1;
}
public function AddJoint(_arg1:b2Joint):void{
var _local2 = m_jointCount++;
[_local2] = _arg1;
}
public function (_arg1:Array):void{
var _local2:b2Mat22;
var _local3:b2Vec2;
var _local4:int;
var _local5:b2Contact;
var _local6:b2ContactConstraint;
var _local7:b2ContactResult;
var _local8:b2Body;
var _local9:int;
var _local10:Array;
var _local11:int;
var _local12:b2Manifold;
var _local13:int;
var _local14:b2ManifoldPoint;
var _local15:b2ContactConstraintPoint;
if ( == null){
return;
};
_local4 = 0;
while (_local4 < m_contactCount) {
_local5 = m_contacts[_local4];
_local6 = _arg1[_local4];
_local7 = s_reportCR;
_local7.shape1 = _local5.m_shape1;
_local7.shape2 = _local5.m_shape2;
_local8 = _local7.shape1.m_body;
_local9 = _local5.m_manifoldCount;
_local10 = _local5.GetManifolds();
_local11 = 0;
while (_local11 < _local9) {
_local12 = _local10[_local11];
_local7.normal.SetV(_local12.normal);
_local13 = 0;
while (_local13 < _local12.pointCount) {
_local14 = _local12.points[_local13];
_local15 = _local6.points[_local13];
_local7.position = _local8.GetWorldPoint(_local14.localPoint1);
_local7.normalImpulse = _local15.normalImpulse;
_local7.tangentImpulse = _local15.tangentImpulse;
_local7.id.key = _local14.id.key;
.Result(_local7);
_local13++;
};
_local11++;
};
_local4++;
};
}
public function Solve(_arg1:b2TimeStep, _arg2:b2Vec2, _arg3:Boolean, _arg4:Boolean):void{
var _local5:int;
var _local6:b2Body;
var _local7:b2Joint;
var _local8:b2ContactSolver;
var _local9:int;
var _local10:Boolean;
var _local11:Boolean;
var _local12:Boolean;
var _local13:Number;
var _local14:Number;
var _local15:Number;
_local5 = 0;
while (_local5 < m_bodyCount) {
_local6 = m_bodies[_local5];
if (_local6.IsStatic()){
} else {
_local6.m_linearVelocity.x = (_local6.m_linearVelocity.x + (_arg1.dt * (_arg2.x + (_local6.m_invMass * _local6.m_force.x))));
_local6.m_linearVelocity.y = (_local6.m_linearVelocity.y + (_arg1.dt * (_arg2.y + (_local6.m_invMass * _local6.m_force.y))));
_local6.m_angularVelocity = (_local6.m_angularVelocity + ((_arg1.dt * _local6.m_invI) * _local6.m_torque));
_local6.m_force.SetZero();
_local6.m_torque = 0;
_local6.m_linearVelocity.Multiply(b2Math.b2Clamp((1 - (_arg1.dt * _local6.m_linearDamping)), 0, 1));
_local6.m_angularVelocity = (_local6.m_angularVelocity * b2Math.b2Clamp((1 - (_arg1.dt * _local6.m_angularDamping)), 0, 1));
if (_local6.m_linearVelocity.LengthSquared() > b2Settings.b2_maxLinearVelocitySquared){
_local6.m_linearVelocity.Normalize();
_local6.m_linearVelocity.x = (_local6.m_linearVelocity.x * b2Settings.b2_maxLinearVelocity);
_local6.m_linearVelocity.y = (_local6.m_linearVelocity.y * b2Settings.b2_maxLinearVelocity);
};
if ((_local6.m_angularVelocity * _local6.m_angularVelocity) > b2Settings.b2_maxAngularVelocitySquared){
if (_local6.m_angularVelocity < 0){
_local6.m_angularVelocity = -(b2Settings.b2_maxAngularVelocity);
} else {
_local6.m_angularVelocity = b2Settings.b2_maxAngularVelocity;
};
};
};
_local5++;
};
_local8 = new b2ContactSolver(_arg1, m_contacts, m_contactCount, m_allocator);
_local8.InitVelocityConstraints(_arg1);
_local5 = 0;
while (_local5 < m_jointCount) {
_local7 = [_local5];
_local7.InitVelocityConstraints(_arg1);
_local5++;
};
_local5 = 0;
while (_local5 < _arg1.maxIterations) {
_local8.SolveVelocityConstraints();
_local9 = 0;
while (_local9 < m_jointCount) {
_local7 = [_local9];
_local7.SolveVelocityConstraints(_arg1);
_local9++;
};
_local5++;
};
_local8.FinalizeVelocityConstraints();
_local5 = 0;
while (_local5 < m_bodyCount) {
_local6 = m_bodies[_local5];
if (_local6.IsStatic()){
} else {
_local6.m_sweep.c0.SetV(_local6.m_sweep.c);
_local6.m_sweep.a0 = _local6.m_sweep.a;
_local6.m_sweep.c.x = (_local6.m_sweep.c.x + (_arg1.dt * _local6.m_linearVelocity.x));
_local6.m_sweep.c.y = (_local6.m_sweep.c.y + (_arg1.dt * _local6.m_linearVelocity.y));
_local6.m_sweep.a = (_local6.m_sweep.a + (_arg1.dt * _local6.m_angularVelocity));
_local6.SynchronizeTransform();
};
_local5++;
};
if (_arg3){
_local5 = 0;
while (_local5 < m_jointCount) {
_local7 = [_local5];
_local7.InitPositionConstraints();
_local5++;
};
m_positionIterationCount = 0;
while (m_positionIterationCount < _arg1.maxIterations) {
_local10 = _local8.SolvePositionConstraints(b2Settings.b2_contactBaumgarte);
_local11 = true;
_local5 = 0;
while (_local5 < m_jointCount) {
_local7 = [_local5];
_local12 = _local7.SolvePositionConstraints();
_local11 = ((_local11) && (_local12));
_local5++;
};
if (((_local10) && (_local11))){
break;
};
m_positionIterationCount++;
};
};
(_local8.m_constraints);
if (_arg4){
_local13 = Number.MAX_VALUE;
_local14 = (b2Settings.b2_linearSleepTolerance * b2Settings.b2_linearSleepTolerance);
_local15 = (b2Settings.b2_angularSleepTolerance * b2Settings.b2_angularSleepTolerance);
_local5 = 0;
while (_local5 < m_bodyCount) {
_local6 = m_bodies[_local5];
if (_local6.m_invMass == 0){
} else {
if ((_local6.m_flags & b2Body.e_allowSleepFlag) == 0){
_local6.m_sleepTime = 0;
_local13 = 0;
};
if (((((((_local6.m_flags & b2Body.e_allowSleepFlag) == 0)) || (((_local6.m_angularVelocity * _local6.m_angularVelocity) > _local15)))) || ((b2Math.b2Dot(_local6.m_linearVelocity, _local6.m_linearVelocity) > _local14)))){
_local6.m_sleepTime = 0;
_local13 = 0;
} else {
_local6.m_sleepTime = (_local6.m_sleepTime + _arg1.dt);
_local13 = b2Math.b2Min(_local13, _local6.m_sleepTime);
};
};
_local5++;
};
if (_local13 >= b2Settings.b2_timeToSleep){
_local5 = 0;
while (_local5 < m_bodyCount) {
_local6 = m_bodies[_local5];
m_bodies[_local5].m_flags = (_local6.m_flags | b2Body.e_sleepFlag);
_local6.m_linearVelocity.SetZero();
_local6.m_angularVelocity = 0;
_local5++;
};
};
};
}
public function AddContact(_arg1:b2Contact):void{
var _local2 = m_contactCount++;
m_contacts[_local2] = _arg1;
}
public function Clear():void{
m_bodyCount = 0;
m_contactCount = 0;
m_jointCount = 0;
}
public function SolveTOI(_arg1:b2TimeStep):void{
var _local2:int;
var _local3:b2ContactSolver;
var _local4:Number;
var _local5:b2Body;
var _local6:Boolean;
_local3 = new b2ContactSolver(_arg1, m_contacts, m_contactCount, m_allocator);
_local2 = 0;
while (_local2 < _arg1.maxIterations) {
_local3.SolveVelocityConstraints();
_local2++;
};
_local2 = 0;
while (_local2 < m_bodyCount) {
_local5 = m_bodies[_local2];
if (_local5.IsStatic()){
} else {
_local5.m_sweep.c0.SetV(_local5.m_sweep.c);
_local5.m_sweep.a0 = _local5.m_sweep.a;
_local5.m_sweep.c.x = (_local5.m_sweep.c.x + (_arg1.dt * _local5.m_linearVelocity.x));
_local5.m_sweep.c.y = (_local5.m_sweep.c.y + (_arg1.dt * _local5.m_linearVelocity.y));
_local5.m_sweep.a = (_local5.m_sweep.a + (_arg1.dt * _local5.m_angularVelocity));
_local5.SynchronizeTransform();
};
_local2++;
};
_local4 = 0.75;
_local2 = 0;
while (_local2 < _arg1.maxIterations) {
_local6 = _local3.SolvePositionConstraints(_local4);
if (_local6){
break;
};
_local2++;
};
(_local3.m_constraints);
}
}
}//package Box2D.Dynamics
Section 73
//b2TimeStep (Box2D.Dynamics.b2TimeStep)
package Box2D.Dynamics {
public class b2TimeStep {
public var warmStarting:Boolean;
public var positionCorrection:Boolean;
public var dt:Number;
public var maxIterations:int;
public var dtRatio:Number;
public var inv_dt:Number;
}
}//package Box2D.Dynamics
Section 74
//b2World (Box2D.Dynamics.b2World)
package Box2D.Dynamics {
import Box2D.Collision.Shapes.*;
import Box2D.Common.Math.*;
import Box2D.Dynamics.Joints.*;
import Box2D.Collision.*;
import Box2D.Common.*;
import Box2D.Dynamics.Contacts.*;
public class b2World {
public var :Number;
public var :b2BoundaryListener;
public var m_contactList:b2Contact;
public var m_blockAllocator;
public var m_contactListener:b2ContactListener;
public var :Boolean;
public var m_broadPhase:b2BroadPhase;
public var
:b2DestructionListener;
public var m_jointCount:int;
public var m_bodyCount:int;
public var m_lock:Boolean;
public var m_positionIterationCount:int;
public var
:b2Body;
public var m_contactCount:int;
public var :b2DebugDraw;
public var m_contactFilter:b2ContactFilter;
public var :b2Body;
public var ;
public var m_jointList:b2Joint;
public var :b2Vec2;
public var :b2ContactManager;
private static var s_jointColor:b2Color = new b2Color(0.5, 0.8, 0.8);
public static var m_continuousPhysics:Boolean;
public static var m_warmStarting:Boolean;
private static var s_coreColor:b2Color = new b2Color(0.9, 0.6, 0.6);
public static var m_positionCorrection:Boolean;
private static var s_xf:b2XForm = new b2XForm();
public function b2World(_arg1:b2AABB, _arg2:b2Vec2, _arg3:Boolean){
var _local4:b2BodyDef;
= new b2ContactManager();
super();
= null;
= null;
m_contactFilter = b2ContactFilter.b2_defaultFilter;
m_contactListener = null;
= null;
= null;
m_contactList = null;
m_jointList = null;
m_bodyCount = 0;
m_contactCount = 0;
m_jointCount = 0;
m_positionCorrection = true;
m_warmStarting = true;
m_continuousPhysics = true;
= _arg3;
= _arg2;
m_lock = false;
= 0;
.m_world = this;
m_broadPhase = new b2BroadPhase(_arg1, );
_local4 = new b2BodyDef();
= (_local4);
}
public function
(_arg1:b2Joint):void{
var _local2:b2Body;
var _local3:b2Body;
var _local4:b2XForm;
var _local5:b2XForm;
var _local6:b2Vec2;
var _local7:b2Vec2;
var _local8:b2Vec2;
var _local9:b2Vec2;
var _local10:b2Color;
var _local11:b2PulleyJoint;
var _local12:b2Vec2;
var _local13:b2Vec2;
_local2 = _arg1.m_body1;
_local3 = _arg1.m_body2;
_local4 = _local2.m_xf;
_local5 = _local3.m_xf;
_local6 = _local4.position;
_local7 = _local5.position;
_local8 = _arg1.GetAnchor1();
_local9 = _arg1.GetAnchor2();
_local10 = s_jointColor;
switch (_arg1.m_type){
case b2Joint.e_distanceJoint:
.DrawSegment(_local8, _local9, _local10);
break;
case b2Joint.e_pulleyJoint:
_local11 = (_arg1 as b2PulleyJoint);
_local12 = _local11.GetGroundAnchor1();
_local13 = _local11.GetGroundAnchor2();
.DrawSegment(_local12, _local8, _local10);
.DrawSegment(_local13, _local9, _local10);
.DrawSegment(_local12, _local13, _local10);
break;
case b2Joint.e_mouseJoint:
.DrawSegment(_local8, _local9, _local10);
break;
default:
if (_local2 !=
){
.DrawSegment(_local6, _local8, _local10);
};
.DrawSegment(_local8, _local9, _local10);
if (_local3 !=
){
.DrawSegment(_local7, _local9, _local10);
};
};
}
public function (_arg1:b2Shape):void{
_arg1.RefilterProxy(m_broadPhase, _arg1.m_body.m_xf);
}
public function
(_arg1:b2DebugDraw):void{
= _arg1;
}
public function (_arg1:Boolean):void{
m_continuousPhysics = _arg1;
}
public function ():int{
return (m_broadPhase.m_proxyCount);
}
public function ():void{
var _local1:uint;
var _local2:int;
var _local3:b2Body;
var _local4:b2Shape;
var _local5:b2Joint;
var _local6:b2BroadPhase;
var _local7:b2Vec2;
var _local8:b2Vec2;
var _local9:b2Vec2;
var _local10:b2Color;
var _local11:b2XForm;
var _local12:b2AABB;
var _local13:b2AABB;
var _local14:Array;
var _local15:Boolean;
var _local16:uint;
var _local17:b2Pair;
var _local18:b2Proxy;
var _local19:b2Proxy;
var _local20:b2Vec2;
var _local21:b2Vec2;
var _local22:b2Proxy;
var _local23:b2PolygonShape;
var _local24:b2OBB;
var _local25:b2Vec2;
var _local26:b2Mat22;
var _local27:b2Vec2;
var _local28:Number;
if ( == null){
return;
};
.m_sprite.graphics.clear();
_local1 = .GetFlags();
_local7 = new b2Vec2();
_local8 = new b2Vec2();
_local9 = new b2Vec2();
_local10 = new b2Color(0, 0, 0);
_local12 = new b2AABB();
_local13 = new b2AABB();
_local14 = [new b2Vec2(), new b2Vec2(), new b2Vec2(), new b2Vec2()];
if ((_local1 & b2DebugDraw.e_shapeBit)){
_local15 = ((_local1 & b2DebugDraw.e_coreShapeBit) == b2DebugDraw.e_coreShapeBit);
_local3 = ;
while (_local3) {
_local11 = _local3.m_xf;
_local4 = _local3.GetShapeList();
while (_local4) {
if (_local3.IsStatic()){
(_local4, _local11, new b2Color(0.5, 0.9, 0.5), _local15);
} else {
if (_local3.IsSleeping()){
(_local4, _local11, new b2Color(0.5, 0.5, 0.9), _local15);
} else {
(_local4, _local11, new b2Color(0.9, 0.9, 0.9), _local15);
};
};
_local4 = _local4.m_next;
};
_local3 = _local3.m_next;
};
};
if ((_local1 & b2DebugDraw.e_jointBit)){
_local5 = m_jointList;
while (_local5) {
(_local5);
_local5 = _local5.m_next;
};
};
if ((_local1 & b2DebugDraw.e_pairBit)){
_local6 = m_broadPhase;
_local7.Set((1 / _local6.m_quantizationFactor.x), (1 / _local6.m_quantizationFactor.y));
_local10.Set(0.9, 0.9, 0.3);
_local2 = 0;
while (_local2 < b2Pair.b2_tableCapacity) {
_local16 = _local6.m_pairManager.m_hashTable[_local2];
while (_local16 != b2Pair.b2_nullPair) {
_local17 = _local6.m_pairManager.m_pairs[_local16];
_local18 = _local6.m_proxyPool[_local17.proxyId1];
_local19 = _local6.m_proxyPool[_local17.proxyId2];
_local12.lowerBound.x = (_local6.m_worldAABB.lowerBound.x + (_local7.x * _local6.m_bounds[0][_local18.lowerBounds[0]].value));
_local12.lowerBound.y = (_local6.m_worldAABB.lowerBound.y + (_local7.y * _local6.m_bounds[1][_local18.lowerBounds[1]].value));
_local12.upperBound.x = (_local6.m_worldAABB.lowerBound.x + (_local7.x * _local6.m_bounds[0][_local18.upperBounds[0]].value));
_local12.upperBound.y = (_local6.m_worldAABB.lowerBound.y + (_local7.y * _local6.m_bounds[1][_local18.upperBounds[1]].value));
_local13.lowerBound.x = (_local6.m_worldAABB.lowerBound.x + (_local7.x * _local6.m_bounds[0][_local19.lowerBounds[0]].value));
_local13.lowerBound.y = (_local6.m_worldAABB.lowerBound.y + (_local7.y * _local6.m_bounds[1][_local19.lowerBounds[1]].value));
_local13.upperBound.x = (_local6.m_worldAABB.lowerBound.x + (_local7.x * _local6.m_bounds[0][_local19.upperBounds[0]].value));
_local13.upperBound.y = (_local6.m_worldAABB.lowerBound.y + (_local7.y * _local6.m_bounds[1][_local19.upperBounds[1]].value));
_local8.x = (0.5 * (_local12.lowerBound.x + _local12.upperBound.x));
_local8.y = (0.5 * (_local12.lowerBound.y + _local12.upperBound.y));
_local9.x = (0.5 * (_local13.lowerBound.x + _local13.upperBound.x));
_local9.y = (0.5 * (_local13.lowerBound.y + _local13.upperBound.y));
.DrawSegment(_local8, _local9, _local10);
_local16 = _local17.next;
};
_local2++;
};
};
if ((_local1 & b2DebugDraw.e_aabbBit)){
_local6 = m_broadPhase;
_local20 = _local6.m_worldAABB.lowerBound;
_local21 = _local6.m_worldAABB.upperBound;
_local7.Set((1 / _local6.m_quantizationFactor.x), (1 / _local6.m_quantizationFactor.y));
_local10.Set(0.9, 0.3, 0.9);
_local2 = 0;
while (_local2 < b2Settings.b2_maxProxies) {
_local22 = _local6.m_proxyPool[_local2];
if (_local22.IsValid() == false){
} else {
_local12.lowerBound.x = (_local20.x + (_local7.x * _local6.m_bounds[0][_local22.lowerBounds[0]].value));
_local12.lowerBound.y = (_local20.y + (_local7.y * _local6.m_bounds[1][_local22.lowerBounds[1]].value));
_local12.upperBound.x = (_local20.x + (_local7.x * _local6.m_bounds[0][_local22.upperBounds[0]].value));
_local12.upperBound.y = (_local20.y + (_local7.y * _local6.m_bounds[1][_local22.upperBounds[1]].value));
_local14[0].Set(_local12.lowerBound.x, _local12.lowerBound.y);
_local14[1].Set(_local12.upperBound.x, _local12.lowerBound.y);
_local14[2].Set(_local12.upperBound.x, _local12.upperBound.y);
_local14[3].Set(_local12.lowerBound.x, _local12.upperBound.y);
.DrawPolygon(_local14, 4, _local10);
};
_local2++;
};
_local14[0].Set(_local20.x, _local20.y);
_local14[1].Set(_local21.x, _local20.y);
_local14[2].Set(_local21.x, _local21.y);
_local14[3].Set(_local20.x, _local21.y);
.DrawPolygon(_local14, 4, new b2Color(0.3, 0.9, 0.9));
};
if ((_local1 & b2DebugDraw.e_obbBit)){
_local10.Set(0.5, 0.3, 0.5);
_local3 = ;
while (_local3) {
_local11 = _local3.m_xf;
_local4 = _local3.GetShapeList();
while (_local4) {
if (_local4.m_type != b2Shape.e_polygonShape){
} else {
_local23 = (_local4 as b2PolygonShape);
_local24 = _local23.GetOBB();
_local25 = _local24.extents;
_local14[0].Set(-(_local25.x), -(_local25.y));
_local14[1].Set(_local25.x, -(_local25.y));
_local14[2].Set(_local25.x, _local25.y);
_local14[3].Set(-(_local25.x), _local25.y);
_local2 = 0;
while (_local2 < 4) {
_local26 = _local24.R;
_local27 = _local14[_local2];
_local28 = (_local24.center.x + ((_local26.col1.x * _local27.x) + (_local26.col2.x * _local27.y)));
_local14[_local2].y = (_local24.center.y + ((_local26.col1.y * _local27.x) + (_local26.col2.y * _local27.y)));
_local14[_local2].x = _local28;
_local26 = _local11.R;
_local28 = (_local11.position.x + ((_local26.col1.x * _local27.x) + (_local26.col2.x * _local27.y)));
_local14[_local2].y = (_local11.position.y + ((_local26.col1.y * _local27.x) + (_local26.col2.y * _local27.y)));
_local14[_local2].x = _local28;
_local2++;
};
.DrawPolygon(_local14, 4, _local10);
};
_local4 = _local4.m_next;
};
_local3 = _local3.m_next;
};
};
if ((_local1 & b2DebugDraw.e_centerOfMassBit)){
_local3 = ;
while (_local3) {
_local11 = s_xf;
_local11.R = _local3.m_xf.R;
_local11.position = _local3.GetWorldCenter();
.DrawXForm(_local11);
_local3 = _local3.m_next;
};
};
}
public function (_arg1:b2Body):void{
var _local2:b2JointEdge;
var _local3:b2Shape;
var _local4:b2JointEdge;
var _local5:b2Shape;
if (m_lock == true){
return;
};
_local2 = _arg1.m_jointList;
while (_local2) {
_local4 = _local2;
_local2 = _local2.next;
if (
){
.SayGoodbyeJoint(_local4.joint);
};
(_local4.joint);
};
_local3 = _arg1.m_shapeList;
while (_local3) {
_local5 = _local3;
_local3 = _local3.m_next;
if (
){
.SayGoodbyeShape(_local5);
};
_local5.DestroyProxy(m_broadPhase);
b2Shape.Destroy(_local5, m_blockAllocator);
};
if (_arg1.m_prev){
_arg1.m_prev.m_next = _arg1.m_next;
};
if (_arg1.m_next){
_arg1.m_next.m_prev = _arg1.m_prev;
};
if (_arg1 == ){
= _arg1.m_next;
};
m_bodyCount--;
}
public function (_arg1:b2ContactFilter):void{
m_contactFilter = _arg1;
}
public function ():b2Body{
return (
);
}
public function (_arg1:b2Shape, _arg2:b2XForm, _arg3:b2Color, _arg4:Boolean):void{
var _local5:b2Color;
var _local6:b2CircleShape;
var _local7:b2Vec2;
var _local8:Number;
var _local9:b2Vec2;
var _local10:int;
var _local11:b2PolygonShape;
var _local12:int;
var _local13:Array;
var _local14:Array;
var _local15:Array;
_local5 = s_coreColor;
switch (_arg1.m_type){
case b2Shape.e_circleShape:
_local6 = (_arg1 as b2CircleShape);
_local7 = b2Math.b2MulX(_arg2, _local6.m_localPosition);
_local8 = _local6.m_radius;
_local9 = _arg2.R.col1;
.DrawSolidCircle(_local7, _local8, _local9, _arg3);
if (_arg4){
.DrawCircle(_local7, (_local8 - b2Settings.b2_toiSlop), _local5);
};
break;
case b2Shape.e_polygonShape:
_local11 = (_arg1 as b2PolygonShape);
_local12 = _local11.GetVertexCount();
_local13 = _local11.GetVertices();
_local14 = new Array(b2Settings.b2_maxPolygonVertices);
_local10 = 0;
while (_local10 < _local12) {
_local14[_local10] = b2Math.b2MulX(_arg2, _local13[_local10]);
_local10++;
};
.DrawSolidPolygon(_local14, _local12, _arg3);
if (_arg4){
_local15 = _local11.GetCoreVertices();
_local10 = 0;
while (_local10 < _local12) {
_local14[_local10] = b2Math.b2MulX(_arg2, _local15[_local10]);
_local10++;
};
.DrawPolygon(_local14, _local12, _local5);
};
break;
};
}
public function ():int{
return (m_contactCount);
}
public function Solve(_arg1:b2TimeStep):void{
var _local2:b2Body;
var _local3:b2Island;
var _local4:b2Contact;
var _local5:b2Joint;
var _local6:int;
var _local7:Array;
var _local8:b2Body;
var _local9:int;
var _local10:int;
var _local11:b2Body;
var _local12:b2ContactEdge;
var _local13:b2JointEdge;
var _local14:Boolean;
m_positionIterationCount = 0;
_local3 = new b2Island(m_bodyCount, m_contactCount, m_jointCount, , m_contactListener);
_local2 = ;
while (_local2) {
_local2.m_flags = (_local2.m_flags & ~(b2Body.e_islandFlag));
_local2 = _local2.m_next;
};
_local4 = m_contactList;
while (_local4) {
_local4.m_flags = (_local4.m_flags & ~(b2Contact.e_islandFlag));
_local4 = _local4.m_next;
};
_local5 = m_jointList;
while (_local5) {
_local5.m_islandFlag = false;
_local5 = _local5.m_next;
};
_local6 = m_bodyCount;
_local7 = new Array(_local6);
_local8 = ;
while (_local8) {
if ((_local8.m_flags & ((b2Body.e_islandFlag | b2Body.e_sleepFlag) | b2Body.e_frozenFlag))){
} else {
if (_local8.IsStatic()){
} else {
_local3.Clear();
_local9 = 0;
var _temp1 = _local9;
_local9 = (_local9 + 1);
var _local15 = _temp1;
_local7[_local15] = _local8;
_local8.m_flags = (_local8.m_flags | b2Body.e_islandFlag);
while (_local9 > 0) {
--_local9;
_local2 = _local7[_local9];
_local3.AddBody(_local2);
_local2.m_flags = (_local2.m_flags & ~(b2Body.e_sleepFlag));
if (_local2.IsStatic()){
} else {
_local12 = _local2.m_contactList;
while (_local12) {
if ((_local12.contact.m_flags & (b2Contact.e_islandFlag | b2Contact.e_nonSolidFlag))){
} else {
if (_local12.contact.m_manifoldCount == 0){
} else {
_local3.AddContact(_local12.contact);
_local12.contact.m_flags = (_local12.contact.m_flags | b2Contact.e_islandFlag);
_local11 = _local12.other;
if ((_local11.m_flags & b2Body.e_islandFlag)){
} else {
var _temp2 = _local9;
_local9 = (_local9 + 1);
var _local16 = _temp2;
_local7[_local16] = _local11;
_local11.m_flags = (_local11.m_flags | b2Body.e_islandFlag);
};
};
};
_local12 = _local12.next;
};
_local13 = _local2.m_jointList;
while (_local13) {
if (_local13.joint.m_islandFlag == true){
} else {
_local3.AddJoint(_local13.joint);
_local13.joint.m_islandFlag = true;
_local11 = _local13.other;
if ((_local11.m_flags & b2Body.e_islandFlag)){
} else {
var _temp3 = _local9;
_local9 = (_local9 + 1);
_local16 = _temp3;
_local7[_local16] = _local11;
_local11.m_flags = (_local11.m_flags | b2Body.e_islandFlag);
};
};
_local13 = _local13.next;
};
};
};
_local3.Solve(_arg1, , m_positionCorrection, );
if (_local3.m_positionIterationCount > m_positionIterationCount){
m_positionIterationCount = _local3.m_positionIterationCount;
};
_local10 = 0;
while (_local10 < _local3.m_bodyCount) {
_local2 = _local3.m_bodies[_local10];
if (_local2.IsStatic()){
_local2.m_flags = (_local2.m_flags & ~(b2Body.e_islandFlag));
};
_local10++;
};
};
};
_local8 = _local8.m_next;
};
_local2 = ;
while (_local2) {
if ((_local2.m_flags & (b2Body.e_sleepFlag | b2Body.e_frozenFlag))){
} else {
if (_local2.IsStatic()){
} else {
_local14 = _local2.SynchronizeShapes();
if ((((_local14 == false)) && (!(( == null))))){
.Violation(_local2);
};
};
};
_local2 = _local2.m_next;
};
m_broadPhase.Commit();
}
public function (_arg1:b2AABB, _arg2:Array, _arg3:int):int{
var _local4:Array;
var _local5:int;
var _local6:int;
_local4 = new Array(_arg3);
_local5 = m_broadPhase.QueryAABB(_arg1, _local4, _arg3);
_local6 = 0;
while (_local6 < _local5) {
_arg2[_local6] = _local4[_local6];
_local6++;
};
return (_local5);
}
public function (_arg1:b2Vec2):void{
= _arg1;
}
public function SolveTOI(_arg1:b2TimeStep):void{
var _local2:b2Body;
var _local3:b2Shape;
var _local4:b2Shape;
var _local5:b2Body;
var _local6:b2Body;
var _local7:b2ContactEdge;
var _local8:b2Island;
var _local9:int;
var _local10:Array;
var _local11:b2Contact;
var _local12:b2Contact;
var _local13:Number;
var _local14:b2Body;
var _local15:int;
var _local16:b2TimeStep;
var _local17:int;
var _local18:Number;
var _local19:Number;
var _local20:b2Body;
var _local21:Boolean;
_local8 = new b2Island(m_bodyCount, b2Settings.b2_maxTOIContactsPerIsland, 0, , m_contactListener);
_local9 = m_bodyCount;
_local10 = new Array(_local9);
_local2 = ;
while (_local2) {
_local2.m_flags = (_local2.m_flags & ~(b2Body.e_islandFlag));
_local2.m_sweep.t0 = 0;
_local2 = _local2.m_next;
};
_local11 = m_contactList;
while (_local11) {
_local11.m_flags = (_local11.m_flags & ~((b2Contact.e_toiFlag | b2Contact.e_islandFlag)));
_local11 = _local11.m_next;
};
while (true) {
_local12 = null;
_local13 = 1;
_local11 = m_contactList;
for (;_local11;(_local11 = _local11.m_next)) {
if ((_local11.m_flags & (b2Contact.e_slowFlag | b2Contact.e_nonSolidFlag))){
} else {
_local18 = 1;
if ((_local11.m_flags & b2Contact.e_toiFlag)){
_local18 = _local11.m_toi;
} else {
_local3 = _local11.m_shape1;
_local4 = _local11.m_shape2;
_local5 = _local3.m_body;
_local6 = _local4.m_body;
if (((((_local5.IsStatic()) || (_local5.IsSleeping()))) && (((_local6.IsStatic()) || (_local6.IsSleeping()))))){
continue;
};
_local19 = _local5.m_sweep.t0;
if (_local5.m_sweep.t0 < _local6.m_sweep.t0){
_local19 = _local6.m_sweep.t0;
_local5.m_sweep.Advance(_local19);
} else {
if (_local6.m_sweep.t0 < _local5.m_sweep.t0){
_local19 = _local5.m_sweep.t0;
_local6.m_sweep.Advance(_local19);
};
};
_local18 = b2TimeOfImpact.TimeOfImpact(_local11.m_shape1, _local5.m_sweep, _local11.m_shape2, _local6.m_sweep);
if ((((_local18 > 0)) && ((_local18 < 1)))){
_local18 = (((1 - _local18) * _local19) + _local18);
if (_local18 > 1){
_local18 = 1;
};
};
_local11.m_toi = _local18;
_local11.m_flags = (_local11.m_flags | b2Contact.e_toiFlag);
};
if ((((Number.MIN_VALUE < _local18)) && ((_local18 < _local13)))){
_local12 = _local11;
_local13 = _local18;
};
};
};
if ((((_local12 == null)) || (((1 - (100 * Number.MIN_VALUE)) < _local13)))){
break;
};
_local3 = _local12.m_shape1;
_local4 = _local12.m_shape2;
_local5 = _local3.m_body;
_local6 = _local4.m_body;
_local5.Advance(_local13);
_local6.Advance(_local13);
_local12.Update(m_contactListener);
_local12.m_flags = (_local12.m_flags & ~(b2Contact.e_toiFlag));
if (_local12.m_manifoldCount == 0){
} else {
_local14 = _local5;
if (_local14.IsStatic()){
_local14 = _local6;
};
_local8.Clear();
_local15 = 0;
var _temp1 = _local15;
_local15 = (_local15 + 1);
var _local22 = _temp1;
_local10[_local22] = _local14;
_local14.m_flags = (_local14.m_flags | b2Body.e_islandFlag);
while (_local15 > 0) {
--_local15;
_local2 = _local10[_local15];
_local8.AddBody(_local2);
_local2.m_flags = (_local2.m_flags & ~(b2Body.e_sleepFlag));
if (_local2.IsStatic()){
} else {
_local7 = _local2.m_contactList;
while (_local7) {
if (_local8.m_contactCount == _local8.m_contactCapacity){
} else {
if ((_local7.contact.m_flags & ((b2Contact.e_islandFlag | b2Contact.e_slowFlag) | b2Contact.e_nonSolidFlag))){
} else {
if (_local7.contact.m_manifoldCount == 0){
} else {
_local8.AddContact(_local7.contact);
_local7.contact.m_flags = (_local7.contact.m_flags | b2Contact.e_islandFlag);
_local20 = _local7.other;
if ((_local20.m_flags & b2Body.e_islandFlag)){
} else {
if (_local20.IsStatic() == false){
_local20.Advance(_local13);
_local20.WakeUp();
};
var _temp2 = _local15;
_local15 = (_local15 + 1);
var _local23 = _temp2;
_local10[_local23] = _local20;
_local20.m_flags = (_local20.m_flags | b2Body.e_islandFlag);
};
};
};
};
_local7 = _local7.next;
};
};
};
_local16 = new b2TimeStep();
_local16.dt = ((1 - _local13) * _arg1.dt);
_local16.inv_dt = (1 / _local16.dt);
_local16.maxIterations = _arg1.maxIterations;
_local8.SolveTOI(_local16);
_local17 = 0;
while (_local17 < _local8.m_bodyCount) {
_local2 = _local8.m_bodies[_local17];
_local2.m_flags = (_local2.m_flags & ~(b2Body.e_islandFlag));
if ((_local2.m_flags & (b2Body.e_sleepFlag | b2Body.e_frozenFlag))){
} else {
if (_local2.IsStatic()){
} else {
_local21 = _local2.SynchronizeShapes();
if ((((_local21 == false)) && (!(( == null))))){
.Violation(_local2);
};
_local7 = _local2.m_contactList;
while (_local7) {
_local7.contact.m_flags = (_local7.contact.m_flags & ~(b2Contact.e_toiFlag));
_local7 = _local7.next;
};
};
};
_local17++;
};
_local17 = 0;
while (_local17 < _local8.m_contactCount) {
_local11 = _local8.m_contacts[_local17];
_local8.m_contacts[_local17].m_flags = (_local11.m_flags & ~((b2Contact.e_toiFlag | b2Contact.e_islandFlag)));
_local17++;
};
m_broadPhase.Commit();
};
};
}
public function GetJointList():b2Joint{
return (m_jointList);
}
public function Validate():void{
m_broadPhase.Validate();
}
public function ():int{
return (m_broadPhase.m_pairManager.m_pairCount);
}
public function ():b2Body{
return ();
}
public function (_arg1:Boolean):void{
m_warmStarting = _arg1;
}
public function (_arg1:Boolean):void{
m_positionCorrection = _arg1;
}
public function (_arg1:b2JointDef):b2Joint{
var _local2:b2Joint;
var _local3:b2Body;
var _local4:b2Shape;
_local2 = b2Joint.Create(_arg1, m_blockAllocator);
_local2.m_prev = null;
_local2.m_next = m_jointList;
if (m_jointList){
m_jointList.m_prev = _local2;
};
m_jointList = _local2;
m_jointCount++;
_local2.m_node1.joint = _local2;
_local2.m_node1.other = _local2.m_body2;
_local2.m_node1.prev = null;
_local2.m_node1.next = _local2.m_body1.m_jointList;
if (_local2.m_body1.m_jointList){
_local2.m_body1.m_jointList.prev = _local2.m_node1;
};
_local2.m_body1.m_jointList = _local2.m_node1;
_local2.m_node2.joint = _local2;
_local2.m_node2.other = _local2.m_body1;
_local2.m_node2.prev = null;
_local2.m_node2.next = _local2.m_body2.m_jointList;
if (_local2.m_body2.m_jointList){
_local2.m_body2.m_jointList.prev = _local2.m_node2;
};
_local2.m_body2.m_jointList = _local2.m_node2;
if (_arg1.collideConnected == false){
_local3 = ((_arg1.body1.m_shapeCount < _arg1.body2.m_shapeCount)) ? _arg1.body1 : _arg1.body2;
_local4 = _local3.m_shapeList;
while (_local4) {
_local4.RefilterProxy(m_broadPhase, _local3.m_xf);
_local4 = _local4.m_next;
};
};
return (_local2);
}
public function (_arg1:b2Joint):void{
var _local2:Boolean;
var _local3:b2Body;
var _local4:b2Body;
var _local5:b2Body;
var _local6:b2Shape;
_local2 = _arg1.m_collideConnected;
if (_arg1.m_prev){
_arg1.m_prev.m_next = _arg1.m_next;
};
if (_arg1.m_next){
_arg1.m_next.m_prev = _arg1.m_prev;
};
if (_arg1 == m_jointList){
m_jointList = _arg1.m_next;
};
_local3 = _arg1.m_body1;
_local4 = _arg1.m_body2;
_local3.WakeUp();
_local4.WakeUp();
if (_arg1.m_node1.prev){
_arg1.m_node1.prev.next = _arg1.m_node1.next;
};
if (_arg1.m_node1.next){
_arg1.m_node1.next.prev = _arg1.m_node1.prev;
};
if (_arg1.m_node1 == _local3.m_jointList){
_local3.m_jointList = _arg1.m_node1.next;
};
_arg1.m_node1.prev = null;
_arg1.m_node1.next = null;
if (_arg1.m_node2.prev){
_arg1.m_node2.prev.next = _arg1.m_node2.next;
};
if (_arg1.m_node2.next){
_arg1.m_node2.next.prev = _arg1.m_node2.prev;
};
if (_arg1.m_node2 == _local4.m_jointList){
_local4.m_jointList = _arg1.m_node2.next;
};
_arg1.m_node2.prev = null;
_arg1.m_node2.next = null;
b2Joint.Destroy(_arg1, m_blockAllocator);
m_jointCount--;
if (_local2 == false){
_local5 = ((_local3.m_shapeCount < _local4.m_shapeCount)) ? _local3 : _local4;
_local6 = _local5.m_shapeList;
while (_local6) {
_local6.RefilterProxy(m_broadPhase, _local5.m_xf);
_local6 = _local6.m_next;
};
};
}
public function (_arg1:b2ContactListener):void{
m_contactListener = _arg1;
}
public function (_arg1:b2BodyDef):b2Body{
var _local2:b2Body;
if (m_lock == true){
return (null);
};
_local2 = new b2Body(_arg1, this);
_local2.m_prev = null;
_local2.m_next = ;
if (){
.m_prev = _local2;
};
= _local2;
m_bodyCount++;
return (_local2);
}
public function (_arg1:b2BoundaryListener):void{
= _arg1;
}
public function (_arg1:b2DestructionListener):void{
= _arg1;
}
public function Step(_arg1:Number, _arg2:int):void{
var _local3:b2TimeStep;
m_lock = true;
_local3 = new b2TimeStep();
_local3.dt = _arg1;
_local3.maxIterations = _arg2;
if (_arg1 > 0){
_local3.inv_dt = (1 / _arg1);
} else {
_local3.inv_dt = 0;
};
_local3.dtRatio = ( * _arg1);
_local3.positionCorrection = m_positionCorrection;
_local3.warmStarting = m_warmStarting;
.Collide();
if (_local3.dt > 0){
Solve(_local3);
};
if (((m_continuousPhysics) && ((_local3.dt > 0)))){
SolveTOI(_local3);
};
();
= _local3.inv_dt;
m_lock = false;
}
public function ():int{
return (m_bodyCount);
}
public function ():int{
return (m_jointCount);
}
}
}//package Box2D.Dynamics
Section 75
//BaseScrollPane (fl.containers.BaseScrollPane)
package fl.containers {
import fl.core.*;
import fl.controls.*;
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import fl.events.*;
public class BaseScrollPane extends UIComponent {
protected var :Number;// = 4
protected var _maxHorizontalScrollPosition:Number;// = 0
protected var :Boolean;
protected var :Shape;
protected var :Boolean;
protected var availableWidth:Number;
protected var :Number;// = 0
protected var :Number;// = 0
protected var :ScrollBar;
protected var useFixedHorizontalScrolling:Boolean;// = false
protected var :Number;// = 0
protected var contentHeight:Number;// = 0
protected var :Number;// = 0
protected var background:DisplayObject;
protected var :Boolean;// = false
protected var contentPadding:Number;// = 0
protected var availableHeight:Number;
protected var :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(){
= 0;
contentHeight = 0;
contentPadding = 0;
= 0;
_maxHorizontalScrollPosition = 0;
= 0;
= 0;
= 4;
useFixedHorizontalScrolling = false;
= false;
super();
}
protected function (_arg1:MouseEvent):void{
if (((((!(enabled)) || (!(.visible)))) || ((contentHeight <= availableHeight)))){
return;
};
.scrollPosition = (.scrollPosition - (_arg1.delta * verticalLineScrollSize));
setVerticalScrollPosition(.scrollPosition);
dispatchEvent(new ScrollEvent(ScrollBarDirection.VERTICAL, _arg1.delta, horizontalScrollPosition));
}
public function get verticalScrollPosition():Number{
return (.scrollPosition);
}
protected function
():void{
if (enabled){
if (contains( )){
removeChild( );
};
} else {
.x = ( .y = contentPadding);
.width = availableWidth;
.height = availableHeight;
.alpha = (getStyleValue("disabledAlpha") as Number);
addChild( );
};
}
public function set verticalScrollPosition(_arg1:Number):void{
drawNow();
.scrollPosition = _arg1;
setVerticalScrollPosition(.scrollPosition, false);
}
protected function (_arg1:Number, _arg2:Number):void{
if (((((( == _arg1)) || (useFixedHorizontalScrolling))) && ((contentHeight == _arg2)))){
return;
};
= _arg1;
contentHeight = _arg2;
invalidate(InvalidationType.SIZE);
}
public function get horizontalScrollPosition():Number{
return (.scrollPosition);
}
public function get horizontalScrollBar():ScrollBar{
return ();
}
override public function set enabled(_arg1:Boolean):void{
if (enabled == _arg1){
return;
};
.enabled = _arg1;
.enabled = _arg1;
super.enabled = _arg1;
}
public function get verticalLineScrollSize():Number{
return (.lineScrollSize);
}
public function get horizontalScrollPolicy():String{
return (_horizontalScrollPolicy);
}
protected function ():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)) - );
= (((_verticalScrollPolicy == ScrollPolicy.ON)) || ((((_verticalScrollPolicy == ScrollPolicy.AUTO)) && ((contentHeight > _local3)))));
_local4 = ((width - () ? _local1 : 0) - (2 * _local2));
_local5 = (useFixedHorizontalScrolling) ? _maxHorizontalScrollPosition : ( - _local4);
= (((_horizontalScrollPolicy == ScrollPolicy.ON)) || ((((_horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((_local5 > 0)))));
if (){
_local3 = (_local3 - _local1);
};
if ((((((() && (!()))) && ((_verticalScrollPolicy == ScrollPolicy.AUTO)))) && ((contentHeight > _local3)))){
= true;
_local4 = (_local4 - _local1);
};
availableHeight = (_local3 + );
availableWidth = _local4;
}
public function get maxVerticalScrollPosition():Number{
drawNow();
return (Math.max(0, (contentHeight - availableHeight)));
}
public function set horizontalScrollPosition(_arg1:Number):void{
drawNow();
.scrollPosition = _arg1;
setHorizontalScrollPosition(.scrollPosition, false);
}
public function get horizontalLineScrollSize():Number{
return (.lineScrollSize);
}
public function set verticalPageScrollSize(_arg1:Number):void{
= _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 ( );
}
protected function
(_arg1:ScrollEvent):void{
if (_arg1.target == ){
setVerticalScrollPosition(_arg1.position);
} else {
setHorizontalScrollPosition(_arg1.position);
};
}
public function set verticalLineScrollSize(_arg1:Number):void{
.lineScrollSize = _arg1;
}
public function get verticalScrollBar():ScrollBar{
return ();
}
protected function setVerticalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
}
public function set horizontalPageScrollSize(_arg1:Number):void{
= _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);
= new ScrollBar();
.addEventListener(ScrollEvent.SCROLL,
, false, 0, true);
.visible = false;
.lineScrollSize = ;
addChild();
copyStylesToChild(, SCROLL_BAR_STYLES);
= new ScrollBar();
.direction = ScrollBarDirection.HORIZONTAL;
.addEventListener(ScrollEvent.SCROLL,
, false, 0, true);
.visible = false;
.lineScrollSize = ;
addChild();
copyStylesToChild(, SCROLL_BAR_STYLES);
= new Shape();
_local1 = .graphics;
_local1.beginFill(0xFFFFFF);
_local1.drawRect(0, 0, width, height);
_local1.endFill();
addEventListener(MouseEvent.MOUSE_WHEEL, , false, 0, true);
}
protected function
():void{
}
public function get verticalPageScrollSize():Number{
if (isNaN(availableHeight)){
drawNow();
};
return ((((( == 0)) && (!(isNaN(availableHeight))))) ? availableHeight : );
}
protected function drawLayout():void{
();
();
background.width = width;
background.height = height;
if (){
.visible = true;
.x = ((width - ScrollBar.WIDTH) - contentPadding);
.y = contentPadding;
.height = availableHeight;
} else {
.visible = false;
};
.setScrollProperties(availableHeight, 0, (contentHeight - availableHeight), verticalPageScrollSize);
setVerticalScrollPosition(.scrollPosition, false);
if (){
.visible = true;
.x = contentPadding;
.y = ((height - ScrollBar.WIDTH) - contentPadding);
.width = availableWidth;
} else {
.visible = false;
};
.setScrollProperties(availableWidth, 0, (useFixedHorizontalScrolling) ? _maxHorizontalScrollPosition : ( - availableWidth), horizontalPageScrollSize);
setHorizontalScrollPosition(.scrollPosition, false);
();
}
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{
.lineScrollSize = _arg1;
}
public function get horizontalPageScrollSize():Number{
if (isNaN(availableWidth)){
drawNow();
};
return ((((( == 0)) && (!(isNaN(availableWidth))))) ? availableWidth : );
}
public function get maxHorizontalScrollPosition():Number{
drawNow();
return (Math.max(0, ( - availableWidth)));
}
protected function setStyles():void{
copyStylesToChild(, SCROLL_BAR_STYLES);
copyStylesToChild(, SCROLL_BAR_STYLES);
}
protected function updateChildren():void{
.enabled = (.enabled = enabled);
.drawNow();
.drawNow();
}
public function set verticalScrollPolicy(_arg1:String):void{
_verticalScrollPolicy = _arg1;
invalidate(InvalidationType.SIZE);
}
public function set useBitmapScrolling(_arg1:Boolean):void{
= _arg1;
invalidate(InvalidationType.STATE);
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, ScrollBar.getStyleDefinition()));
}
}
}//package fl.containers
Section 76
//CellRenderer (fl.controls.listClasses.CellRenderer)
package fl.controls.listClasses {
import fl.controls.*;
import flash.events.*;
public class CellRenderer extends LabelButton implements ICellRenderer {
protected var :Object;
protected var :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{
= _arg1;
label = .label;
setStyle("icon", .icon);
}
override public function set selected(_arg1:Boolean):void{
super.selected = _arg1;
}
public function set data(_arg1:Object):void{
= _arg1;
}
public function get listData():ListData{
return ();
}
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 ();
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls.listClasses
Section 77
//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 78
//ListData (fl.controls.listClasses.ListData)
package fl.controls.listClasses {
import fl.core.*;
public class ListData {
protected var
:uint;
protected var
:UIComponent;
protected var
:String;
protected var
:Object;// = null
protected var
:uint;
protected var
:uint;
public function ListData(_arg1:String, _arg2:Object, _arg3:UIComponent, _arg4:uint, _arg5:uint, _arg6:uint=0){
= null;
super();
= _arg1;
= _arg2;
= _arg3;
= _arg4;
= _arg5;
= _arg6;
}
public function get owner():UIComponent{
return (
);
}
public function get label():String{
return (
);
}
public function get row():uint{
return (
);
}
public function get index():uint{
return (
);
}
public function get icon():Object{
return (
);
}
public function get column():uint{
return (
);
}
}
}//package fl.controls.listClasses
Section 79
//BaseButton (fl.controls.BaseButton)
package fl.controls {
import fl.core.*;
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import fl.events.*;
public class BaseButton extends UIComponent {
protected var _selected:Boolean;// = false
private var
:String;
protected var :Timer;
protected var mouseState:String;
protected var background:DisplayObject;
private var :Boolean;// = false
protected var :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;
= false;
= false;
super();
buttonMode = true;
mouseChildren = false;
useHandCursor = false;
();
setMouseState("up");
= new Timer(1, 0);
.addEventListener(TimerEvent.TIMER, buttonDown, false, 0, true);
}
protected function endPress():void{
.reset();
}
public function set mouseStateLocked(_arg1:Boolean):void{
= _arg1;
if (_arg1 == false){
setMouseState(
);
} else {
= mouseState;
};
}
public function get autoRepeat():Boolean{
return ();
}
public function set autoRepeat(_arg1:Boolean):void{
= _arg1;
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
mouseEnabled = _arg1;
}
public function get selected():Boolean{
return (_selected);
}
protected function (_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 (){
= _arg1;
return;
};
if (mouseState == _arg1){
return;
};
mouseState = _arg1;
invalidate(InvalidationType.STATE);
}
protected function startPress():void{
if (){
.delay = Number(getStyleValue("repeatDelay"));
.start();
};
dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true));
}
protected function buttonDown(_arg1:TimerEvent):void{
if (!){
endPress();
return;
};
if (.currentCount == 1){
.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 ():void{
addEventListener(MouseEvent.ROLL_OVER, , false, 0, true);
addEventListener(MouseEvent.MOUSE_DOWN, , false, 0, true);
addEventListener(MouseEvent.MOUSE_UP, , false, 0, true);
addEventListener(MouseEvent.ROLL_OUT, , 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 80
//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 :DisplayObject;
protected var :Boolean;// = false
private static var defaultStyles:Object = {emphasizedSkin:"Button_emphasizedSkin", emphasizedPadding:2};
public static var createAccessibilityImplementation:Function;
public function Button(){
= 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)) || (!()))){
_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{
= _arg1;
invalidate(InvalidationType.STYLES);
}
override protected function draw():void{
if (((isInvalid(InvalidationType.STYLES)) || (isInvalid(InvalidationType.SIZE)))){
();
};
super.draw();
if ( != null){
setChildIndex(, (numChildren - 1));
};
}
public function get emphasized():Boolean{
return ();
}
override protected function initializeAccessibility():void{
if (Button.createAccessibilityImplementation != null){
Button.createAccessibilityImplementation(this);
};
}
protected function ():void{
var _local1:Object;
var _local2:Number;
if ( != null){
removeChild();
};
= null;
if (!){
return;
};
_local1 = getStyleValue("emphasizedSkin");
if (_local1 != null){
= getDisplayObjectInstance(_local1);
};
if ( != null){
addChildAt(, 0);
_local2 = Number(getStyleValue("emphasizedPadding"));
.x = (.y = -(_local2));
.width = (width + (_local2 * 2));
.height = (height + (_local2 * 2));
};
}
public static function getStyleDefinition():Object{
return (UIComponent.mergeStyles(LabelButton.getStyleDefinition(), defaultStyles));
}
}
}//package fl.controls
Section 81
//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 82
//CheckBox (fl.controls.CheckBox)
package fl.controls {
import flash.display.*;
public class CheckBox extends LabelButton {
private static var defaultStyles:Object = {icon:null, upIcon:"CheckBox_upIcon", downIcon:"CheckBox_downIcon", overIcon:"CheckBox_overIcon", disabledIcon:"CheckBox_disabledIcon", selectedDisabledIcon:"CheckBox_selectedDisabledIcon", focusRectSkin:null, focusRectPadding:null, selectedUpIcon:"CheckBox_selectedUpIcon", selectedDownIcon:"CheckBox_selectedDownIcon", selectedOverIcon:"CheckBox_selectedOverIcon", textFormat:null, disabledTextFormat:null, embedFonts:null, textPadding:5};
public static var createAccessibilityImplementation:Function;
override public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
super.drawFocus(_arg1);
if (_arg1){
_local2 = Number(getStyleValue("focusRectPadding"));
uiFocusRect.x = (background.x - _local2);
uiFocusRect.y = (background.y - _local2);
uiFocusRect.width = (background.width + (_local2 << 1));
uiFocusRect.height = (background.height + (_local2 << 1));
};
}
override public function get autoRepeat():Boolean{
return (false);
}
override public function set autoRepeat(_arg1:Boolean):void{
}
override public function set toggle(_arg1:Boolean):void{
throw (new Error("Warning: You cannot change a CheckBox's toggle."));
}
override public function get toggle():Boolean{
return (true);
}
override protected function configUI():void{
var _local1:Shape;
var _local2:Graphics;
super.configUI();
super.toggle = true;
_local1 = new Shape();
_local2 = _local1.graphics;
_local2.beginFill(0, 0);
_local2.drawRect(0, 0, 100, 100);
_local2.endFill();
background = (_local1 as DisplayObject);
addChildAt(background, 0);
}
override protected function drawLayout():void{
var _local1:Number;
super.drawLayout();
_local1 = Number(getStyleValue("textPadding"));
switch (_labelPlacement){
case ButtonLabelPlacement.RIGHT:
icon.x = _local1;
textField.x = (icon.x + (icon.width + _local1));
background.width = ((textField.x + textField.width) + _local1);
background.height = (Math.max(textField.height, icon.height) + (_local1 * 2));
break;
case ButtonLabelPlacement.LEFT:
icon.x = ((width - icon.width) - _local1);
textField.x = (((width - icon.width) - (_local1 * 2)) - textField.width);
background.width = ((textField.width + icon.width) + (_local1 * 3));
background.height = (Math.max(textField.height, icon.height) + (_local1 * 2));
break;
case ButtonLabelPlacement.TOP:
case ButtonLabelPlacement.BOTTOM:
background.width = (Math.max(textField.width, icon.width) + (_local1 * 2));
background.height = ((textField.height + icon.height) + (_local1 * 3));
break;
};
background.x = Math.min((icon.x - _local1), (textField.x - _local1));
background.y = Math.min((icon.y - _local1), (textField.y - _local1));
}
override protected function drawBackground():void{
}
override protected function initializeAccessibility():void{
if (CheckBox.createAccessibilityImplementation != null){
CheckBox.createAccessibilityImplementation(this);
};
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 83
//LabelButton (fl.controls.LabelButton)
package fl.controls {
import fl.core.*;
import flash.display.*;
import flash.events.*;
import flash.text.*;
import fl.managers.*;
import fl.events.*;
import flash.ui.*;
public class LabelButton extends BaseButton implements IFocusManagerComponent {
protected var _labelPlacement:String;// = "right"
protected var :Boolean;// = false
protected var icon:DisplayObject;
protected var :String;
protected var :String;// = "center"
public var textField:TextField;
protected var
: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;
= false;
= "Label";
= "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 ( == null){
= mouseState;
};
setMouseState("down");
startPress();
};
}
protected function (){
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();
= null;
endPress();
dispatchEvent(new MouseEvent(MouseEvent.CLICK));
};
}
override public function get selected():Boolean{
return (() ? _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;
};
= _arg1;
if (){
addEventListener(MouseEvent.CLICK, toggleSelected, false, 0, true);
} else {
removeEventListener(MouseEvent.CLICK, toggleSelected);
};
invalidate(InvalidationType.STATE);
}
public function get label():String{
return (
);
}
override public function set selected(_arg1:Boolean):void{
_selected = _arg1;
if (){
invalidate(InvalidationType.STATE);
};
}
override protected function draw():void{
if (textField.text !=
){
label =
;
};
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawBackground();
();
();
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 ();
}
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)) && (( == "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 ():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{
= _arg1;
if (textField.text !=
){
textField.text =
;
dispatchEvent(new ComponentEvent(ComponentEvent.LABEL_CHANGE));
};
invalidate(InvalidationType.SIZE);
invalidate(InvalidationType.STYLES);
}
protected function ():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;
();
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, BaseButton.getStyleDefinition()));
}
}
}//package fl.controls
Section 84
//List (fl.controls.List)
package fl.controls {
import fl.controls.listClasses.*;
import fl.core.*;
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.geom.*;
import fl.managers.*;
import flash.ui.*;
public class List extends SelectableList implements IFocusManagerComponent {
protected var :String;// = "label"
protected var :Number;// = 20
protected var :Object;
protected var :String;// = "icon"
protected var :Function;
protected var :Function;
private static var defaultStyles:Object = {focusRectSkin:null, focusRectPadding:null};
public static var createAccessibilityImplementation:Function;
public function List(){
= 20;
= "label";
= "icon";
super();
}
public function get iconField():String{
return ();
}
protected function
(_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 ( != null){
_local11 = (_local5);
} else {
if ( != null){
_local11 = _local5[];
};
};
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 ();
}
public function set iconField(_arg1:String):void{
if (_arg1 == ){
return;
};
= _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;
};
(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 ( != null){
return (String((_arg1)));
};
return (((_arg1[ ])!=null) ? String(_arg1[ ]) : "");
}
public function get labelField():String{
return ( );
}
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((() / 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){
(_local5, _arg2, _arg3);
scrollToSelected();
};
}
public function set labelField(_arg1:String):void{
if (_arg1 == ){
return;
};
= _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 ( == _arg1){
return;
};
= _arg1;
invalidate(InvalidationType.DATA);
}
public function get labelFunction():Function{
return ();
}
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 ():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 ( != getStyleValue("cellRenderer")){
_invalidateList();
= 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((() / 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 ();
}
public function set labelFunction(_arg1:Function):void{
if ( == _arg1){
return;
};
= _arg1;
invalidate(InvalidationType.DATA);
}
public function set rowHeight(_arg1:Number):void{
= _arg1;
invalidate(InvalidationType.SIZE);
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, SelectableList.getStyleDefinition()));
}
}
}//package fl.controls
Section 85
//NumericStepper (fl.controls.NumericStepper)
package fl.controls {
import fl.core.*;
import flash.display.*;
import flash.events.*;
import fl.managers.*;
import fl.events.*;
import flash.ui.*;
public class NumericStepper extends UIComponent implements IFocusManagerComponent {
protected var :BaseButton;
protected var :Number;// = 1
protected var :BaseButton;
protected var :Number;// = 1
protected var :Number;// = 0
protected var :Number;// = 10
protected var :Number;
protected var :TextInput;
protected static const DOWN_ARROW_STYLES:Object = {disabledSkin:"downArrowDisabledSkin", downSkin:"downArrowDownSkin", overSkin:"downArrowOverSkin", upSkin:"downArrowUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"};
protected static const TEXT_INPUT_STYLES:Object = {upSkin:"upSkin", disabledSkin:"disabledSkin", textPadding:"textPadding", textFormat:"textFormat", disabledTextFormat:"disabledTextFormat", embedFonts:"embedFonts"};
protected static const UP_ARROW_STYLES:Object = {disabledSkin:"upArrowDisabledSkin", downSkin:"upArrowDownSkin", overSkin:"upArrowOverSkin", upSkin:"upArrowUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"};
private static var defaultStyles:Object = {downArrowDisabledSkin:"NumericStepperDownArrow_disabledSkin", downArrowDownSkin:"NumericStepperDownArrow_downSkin", downArrowOverSkin:"NumericStepperDownArrow_overSkin", downArrowUpSkin:"NumericStepperDownArrow_upSkin", upArrowDisabledSkin:"NumericStepperUpArrow_disabledSkin", upArrowDownSkin:"NumericStepperUpArrow_downSkin", upArrowOverSkin:"NumericStepperUpArrow_overSkin", upArrowUpSkin:"NumericStepperUpArrow_upSkin", upSkin:"TextInput_upSkin", disabledSkin:"TextInput_disabledSkin", focusRect:null, focusRectSkin:null, focusRectPadding:null, repeatDelay:500, repeatInterval:35, embedFonts:false};
public function NumericStepper(){
= 10;
= 0;
= 1;
= 1;
super();
setStyles();
stepSize = ;
}
override public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
super.drawFocus(_arg1);
if (_arg1){
_local2 = Number(getStyleValue("focusRectPadding"));
uiFocusRect.width = (width + (_local2 * 2));
uiFocusRect.height = (height + (_local2 * 2));
};
}
public function get minimum():Number{
return ();
}
public function set imeMode(_arg1:String):void{
.imeMode = _arg1;
}
public function set minimum(_arg1:Number):void{
= _arg1;
if ( < ){
(, false);
};
}
public function get maximum():Number{
return ();
}
override protected function isOurFocus(_arg1:DisplayObject):Boolean{
return ((((_arg1 == )) || (super.isOurFocus(_arg1))));
}
public function get nextValue():Number{
var _local1:Number;
_local1 = ( + );
return (((_local1)) ? _local1 : );
}
public function set maximum(_arg1:Number):void{
= _arg1;
if ( > ){
(, false);
};
}
protected function (_arg1:Number, _arg2:Boolean=true):void{
var _local3:Number;
if (_arg1 == ){
return;
};
_local3 = ;
=
(_arg1);
.text = .toString();
if (_arg2){
dispatchEvent(new Event(Event.CHANGE, true));
};
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
var _local2:Number;
if (!enabled){
return;
};
_arg1.stopImmediatePropagation();
_local2 = Number(.text);
switch (_arg1.keyCode){
case Keyboard.END:
(maximum);
break;
case Keyboard.HOME:
(minimum);
break;
case Keyboard.UP:
(nextValue);
break;
case Keyboard.DOWN:
(previousValue);
break;
case Keyboard.ENTER:
(_local2);
break;
};
}
override public function set enabled(_arg1:Boolean):void{
if (_arg1 == enabled){
return;
};
super.enabled = _arg1;
.enabled = (.enabled = (.enabled = _arg1));
}
protected function (_arg1:Event):void{
_arg1.stopImmediatePropagation();
}
public function get previousValue():Number{
var _local1:Number;
_local1 = ( - );
return (((_local1)) ? _local1 : );
}
protected function
(_arg1:Number):Number{
var _local2:Number;
if (isNaN(_arg1)){
return ();
};
_local2 = Number(( * Math.round((_arg1 / ))).toFixed());
if (_local2 > maximum){
return (maximum);
};
if (_local2 < minimum){
return (minimum);
};
return (_local2);
}
public function set value(_arg1:Number):void{
(_arg1, false);
}
public function get stepSize():Number{
return ();
}
protected function (_arg1:Event):void{
dispatchEvent(_arg1);
}
public function get imeMode():String{
return (.imeMode);
}
protected function (_arg1:ComponentEvent):void{
(Number(.text), false);
switch (_arg1.currentTarget){
case :
(nextValue);
break;
case :
(previousValue);
};
.setFocus();
.textField.setSelection(0, 0);
}
override protected function focusOutHandler(_arg1:FocusEvent):void{
if (_arg1.eventPhase == 3){
(Number(.text));
};
super.focusOutHandler(_arg1);
}
protected function (_arg1:Number):Boolean{
return ((((_arg1 >= )) && ((_arg1 <= ))));
}
override public function get enabled():Boolean{
return (super.enabled);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
setStyles();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
if (((isFocused) && (focusManager.showFocusIndicator))){
drawFocus(true);
};
validate();
}
override protected function configUI():void{
super.configUI();
= new BaseButton();
copyStylesToChild(, UP_ARROW_STYLES);
.autoRepeat = true;
.setSize(21, 12);
.focusEnabled = false;
addChild();
= new BaseButton();
copyStylesToChild(, DOWN_ARROW_STYLES);
.autoRepeat = true;
.setSize(21, 12);
.focusEnabled = false;
addChild();
= new TextInput();
copyStylesToChild(, TEXT_INPUT_STYLES);
.restrict = "0-9\\-\\.\\,";
.text = .toString();
.setSize(21, 24);
.focusTarget = (this as IFocusManagerComponent);
.focusEnabled = false;
.addEventListener(FocusEvent.FOCUS_IN, );
.addEventListener(FocusEvent.FOCUS_OUT, );
addChild();
.addEventListener(Event.CHANGE, , false, 0, true);
.addEventListener(ComponentEvent.BUTTON_DOWN, , false, 0, true);
.addEventListener(ComponentEvent.BUTTON_DOWN, , false, 0, true);
}
public function get value():Number{
return ();
}
protected function (_arg1:Number):Boolean{
return ((((_arg1 - ) % ) == 0));
}
protected function drawLayout():void{
var _local1:Number;
var _local2:Number;
_local1 = (width - .width);
_local2 = (height / 2);
.setSize(_local1, height);
.height = _local2;
.height = Math.floor(_local2);
.move(_local1, _local2);
.move(_local1, 0);
.drawNow();
.drawNow();
.drawNow();
}
override public function setFocus():void{
if (stage){
stage.focus = .textField;
};
}
protected function ():Number{
var _local1:String;
_local1 = .toString();
if (_local1.indexOf(".") == -1){
return (0);
};
return (_local1.split(".").pop().length);
}
public function get textField():TextInput{
return ();
}
public function set stepSize(_arg1:Number):void{
= _arg1;
= ();
();
}
protected function setStyles():void{
copyStylesToChild(, DOWN_ARROW_STYLES);
copyStylesToChild(, UP_ARROW_STYLES);
copyStylesToChild(, TEXT_INPUT_STYLES);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 86
//ScrollBar (fl.controls.ScrollBar)
package fl.controls {
import fl.core.*;
import flash.events.*;
import fl.events.*;
public class ScrollBar extends UIComponent {
private var :String;// = "vertical"
protected var inDrag:Boolean;// = false
protected var :BaseButton;
private var :Number;// = 0
protected var :BaseButton;
private var :Number;// = 10
private var :Number;
private var :Number;// = 0
private var :Number;// = 0
protected var
:BaseButton;
private var :Number;// = 0
private var :Number;// = 1
protected var :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(){
= 10;
= 0;
= 1;
= 0;
= 0;
= 0;
= ScrollBarDirection.VERTICAL;
inDrag = false;
super();
setStyles();
focusEnabled = false;
}
public function get minScrollPosition():Number{
return ();
}
public function set minScrollPosition(_arg1:Number):void{
setScrollProperties(, _arg1, );
}
public function setScrollPosition(_arg1:Number, _arg2:Boolean=true):void{
var _local3:Number;
_local3 = scrollPosition;
= Math.max(, Math.min( , _arg1));
if (_local3 == ){
return;
};
if (_arg2){
dispatchEvent(new ScrollEvent(, (scrollPosition - _local3), scrollPosition));
};
();
}
public function set scrollPosition(_arg1:Number):void{
setScrollPosition(_arg1, true);
}
public function get pageScrollSize():Number{
return ((()==0) ? : );
}
public function set pageSize(_arg1:Number):void{
if (_arg1 > 0){
= _arg1;
};
}
public function setScrollProperties(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=0):void{
this.pageSize = _arg1;
= _arg2;
= _arg3;
if (_arg4 >= 0){
= _arg4;
};
enabled = ( > );
setScrollPosition(, false);
();
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
.enabled = (
.enabled = (.enabled = (.enabled = ((enabled) && (( > ))))));
();
}
protected function ():void{
var _local1:Number;
_local1 = (( - ) + );
if ((((((
.height <= 12)) || (( <= )))) || ((((_local1 == 0)) || (isNaN(_local1)))))){
.height = 12;
.visible = false;
} else {
.height = Math.max(13, (( / _local1) *
.height));
.y = (
.y + ((
.height - .height) * (( - ) / ( - ))));
.visible = enabled;
};
}
protected function (_arg1:MouseEvent):void{
inDrag = true;
= (mouseY - .y);
.mouseStateLocked = true;
mouseChildren = false;
stage.addEventListener(MouseEvent.MOUSE_MOVE, , false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_UP, , false, 0, true);
}
protected function (_arg1:MouseEvent):void{
inDrag = false;
mouseChildren = true;
.mouseStateLocked = false;
stage.removeEventListener(MouseEvent.MOUSE_MOVE, );
stage.removeEventListener(MouseEvent.MOUSE_UP, );
}
public function set pageScrollSize(_arg1:Number):void{
if (_arg1 >= 0){
= _arg1;
};
}
protected function (_arg1:MouseEvent):void{
var _local2:Number;
_local2 = Math.max(0, Math.min((
.height - .height), ((mouseY -
.y) - )));
setScrollPosition((((_local2 / (
.height - .height)) * ( - )) + ));
}
public function set direction(_arg1:String):void{
var _local2:Boolean;
if ( == _arg1){
return;
};
= _arg1;
if (isLivePreview){
return;
};
setScaleY(1);
_local2 = ( == 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){
= _arg1;
};
}
override public function get height():Number{
return ((()==ScrollBarDirection.HORIZONTAL) ? super.width : super.height);
}
protected function
(_arg1:ComponentEvent):void{
var _local2:Number;
var _local3:Number;
_arg1.stopImmediatePropagation();
if (_arg1.currentTarget == ){
setScrollPosition(( - ));
} else {
if (_arg1.currentTarget == ){
setScrollPosition(( + ));
} else {
_local2 = (((
.mouseY /
.height) * ( - )) + );
_local3 = ((pageScrollSize)==0) ? pageSize : pageScrollSize;
if ( < _local2){
setScrollPosition(Math.min(_local2, ( + _local3)));
} else {
if ( > _local2){
setScrollPosition(Math.max(_local2, ( - _local3)));
};
};
};
};
}
public function get pageSize():Number{
return ();
}
public function set maxScrollPosition(_arg1:Number):void{
setScrollProperties(, , _arg1);
}
public function get scrollPosition():Number{
return ();
}
override public function get enabled():Boolean{
return (super.enabled);
}
override protected function draw():void{
var _local1:Number;
if (isInvalid(InvalidationType.SIZE)){
_local1 = super.height;
.move(0, Math.max(.height, (_local1 - .height)));
.setSize(WIDTH, Math.max(0, (_local1 - (.height + .height))));
();
};
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
setStyles();
};
.drawNow();
.drawNow();
.drawNow();
.drawNow();
validate();
}
override protected function configUI():void{
super.configUI();
= new BaseButton();
.move(0, 14);
.useHandCursor = false;
.autoRepeat = true;
.focusEnabled = false;
addChild(
);
= new LabelButton();
.label = "";
.setSize(WIDTH, 15);
.move(0, 15);
.focusEnabled = false;
addChild();
= new BaseButton();
.setSize(WIDTH, 14);
.autoRepeat = true;
.focusEnabled = false;
addChild();
= new BaseButton();
.setSize(WIDTH, 14);
.move(0, 0);
.autoRepeat = true;
.focusEnabled = false;
addChild();
.addEventListener(ComponentEvent.BUTTON_DOWN,
, false, 0, true);
.addEventListener(ComponentEvent.BUTTON_DOWN,
, false, 0, true);
.addEventListener(ComponentEvent.BUTTON_DOWN,
, false, 0, true);
.addEventListener(MouseEvent.MOUSE_DOWN, , false, 0, true);
enabled = false;
}
public function get direction():String{
return ();
}
public function get lineScrollSize():Number{
return ();
}
override public function setSize(_arg1:Number, _arg2:Number):void{
if ( == ScrollBarDirection.HORIZONTAL){
super.setSize(_arg2, _arg1);
} else {
super.setSize(_arg1, _arg2);
};
}
public function get maxScrollPosition():Number{
return ( );
}
override public function get width():Number{
return ((()==ScrollBarDirection.HORIZONTAL) ? super.height : super.width);
}
protected function setStyles():void{
copyStylesToChild(, DOWN_ARROW_STYLES);
copyStylesToChild(, THUMB_STYLES);
copyStylesToChild(
, TRACK_STYLES);
copyStylesToChild(, UP_ARROW_STYLES);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 87
//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 88
//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 89
//SelectableList (fl.controls.SelectableList)
package fl.controls {
import fl.controls.listClasses.*;
import fl.core.*;
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import fl.data.*;
import fl.managers.*;
import fl.events.*;
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
:Object;
protected var
:Array;
protected var activeCellRenderers:Array;
protected var rendererStyles:Object;
protected var _verticalScrollPosition:Number;
protected var _dataProvider:DataProvider;
protected var _horizontalScrollPosition:Number;
private var :SimpleCollectionItem;
protected var :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;
= 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 = {};
= {};
}
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 (_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 ();
}
public function (_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 ():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 == ){
return;
};
if (!_arg1){
selectedIndices = [];
};
= _arg1;
}
public function itemToLabel(_arg1:Object):String{
return (_arg1["label"]);
}
public function addItemAt(_arg1:Object, _arg2:uint):void{
_dataProvider.addItemAt(_arg1, _arg2);
();
}
public function replaceItemAt(_arg1:Object, _arg2:uint):Object{
return (_dataProvider.replaceItemAt(_arg1, _arg2));
}
protected function
(_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){
();
();
} 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){
();
} else {
if (_local4 == DataChangeType.REPLACE){
} else {
selectedItems =
;
= 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
) {
_local1[_local3].setStyle(_local4,
[_local4]);
};
_local1[_local3].drawNow();
};
_local3++;
};
= {};
}
public function set selectedItem(_arg1:Object):void{
var _local2:int;
_local2 = _dataProvider.
(_arg1);
selectedIndex = _local2;
}
public function (... _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)))) || (!()))){
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
(_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:
= selectedItems;
break;
};
}
public function
(_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 (!){
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);
();
}
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
(_arg1:String, _arg2:int=-1):void{
delete rendererStyles[_arg1];
[_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 (_arg1:Object):Boolean{
return ((selectedItems.indexOf(_arg1) > -1));
}
public function set dataProvider(_arg1:DataProvider):void{
if (_dataProvider != null){
_dataProvider.removeEventListener(DataChangeEvent.DATA_CHANGE,
);
_dataProvider.removeEventListener(DataChangeEvent.PRE_DATA_CHANGE,
);
};
_dataProvider = _arg1;
_dataProvider.addEventListener(DataChangeEvent.DATA_CHANGE,
, false, 0, true);
_dataProvider.addEventListener(DataChangeEvent.PRE_DATA_CHANGE,
, false, 0, true);
();
();
}
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 (_arg1:String, _arg2:Object, _arg3:uint=0):void{
if (rendererStyles[_arg1] == _arg2){
return;
};
[_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.
(_arg1[_local3]);
if (_local4 != -1){
_local2.push(_local4);
};
_local3++;
};
selectedIndices = _local2;
}
public function
():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 90
//TextArea (fl.controls.TextArea)
package fl.controls {
import fl.core.*;
import flash.display.*;
import flash.events.*;
import flash.text.*;
import fl.managers.*;
import fl.events.*;
import flash.ui.*;
import flash.system.*;
public class TextArea extends UIComponent implements IFocusManagerComponent {
protected var :Boolean;// = false
protected var :UIScrollBar;
protected var :String;
protected var background:DisplayObject;
protected var :UIScrollBar;
protected var _horizontalScrollPolicy:String;// = "auto"
protected var :Boolean;// = true
protected var
:Boolean;// = false
public var textField:TextField;
protected var :Boolean;// = true
protected var _verticalScrollPolicy:String;// = "auto"
protected static const SCROLL_BAR_STYLES:Object = {downArrowDisabledSkin:"downArrowDisabledSkin", downArrowDownSkin:"downArrowDownSkin", downArrowOverSkin:"downArrowOverSkin", downArrowUpSkin:"downArrowUpSkin", upArrowDisabledSkin:"upArrowDisabledSkin", upArrowDownSkin:"upArrowDownSkin", upArrowOverSkin:"upArrowOverSkin", upArrowUpSkin:"upArrowUpSkin", thumbDisabledSkin:"thumbDisabledSkin", thumbDownSkin:"thumbDownSkin", thumbOverSkin:"thumbOverSkin", thumbUpSkin:"thumbUpSkin", thumbIcon:"thumbIcon", trackDisabledSkin:"trackDisabledSkin", trackDownSkin:"trackDownSkin", trackOverSkin:"trackOverSkin", trackUpSkin:"trackUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"};
private static var defaultStyles:Object = {upSkin:"TextArea_upSkin", disabledSkin:"TextArea_disabledSkin", focusRectSkin:null, focusRectPadding:null, textFormat:null, disabledTextFormat:null, textPadding:3, embedFonts:false};
public static var createAccessibilityImplementation:Function;
public function TextArea(){
= true;
= true;
_horizontalScrollPolicy = ScrollPolicy.AUTO;
_verticalScrollPolicy = ScrollPolicy.AUTO;
= false;
= 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;
}
protected function (_arg1:MouseEvent):void{
if (((!(enabled)) || (!(.visible)))){
return;
};
.scrollPosition = (.scrollPosition - (_arg1.delta * .lineScrollSize));
dispatchEvent(new ScrollEvent(ScrollBarDirection.VERTICAL, (_arg1.delta * .lineScrollSize), .scrollPosition));
}
public function get verticalScrollPosition():Number{
return (textField.scrollV);
}
override protected function isOurFocus(_arg1:DisplayObject):Boolean{
return ((((_arg1 == textField)) || (super.isOurFocus(_arg1))));
}
public function set verticalScrollPosition(_arg1:Number):void{
drawNow();
textField.scrollV = _arg1;
}
protected function (_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.ENTER){
dispatchEvent(new ComponentEvent(ComponentEvent.ENTER, true));
};
}
public function set text(_arg1:String):void{
if (((componentInspectorSetting) && ((_arg1 == "")))){
return;
};
textField.text = _arg1;
= false;
invalidate(InvalidationType.DATA);
invalidate(InvalidationType.STYLES);
= true;
}
protected function ():void{
textField.type = (((enabled) && ())) ? TextFieldType.INPUT : TextFieldType.DYNAMIC;
textField.selectable = enabled;
textField.wordWrap = ;
textField.multiline = true;
}
public function get selectionEndIndex():int{
return (textField.selectionEndIndex);
}
public function get editable():Boolean{
return ();
}
override protected function focusInHandler(_arg1:FocusEvent):void{
var _local2:IFocusManager;
setIMEMode(true);
if (_arg1.target == this){
stage.focus = textField;
};
_local2 = focusManager;
if (_local2){
if (editable){
_local2.showFocusIndicator = true;
};
_local2.defaultButtonEnabled = false;
};
super.focusInHandler(_arg1);
if (editable){
setIMEMode(true);
};
}
public function get wordWrap():Boolean{
return ();
}
public function get selectionBeginIndex():int{
return (textField.selectionBeginIndex);
}
public function get horizontalScrollBar():UIScrollBar{
return ();
}
public function set alwaysShowSelection(_arg1:Boolean):void{
textField.alwaysShowSelection = _arg1;
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
mouseChildren = enabled;
invalidate(InvalidationType.STATE);
}
protected function (){
var _local1:Object;
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
}
public function get horizontalScrollPosition():Number{
return (textField.scrollH);
}
public function set condenseWhite(_arg1:Boolean):void{
textField.condenseWhite = _arg1;
invalidate(InvalidationType.DATA);
}
public function get horizontalScrollPolicy():String{
return (_horizontalScrollPolicy);
}
public function set displayAsPassword(_arg1:Boolean):void{
textField.displayAsPassword = _arg1;
}
public function get maxVerticalScrollPosition():int{
return (textField.maxScrollV);
}
public function set horizontalScrollPosition(_arg1:Number):void{
drawNow();
textField.scrollH = _arg1;
}
public function get textHeight():Number{
drawNow();
return (textField.textHeight);
}
public function get textWidth():Number{
drawNow();
return (textField.textWidth);
}
public function get restrict():String{
return (textField.restrict);
}
public function set editable(_arg1:Boolean):void{
= _arg1;
invalidate(InvalidationType.STATE);
}
protected function (){
.update();
.update();
.enabled = enabled;
.enabled = enabled;
.drawNow();
.drawNow();
}
public function get maxChars():int{
return (textField.maxChars);
}
public function get length():Number{
return (textField.text.length);
}
public function set wordWrap(_arg1:Boolean):void{
= _arg1;
invalidate(InvalidationType.STATE);
}
public function get verticalScrollPolicy():String{
return (_verticalScrollPolicy);
}
public function getLineMetrics(_arg1:int):TextLineMetrics{
return (textField.getLineMetrics(_arg1));
}
public function get imeMode():String{
return (IME.conversionMode);
}
protected function
(_arg1:ScrollEvent):void{
dispatchEvent(_arg1);
}
override protected function focusOutHandler(_arg1:FocusEvent):void{
var _local2:IFocusManager;
_local2 = focusManager;
if (_local2){
_local2.defaultButtonEnabled = true;
};
setSelection(0, 0);
super.focusOutHandler(_arg1);
if (editable){
setIMEMode(false);
};
}
protected function (_arg1:Event):void{
if (
){
= false;
drawLayout();
return;
};
removeEventListener(Event.ENTER_FRAME, );
}
public function set htmlText(_arg1:String):void{
if (((componentInspectorSetting) && ((_arg1 == "")))){
return;
};
if (_arg1 == ""){
text = "";
return;
};
= true;
= _arg1;
textField.htmlText = _arg1;
invalidate(InvalidationType.DATA);
invalidate(InvalidationType.STYLES);
= true;
}
public function get text():String{
return (textField.text);
}
public function get verticalScrollBar():UIScrollBar{
return ();
}
override public function get enabled():Boolean{
return (super.enabled);
}
public function get condenseWhite():Boolean{
return (textField.condenseWhite);
}
public function set horizontalScrollPolicy(_arg1:String):void{
_horizontalScrollPolicy = _arg1;
invalidate(InvalidationType.SIZE);
}
public function get displayAsPassword():Boolean{
return (textField.displayAsPassword);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STATE)){
();
};
if (isInvalid(InvalidationType.STYLES)){
setStyles();
();
};
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
();
drawBackground();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE, InvalidationType.DATA)){
drawLayout();
};
super.draw();
}
protected function (_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);
();
= new UIScrollBar();
.name = "V";
.visible = false;
.focusEnabled = false;
copyStylesToChild(, SCROLL_BAR_STYLES);
.addEventListener(ScrollEvent.SCROLL,
, false, 0, true);
addChild();
= new UIScrollBar();
.name = "H";
.visible = false;
.focusEnabled = false;
.direction = ScrollBarDirection.HORIZONTAL;
copyStylesToChild(, SCROLL_BAR_STYLES);
.addEventListener(ScrollEvent.SCROLL,
, false, 0, true);
addChild();
textField.addEventListener(TextEvent.TEXT_INPUT, , false, 0, true);
textField.addEventListener(Event.CHANGE, , false, 0, true);
textField.addEventListener(KeyboardEvent.KEY_DOWN, , false, 0, true);
.scrollTarget = textField;
.scrollTarget = textField;
addEventListener(MouseEvent.MOUSE_WHEEL, , false, 0, true);
}
protected function (_arg1:Number, _arg2:Number, _arg3:Number):void{
var _local4:Number;
var _local5:Number;
_local4 = (_arg1 - (_arg3 * 2));
_local5 = (_arg2 - (_arg3 * 2));
if (_local4 != textField.width){
textField.width = _local4;
};
if (_local5 != textField.height){
textField.height = _local5;
};
}
public function appendText(_arg1:String):void{
textField.appendText(_arg1);
invalidate(InvalidationType.DATA);
}
protected function ():Boolean{
if (_verticalScrollPolicy == ScrollPolicy.OFF){
return (false);
};
if (_verticalScrollPolicy == ScrollPolicy.ON){
return (true);
};
return ((textField.maxScrollV > 1));
}
public function setSelection(_arg1:int, _arg2:int):void{
textField.setSelection(_arg1, _arg2);
}
public function get alwaysShowSelection():Boolean{
return (textField.alwaysShowSelection);
}
public function get htmlText():String{
return (textField.htmlText);
}
public function set restrict(_arg1:String):void{
if (((componentInspectorSetting) && ((_arg1 == "")))){
_arg1 = null;
};
textField.restrict = _arg1;
}
protected function drawBackground():void{
var _local1:DisplayObject;
var _local2:String;
_local1 = background;
_local2 = (enabled) ? "upSkin" : "disabledSkin";
background = getDisplayObjectInstance(getStyleValue(_local2));
if (background != null){
addChildAt(background, 0);
};
if (((((!((_local1 == null))) && (!((_local1 == background))))) && (contains(_local1)))){
removeChild(_local1);
};
}
public function set maxChars(_arg1:int):void{
textField.maxChars = _arg1;
}
public function get maxHorizontalScrollPosition():int{
return (textField.maxScrollH);
}
protected function drawLayout():void{
var _local1:Number;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
var _local5:Boolean;
_local1 = Number(getStyleValue("textPadding"));
textField.x = (textField.y = _local1);
background.width = width;
background.height = height;
_local2 = height;
_local3 = ();
_local4 = (width - (_local3) ? .width : 0);
_local5 = ();
if (_local5){
_local2 = (_local2 - .height);
};
(_local4, _local2, _local1);
if (((((_local5) && (!(_local3)))) && (()))){
_local3 = true;
_local4 = (_local4 - .width);
(_local4, _local2, _local1);
};
if (_local3){
.visible = true;
.x = (width - .width);
.height = _local2;
.visible = true;
.enabled = enabled;
} else {
.visible = false;
};
if (_local5){
.visible = true;
.y = (height - .height);
.width = _local4;
.visible = true;
.enabled = enabled;
} else {
.visible = false;
};
();
addEventListener(Event.ENTER_FRAME, , false, 0, true);
}
protected function setStyles():void{
copyStylesToChild(, SCROLL_BAR_STYLES);
copyStylesToChild(, SCROLL_BAR_STYLES);
}
protected function ():Boolean{
if (_horizontalScrollPolicy == ScrollPolicy.OFF){
return (false);
};
if (_horizontalScrollPolicy == ScrollPolicy.ON){
return (true);
};
return ((textField.maxScrollH > 0));
}
protected function ():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;
();
if (){
textField.htmlText = ;
};
}
public function set verticalScrollPolicy(_arg1:String):void{
_verticalScrollPolicy = _arg1;
invalidate(InvalidationType.SIZE);
}
protected function (_arg1:Event):void{
_arg1.stopPropagation();
dispatchEvent(new Event(Event.CHANGE, true));
invalidate(InvalidationType.DATA);
}
public static function getStyleDefinition():Object{
return (UIComponent.mergeStyles(defaultStyles, ScrollBar.getStyleDefinition()));
}
}
}//package fl.controls
Section 91
//TextInput (fl.controls.TextInput)
package fl.controls {
import fl.core.*;
import flash.display.*;
import flash.events.*;
import flash.text.*;
import fl.managers.*;
import fl.events.*;
import flash.ui.*;
public class TextInput extends UIComponent implements IFocusManagerComponent {
protected var :Boolean;// = false
protected var :String;
protected var background:DisplayObject;
protected var :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(){
= true;
= 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 (_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.ENTER){
dispatchEvent(new ComponentEvent(ComponentEvent.ENTER, true));
};
}
public function set text(_arg1:String):void{
textField.text = _arg1;
= false;
invalidate(InvalidationType.DATA);
invalidate(InvalidationType.STYLES);
}
protected function ():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 ();
}
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;
();
}
protected function (){
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{
= _arg1;
();
}
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;
};
= true;
= _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)){
();
drawBackground();
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
super.draw();
}
protected function (_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);
();
textField.addEventListener(TextEvent.TEXT_INPUT, , false, 0, true);
textField.addEventListener(Event.CHANGE, , false, 0, true);
textField.addEventListener(KeyboardEvent.KEY_DOWN, , 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 ():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;
();
if (){
textField.htmlText = ;
};
}
protected function (_arg1:Event):void{
_arg1.stopPropagation();
dispatchEvent(new Event(Event.CHANGE, true));
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 92
//UIScrollBar (fl.controls.UIScrollBar)
package fl.controls {
import fl.core.*;
import flash.events.*;
import flash.text.*;
import fl.events.*;
public class UIScrollBar extends ScrollBar {
protected var
:Boolean;// = false
protected var
:TextField;
protected var
:Boolean;// = false
private static var defaultStyles:Object = {};
public function UIScrollBar(){
= false;
= false;
super();
}
protected function
(_arg1:Event):void{
if (inDrag){
return;
};
if (!enabled){
return;
};
= true;
();
scrollPosition = ((direction)==ScrollBarDirection.HORIZONTAL) ?
.scrollH :
.scrollV;
= false;
}
override public function set minScrollPosition(_arg1:Number):void{
super.minScrollPosition = ((_arg1)<0) ? 0 : _arg1;
}
override public function setScrollPosition(_arg1:Number, _arg2:Boolean=true):void{
super.setScrollPosition(_arg1, _arg2);
if (!
){
= false;
return;
};
();
}
override public function setScrollProperties(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=0):void{
var _local5:Number;
var _local6:Number;
_local5 = _arg3;
_local6 = ((_arg2)<0) ? 0 : _arg2;
if (
!= null){
if (direction == ScrollBarDirection.HORIZONTAL){
_local5 = ((_arg3)>
.maxScrollH) ?
.maxScrollH : _local5;
} else {
_local5 = ((_arg3)>
.maxScrollV) ?
.maxScrollV : _local5;
};
};
super.setScrollProperties(_arg1, _local6, _local5, _arg4);
}
public function get scrollTargetName():String{
return (
.name);
}
public function get scrollTarget():TextField{
return (
);
}
protected function
():void{
var _local1:Boolean;
var _local2:Number;
if (
== null){
setScrollProperties(pageSize, minScrollPosition, maxScrollPosition, pageScrollSize);
scrollPosition = 0;
} else {
_local1 = (direction == ScrollBarDirection.HORIZONTAL);
_local2 = (_local1) ?
.width : 10;
setScrollProperties(_local2, (_local1) ? 0 : 1, (_local1) ?
.maxScrollH :
.maxScrollV, pageScrollSize);
scrollPosition = (_local1) ?
.scrollH :
.scrollV;
};
}
public function update():void{
= true;
();
= false;
}
public function set scrollTargetName(_arg1:String):void{
var target = _arg1;
try {
scrollTarget = (parent.getChildByName(target) as TextField);
} catch(error:Error) {
throw (new Error("ScrollTarget not found, or is not a TextField"));
};
}
override public function set direction(_arg1:String):void{
if (isLivePreview){
return;
};
super.direction = _arg1;
();
}
protected function
(_arg1:Event):void{
= true;
setScrollPosition(((direction)==ScrollBarDirection.HORIZONTAL) ?
.scrollH :
.scrollV, true);
();
= false;
}
override public function set maxScrollPosition(_arg1:Number):void{
var _local2:Number;
_local2 = _arg1;
if (
!= null){
if (direction == ScrollBarDirection.HORIZONTAL){
_local2 = ((_local2)>
.maxScrollH) ?
.maxScrollH : _local2;
} else {
_local2 = ((_local2)>
.maxScrollV) ?
.maxScrollV : _local2;
};
};
super.maxScrollPosition = _local2;
}
protected function
(_arg1:ScrollEvent=null):void{
if (
){
return;
};
if (direction == ScrollBarDirection.HORIZONTAL){
.scrollH = scrollPosition;
} else {
.scrollV = scrollPosition;
};
}
override protected function draw():void{
if (isInvalid(InvalidationType.DATA)){
();
};
super.draw();
}
public function set scrollTarget(_arg1:TextField):void{
if (
!= null){
.removeEventListener(Event.CHANGE,
, false);
.removeEventListener(TextEvent.TEXT_INPUT,
, false);
.removeEventListener(Event.SCROLL,
, false);
removeEventListener(ScrollEvent.SCROLL,
, false);
};
= _arg1;
if (
!= null){
.addEventListener(Event.CHANGE,
, false, 0, true);
.addEventListener(TextEvent.TEXT_INPUT,
, false, 0, true);
.addEventListener(Event.SCROLL,
, false, 0, true);
addEventListener(ScrollEvent.SCROLL,
, false, 0, true);
};
invalidate(InvalidationType.DATA);
}
override public function get direction():String{
return (super.direction);
}
public static function getStyleDefinition():Object{
return (UIComponent.mergeStyles(defaultStyles, ScrollBar.getStyleDefinition()));
}
}
}//package fl.controls
Section 93
//ComponentShim (fl.core.ComponentShim)
package fl.core {
import flash.display.*;
public dynamic class ComponentShim extends MovieClip {
}
}//package fl.core
Section 94
//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 95
//UIComponent (fl.core.UIComponent)
package fl.core {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
import fl.managers.*;
import fl.events.*;
import flash.system.*;
public class UIComponent extends Sprite {
protected var _enabled:Boolean;// = true
private var :Boolean;// = true
protected var :Number;
protected var :Number;
protected var :String;// = null
protected var :Number;
public var focusTarget:IFocusManagerComponent;
protected var :Boolean;// = false
protected var uiFocusRect:DisplayObject;
protected var
:Number;
public var version:String;// = "3.0.0.15"
protected var isFocused:Boolean;// = false
protected var
:Dictionary;
private var
:Boolean;// = true
private var
:TextField;
protected var
:Boolean;// = false
protected var :Boolean;// = false
protected var
:Object;
protected var :Object;
protected var isLivePreview:Boolean;// = false
protected var _imeMode:String;// = null
protected var :Object;
protected var :Number;
protected var
: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;
= false;
_enabled = true;
isFocused = false;
= true;
= true;
_imeMode = null;
= null;
= false;
= false;
super();
= {};
= {};
= {};
= 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);
};
();
addEventListener(Event.ENTER_FRAME,
, 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 (_arg1:Event):void{
var _local2:Dictionary;
var _local3:Object;
if (_arg1.type == Event.ADDED_TO_STAGE){
removeEventListener(Event.ADDED_TO_STAGE, );
stage.addEventListener(Event.RENDER, , false, 0, true);
stage.invalidate();
return;
};
_arg1.target.removeEventListener(Event.RENDER, );
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, , false, 0, true);
return;
};
inCallLaterPhase = true;
_local2 =
;
for (_local3 in _local2) {
_local3();
delete _local2[_local3];
};
inCallLaterPhase = false;
}
private function (_arg1:Event):void{
removeEventListener("addedToStage", );
();
}
protected function getStyleValue(_arg1:String):Object{
return ((([_arg1])==null) ?
[_arg1] : [_arg1]);
}
protected function isOurFocus(_arg1:DisplayObject):Boolean{
return ((_arg1 == this));
}
override public function get scaleX():Number{
return ((width / ));
}
override public function get scaleY():Number{
return ((height / ));
}
override public function set height(_arg1:Number):void{
if ( == _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 (((([_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
[_arg1] = _arg2;
invalidate(InvalidationType.STYLES);
}
override public function get visible():Boolean{
return (super.visible);
}
public function get componentInspectorSetting():Boolean{
return ();
}
override public function get x():Number{
return ((isNaN( )) ? super.x : );
}
override public function get y():Number{
return ((isNaN(
)) ? super.y :
);
}
protected function setIMEMode(_arg1:Boolean){
var enabled = _arg1;
if (_imeMode != null){
if (enabled){
IME.enabled = true;
= IME.conversionMode;
try {
if (((!( )) && (!((IME.conversionMode == IMEConversionMode.UNKNOWN))))){
IME.conversionMode = _imeMode;
};
= false;
} catch(e:Error) {
= true;
throw (new Error(("IME mode not supported: " + _imeMode)));
};
} else {
if (((!((IME.conversionMode == IMEConversionMode.UNKNOWN))) && (!(( == IMEConversionMode.UNKNOWN))))){
IME.conversionMode = ;
};
IME.enabled = false;
};
};
}
public function set enabled(_arg1:Boolean):void{
if (_arg1 == _enabled){
return;
};
_enabled = _arg1;
invalidate(InvalidationType.STATE);
}
public function (_arg1:String, _arg2:Object):void{
if ((((
[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
[_arg1] = _arg2;
if ([_arg1] == null){
invalidate(InvalidationType.STYLES);
};
}
protected function keyUpHandler(_arg1:KeyboardEvent):void{
}
public function set focusEnabled(_arg1:Boolean):void{
= _arg1;
}
override public function set scaleX(_arg1:Number):void{
setSize(( * _arg1), height);
}
public function get mouseFocusEnabled():Boolean{
return ();
}
override public function set scaleY(_arg1:Number):void{
setSize(width, ( * _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 ():void{
}
protected function (_arg1:Function):void{
if (inCallLaterPhase){
return;
};
[_arg1] = true;
if (stage != null){
stage.addEventListener(Event.RENDER, , false, 0, true);
stage.invalidate();
} else {
addEventListener(Event.ADDED_TO_STAGE, , false, 0, true);
};
}
protected function ():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
(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME,
);
initializeAccessibility();
}
public function set componentInspectorSetting(_arg1:Boolean):void{
= _arg1;
if (){
();
} else {
();
};
}
override public function set x(_arg1:Number):void{
move(_arg1,
);
}
public function drawNow():void{
draw();
}
override public function set y(_arg1:Number):void{
move( , _arg1);
}
protected function
():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{
= _arg1;
}
public function getFocus():InteractiveObject{
if (stage){
return (stage.focus);
};
return (null);
}
protected function validate():void{
= {};
}
override public function get height():Number{
return ();
}
public function invalidate(_arg1:String="all", _arg2:Boolean=true):void{
[_arg1] = true;
if (_arg2){
this. (draw);
};
}
public function get enabled():Boolean{
return (_enabled);
}
protected function
():Number{
return (super.scaleX);
}
protected function
():Number{
return (super.scaleY);
}
public function get focusEnabled():Boolean{
return (
);
}
protected function
():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 =
();
_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;
= _local2;
= _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 ():void{
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, , false, 0, true);
} else {
();
};
}
public function set focusManager(_arg1:IFocusManager):void{
UIComponent.focusManagers[this] = _arg1;
}
public function (_arg1:String):void{
setStyle(_arg1, null);
}
protected function isInvalid(_arg1:String, ... _args):Boolean{
if ((([_arg1]) || ([InvalidationType.ALL]))){
return (true);
};
while (_args.length > 0) {
if ([_args.pop()]){
return (true);
};
};
return (false);
}
public function setSize(_arg1:Number, _arg2:Number):void{
= _arg1;
= _arg2;
invalidate(InvalidationType.SIZE);
dispatchEvent(new ComponentEvent(ComponentEvent.RESIZE, false));
}
override public function set width(_arg1:Number):void{
if (
== _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 (
);
}
public function move(_arg1:Number, _arg2:Number):void{
= _arg1;
= _arg2;
super.x = Math.round(_arg1);
super.y = Math.round(_arg2);
dispatchEvent(new ComponentEvent(ComponentEvent.MOVE));
}
public function ():void{
invalidate(InvalidationType.ALL, false);
draw();
}
public function (_arg1:String):Object{
return ([_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 96
//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 = (_arg1);
};
}
protected function (_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{
(_arg1, (data.length - 1));
(DataChangeType.INVALIDATE, [data[_arg1]], _arg1, _arg1);
}
public function
(_arg1:Object):int{
return (data.indexOf(_arg1));
}
protected function (_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;
(_arg1, (data.length - 1));
(DataChangeType.REMOVE, data.slice(_arg1, (_arg1 + 1)), _arg1, _arg1);
_local2 = data.splice(_arg1, 1);
(DataChangeType.REMOVE, _local2, _arg1, _arg1);
return (_local2[0]);
}
public function addItem(_arg1:Object):void{
(DataChangeType.ADD, [_arg1], (data.length - 1), (data.length - 1));
data.push(_arg1);
(DataChangeType.ADD, [_arg1], (data.length - 1), (data.length - 1));
}
public function sortOn(_arg1:Object, _arg2:Object=null){
var _local3:Array;
(DataChangeType.SORT, data.concat(), 0, (data.length - 1));
_local3 = data.sortOn(_arg1, _arg2);
(DataChangeType.SORT, data.concat(), 0, (data.length - 1));
return (_local3);
}
public function sort(... _args){
var _local2:Array;
(DataChangeType.SORT, data.concat(), 0, (data.length - 1));
_local2 = data.sort.apply(data, _args);
(DataChangeType.SORT, data.concat(), 0, (data.length - 1));
return (_local2);
}
public function (_arg1:Object):void{
(_arg1, data.length);
}
public function concat(_arg1:Object):void{
(_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{
(_arg2, data.length);
(DataChangeType.ADD, [_arg1], _arg2, _arg2);
data.splice(_arg2, 0, _arg1);
(DataChangeType.ADD, [_arg1], _arg2, _arg2);
}
public function getItemAt(_arg1:uint):Object{
(_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 =
(_arg1);
if (_local2 == -1){
return;
};
invalidateItemAt(_local2);
}
protected function (_arg1:String, _arg2:Array, _arg3:int, _arg4:int):void{
dispatchEvent(new DataChangeEvent(DataChangeEvent.DATA_CHANGE, _arg1, _arg2, _arg3, _arg4));
}
protected function (_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 (_arg1:Object, _arg2:uint):void{
var _local3:Array;
(_arg2, data.length);
_local3 = (_arg1);
(DataChangeType.ADD, _local3, _arg2, ((_arg2 + _local3.length) - 1));
data.splice.apply(data, [_arg2, 0].concat(_local3));
(DataChangeType.ADD, _local3, _arg2, ((_arg2 + _local3.length) - 1));
}
public function (_arg1:Object, _arg2:Object):Object{
var _local3:int;
_local3 =
(_arg2);
if (_local3 != -1){
return (replaceItemAt(_arg1, _local3));
};
return (null);
}
public function removeItem(_arg1:Object):Object{
var _local2:int;
_local2 =
(_arg1);
if (_local2 != -1){
return (removeItemAt(_local2));
};
return (null);
}
public function (_arg1:Object):void{
var _local2:Array;
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:Object;
_local2 = (_arg1);
_local3 = _local2.length;
_local4 = data.length;
(DataChangeType.ADD, data.slice(_local4, data.length), _local4, (this.data.length - 1));
_local5 = 0;
while (_local5 < _local3) {
_local6 = _local2[_local5];
if (
(_local6) == -1){
data.push(_local6);
};
_local5++;
};
if (data.length > _local4){
(DataChangeType.ADD, data.slice(_local4, data.length), _local4, (this.data.length - 1));
} else {
(DataChangeType.ADD, [], -1, -1);
};
}
public function replaceItemAt(_arg1:Object, _arg2:uint):Object{
var _local3:Array;
(_arg2, (data.length - 1));
_local3 = [data[_arg2]];
(DataChangeType.REPLACE, _local3, _arg2, _arg2);
data[_arg2] = _arg1;
(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();
(DataChangeType.REMOVE_ALL, _local1, 0, _local1.length);
data = [];
(DataChangeType.REMOVE_ALL, _local1, 0, _local1.length);
}
}
}//package fl.data
Section 97
//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 98
//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 99
//DataChangeEvent (fl.events.DataChangeEvent)
package fl.events {
import flash.events.*;
public class DataChangeEvent extends Event {
protected var :Array;
protected var :uint;
protected var :String;
protected var
: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);
= _arg2;
= _arg4;
= _arg3;
= ((_arg5)==-1) ?
: _arg5;
}
public function get changeType():String{
return ( );
}
public function get startIndex():uint{
return (
);
}
public function get items():Array{
return ();
}
override public function clone():Event{
return (new DataChangeEvent(type, , ,
, ));
}
override public function toString():String{
return (formatToString("DataChangeEvent", "type", "changeType", "startIndex", "endIndex", "bubbles", "cancelable"));
}
public function get endIndex():uint{
return ();
}
}
}//package fl.events
Section 100
//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 101
//ListEvent (fl.events.ListEvent)
package fl.events {
import flash.events.*;
public class ListEvent extends Event {
protected var
:int;
protected var :Object;
protected var :int;
protected var :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);
= _arg5;
= _arg4;
= _arg6;
= _arg7;
}
public function get rowIndex():Object{
return ();
}
public function get index():int{
return (
);
}
public function get item():Object{
return ();
}
public function get columnIndex():int{
return ();
}
override public function clone():Event{
return (new ListEvent(type, bubbles, cancelable, , ));
}
override public function toString():String{
return (formatToString("ListEvent", "type", "bubbles", "cancelable", "columnIndex", "rowIndex", "index", "item"));
}
}
}//package fl.events
Section 102
//ScrollEvent (fl.events.ScrollEvent)
package fl.events {
import flash.events.*;
public class ScrollEvent extends Event {
private var :Number;
private var :String;
private var :Number;
public static const SCROLL:String = "scroll";
public function ScrollEvent(_arg1:String, _arg2:Number, _arg3:Number){
super(ScrollEvent.SCROLL, false, false);
= _arg1;
= _arg2;
= _arg3;
}
override public function clone():Event{
return (new ScrollEvent(, , ));
}
public function get position():Number{
return ();
}
override public function toString():String{
return (formatToString("ScrollEvent", "type", "bubbles", "cancelable", "direction", "delta", "position"));
}
public function get delta():Number{
return ();
}
public function get direction():String{
return ();
}
}
}//package fl.events
Section 103
//FocusManager (fl.managers.FocusManager)
package fl.managers {
import fl.core.*;
import fl.controls.*;
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
public class FocusManager implements IFocusManager {
private var :Dictionary;
private var :Boolean;// = true
private var :Button;
private var :Array;
private var :DisplayObjectContainer;
private var :Boolean;// = true
private var :Boolean;// = false
private var :Button;
private var
:Boolean;// = true
private var :InteractiveObject;
private var :String;
public function FocusManager(_arg1:DisplayObjectContainer){
= false;
= true;
= true;
= true;
super();
= new Dictionary(true);
if (_arg1 != null){
= _arg1;
(DisplayObject(_arg1));
_arg1.addEventListener(Event.ADDED, );
_arg1.addEventListener(Event.REMOVED, );
();
};
}
public function get showFocusIndicator():Boolean{
return ();
}
private function (_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 = .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 (([_arg1], _arg4)){
_local7 = DisplayObject(
([_arg1]));
if ((_local7 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local7);
_local9 = 0;
while (_local9 < .length) {
_local10 = [_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{
= _arg1;
}
private function (_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) && ((o)))){
[o] = true;
= true;
};
o.addEventListener(Event.TAB_ENABLED_CHANGE, );
o.addEventListener(Event.TAB_INDEX_CHANGE, );
};
} else {
if ((o is InteractiveObject)){
io = (o as InteractiveObject);
if (((((io) && (io.tabEnabled))) && ((
(io) == io)))){
[io] = true;
= true;
};
io.addEventListener(Event.TAB_ENABLED_CHANGE, );
io.addEventListener(Event.TAB_INDEX_CHANGE, );
};
};
};
if ((o is DisplayObjectContainer)){
doc = DisplayObjectContainer(o);
o.addEventListener(Event.TAB_CHILDREN_CHANGE, );
if ((((((doc is Stage)) || ((doc.parent is Stage)))) || (doc.tabChildren))){
i = 0;
while (i < doc.numChildren) {
try {
child = doc.getChildAt(i);
if (child != null){
(doc.getChildAt(i));
};
} catch(error:SecurityError) {
};
i = (i + 1);
};
};
};
}
private function getChildIndex(_arg1:DisplayObjectContainer, _arg2:DisplayObject):int{
return (_arg1.getChildIndex(_arg2));
}
private function (_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 (_arg1:DisplayObject, _arg2:String):Boolean{
var _local3:IFocusManagerGroup;
if (!
(_arg1)){
return (false);
};
if ((_arg1 is IFocusManagerGroup)){
_local3 = IFocusManagerGroup(_arg1);
if (_arg2 == _local3.groupName){
return (false);
};
};
return (true);
}
public function
(_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 ():void{
var _local1:Object;
var _local2:InteractiveObject;
= [];
for (_local1 in ) {
_local2 = InteractiveObject(_local1);
if (((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))){
.push(_local2);
};
};
.sort();
}
private function (_arg1:DisplayObject):void{
var _local2:Object;
var _local3:DisplayObject;
if ((_arg1 is DisplayObjectContainer)){
_arg1.removeEventListener(Event.TAB_CHILDREN_CHANGE, );
_arg1.removeEventListener(Event.TAB_INDEX_CHANGE, );
for (_local2 in ) {
_local3 = DisplayObject(_local2);
if (DisplayObjectContainer(_arg1).contains(_local3)){
if (_local3 == ){
= null;
};
_local3.removeEventListener(Event.TAB_ENABLED_CHANGE, );
delete [_local2];
= true;
};
};
};
}
private function (_arg1:Event):void{
var _local2:DisplayObject;
_local2 = DisplayObject(_arg1.target);
if (_local2.stage){
(DisplayObject(_arg1.target));
};
}
private function
(_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 (_arg1:Event):void{
var _local2:DisplayObjectContainer;
if (_arg1.target != _arg1.currentTarget){
return;
};
= true;
_local2 = DisplayObjectContainer(_arg1.target);
if (_local2.tabChildren){
(_local2, true);
} else {
(_local2);
};
}
public function ():void{
.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
}
public function getFocus():InteractiveObject{
var _local1:InteractiveObject;
_local1 = form.stage.focus;
return (
(_local1));
}
private function
(_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 != ){
if ( ){
.emphasized = false;
};
if (){
.emphasized = false;
};
= _local2;
= _local2;
if (_local2){
_local2.emphasized = true;
};
};
}
private function (_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 (_arg1:FocusEvent):void{
var _local2:InteractiveObject;
if (!()){
return;
};
_local2 = (_arg1.shiftKey);
if (_local2){
setFocus(_local2);
};
}
private function ():Boolean{
var _local1:Object;
for (_local1 in ) {
return (true);
};
return (false);
}
private function (_arg1:Event):void{
= true;
}
private function ():void{
var _local1:Object;
var _local2:InteractiveObject;
= [];
for (_local1 in ) {
_local2 = InteractiveObject(_local1);
if (((((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))) && ((_local2.tabIndex > 0)))){
();
return;
};
.push(_local2);
};
.sort();
}
private function (_arg1:FocusEvent):void{
showFocusIndicator = true;
if ((((((_arg1.keyCode == Keyboard.TAB)) || ((_arg1.keyCode == 0)))) && (!(_arg1.isDefaultPrevented())))){
(_arg1);
_arg1.preventDefault();
};
}
private function (_arg1:DisplayObject):int{
var _local2:int;
var _local3:int;
_local2 = .length;
_local3 = 0;
_local3 = 0;
while (_local3 < _local2) {
if ([_local3] == _arg1){
return (_local3);
};
_local3++;
};
return (-1);
}
public function ():void{
}
private function (_arg1:Event):void{
var _local2:int;
var _local3:DisplayObject;
var _local4:InteractiveObject;
_local3 = DisplayObject(_arg1.target);
if ((((_local3 is IFocusManagerComponent)) && (([_local3] == true)))){
if (_local3 == ){
IFocusManagerComponent().drawFocus(false);
= null;
};
_local3.removeEventListener(Event.TAB_ENABLED_CHANGE, );
delete [_local3];
= true;
} else {
if ((((_local3 is InteractiveObject)) && (([_local3] == true)))){
_local4 = (_local3 as InteractiveObject);
if (_local4){
if (_local4 == ){
= null;
};
delete [_local4];
= true;
};
_local3.addEventListener(Event.TAB_ENABLED_CHANGE, );
};
};
(_local3);
}
private function (_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 ( );
}
private function (_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
if (){
if (( is IFocusManagerComponent)){
IFocusManagerComponent().setFocus();
} else {
form.stage.focus = ;
};
};
= "ACTIVATE";
}
public function ():void{
}
public function set defaultButtonEnabled(_arg1:Boolean):void{
= _arg1;
}
public function (_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 (!()){
return (null);
};
if (
){
();
= false;
};
_local2 = form.stage.focus;
_local2 = DisplayObject(
(InteractiveObject(_local2)));
_local3 = "";
if ((_local2 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local2);
_local3 = _local8.groupName;
};
_local4 = (_local2);
_local5 = false;
_local6 = _local4;
if (_local4 == -1){
if (_arg1){
_local4 = .length;
};
_local5 = true;
};
_local7 = (_local4, _arg1, _local5, _local3);
return (
([_local7]));
}
private function
(_arg1:MouseEvent):void{
var _local2:InteractiveObject;
if (_arg1.isDefaultPrevented()){
return;
};
_local2 =
(InteractiveObject(_arg1.target));
if (!_local2){
return;
};
showFocusIndicator = false;
if (((((!((_local2 == ))) || (( == "ACTIVATE")))) && (!((_local2 is TextField))))){
setFocus(_local2);
};
= "MOUSEDOWN";
}
private function (_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){
= "KEY";
if (
){
();
= false;
};
};
if (((((((defaultButtonEnabled) && ((_arg1.keyCode == Keyboard.ENTER)))) && (defaultButton))) && (.enabled))){
();
};
}
private function focusInHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
var _local3:Button;
_local2 = InteractiveObject(_arg1.target);
if (form.contains(_local2)){
=
(InteractiveObject(_local2));
if (( is Button)){
_local3 = Button();
if (){
.emphasized = false;
= _local3;
_local3.emphasized = true;
};
} else {
if ((() && (!(( == ))))){
.emphasized = false;
= ;
.emphasized = true;
};
};
};
}
private function (_arg1:Event):void{
var _local2:InteractiveObject;
var _local3:Boolean;
= true;
_local2 = InteractiveObject(_arg1.target);
_local3 = ([_local2] == true);
if (_local2.tabEnabled){
if (((!(_local3)) && ((_local2)))){
if (!(_local2 is IFocusManagerComponent)){
_local2.focusRect = false;
};
[_local2] = true;
};
} else {
if (_local3){
delete [_local2];
};
};
}
public function set showFocusIndicator(_arg1:Boolean):void{
= _arg1;
}
public function get form():DisplayObjectContainer{
return ();
}
private function (_arg1:InteractiveObject, _arg2:InteractiveObject):int{
return (((_arg1.tabIndex > _arg2.tabIndex)) ? 1 : ((_arg1.tabIndex < _arg2.tabIndex)) ? -1 : (_arg1, _arg2));
}
public function
():void{
if (){
return;
};
form.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, , false, 0, true);
form.stage.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, , false, 0, true);
form.addEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.stage.addEventListener(Event.ACTIVATE, , false, 0, true);
form.stage.addEventListener(Event.DEACTIVATE, , false, 0, true);
form.addEventListener(MouseEvent.MOUSE_DOWN,
);
form.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
= true;
if (){
setFocus();
};
}
public function ():void{
form.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, );
form.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, );
form.removeEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.stage.removeEventListener(Event.ACTIVATE, );
form.stage.removeEventListener(Event.DEACTIVATE, );
form.removeEventListener(MouseEvent.MOUSE_DOWN,
);
form.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
= false;
}
public function get defaultButtonEnabled():Boolean{
return ();
}
}
}//package fl.managers
Section 104
//IFocusManager (fl.managers.IFocusManager)
package fl.managers {
import fl.controls.*;
import flash.display.*;
public interface IFocusManager {
function getFocus():InteractiveObject;
function ():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
():void;
function ():void;
function set defaultButtonEnabled(_arg1:Boolean):void;
function ():void;
function
(_arg1:InteractiveObject):InteractiveObject;
function (_arg1:Boolean=false):InteractiveObject;
}
}//package fl.managers
Section 105
//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 106
//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 107
//StyleManager (fl.managers.StyleManager)
package fl.managers {
import fl.core.*;
import flash.utils.*;
import flash.text.*;
public class StyleManager {
private var globalStyles:Object;
private var :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);
= 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 (_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.[_local3];
for (_local5 in _local4) {
_arg1. (_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. (_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.[classDef] = defaultStyles;
inst.classToStylesDict[classDef] = {};
};
inst.classToInstancesDict[classDef][instance] = true;
setSharedStyles(instance);
}
public static function (_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.[_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 108
//Key (General.Key)
package General {
import flash.display.*;
import flash.events.*;
public class Key {
public static var debug:Boolean = false;
private static var initialized:Boolean = false;
public static var keysDown:Object = new Object();
private static function clearKeys(_arg1:Event):void{
keysDown = new Object();
}
private static function keyPressed(_arg1:KeyboardEvent):void{
keysDown[_arg1.keyCode] = true;
if (debug){
trace(("Key pressed: " + _arg1.keyCode));
};
}
public static function isDown(_arg1:uint):Boolean{
if (!initialized){
throw (new Error("Key class has yet been initialized."));
};
return (Boolean((_arg1 in keysDown)));
}
public static function initialize(_arg1:Stage){
if (!initialized){
_arg1.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
_arg1.addEventListener(KeyboardEvent.KEY_UP, keyReleased);
_arg1.addEventListener(Event.DEACTIVATE, clearKeys);
initialized = true;
};
}
public static function removeKey(_arg1:int){
delete keysDown[_arg1];
}
private static function keyReleased(_arg1:KeyboardEvent):void{
if ((_arg1.keyCode in keysDown)){
delete keysDown[_arg1.keyCode];
};
}
}
}//package General
Section 109
//Action (org.flintparticles.common.actions.Action)
package org.flintparticles.common.actions {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
public interface Action {
function addedToEmitter(_arg1:Emitter):void;
function removedFromEmitter(_arg1:Emitter):void;
function update(_arg1:Emitter, _arg2:Particle, _arg3:Number):void;
function getDefaultPriority():Number;
}
}//package org.flintparticles.common.actions
Section 110
//ActionBase (org.flintparticles.common.actions.ActionBase)
package org.flintparticles.common.actions {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
public class ActionBase implements Action {
public function removedFromEmitter(_arg1:Emitter):void{
}
public function getDefaultPriority():Number{
return (0);
}
public function update(_arg1:Emitter, _arg2:Particle, _arg3:Number):void{
}
public function addedToEmitter(_arg1:Emitter):void{
}
}
}//package org.flintparticles.common.actions
Section 111
//Activity (org.flintparticles.common.activities.Activity)
package org.flintparticles.common.activities {
import org.flintparticles.common.emitters.*;
public interface Activity {
function initialize(_arg1:Emitter):void;
function addedToEmitter(_arg1:Emitter):void;
function removedFromEmitter(_arg1:Emitter):void;
function update(_arg1:Emitter, _arg2:Number):void;
function getDefaultPriority():Number;
}
}//package org.flintparticles.common.activities
Section 112
//ActivityBase (org.flintparticles.common.activities.ActivityBase)
package org.flintparticles.common.activities {
import org.flintparticles.common.emitters.*;
public class ActivityBase implements Activity {
public function addedToEmitter(_arg1:Emitter):void{
}
public function removedFromEmitter(_arg1:Emitter):void{
}
public function update(_arg1:Emitter, _arg2:Number):void{
}
public function getDefaultPriority():Number{
return (0);
}
public function initialize(_arg1:Emitter):void{
}
}
}//package org.flintparticles.common.activities
Section 113
//FrameUpdatable (org.flintparticles.common.activities.FrameUpdatable)
package org.flintparticles.common.activities {
import org.flintparticles.common.emitters.*;
public interface FrameUpdatable {
function frameUpdate(_arg1:Emitter, _arg2:Number):void;
}
}//package org.flintparticles.common.activities
Section 114
//UpdateOnFrame (org.flintparticles.common.activities.UpdateOnFrame)
package org.flintparticles.common.activities {
import org.flintparticles.common.emitters.*;
public class UpdateOnFrame extends ActivityBase {
private var
:FrameUpdatable;
public function UpdateOnFrame(_arg1:FrameUpdatable){
= _arg1;
}
override public function update(_arg1:Emitter, _arg2:Number):void{
.frameUpdate(_arg1, _arg2);
}
}
}//package org.flintparticles.common.activities
Section 115
//Counter (org.flintparticles.common.counters.Counter)
package org.flintparticles.common.counters {
import org.flintparticles.common.emitters.*;
public interface Counter {
function stop():void;
function updateEmitter(_arg1:Emitter, _arg2:Number):uint;
function startEmitter(_arg1:Emitter):uint;
function resume():void;
}
}//package org.flintparticles.common.counters
Section 116
//ZeroCounter (org.flintparticles.common.counters.ZeroCounter)
package org.flintparticles.common.counters {
import org.flintparticles.common.emitters.*;
public class ZeroCounter implements Counter {
public function stop():void{
}
public function updateEmitter(_arg1:Emitter, _arg2:Number):uint{
return (0);
}
public function startEmitter(_arg1:Emitter):uint{
return (0);
}
public function resume():void{
}
}
}//package org.flintparticles.common.counters
Section 117
//Emitter (org.flintparticles.common.emitters.Emitter)
package org.flintparticles.common.emitters {
import flash.events.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.initializers.*;
import org.flintparticles.common.actions.*;
import org.flintparticles.common.activities.*;
import org.flintparticles.common.counters.*;
import org.flintparticles.common.events.*;
import org.flintparticles.common.utils.*;
public class Emitter extends EventDispatcher {
protected var :Boolean;// = false
protected var :PriorityArray;
protected var _particles:Array;
protected var :PriorityArray;
protected var :Counter;
protected var :Boolean;// = false
protected var :PriorityArray;
protected var :Boolean;// = true
protected var
:Number;// = 0
protected var _particleFactory:ParticleFactory;
protected var :Number;// = 0.1
public function Emitter(){
= true;
= 0;
= false;
= false;
= 0.1;
super();
_particles = new Array();
= new PriorityArray();
= new PriorityArray();
= new PriorityArray();
= new ZeroCounter();
}
public function stop():void{
if (){
FrameUpdater.instance.removeEventListener(UpdateEvent.UPDATE, );
};
= false;
();
}
public function get counter():Counter{
return ();
}
public function (_arg1:Initializer, _arg2:Number=NaN):void{
if (isNaN(_arg2)){
_arg2 = _arg1.getDefaultPriority();
};
.add(_arg1, _arg2);
_arg1.addedToEmitter(this);
}
public function ():void{
var _local1:int;
var _local2:int;
_local1 = _particles.length;
_local2 = 0;
while (_local2 < _local1) {
dispatchEvent(new ParticleEvent(ParticleEvent.PARTICLE_DEAD, _particles[_local2]));
_particleFactory.disposeParticle(_particles[_local2]);
_local2++;
};
_particles.length = 0;
}
public function set fixedFrameTime(_arg1:Number):void{
= _arg1;
}
public function get maximumFrameTime():Number{
return ();
}
public function get useInternalTick():Boolean{
return ();
}
public function get particleFactory():ParticleFactory{
return (_particleFactory);
}
private function (_arg1:UpdateEvent):void{
if (
){
update(
);
} else {
update(_arg1.time);
};
}
protected function createParticle():Particle{
var _local1:Particle;
var _local2:int;
var _local3:int;
_local1 = _particleFactory.createParticle();
_local2 = .length;
initParticle(_local1);
_local3 = 0;
while (_local3 < _local2) {
[_local3].initialize(this, _local1);
_local3++;
};
_particles.push(_local1);
dispatchEvent(new ParticleEvent(ParticleEvent.PARTICLE_CREATED, _local1));
return (_local1);
}
public function get particles():Array{
return (_particles);
}
protected function sortParticles():void{
}
public function removeActivity(_arg1:Activity):void{
if (.remove(_arg1)){
_arg1.removedFromEmitter(this);
};
}
public function set maximumFrameTime(_arg1:Number):void{
= _arg1;
}
protected function initParticle(_arg1:Particle):void{
}
public function addAction(_arg1:Action, _arg2:Number=NaN):void{
if (isNaN(_arg2)){
_arg2 = _arg1.getDefaultPriority();
};
.add(_arg1, _arg2);
_arg1.addedToEmitter(this);
}
public function (_arg1:Class):Boolean{
var _local2:uint;
var _local3:uint;
_local2 = .length;
_local3 = 0;
while (_local3 < _local2) {
if (([_local3] is _arg1)){
return (true);
};
_local3++;
};
return (false);
}
public function resume():void{
= true;
}
public function (_arg1:Initializer):void{
if (.remove(_arg1)){
_arg1.removedFromEmitter(this);
};
}
public function get running():Boolean{
return ();
}
public function (_arg1:Class):Boolean{
var _local2:uint;
var _local3:uint;
_local2 = .length;
_local3 = 0;
while (_local3 < _local2) {
if (([_local3] is _arg1)){
return (true);
};
_local3++;
};
return (false);
}
public function get fixedFrameTime():Number{
return (
);
}
public function set particleFactory(_arg1:ParticleFactory):void{
_particleFactory = _arg1;
}
public function (_arg1:Activity):Boolean{
return (.contains(_arg1));
}
public function addActivity(_arg1:Activity, _arg2:Number=NaN):void{
if (isNaN(_arg2)){
_arg2 = _arg1.getDefaultPriority();
};
.add(_arg1, _arg2);
_arg1.addedToEmitter(this);
}
public function update(_arg1:Number):void{
var _local2:int;
var _local3:Particle;
var _local4:int;
var _local5:Action;
var _local6:int;
var _local7:int;
if (!){
return;
};
if (_arg1 > ){
_arg1 = ;
};
_local4 = .updateEmitter(this, _arg1);
_local2 = 0;
while (_local2 < _local4) {
createParticle();
_local2++;
};
sortParticles();
_local4 = .length;
_local2 = 0;
while (_local2 < _local4) {
[_local2].update(this, _arg1);
_local2++;
};
if (_particles.length > 0){
_local4 = .length;
_local6 = _particles.length;
_local7 = 0;
while (_local7 < _local4) {
_local5 = [_local7];
_local2 = 0;
while (_local2 < _local6) {
_local3 = _particles[_local2];
_local5.update(this, _local3, _arg1);
_local2++;
};
_local7++;
};
_local2 = _local6;
while (_local2--) {
_local3 = _particles[_local2];
if (_local3.isDead){
dispatchEvent(new ParticleEvent(ParticleEvent.PARTICLE_DEAD, _local3));
_particleFactory.disposeParticle(_local3);
_particles.splice(_local2, 1);
};
};
} else {
dispatchEvent(new EmitterEvent(EmitterEvent.EMITTER_EMPTY));
};
dispatchEvent(new EmitterEvent(EmitterEvent.EMITTER_UPDATED));
}
public function (_arg1:Action):void{
if (.remove(_arg1)){
_arg1.removedFromEmitter(this);
};
}
public function
(_arg1:Class):Boolean{
var _local2:uint;
var _local3:uint;
_local2 = .length;
_local3 = 0;
while (_local3 < _local2) {
if (([_local3] is _arg1)){
return (true);
};
_local3++;
};
return (false);
}
public function (_arg1:Array, _arg2:Boolean=false):void{
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
_local3 = _arg1.length;
if (_arg2){
_local5 = .length;
_local6 = 0;
while (_local6 < _local5) {
_local4 = 0;
while (_local4 < _local3) {
[_local6].initialize(this, _arg1[_local4]);
_local4++;
};
_local6++;
};
};
_local4 = 0;
while (_local4 < _local3) {
_particles.push(_arg1[_local4]);
dispatchEvent(new ParticleEvent(ParticleEvent.PARTICLE_ADDED, _arg1[_local4]));
_local4++;
};
}
public function set useInternalTick(_arg1:Boolean):void{
if ( != _arg1){
= _arg1;
if (){
if (){
FrameUpdater.instance.addEventListener(UpdateEvent.UPDATE, , false, 0, true);
} else {
FrameUpdater.instance.removeEventListener(UpdateEvent.UPDATE, );
};
};
};
}
public function (_arg1:Initializer):Boolean{
return (.contains(_arg1));
}
public function start():void{
var _local1:int;
var _local2:int;
if (){
FrameUpdater.instance.addEventListener(UpdateEvent.UPDATE, , false, 0, true);
};
= true;
= true;
_local1 = .length;
_local2 = 0;
while (_local2 < _local1) {
[_local2].initialize(this);
_local2++;
};
_local1 = .startEmitter(this);
_local2 = 0;
while (_local2 < _local1) {
createParticle();
_local2++;
};
}
public function (_arg1:Action):Boolean{
return (.contains(_arg1));
}
public function ():void{
= false;
}
public function set counter(_arg1:Counter):void{
= _arg1;
}
public function (_arg1:Number, _arg2:Number=10):void{
var _local3:Number;
var _local4:Number;
_local3 = ;
_local4 = (1 / _arg2);
= _local4;
while (_arg1 > 0) {
_arg1 = (_arg1 - _local4);
update(_local4);
};
= _local3;
}
}
}//package org.flintparticles.common.emitters
Section 118
//EmitterEvent (org.flintparticles.common.events.EmitterEvent)
package org.flintparticles.common.events {
import flash.events.*;
public class EmitterEvent extends Event {
public static var EMITTER_UPDATED:String = "emitterUpdated";
public static var EMITTER_EMPTY:String = "emitterEmpty";
public function EmitterEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
}
}//package org.flintparticles.common.events
Section 119
//ParticleEvent (org.flintparticles.common.events.ParticleEvent)
package org.flintparticles.common.events {
import flash.events.*;
import org.flintparticles.common.particles.*;
public class ParticleEvent extends Event {
public var particle:Particle;
public static var PARTICLE_ADDED:String = "particleAdded";
public static var PARTICLE_DEAD:String = "particleDead";
public static var PARTICLE_CREATED:String = "particleCreated";
public function ParticleEvent(_arg1:String, _arg2:Particle=null, _arg3:Boolean=false, _arg4:Boolean=false){
super(_arg1, _arg3, _arg4);
this.particle = _arg2;
}
}
}//package org.flintparticles.common.events
Section 120
//UpdateEvent (org.flintparticles.common.events.UpdateEvent)
package org.flintparticles.common.events {
import flash.events.*;
public class UpdateEvent extends Event {
public var time:Number;
public static var UPDATE:String = "update";
public function UpdateEvent(_arg1:String, _arg2:Number=NaN, _arg3:Boolean=false, _arg4:Boolean=false){
super(_arg1, _arg3, _arg4);
this.time = _arg2;
}
}
}//package org.flintparticles.common.events
Section 121
//Initializer (org.flintparticles.common.initializers.Initializer)
package org.flintparticles.common.initializers {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
public interface Initializer {
function initialize(_arg1:Emitter, _arg2:Particle):void;
function addedToEmitter(_arg1:Emitter):void;
function removedFromEmitter(_arg1:Emitter):void;
function getDefaultPriority():Number;
}
}//package org.flintparticles.common.initializers
Section 122
//Particle (org.flintparticles.common.particles.Particle)
package org.flintparticles.common.particles {
import flash.utils.*;
import flash.geom.*;
public class Particle {
public var :Number;// = 0
public var
:Number;// = 1
public var :Number;// = 1
public var image;// = null
public var color:uint;// = 4294967295
public var :Number;// = 1
private var :ColorTransform;// = null
private var :uint;
public var isDead:Boolean;// = false
public var mass:Number;// = 1
private var :Dictionary;// = null
public var :Number;// = 0
public function Particle(){
color = 4294967295;
= null;
= 1;
mass = 1;
= 1;
image = null;
= 0;
= 0;
= 1;
isDead = false;
= null;
super();
}
public function get dictionary():Dictionary{
if ( == null){
= new Dictionary();
};
return ( );
}
public function get colorTransform():ColorTransform{
if (((!( )) || (!(( == color))))){
= new ColorTransform((((color >>> 16) & 0xFF) / 0xFF), (((color >>> 8) & 0xFF) / 0xFF), ((color & 0xFF) / 0xFF), (((color >>> 24) & 0xFF) / 0xFF), 0, 0, 0, 0);
= color;
};
return ( );
}
public function get alpha():Number{
return ((((color & 4278190080) >>> 24) / 0xFF));
}
public function initialize():void{
color = 4294967295;
= 1;
mass = 1;
= 1;
= 0;
= 0;
= 1;
isDead = false;
image = null;
= null;
= null;
}
}
}//package org.flintparticles.common.particles
Section 123
//ParticleFactory (org.flintparticles.common.particles.ParticleFactory)
package org.flintparticles.common.particles {
public interface ParticleFactory {
function createParticle():Particle;
function disposeParticle(_arg1:Particle):void;
}
}//package org.flintparticles.common.particles
Section 124
//Renderer (org.flintparticles.common.renderers.Renderer)
package org.flintparticles.common.renderers {
import org.flintparticles.common.emitters.*;
public interface Renderer {
function (_arg1:Emitter):void;
function (_arg1:Emitter):void;
}
}//package org.flintparticles.common.renderers
Section 125
//SpriteRendererBase (org.flintparticles.common.renderers.SpriteRendererBase)
package org.flintparticles.common.renderers {
import flash.display.*;
import flash.events.*;
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.events.*;
public class SpriteRendererBase extends Sprite implements Renderer {
protected var :Array;
public function SpriteRendererBase(){
= new Array();
mouseEnabled = false;
mouseChildren = false;
addEventListener(Event.ADDED_TO_STAGE, addedToStage, false, 0, true);
}
private function particleAdded(_arg1:ParticleEvent):void{
addParticle(_arg1.particle);
if (stage){
stage.invalidate();
};
}
private function addedToStage(_arg1:Event):void{
if (stage){
stage.invalidate();
};
}
protected function removeParticle(_arg1:Particle):void{
}
protected function addParticle(_arg1:Particle):void{
}
public function (_arg1:Emitter):void{
var _local2:int;
var _local3:Particle;
_local2 = 0;
while (_local2 < .length) {
if ([_local2] == _arg1){
.splice(_local2, 1);
_arg1.removeEventListener(EmitterEvent.EMITTER_UPDATED, emitterUpdated);
_arg1.removeEventListener(ParticleEvent.PARTICLE_CREATED, particleAdded);
_arg1.removeEventListener(ParticleEvent.PARTICLE_ADDED, particleAdded);
_arg1.removeEventListener(ParticleEvent.PARTICLE_DEAD,
);
for each (_local3 in _arg1.particles) {
removeParticle(_local3);
};
if (.length == 0){
removeEventListener(Event.RENDER, );
renderParticles([]);
} else {
stage.invalidate();
};
return;
};
_local2++;
};
}
private function emitterUpdated(_arg1:EmitterEvent):void{
if (stage){
stage.invalidate();
};
}
public function (_arg1:Emitter):void{
var _local2:Particle;
.push(_arg1);
if (stage){
stage.invalidate();
};
_arg1.addEventListener(EmitterEvent.EMITTER_UPDATED, emitterUpdated, false, 0, true);
_arg1.addEventListener(ParticleEvent.PARTICLE_CREATED, particleAdded, false, 0, true);
_arg1.addEventListener(ParticleEvent.PARTICLE_ADDED, particleAdded, false, 0, true);
_arg1.addEventListener(ParticleEvent.PARTICLE_DEAD,
, false, 0, true);
for each (_local2 in _arg1.particles) {
addParticle(_local2);
};
if (.length == 1){
addEventListener(Event.RENDER, , false, 0, true);
};
}
protected function renderParticles(_arg1:Array):void{
}
public function get emitters():Array{
return ();
}
private function (_arg1:Event):void{
var _local2:Array;
var _local3:int;
_local2 = new Array();
_local3 = 0;
while (_local3 < .length) {
_local2 = _local2.concat([_local3].particles);
_local3++;
};
renderParticles(_local2);
}
private function
(_arg1:ParticleEvent):void{
removeParticle(_arg1.particle);
if (stage){
stage.invalidate();
};
}
}
}//package org.flintparticles.common.renderers
Section 126
//FrameUpdater (org.flintparticles.common.utils.FrameUpdater)
package org.flintparticles.common.utils {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import org.flintparticles.common.events.*;
public class FrameUpdater extends EventDispatcher {
private var :Shape;
private var :Number;
private static var _instance:FrameUpdater;
public function FrameUpdater(){
= new Shape();
.addEventListener(Event.ENTER_FRAME, frameUpdate, false, 0, true);
= getTimer();
}
private function frameUpdate(_arg1:Event):void{
var _local2:int;
var _local3:Number;
_local2 = ;
= getTimer();
_local3 = (( - _local2) * 0.001);
dispatchEvent(new UpdateEvent(UpdateEvent.UPDATE, _local3));
}
public static function get instance():FrameUpdater{
if (_instance == null){
_instance = new (FrameUpdater);
};
return (_instance);
}
}
}//package org.flintparticles.common.utils
Section 127
//Maths (org.flintparticles.common.utils.Maths)
package org.flintparticles.common.utils {
public class Maths {
private static const DEGTORAD:Number = 0.0174532925199433;
private static const RADTODEG:Number = 57.2957795130823;
public static function asRadians(_arg1:Number):Number{
return ((_arg1 * DEGTORAD));
}
public static function asDegrees(_arg1:Number):Number{
return ((_arg1 * RADTODEG));
}
}
}//package org.flintparticles.common.utils
Section 128
//PriorityArray (org.flintparticles.common.utils.PriorityArray)
package org.flintparticles.common.utils {
import flash.utils.*;
public class PriorityArray extends Proxy {
private var :Array;
public function PriorityArray(){
= new Array();
}
public function remove(_arg1):Boolean{
var _local2:uint;
_local2 = .length;
while (_local2--) {
if ([_local2].value == _arg1){
.splice(_local2, 1);
return (true);
};
};
return (false);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextName(_arg1:int):String{
return ((_arg1 - 1).toString());
}
public function (_arg1:uint){
var _local2:*;
_local2 = [_arg1].value;
.splice(_arg1, 1);
return (_local2);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){
var _local2:int;
_local2 = int(_arg1);
if ((((((_local2 == _arg1)) && ((_local2 < .length)))) && ([_local2]))){
return ([_local2].value);
};
return (undefined);
}
public function clear():void{
.length = 0;
}
public function add(_arg1, _arg2:Number):uint{
var _local3:uint;
var _local4:uint;
_local3 = .length;
_local4 = 0;
while (_local4 < _local3) {
if ([_local4].priority < _arg2){
break;
};
_local4++;
};
.splice(_local4, 0, new Pair(_arg2, _arg1));
return (.length);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextNameIndex(_arg1:int):int{
if (_arg1 < .length){
return ((_arg1 + 1));
};
return (0);
}
public function get length():uint{
return (.length);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{
var _local3:uint;
_local3 = uint(_arg1);
if ((((_local3 == _arg1)) && ((_local3 < .length)))){
[_local3].value = _arg2;
};
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextValue(_arg1:int){
return ([(_arg1 - 1)]);
}
public function contains(_arg1):Boolean{
var _local2:uint;
_local2 = .length;
while (_local2--) {
if ([_local2].value == _arg1){
return (true);
};
};
return (false);
}
}
}//package org.flintparticles.common.utils
class Pair {
private var value;
private var priority:Number;
private function Pair(_arg1:Number, _arg2){
this.priority = _arg1;
this.value = _arg2;
}
}
Section 129
//Explosion (org.flintparticles.twoD.actions.Explosion)
package org.flintparticles.twoD.actions {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.actions.*;
import org.flintparticles.common.activities.*;
import org.flintparticles.twoD.particles.*;
public class Explosion extends ActionBase implements FrameUpdatable {
private var :Number;// = 500
private var :Number;
private var :Number;
private var :UpdateOnFrame;
private var :Number;// = 0
private var :Number;// = 0
private var :Number;
private var :Number;
private var :Number;// = 0
private var :Number;
private var
:Number;
private static const POWER_FACTOR:Number = 100000;
public function Explosion(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=300, _arg5:Number=10, _arg6:Number=1){
= 0;
= 0;
= 0;
= 500;
super();
= (_arg1 * POWER_FACTOR);
= _arg2;
= _arg3;
= _arg4;
= (_arg5 * 0.5);
= (1 / );
= (_arg6 * _arg6);
}
public function get depth():Number{
return (( * 2));
}
public function get power():Number{
return (( / POWER_FACTOR));
}
override public function update(_arg1:Emitter, _arg2:Particle, _arg3:Number):void{
var _local4:Particle2D;
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;
_local4 = Particle2D(_arg2);
_local5 = (_local4.x - );
_local6 = (_local4.y -
);
_local7 = ((_local5 * _local5) + (_local6 * _local6));
if (_local7 == 0){
_local7 = 0.02;
_local5 = 0.1;
_local6 = 0.1;
};
_local8 = Math.sqrt(_local7);
if (_local8 < ( - )){
return;
};
if (_local8 > ( + )){
return;
};
_local9 = ((_local8 < )) ? (( - ) + _local8) : (( - _local8) + );
_local10 = ((_local8 < )) ? (( - ) + _local8) : (( - _local8) + );
_local9 = (_local9 * );
_local10 = (_local10 * );
if (_local9 < 0){
_arg3 = ((_arg3 * ( + _local9)) / );
_local9 = 0;
};
if (_local10 < 0){
_arg3 = ((_arg3 * ( + _local10)) / );
_local10 = 0;
};
if ((((_local8 < )) || ((_local8 > )))){
_local11 = (((_arg3 * ) * (_local9 + _local10)) / ((( * 2) * _local8) * _local4.mass));
} else {
_local12 = ((1 - _local10) / );
_local13 = (((_local12 * _arg3) * ) * (_local10 + 1));
_local14 = ((((1 - _local12) * _arg3) * ) * (_local9 + 1));
_local11 = ((_local13 + _local14) / ((( * 2) * _local8) * _local4.mass));
};
_local4.velX = (_local4.velX + (_local5 * _local11));
_local4.velY = (_local4.velY + (_local6 * _local11));
}
public function set power(_arg1:Number):void{
= (_arg1 * POWER_FACTOR);
}
public function set depth(_arg1:Number):void{
= (_arg1 * 0.5);
= (1 / );
}
public function get y():Number{
return (
);
}
public function set y(_arg1:Number):void{
= _arg1;
}
override public function addedToEmitter(_arg1:Emitter):void{
= new UpdateOnFrame(this);
_arg1.addActivity();
}
public function frameUpdate(_arg1:Emitter, _arg2:Number):void{
= ;
= ( * _arg2);
= ( + );
}
public function set epsilon(_arg1:Number):void{
= (_arg1 * _arg1);
}
override public function removedFromEmitter(_arg1:Emitter):void{
if (){
_arg1.removeActivity();
};
}
public function get x():Number{
return ( );
}
public function get epsilon():Number{
return (Math.sqrt());
}
public function set x(_arg1:Number):void{
= _arg1;
}
public function set expansionRate(_arg1:Number):void{
= _arg1;
}
public function get expansionRate():Number{
return ();
}
}
}//package org.flintparticles.twoD.actions
Section 130
//Emitter2D (org.flintparticles.twoD.emitters.Emitter2D)
package org.flintparticles.twoD.emitters {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.utils.*;
import org.flintparticles.twoD.particles.*;
public class Emitter2D extends Emitter {
protected var
:Number;// = 0
protected var :Number;// = 0
public var :Boolean;// = false
public var :Array;
protected var :Number;// = 0
protected static var _creator:ParticleCreator2D = new ParticleCreator2D();
public function Emitter2D(){
= 0;
= 0;
= 0;
= false;
super();
_particleFactory = _creator;
}
public function set rotation(_arg1:Number):void{
= Maths.asRadians(_arg1);
}
public function get y():Number{
return (
);
}
public function set y(_arg1:Number):void{
= _arg1;
}
override protected function sortParticles():void{
var _local1:int;
var _local2:int;
if (){
= _particles.sortOn("x", (Array.NUMERIC | Array.RETURNINDEXEDARRAY));
_local1 = _particles.length;
_local2 = 0;
while (_local2 < _local1) {
_particles[[_local2]].sortID = _local2;
_local2++;
};
};
}
override protected function initParticle(_arg1:Particle):void{
var _local2:Particle2D;
_local2 = Particle2D(_arg1);
_local2.x = ;
_local2.y =
;
_local2.rotation = ;
}
public function set rotRadians(_arg1:Number):void{
= _arg1;
}
public function get rotRadians():Number{
return ();
}
public function set x(_arg1:Number):void{
= _arg1;
}
public function get rotation():Number{
return (Maths.asDegrees());
}
public function get x():Number{
return ( );
}
public static function get defaultParticleFactory():ParticleFactory{
return (_creator);
}
}
}//package org.flintparticles.twoD.emitters
Section 131
//Particle2D (org.flintparticles.twoD.particles.Particle2D)
package org.flintparticles.twoD.particles {
import org.flintparticles.common.particles.*;
import flash.geom.*;
public class Particle2D extends Particle {
public var sortID:uint;// = 0
public var rotation:Number;// = 0
private var :Number;
public var velX:Number;// = 0
public var :Number;// = 0
private var :Number;
public var velY:Number;// = 0
public var x:Number;// = 0
public var y:Number;// = 0
private var :Number;
public function Particle2D(){
x = 0;
y = 0;
velX = 0;
velY = 0;
rotation = 0;
= 0;
sortID = 0;
super();
}
public function get matrixTransform():Matrix{
var _local1:Number;
var _local2:Number;
_local1 = (
* Math.cos(rotation));
_local2 = (
* Math.sin(rotation));
return (new Matrix(_local1, _local2, -(_local2), _local1, x, y));
}
override public function initialize():void{
super.initialize();
x = 0;
y = 0;
velX = 0;
velY = 0;
rotation = 0;
= 0;
sortID = 0;
}
public function get inertia():Number{
if (((!((mass == ))) || (!(( == ))))){
= (((mass * ) * ) * 0.5);
= mass;
= ;
};
return ();
}
}
}//package org.flintparticles.twoD.particles
Section 132
//ParticleCreator2D (org.flintparticles.twoD.particles.ParticleCreator2D)
package org.flintparticles.twoD.particles {
import org.flintparticles.common.particles.*;
public class ParticleCreator2D implements ParticleFactory {
private var _particles:Array;
public function ParticleCreator2D(){
_particles = new Array();
}
public function ():void{
_particles = new Array();
}
public function createParticle():Particle{
if (_particles.length){
return (_particles.pop());
};
return (new Particle2D());
}
public function disposeParticle(_arg1:Particle):void{
if ((_arg1 is Particle2D)){
_arg1.initialize();
_particles.push(_arg1);
};
}
}
}//package org.flintparticles.twoD.particles
Section 133
//DisplayObjectRenderer (org.flintparticles.twoD.renderers.DisplayObjectRenderer)
package org.flintparticles.twoD.renderers {
import flash.display.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.renderers.*;
import org.flintparticles.twoD.particles.*;
public class DisplayObjectRenderer extends SpriteRendererBase {
override protected function removeParticle(_arg1:Particle):void{
removeChild(_arg1.image);
}
override protected function addParticle(_arg1:Particle):void{
addChildAt(_arg1.image, 0);
}
override protected function renderParticles(_arg1:Array):void{
var _local2:Particle2D;
var _local3:DisplayObject;
var _local4:int;
var _local5:int;
_local4 = _arg1.length;
_local5 = 0;
while (_local5 < _local4) {
_local2 = _arg1[_local5];
_local3 = _local2.image;
_local3.transform.colorTransform = _local2.colorTransform;
_local3.transform.matrix = _local2.matrixTransform;
_local5++;
};
}
}
}//package org.flintparticles.twoD.renderers
Section 134
//30x30_16 (Totem2_final_02_03_09_fla.30x30_16)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class 30x30_16 extends MovieClip {
public function 30x30_16(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Totem2_final_02_03_09_fla
Section 135
//60x30_17 (Totem2_final_02_03_09_fla.60x30_17)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class 60x30_17 extends MovieClip {
public function 60x30_17(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Totem2_final_02_03_09_fla
Section 136
//90x30_18 (Totem2_final_02_03_09_fla.90x30_18)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class 90x30_18 extends MovieClip {
public function 90x30_18(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Totem2_final_02_03_09_fla
Section 137
//Action_5 (Totem2_final_02_03_09_fla.Action_5)
package Totem2_final_02_03_09_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
import flash.geom.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Action_5 extends MovieClip {
public function Action_5(){
addFrameScript(0, frame1);
}
public function (_arg1:Event):void{
MovieClip(parent).gotoAndPlay("loaded");
}
public function (_arg1:ProgressEvent):void{
var _local2:int;
_local2 = Math.round(((_arg1.target.bytesLoaded / _arg1.target.bytesTotal) * 100));
MovieClip(parent).gotoAndStop(_local2);
}
function frame1(){
MovieClip(root).stop();
if (root.loaderInfo.bytesLoaded == root.loaderInfo.bytesTotal){
MovieClip(parent).gotoAndPlay("loaded");
};
root.loaderInfo.addEventListener(ProgressEvent.PROGRESS, );
root.loaderInfo.addEventListener(Event.COMPLETE, );
}
}
}//package Totem2_final_02_03_09_fla
Section 138
//acv_280 (Totem2_final_02_03_09_fla.acv_280)
package Totem2_final_02_03_09_fla {
import flash.display.*;
import flash.text.*;
public dynamic class acv_280 extends MovieClip {
public var ptico:MovieClip;
public var gpoints:TextField;
}
}//package Totem2_final_02_03_09_fla
Section 139
//currentDotIndicator_219 (Totem2_final_02_03_09_fla.currentDotIndicator_219)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class currentDotIndicator_219 extends MovieClip {
public function currentDotIndicator_219(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Totem2_final_02_03_09_fla
Section 140
//debugControl_14 (Totem2_final_02_03_09_fla.debugControl_14)
package Totem2_final_02_03_09_fla {
import flash.display.*;
import flash.text.*;
public dynamic class debugControl_14 extends MovieClip {
public var debugdo:TextField;
public var debugdump:TextField;
}
}//package Totem2_final_02_03_09_fla
Section 141
//editortbool_106 (Totem2_final_02_03_09_fla.editortbool_106)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class editortbool_106 extends MovieClip {
public function editortbool_106(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Totem2_final_02_03_09_fla
Section 142
//G_menusettingslft_202 (Totem2_final_02_03_09_fla.G_menusettingslft_202)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class G_menusettingslft_202 extends MovieClip {
public var bt_close:SimpleButton;
}
}//package Totem2_final_02_03_09_fla
Section 143
//gabs_logo_293 (Totem2_final_02_03_09_fla.gabs_logo_293)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class gabs_logo_293 extends MovieClip {
public function gabs_logo_293(){
addFrameScript(75, );
}
function (){
stop();
}
}
}//package Totem2_final_02_03_09_fla
Section 144
//gameBG_20 (Totem2_final_02_03_09_fla.gameBG_20)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class gameBG_20 extends MovieClip {
public function gameBG_20(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Totem2_final_02_03_09_fla
Section 145
//gameBGend_254 (Totem2_final_02_03_09_fla.gameBGend_254)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class gameBGend_254 extends MovieClip {
public function gameBGend_254(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Totem2_final_02_03_09_fla
Section 146
//graphicscontroller_205 (Totem2_final_02_03_09_fla.graphicscontroller_205)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class graphicscontroller_205 extends MovieClip {
public function graphicscontroller_205(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Totem2_final_02_03_09_fla
Section 147
//hspick_236 (Totem2_final_02_03_09_fla.hspick_236)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class hspick_236 extends MovieClip {
public function hspick_236(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Totem2_final_02_03_09_fla
Section 148
//hud_bremaining_297 (Totem2_final_02_03_09_fla.hud_bremaining_297)
package Totem2_final_02_03_09_fla {
import flash.display.*;
import flash.text.*;
public dynamic class hud_bremaining_297 extends MovieClip {
public var walkthrough:SimpleButton;
public var levelname:TextField;
public var leveltime:TextField;
public var leveltext:MovieClip;
public var lbdisplay:TextField;
public var levelnumber:TextField;
}
}//package Totem2_final_02_03_09_fla
Section 149
//idol1_ending_luis_256 (Totem2_final_02_03_09_fla.idol1_ending_luis_256)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class idol1_ending_luis_256 extends MovieClip {
public function idol1_ending_luis_256(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Totem2_final_02_03_09_fla
Section 150
//idol10_ending_luis_265 (Totem2_final_02_03_09_fla.idol10_ending_luis_265)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class idol10_ending_luis_265 extends MovieClip {
public function idol10_ending_luis_265(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Totem2_final_02_03_09_fla
Section 151
//idol11_ending_luis_187 (Totem2_final_02_03_09_fla.idol11_ending_luis_187)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class idol11_ending_luis_187 extends MovieClip {
public function idol11_ending_luis_187(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Totem2_final_02_03_09_fla
Section 152
//idol2_ending_luis_258 (Totem2_final_02_03_09_fla.idol2_ending_luis_258)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class idol2_ending_luis_258 extends MovieClip {
public function idol2_ending_luis_258(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Totem2_final_02_03_09_fla
Section 153
//idol3_ending_luis_259 (Totem2_final_02_03_09_fla.idol3_ending_luis_259)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class idol3_ending_luis_259 extends MovieClip {
public function idol3_ending_luis_259(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Totem2_final_02_03_09_fla
Section 154
//idol4_ending_luis_260 (Totem2_final_02_03_09_fla.idol4_ending_luis_260)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class idol4_ending_luis_260 extends MovieClip {
public function idol4_ending_luis_260(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Totem2_final_02_03_09_fla
Section 155
//idol5_ending_luis_261 (Totem2_final_02_03_09_fla.idol5_ending_luis_261)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class idol5_ending_luis_261 extends MovieClip {
public function idol5_ending_luis_261(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Totem2_final_02_03_09_fla
Section 156
//idol7_ending_luis_273 (Totem2_final_02_03_09_fla.idol7_ending_luis_273)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class idol7_ending_luis_273 extends MovieClip {
public function idol7_ending_luis_273(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Totem2_final_02_03_09_fla
Section 157
//idol8_ending_luis_263 (Totem2_final_02_03_09_fla.idol8_ending_luis_263)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class idol8_ending_luis_263 extends MovieClip {
public function idol8_ending_luis_263(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Totem2_final_02_03_09_fla
Section 158
//idol9_ending_luis_264 (Totem2_final_02_03_09_fla.idol9_ending_luis_264)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class idol9_ending_luis_264 extends MovieClip {
public function idol9_ending_luis_264(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Totem2_final_02_03_09_fla
Section 159
//l_ground_22 (Totem2_final_02_03_09_fla.l_ground_22)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class l_ground_22 extends MovieClip {
public function l_ground_22(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Totem2_final_02_03_09_fla
Section 160
//loadED_6 (Totem2_final_02_03_09_fla.loadED_6)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class loadED_6 extends MovieClip {
public function loadED_6(){
addFrameScript(39, );
}
function (){
stop();
}
}
}//package Totem2_final_02_03_09_fla
Section 161
//Loading_1 (Totem2_final_02_03_09_fla.Loading_1)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class Loading_1 extends MovieClip {
public var NEWGROUNDS:MovieClip;
public var LOGO:MovieClip;
}
}//package Totem2_final_02_03_09_fla
Section 162
//LoadSaveIndicator_135 (Totem2_final_02_03_09_fla.LoadSaveIndicator_135)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class LoadSaveIndicator_135 extends MovieClip {
public function LoadSaveIndicator_135(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Totem2_final_02_03_09_fla
Section 163
//LoadSaveIndicator2_132 (Totem2_final_02_03_09_fla.LoadSaveIndicator2_132)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class LoadSaveIndicator2_132 extends MovieClip {
public function LoadSaveIndicator2_132(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Totem2_final_02_03_09_fla
Section 164
//lsls_beated_224 (Totem2_final_02_03_09_fla.lsls_beated_224)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class lsls_beated_224 extends MovieClip {
public function lsls_beated_224(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Totem2_final_02_03_09_fla
Section 165
//lsls_levelname_225 (Totem2_final_02_03_09_fla.lsls_levelname_225)
package Totem2_final_02_03_09_fla {
import flash.display.*;
import flash.text.*;
public dynamic class lsls_levelname_225 extends MovieClip {
public var txtvar:TextField;
}
}//package Totem2_final_02_03_09_fla
Section 166
//lsls_otherlevels_231 (Totem2_final_02_03_09_fla.lsls_otherlevels_231)
package Totem2_final_02_03_09_fla {
import flash.display.*;
import flash.text.*;
public dynamic class lsls_otherlevels_231 extends MovieClip {
public var txtvar:TextField;
}
}//package Totem2_final_02_03_09_fla
Section 167
//lsls_questlevel_223 (Totem2_final_02_03_09_fla.lsls_questlevel_223)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class lsls_questlevel_223 extends MovieClip {
public var bt_go:SimpleButton;
public var lvlseconds:MovieClip;
public var lvlsecondshighscores:MovieClip;
public var lvlname:MovieClip;
public var beated:MovieClip;
}
}//package Totem2_final_02_03_09_fla
Section 168
//lsls_seconds_226 (Totem2_final_02_03_09_fla.lsls_seconds_226)
package Totem2_final_02_03_09_fla {
import flash.display.*;
import flash.text.*;
public dynamic class lsls_seconds_226 extends MovieClip {
public var txtvar:TextField;
}
}//package Totem2_final_02_03_09_fla
Section 169
//lvlsl_container_222 (Totem2_final_02_03_09_fla.lvlsl_container_222)
package Totem2_final_02_03_09_fla {
import fl.controls.*;
import flash.display.*;
public dynamic class lvlsl_container_222 extends MovieClip {
public var bt_play:SimpleButton;
public var lvlseconds:MovieClip;
public var ls_levels:List;
public var lvlsecondshighscores:MovieClip;
public var bt_previous:SimpleButton;
public var l1:MovieClip;
public var l4:MovieClip;
public var l8:MovieClip;
public var l5:MovieClip;
public var l3:MovieClip;
public var l7:MovieClip;
public var l0:MovieClip;
public var l6:MovieClip;
public var l2:MovieClip;
public var l9:MovieClip;
public var lvlname:MovieClip;
public var bt_next:SimpleButton;
public function lvlsl_container_222(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Totem2_final_02_03_09_fla
Section 170
//MOTHERLOAD_294 (Totem2_final_02_03_09_fla.MOTHERLOAD_294)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class MOTHERLOAD_294 extends MovieClip {
public var CHEATSOR:MovieClip;
public var hud_bremaining:MovieClip;
public var DEBUG:MovieClip;
public var TOP:MovieClip;
public var BG:MovieClip;
public var EDIDOL:MovieClip;
public var CURSOR:MovieClip;
public var Luisfloor:G_floor;
public var EDT:MovieClip;
public var GRAPHICS:MovieClip;
public var BG3:MovieClip;
public var BIRDZ:MovieClip;
public var HUD:MovieClip;
public var EFFECTS:MovieClip;
}
}//package Totem2_final_02_03_09_fla
Section 171
//movingLoading_181 (Totem2_final_02_03_09_fla.movingLoading_181)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class movingLoading_181 extends MovieClip {
public var randomtext:MovieClip;
public var :int;
public function movingLoading_181(){
addFrameScript(0, frame1);
}
function frame1(){
= Math.ceil((Math.random() * 9));
randomtext.gotoAndStop();
}
}
}//package Totem2_final_02_03_09_fla
Section 172
//musicindicator_206 (Totem2_final_02_03_09_fla.musicindicator_206)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class musicindicator_206 extends MovieClip {
public function musicindicator_206(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Totem2_final_02_03_09_fla
Section 173
//mwdindic_239 (Totem2_final_02_03_09_fla.mwdindic_239)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class mwdindic_239 extends MovieClip {
public function mwdindic_239(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Totem2_final_02_03_09_fla
Section 174
//NewFolderMC_136 (Totem2_final_02_03_09_fla.NewFolderMC_136)
package Totem2_final_02_03_09_fla {
import flash.display.*;
import flash.text.*;
public dynamic class NewFolderMC_136 extends MovieClip {
public var bt_cancel:SimpleButton;
public var nameField:TextField;
public var bt_create:SimpleButton;
public var pathField:TextField;
}
}//package Totem2_final_02_03_09_fla
Section 175
//NG_AD_OBJECT_WITH_PRELOADER_2 (Totem2_final_02_03_09_fla.NG_AD_OBJECT_WITH_PRELOADER_2)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class NG_AD_OBJECT_WITH_PRELOADER_2 extends MovieClip {
public var NGLOADER:MovieClip;
public var ng_ad:MovieClip;
public var NG_Button:SimpleButton;
public function NG_AD_OBJECT_WITH_PRELOADER_2(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Totem2_final_02_03_09_fla
Section 176
//NG_TANK_10 (Totem2_final_02_03_09_fla.NG_TANK_10)
package Totem2_final_02_03_09_fla {
import flash.display.*;
import flash.events.*;
public dynamic class NG_TANK_10 extends MovieClip {
public var NG_Logo:SimpleButton;
public function NG_TANK_10(){
addFrameScript(0, frame1);
}
public function loadNGSite(_arg1:Event){
NewgroundsAPI.loadNewgrounds();
}
function frame1(){
NG_Logo.addEventListener(MouseEvent.CLICK, loadNGSite);
}
}
}//package Totem2_final_02_03_09_fla
Section 177
//randomtext_188 (Totem2_final_02_03_09_fla.randomtext_188)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class randomtext_188 extends MovieClip {
public function randomtext_188(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Totem2_final_02_03_09_fla
Section 178
//Symbol19copy_204 (Totem2_final_02_03_09_fla.Symbol19copy_204)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class Symbol19copy_204 extends MovieClip {
public var graphicsindicator:MovieClip;
public var musicindicator:MovieClip;
}
}//package Totem2_final_02_03_09_fla
Section 179
//Symbol28_250 (Totem2_final_02_03_09_fla.Symbol28_250)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class Symbol28_250 extends MovieClip {
public function Symbol28_250(){
addFrameScript(34, );
}
function (){
stop();
}
}
}//package Totem2_final_02_03_09_fla
Section 180
//totem_intro_284 (Totem2_final_02_03_09_fla.totem_intro_284)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class totem_intro_284 extends MovieClip {
public function totem_intro_284(){
addFrameScript(364, );
}
function (){
stop();
MovieClip(root).play();
}
}
}//package Totem2_final_02_03_09_fla
Section 181
//win_addblock_64 (Totem2_final_02_03_09_fla.win_addblock_64)
package Totem2_final_02_03_09_fla {
import fl.controls.*;
import flash.display.*;
import fl.data.*;
public dynamic class win_addblock_64 extends MovieClip {
public var bt_drag:SimpleButton;
public var ;
public var placerocks:MovieClip;
public var
:DataProvider;
public var ;
public var :DataProvider;
public var addb_90:CheckBox;
public var :Object;
public var :Object;
public var ls_size:List;
public var :SimpleCollectionItem;
public var :SimpleCollectionItem;
public var bt_close:SimpleButton;
public var :Array;
public var
:Array;
public var bt_addblock:SimpleButton;
public var i1:int;
public var i0:int;
public var ls_type:List;
public function win_addblock_64(){
();
();
();
}
function (){
try {
ls_type["componentInspectorSetting"] = true;
} catch(e:Error) {
};
ls_type.allowMultipleSelection = false;
= new DataProvider();
= [{label:"Normal", data:1}, {label:"Hard", data:2}, {label:"Sloppy", data:3}, {label:"Combo", data:4}, {label:"TNT", data:5}, {label:"UFO", data:6}];
i1 = 0;
while (i1 <
.length) {
= new SimpleCollectionItem();
=
[i1];
for ( in ) {
[] = [];
};
.addItem( );
i1++;
};
ls_type.dataProvider = ;
ls_type.enabled = true;
ls_type.horizontalLineScrollSize = 2;
ls_type.horizontalPageScrollSize = 0;
ls_type.horizontalScrollPolicy = "auto";
ls_type.verticalLineScrollSize = 3;
ls_type.verticalPageScrollSize = 0;
ls_type.verticalScrollPolicy = "auto";
ls_type.visible = true;
try {
ls_type["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function (){
try {
addb_90["componentInspectorSetting"] = true;
} catch(e:Error) {
};
addb_90.enabled = true;
addb_90.label = " ";
addb_90.labelPlacement = "right";
addb_90.selected = false;
addb_90.visible = true;
try {
addb_90["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function (){
try {
ls_size["componentInspectorSetting"] = true;
} catch(e:Error) {
};
ls_size.allowMultipleSelection = false;
= new DataProvider();
= [{label:"1x1", data:"30x30"}, {label:"2x1", data:"60x30"}, {label:"3x1", data:"90x30"}, {label:"4x1", data:"120x30"}, {label:"5x1", data:"150x30"}, {label:"6x1", data:"180x30"}, {label:"7x1", data:"210x30"}, {label:"2x2", data:"60x60"}, {label:"3x2", data:"90x60"}, {label:"4x2", data:"120x60"}, {label:"5x2", data:"150x60"}, {label:"6x2", data:"180x60"}, {label:"7x2", data:"210x60"}];
i0 = 0;
while (i0 < .length) {
= new SimpleCollectionItem();
= [i0];
for ( in ) {
[] = [];
};
.addItem( );
i0++;
};
ls_size.dataProvider =
;
ls_size.enabled = true;
ls_size.horizontalLineScrollSize = 2;
ls_size.horizontalPageScrollSize = 0;
ls_size.horizontalScrollPolicy = "auto";
ls_size.verticalLineScrollSize = 3;
ls_size.verticalPageScrollSize = 0;
ls_size.verticalScrollPolicy = "auto";
ls_size.visible = true;
try {
ls_size["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package Totem2_final_02_03_09_fla
Section 182
//win_confirm_delete_138 (Totem2_final_02_03_09_fla.win_confirm_delete_138)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class win_confirm_delete_138 extends MovieClip {
public var bt_yes:SimpleButton;
public var bt_no:SimpleButton;
}
}//package Totem2_final_02_03_09_fla
Section 183
//win_confirm_overwrite_127 (Totem2_final_02_03_09_fla.win_confirm_overwrite_127)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class win_confirm_overwrite_127 extends MovieClip {
public var bt_copy:SimpleButton;
public var bt_yes:SimpleButton;
public var bt_no:SimpleButton;
}
}//package Totem2_final_02_03_09_fla
Section 184
//win_confirm_quit_125 (Totem2_final_02_03_09_fla.win_confirm_quit_125)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class win_confirm_quit_125 extends MovieClip {
public var bt_yes:SimpleButton;
public var bt_no:SimpleButton;
}
}//package Totem2_final_02_03_09_fla
Section 185
//win_confirm_unsaved_129 (Totem2_final_02_03_09_fla.win_confirm_unsaved_129)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class win_confirm_unsaved_129 extends MovieClip {
public var bt_yes:SimpleButton;
public var bt_no:SimpleButton;
}
}//package Totem2_final_02_03_09_fla
Section 186
//win_export_140 (Totem2_final_02_03_09_fla.win_export_140)
package Totem2_final_02_03_09_fla {
import fl.controls.*;
import flash.display.*;
import fl.data.*;
public dynamic class win_export_140 extends MovieClip {
public var i4:int;
public var
;
public var
:DataProvider;
public var bt_export:SimpleButton;
public var l_explist:List;
public var :Object;
public var bt_close:SimpleButton;
public var :SimpleCollectionItem;
public var :Array;
public function win_export_140(){
();
}
function
(){
try {
l_explist["componentInspectorSetting"] = true;
} catch(e:Error) {
};
l_explist.allowMultipleSelection = true;
= new DataProvider();
= [];
i4 = 0;
while (i4 < .length) {
= new SimpleCollectionItem();
= [i4];
for (
in ) {
[
] = [
];
};
.addItem();
i4++;
};
l_explist.dataProvider =
;
l_explist.enabled = true;
l_explist.horizontalLineScrollSize = 4;
l_explist.horizontalPageScrollSize = 0;
l_explist.horizontalScrollPolicy = "auto";
l_explist.verticalLineScrollSize = 4;
l_explist.verticalPageScrollSize = 0;
l_explist.verticalScrollPolicy = "auto";
l_explist.visible = true;
try {
l_explist["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package Totem2_final_02_03_09_fla
Section 187
//win_exporttxt_143 (Totem2_final_02_03_09_fla.win_exporttxt_143)
package Totem2_final_02_03_09_fla {
import fl.controls.*;
import flash.display.*;
public dynamic class win_exporttxt_143 extends MovieClip {
public var t_output:TextArea;
public var bt_close:SimpleButton;
}
}//package Totem2_final_02_03_09_fla
Section 188
//win_help_153 (Totem2_final_02_03_09_fla.win_help_153)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class win_help_153 extends MovieClip {
public var bt_close:SimpleButton;
}
}//package Totem2_final_02_03_09_fla
Section 189
//win_import_149 (Totem2_final_02_03_09_fla.win_import_149)
package Totem2_final_02_03_09_fla {
import fl.controls.*;
import flash.display.*;
import flash.text.*;
import fl.data.*;
public dynamic class win_import_149 extends MovieClip {
public var i5:int;
public var ;
public var NewFolder:MovieClip;
public var t_path:TextField;
public var :DataProvider;
public var bt_import:SimpleButton;
public var t_input:TextArea;
public var bt_newfolder:SimpleButton;
public var l_implist:List;
public var :Object;
public var
:SimpleCollectionItem;
public var bt_close:SimpleButton;
public var :Array;
public function win_import_149(){
();
}
function (){
try {
l_implist["componentInspectorSetting"] = true;
} catch(e:Error) {
};
l_implist.allowMultipleSelection = true;
= new DataProvider();
= [];
i5 = 0;
while (i5 < .length) {
= new SimpleCollectionItem();
= [i5];
for ( in ) {
[] = [];
};
.addItem(
);
i5++;
};
l_implist.dataProvider = ;
l_implist.enabled = true;
l_implist.horizontalLineScrollSize = 4;
l_implist.horizontalPageScrollSize = 0;
l_implist.horizontalScrollPolicy = "auto";
l_implist.verticalLineScrollSize = 4;
l_implist.verticalPageScrollSize = 0;
l_implist.verticalScrollPolicy = "auto";
l_implist.visible = true;
try {
l_implist["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package Totem2_final_02_03_09_fla
Section 190
//win_importSTATUS_151 (Totem2_final_02_03_09_fla.win_importSTATUS_151)
package Totem2_final_02_03_09_fla {
import fl.controls.*;
import flash.display.*;
public dynamic class win_importSTATUS_151 extends MovieClip {
public var t_status:TextArea;
public var bt_close:SimpleButton;
}
}//package Totem2_final_02_03_09_fla
Section 191
//win_levelcfg_107 (Totem2_final_02_03_09_fla.win_levelcfg_107)
package Totem2_final_02_03_09_fla {
import fl.controls.*;
import flash.display.*;
import flash.text.*;
import fl.data.*;
public dynamic class win_levelcfg_107 extends MovieClip {
public var bt_drag:SimpleButton;
public var ;
public var ckb_delay:CheckBox;
public var i2:int;
public var
:DataProvider;
public var placeapples:MovieClip;
public var bt_addidol:SimpleButton;
public var
:Object;
public var
:SimpleCollectionItem;
public var bt_close:SimpleButton;
public var numericblocks:NumericStepper;
public var
:Array;
public var t_lvlname:TextField;
public var ls_idol:List;
public function win_levelcfg_107(){
();
();
();
}
function
(){
try {
ls_idol["componentInspectorSetting"] = true;
} catch(e:Error) {
};
ls_idol.allowMultipleSelection = false;
= new DataProvider();
= [{label:"Trio", data:0}, {label:"Hammer", data:1}, {label:"Fatso", data:2}, {label:"Froggy", data:3}, {label:"TOT", data:4}, {label:"Moustache", data:5}, {label:"B", data:6}, {label:"ExMark", data:7}, {label:"E.T.", data:8}, {label:"E.T.2", data:9}, {label:"SPORE", data:10}];
i2 = 0;
while (i2 <
.length) {
= new SimpleCollectionItem();
=
[i2];
for ( in
) {
[] =
[];
};
.addItem(
);
i2++;
};
ls_idol.dataProvider =
;
ls_idol.enabled = true;
ls_idol.horizontalLineScrollSize = 2;
ls_idol.horizontalPageScrollSize = 0;
ls_idol.horizontalScrollPolicy = "auto";
ls_idol.verticalLineScrollSize = 3;
ls_idol.verticalPageScrollSize = 0;
ls_idol.verticalScrollPolicy = "auto";
ls_idol.visible = true;
try {
ls_idol["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function
(){
try {
ckb_delay["componentInspectorSetting"] = true;
} catch(e:Error) {
};
ckb_delay.enabled = true;
ckb_delay.label = " ";
ckb_delay.labelPlacement = "right";
ckb_delay.selected = false;
ckb_delay.visible = true;
try {
ckb_delay["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function
(){
try {
numericblocks["componentInspectorSetting"] = true;
} catch(e:Error) {
};
numericblocks.enabled = false;
numericblocks.maximum = 1;
numericblocks.minimum = 1;
numericblocks.stepSize = 1;
numericblocks.value = 1;
numericblocks.visible = true;
try {
numericblocks["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package Totem2_final_02_03_09_fla
Section 192
//win_loadlevel_130 (Totem2_final_02_03_09_fla.win_loadlevel_130)
package Totem2_final_02_03_09_fla {
import fl.controls.*;
import flash.display.*;
import flash.text.*;
public dynamic class win_loadlevel_130 extends MovieClip {
public var LoadSaveIndicator2:MovieClip;
public var NewFolder:MovieClip;
public var t_path:TextField;
public var bt_delete:SimpleButton;
public var bt_newfolder:SimpleButton;
public var bt_save:SimpleButton;
public var l_current:List;
public var LoadSaveIndicator:MovieClip;
public var bt_load:SimpleButton;
public var bt_close:SimpleButton;
}
}//package Totem2_final_02_03_09_fla
Section 193
//win_loadsave_121 (Totem2_final_02_03_09_fla.win_loadsave_121)
package Totem2_final_02_03_09_fla {
import flash.display.*;
public dynamic class win_loadsave_121 extends MovieClip {
public var bt_drag:SimpleButton;
public var bt_import:SimpleButton;
public var bt_new:SimpleButton;
public var bt_export:SimpleButton;
public var bt_save:SimpleButton;
public var bt_load:SimpleButton;
public var bt_close:SimpleButton;
}
}//package Totem2_final_02_03_09_fla
Section 194
//X_LOAD_3 (Totem2_final_02_03_09_fla.X_LOAD_3)
package Totem2_final_02_03_09_fla {
import flash.display.*;
import flash.events.*;
public dynamic class X_LOAD_3 extends MovieClip {
public var NGButton:SimpleButton;
public function X_LOAD_3(){
addFrameScript(100, , 150, , 164, );
}
function (){
NGButton.addEventListener(MouseEvent.CLICK, );
}
function (){
stop();
}
public function (_arg1:Event){
gotoAndStop("end");
MovieClip(root).play();
}
function (){
play();
}
}
}//package Totem2_final_02_03_09_fla
Section 195
//Cheats (TotemEngine.Cheats)
package TotemEngine {
public class Cheats {
public static function DoCheat(_arg1:String):Boolean{
var _local2:Boolean;
_local2 = true;
switch (_arg1){
case "highroller":
Data.TotemData.data.UnlockedLevels.unlocked[0] = true;
Data.TotemData.flush();
CheckLevelsAchievement();
break;
case "idontwantchallenge":
Data.TotemData.data.UnlockedLevels.unlocked[1] = true;
Data.TotemData.flush();
CheckLevelsAchievement();
break;
case "idowantchallenge":
Data.TotemData.data.UnlockedLevels.unlocked[2] = true;
Data.TotemData.flush();
CheckLevelsAchievement();
break;
case "ronislevel":
Data.TotemData.data.UnlockedLevels.unlocked[3] = true;
Data.TotemData.flush();
CheckLevelsAchievement();
break;
case "beka":
Data.TotemData.data.UnlockedLevels.unlocked[4] = true;
Data.TotemData.flush();
CheckLevelsAchievement();
break;
case "thisisnotalevel":
Data.TotemData.data.UnlockedLevels.unlocked[5] = true;
Data.TotemData.flush();
CheckLevelsAchievement();
break;
case "therealimpossiblelevel":
Data.TotemData.data.UnlockedLevels.unlocked[6] = true;
Data.TotemData.flush();
CheckLevelsAchievement();
break;
case "iamevil":
if (Speaker.MenuCurrentSong == 1){
Speaker.MenuCurrentSong = 2;
} else {
Speaker.MenuCurrentSong = 1;
};
Speaker.StopMenuSong();
Speaker.StartMenuSong();
break;
case "werealldoomed":
if (Gear.topInverted){
Gear.RemoveTopInvert();
} else {
Gear.AddTopInvert();
trace("I AM SOMWHER");
};
break;
case "resetcustomlevelsmemory":
Data.TotemData.data.Editor.levels = new Array();
Data.TotemData.data.Editor.folders = new Array();
Data.TotemData.data.MyLevels = new Array();
Data.TotemData.data.Editor.lid = 0;
Data.TotemData.data.Editor.fid = 0;
Data.TotemData.flush();
break;
case "resetallmemory":
Data.TotemData.data.EditorVersion = 0;
Data.TotemData.data.SettingsVersion = 0;
Data.TotemData.data.LevelSaveVersion = 0;
Data.TotemData.data.SponsorLevelSaveVersion = 0;
Data.TotemData.data.UnlockedLevelSaveVersion = 0;
Data.TotemData.data.ClassicLevelSaveVersion = 0;
Data.TotemData.data.MyLevelSaveVersion = 0;
Data.TotemData.data.GameBeatenVersion = 0;
Data.TotemData.data.GameAchievementsVersion = 0;
Data.TotemData.data.StatusVersion = 0;
Data.Init();
break;
case "aimayhem":
if (Gear.AiDelay == 30){
Gear.AiDelay = 8;
} else {
Gear.AiDelay = 30;
};
break;
case "showstatus":
if (!Gear.InfoOn){
Gear.AddInfo();
} else {
Gear.RemoveInfo();
};
break;
case "pico":
if (!Gear.isPico){
Gear.isPico = true;
} else {
Gear.isPico = false;
};
break;
case "theblackmonolith":
if (Data.TotemData.data.Levels.maxed >= 49){
Gear.CheatsTabOn = false;
Gear.KillMenu();
Gear.StartGameEnding();
};
break;
case "luismalice":
Data.TotemData.data.Levels.maxed = 49;
Data.TotemData.flush();
break;
case "johnsonjack":
Gear.ToggleUpsideDown();
break;
default:
_local2 = false;
break;
};
return (_local2);
}
private static function CheckLevelsAchievement():void{
var _local1:Boolean;
var _local2:int;
_local1 = true;
_local2 = 0;
while (_local2 < Data.TotemData.data.UnlockedLevels.unlocked.length) {
if (Data.TotemData.data.UnlockedLevels.unlocked[_local2] == false){
_local1 = false;
break;
};
_local2++;
};
if (_local1){
Gear.DoAchievement(6);
};
}
}
}//package TotemEngine
Section 196
//Console (TotemEngine.Console)
package TotemEngine {
import flash.display.*;
import Box2D.Dynamics.*;
import Box2D.Collision.Shapes.*;
import Box2D.Common.Math.*;
import Box2D.Dynamics.Joints.*;
import Box2D.Collision.*;
import Box2D.Dynamics.Contacts.*;
public class Console {
public static var root:MovieClip;
public static function Init(_arg1:MovieClip){
root = _arg1;
}
public static function Read(_arg1:String):void{
var _local2:Array;
var _local3:String;
var _local4:String;
var _local5:Array;
var _local6:Array;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:int;
var _local11:b2Body;
_local2 = _arg1.split("=");
_local3 = _local2[0].split(" ").join("");
switch (_local3){
case "gravity":
if (_local2.length == 1){
Debug.Dump(((("GET: gravity=" + (TotemMath.SCALE * Gear.gravity.x)) + ",") + (TotemMath.SCALE * Gear.gravity.y)));
} else {
_local4 = _local2[1].split(" ").join("");
_local5 = _local4.split(",");
_local5[0] = Number(_local5[0]);
_local5[1] = Number(_local5[1]);
if (((!(isNaN(_local5[0]))) && (!(isNaN(_local5[1]))))){
Debug.Dump((((("EDIT: gravity is now (" + _local5[0]) + ",") + _local5[1]) + ")pixels/second"));
Gear.gravity.Set(TotemMath.Scale(_local5[0]), TotemMath.Scale(_local5[1]));
if (Gear.isOn){
Gear.totemWorld.(Gear.gravity);
};
} else {
Debug.Dump("ERROR: value for gravity is not numeric");
Debug.Dump("correct usage: gravity = xvalue,yvalue");
};
};
break;
case "test":
_local6 = new Array("Normal", "Black", "Sloppy", "Combo", "Explosive", "Glass");
_local7 = Math.ceil((Math.random() * 6));
_local8 = Math.ceil((Math.random() * 7));
_local9 = Math.ceil((Math.random() * 2));
_local10 = Math.ceil((Math.random() * 360));
_local11 = Factory.NewBlock(_local6[(_local7 - 1)], _local8, _local9, 345, 50, _local10);
break;
default:
Debug.Dump((("ERROR: param '" + _local3) + "' not found."));
break;
};
}
}
}//package TotemEngine
Section 197
//ContactManager (TotemEngine.ContactManager)
package TotemEngine {
import flash.display.*;
import Box2D.Dynamics.*;
import Box2D.Collision.Shapes.*;
import Box2D.Common.Math.*;
import Box2D.Dynamics.Joints.*;
import Box2D.Collision.*;
public class ContactManager extends b2ContactListener {
private static var okReact:Boolean = true;
private static var body2:b2Body;
private static var numSlides:int = 0;
private static var body1:b2Body;
override public function Persist(_arg1:b2ContactPoint):void{
body1 = _arg1.shape1.GetBody();
body2 = _arg1.shape2.GetBody();
if (okReact){
if ((((((_arg1.friction > 0.3)) && ((Math.abs(_arg1.velocity.x) > 1.5)))) && ((numSlides < 5)))){
if (body2.m_userData.slidingHard == false){
body2.m_userData.slidingHard = true;
numSlides++;
};
} else {
if (body2.m_userData.slidingHard == true){
body2.m_userData.slidingHard = false;
numSlides--;
};
if (body1.m_userData.slidingHard == true){
body1.m_userData.slidingHard = false;
numSlides--;
};
};
};
}
override public function Add(_arg1:b2ContactPoint):void{
body1 = _arg1.shape1.GetBody();
body2 = _arg1.shape2.GetBody();
if ((((body1.m_userData.phystype == 3)) && ((body2.m_userData.phystype == 3)))){
Gear.ComboDestroy(body1, body2);
} else {
if ((TotemMath.Hipo(body1.GetLinearVelocity().x, body1.GetLinearVelocity().y) + TotemMath.Hipo(body2.GetLinearVelocity().x, body2.GetLinearVelocity().y)) > 5){
};
};
if ((((((body1.m_userData.phystype == 300)) && ((body2.m_userData.phystype == 1000)))) && (!(body2.m_userData.todie)))){
if (Gear.gameMode == "playgame"){
Gear.ThrowGameOver();
} else {
Gear.gameOver = true;
};
body2.m_userData.todie = true;
body2.m_userData.gotoAndPlay(2);
} else {
if ((((((body1.m_userData.phystype == 1000)) && ((body2.m_userData.phystype == 300)))) && (!(body1.m_userData.todie)))){
if (Gear.gameMode == "playgame"){
Gear.ThrowGameOver();
} else {
Gear.gameOver = true;
};
body1.m_userData.todie = true;
body1.m_userData.gotoAndPlay(2);
};
};
}
override public function Remove(_arg1:b2ContactPoint):void{
body1 = _arg1.shape1.GetBody();
body2 = _arg1.shape2.GetBody();
}
}
}//package TotemEngine
Section 198
//Data (TotemEngine.Data)
package TotemEngine {
import flash.net.*;
public class Data {
public static var dataOutput:String;
public static var TotemData:SharedObject;
public static function DeleteFolder(_arg1:int){
var _local2:Array;
var _local3:Array;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:Array;
var _local9:Array;
var _local10:Array;
_local2 = new Array();
_local3 = new Array();
if (_arg1 != -1){
_local4 = 0;
while (_local4 < TotemData.data.Editor.levels.length) {
if (TotemData.data.Editor.levels[_local4].folder == _arg1){
_local3.push(TotemData.data.Editor.levels[_local4].id);
};
_local4++;
};
while (_local3.length > 0) {
_local7 = 0;
while (_local7 < TotemData.data.Editor.levels.length) {
if (TotemData.data.Editor.levels[_local7].id == _local3[0]){
_local9 = TotemData.data.Editor.levels.splice(_local7, 1);
break;
};
_local7++;
};
_local8 = _local3.splice(0, 1);
};
_local5 = 0;
while (_local5 < TotemData.data.Editor.folders.length) {
if (TotemData.data.Editor.folders[_local5].id == _arg1){
_local10 = TotemData.data.Editor.folders.splice(_local5, 1);
break;
};
_local5++;
};
_local6 = 0;
while (_local6 < TotemData.data.Editor.folders.length) {
if (TotemData.data.Editor.folders[_local6].parentId == _arg1){
DeleteFolder(TotemData.data.Editor.folders[_local6].id);
};
_local6++;
};
};
TotemData.flush();
}
public static function ResumeExport(_arg1:Array, _arg2:String="RAW"){
var _local3:int;
var _local4:Object;
var _local5:int;
var _local6:int;
var _local7:String;
var _local8:int;
var _local9:Array;
var _local10:int;
var _local11:int;
var _local12:Object;
var _local13:int;
var _local14:String;
var _local15:int;
var _local16:Array;
var _local17:int;
var _local18:String;
var _local19:Array;
var _local20:int;
var _local21:String;
if (_arg2 == "RAW"){
_local3 = 0;
while (_local3 < _arg1.length) {
_local5 = 0;
while (_local5 < TotemData.data.Editor.folders.length) {
if (TotemData.data.Editor.folders[_local5].id == _arg1[_local3]){
_local4 = TotemData.data.Editor.folders[_local5];
break;
};
_local5++;
};
dataOutput = (dataOutput + (("\t\t\t////// EXPORTING FOLDER:: " + _local4.name) + "\n"));
_local6 = 0;
while (_local6 < TotemData.data.Editor.levels.length) {
if (TotemData.data.Editor.levels[_local6].folder == _local4.id){
dataOutput = (dataOutput + (("\t\t\t////\n\t\t\t////// LEVEL:: " + TotemData.data.Editor.levels[_local6].name) + "\n"));
dataOutput = (dataOutput + "\t\t\ttempInsideLevel = new Object();\n");
dataOutput = (dataOutput + (("\t\t\ttempInsideLevel.name = \"" + TotemData.data.Editor.levels[_local6].name) + "\";\n"));
dataOutput = (dataOutput + "\t\t\ttempInsideLevel.blocks = new Array();\n");
_local7 = "";
_local8 = 0;
while (_local8 < TotemData.data.Editor.levels[_local6].blocks.length) {
dataOutput = (dataOutput + "\t\t\ttempInsideBlock = new Object();\n");
dataOutput = (dataOutput + (("\t\t\ttempInsideBlock.phystype = " + TotemData.data.Editor.levels[_local6].blocks[_local8].phystype) + ";\n"));
dataOutput = (dataOutput + (("\t\t\ttempInsideBlock.sizex = " + TotemData.data.Editor.levels[_local6].blocks[_local8].sizex) + ";\n"));
dataOutput = (dataOutput + (("\t\t\ttempInsideBlock.sizey = " + TotemData.data.Editor.levels[_local6].blocks[_local8].sizey) + ";\n"));
dataOutput = (dataOutput + (("\t\t\ttempInsideBlock.xpos = " + TotemData.data.Editor.levels[_local6].blocks[_local8].xpos) + ";\n"));
dataOutput = (dataOutput + (("\t\t\ttempInsideBlock.ypos = " + TotemData.data.Editor.levels[_local6].blocks[_local8].ypos) + ";\n"));
dataOutput = (dataOutput + (("\t\t\ttempInsideBlock.rotation = " + TotemData.data.Editor.levels[_local6].blocks[_local8].rotation) + ";\n"));
dataOutput = (dataOutput + "\t\t\ttempInsideLevel.blocks.push(tempInsideBlock);\n");
_local8++;
};
dataOutput = (dataOutput + "\t\t\ttempInsideLevel.idols = new Array();\n");
_local9 = new Array();
_local10 = 0;
while (_local10 < TotemData.data.Editor.levels[_local6].idols.length) {
dataOutput = (dataOutput + "\t\t\ttempInsideIdol = new Object();\n");
dataOutput = (dataOutput + (("\t\t\ttempInsideIdol.x = " + TotemData.data.Editor.levels[_local6].idols[_local10].x) + ";\n"));
dataOutput = (dataOutput + (("\t\t\ttempInsideIdol.y = " + TotemData.data.Editor.levels[_local6].idols[_local10].y) + ";\n"));
dataOutput = (dataOutput + (("\t\t\ttempInsideIdol.rotation = " + TotemData.data.Editor.levels[_local6].idols[_local10].rotation) + ";\n"));
dataOutput = (dataOutput + (("\t\t\ttempInsideIdol.itype = " + TotemData.data.Editor.levels[_local6].idols[_local10].itype) + ";\n"));
dataOutput = (dataOutput + "\t\t\ttempInsideLevel.idols.push(tempInsideIdol);\n");
_local10++;
};
dataOutput = (dataOutput + (("\t\t\ttempInsideLevel.type = " + TotemData.data.Editor.levels[_local6].type) + ";\n"));
dataOutput = (dataOutput + (("\t\t\ttempInsideLevel.blockdelay = " + TotemData.data.Editor.levels[_local6].blockdelay) + ";\n"));
dataOutput = (dataOutput + "\t\t\tClassicLevels.push(tempInsideLevel);\n");
dataOutput = (dataOutput + (("\t\t\t////\n\t\t\t//LEVEL " + TotemData.data.Editor.levels[_local6].name) + " ADDED;\n\t\t\t////\n"));
};
_local6++;
};
dataOutput = (dataOutput + "\t\t\t//\n\t\t\t////////////////////////////////FOLDER END ///////////////////////////\n\t\t\t//\n");
_local3++;
};
} else {
_local11 = 0;
while (_local11 < _arg1.length) {
_local13 = 0;
while (_local13 < TotemData.data.Editor.folders.length) {
if (TotemData.data.Editor.folders[_local13].id == _arg1[_local11]){
_local12 = TotemData.data.Editor.folders[_local13];
break;
};
_local13++;
};
_local14 = (_local12.name + "@#T2|LF#@");
_local15 = 0;
while (_local15 < TotemData.data.Editor.levels.length) {
if (TotemData.data.Editor.levels[_local15].folder == _local12.id){
_local14 = (_local14 + (TotemData.data.Editor.levels[_local15].name + "@###@"));
_local16 = new Array();
_local17 = 0;
while (_local17 < TotemData.data.Editor.levels[_local15].blocks.length) {
_local16.push(((((((((((TotemData.data.Editor.levels[_local15].blocks[_local17].phystype + "*b p*") + TotemData.data.Editor.levels[_local15].blocks[_local17].sizex) + "*b p*") + TotemData.data.Editor.levels[_local15].blocks[_local17].sizey) + "*b p*") + TotemData.data.Editor.levels[_local15].blocks[_local17].xpos) + "*b p*") + TotemData.data.Editor.levels[_local15].blocks[_local17].ypos) + "*b p*") + TotemData.data.Editor.levels[_local15].blocks[_local17].rotation));
_local17++;
};
_local18 = _local16.join("*b b*");
_local14 = (_local14 + (_local18 + "@###@"));
_local19 = new Array();
_local20 = 0;
while (_local20 < TotemData.data.Editor.levels[_local15].idols.length) {
_local19.push(((((((TotemData.data.Editor.levels[_local15].idols[_local20].x + "*i p*") + TotemData.data.Editor.levels[_local15].idols[_local20].y) + "*i p*") + TotemData.data.Editor.levels[_local15].idols[_local20].rotation) + "*i p*") + TotemData.data.Editor.levels[_local15].idols[_local20].itype));
_local20++;
};
_local21 = _local19.join("*i i*");
_local14 = (_local14 + (_local21 + "@###@"));
_local14 = (_local14 + (TotemData.data.Editor.levels[_local15].type + "@###@"));
_local14 = (_local14 + TotemData.data.Editor.levels[_local15].blockdelay);
_local14 = (_local14 + "@#T2/LL#@");
};
_local15++;
};
_local14 = (_local14 + "@#T2/LL#@");
_local14 = _local14.split("@#T2/LL#@@#T2/LL#@").join("");
_local14 = (_local14 + "@T2|BD@");
dataOutput = (dataOutput + _local14);
_local11++;
};
dataOutput = (dataOutput + "@T2|BD@");
dataOutput = dataOutput.split("@T2|BD@@T2|BD@").join("");
};
}
public static function SaveLevel(_arg1:String, _arg2:Array, _arg3:Array, _arg4:int=-1, _arg5:int=-1, _arg6:int=0, _arg7:Boolean=true):int{
var _local8:Object;
var _local9:int;
if (_arg4 == -1){
TotemData.data.Editor.lid++;
};
_local8 = new Object();
_local8.id = _arg4;
_local8.name = _arg1;
_local8.blocks = _arg2;
_local8.idols = _arg3;
_local8.folder = _arg5;
_local8.type = _arg6;
_local8.blockdelay = _arg7;
if (_arg4 != -1){
_local9 = 0;
while (_local9 < TotemData.data.Editor.levels.length) {
if (_arg4 == TotemData.data.Editor.levels[_local9].id){
TotemData.data.Editor.levels[_local9] = _local8;
break;
};
_local9++;
};
} else {
_local8.id = TotemData.data.Editor.lid;
TotemData.data.Editor.levels.push(_local8);
};
return (_local8.id);
}
public static function PrepareExport(_arg1:Array, _arg2:String="RAW"){
dataOutput = "";
if (_arg2 == "RAW"){
dataOutput = (dataOutput + "\t\t\t// Totem Destroyer 2 Level Editor :: Exported data\n\t\t\t//\n");
};
ResumeExport(_arg1, _arg2);
}
public static function GetParentIdById(_arg1:int):int{
var _local2:Object;
var _local3:int;
_local2 = new Object();
_local2.parentId = -1;
if (_arg1 != -1){
_local3 = 0;
while (_local3 < TotemData.data.Editor.folders.length) {
if (TotemData.data.Editor.folders[_local3].id == _arg1){
_local2 = TotemData.data.Editor.folders[_local3];
break;
};
_local3++;
};
};
return (_local2.parentId);
}
public static function NewFolder(_arg1:String, _arg2:int=-1):int{
var _local3:Object;
TotemData.data.Editor.fid++;
_local3 = new Object();
_local3.id = TotemData.data.Editor.fid;
_local3.parentId = _arg2;
_local3.name = _arg1;
TotemData.data.Editor.folders.push(_local3);
TotemData.flush();
return (TotemData.data.Editor.fid);
}
public static function Init(){
TotemData = SharedObject.getLocal("ochsenhofer_totem2", "/");
if (TotemData.data.EditorVersion != "1.0.0.3"){
TotemData.data.Editor = new Object();
TotemData.data.Editor.folders = new Array();
TotemData.data.Editor.levels = new Array();
TotemData.data.Editor.fid = 0;
TotemData.data.Editor.lid = 0;
TotemData.data.EditorVersion = "1.0.0.3";
};
if (TotemData.data.SettingsVersion != "0.9.1.2"){
TotemData.data.Settings = new Object();
TotemData.data.Settings.music = new Boolean(true);
TotemData.data.Settings.timesky = new Boolean(false);
TotemData.data.Settings.reversed = new Boolean(false);
TotemData.data.Settings.graphics = new int(2);
TotemData.data.SettingsVersion = "0.9.1.2";
};
if (TotemData.data.LevelSaveVersion != "0.9.1.6"){
TotemData.data.Levels = new Object();
TotemData.data.Levels.current = new int(0);
TotemData.data.Levels.maxed = new int(0);
TotemData.data.Levels.records = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1];
TotemData.data.Levels.recordshighscores = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1];
TotemData.data.Levels.custom = new int(0);
TotemData.data.LevelSaveVersion = "0.9.1.6";
};
if (TotemData.data.SponsorLevelSaveVersion != "0.9.1.6"){
TotemData.data.SponsorLevels = new Object();
TotemData.data.SponsorLevels.current = new int(0);
TotemData.data.SponsorLevels.records = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1];
TotemData.data.SponsorLevels.custom = new int(0);
TotemData.data.SponsorLevelSaveVersion = "0.9.1.6";
};
if (TotemData.data.UnlockedLevelSaveVersion != "0.9.1.7"){
TotemData.data.UnlockedLevels = new Object();
TotemData.data.UnlockedLevels.current = new int(0);
TotemData.data.UnlockedLevels.records = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1];
TotemData.data.UnlockedLevels.unlocked = [false, false, false, false, false, false, false, false, false, false];
TotemData.data.UnlockedLevels.custom = new int(0);
TotemData.data.UnlockedLevelSaveVersion = "0.9.1.7";
};
if (TotemData.data.ClassicLevelSaveVersion != "0.9.1.6"){
TotemData.data.ClassicLevels = new Object();
TotemData.data.ClassicLevels.current = new int(0);
TotemData.data.ClassicLevels.records = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1];
TotemData.data.ClassicLevels.custom = new int(0);
TotemData.data.ClassicLevelSaveVersion = "0.9.1.6";
};
if (TotemData.data.MyLevelSaveVersion != "0.9.1.5"){
TotemData.data.MyLevels = new Array();
TotemData.data.MyLevelSaveVersion = "0.9.1.5";
};
if (TotemData.data.GameBeatenVersion != "0.9.0.7"){
TotemData.data.GameBeaten = new Boolean(false);
TotemData.data.GameBeatenVersion = "0.9.0.7";
};
if (TotemData.data.GameAchievementsVersion != "0.9.0.6"){
TotemData.data.GameAchievements = new Object();
TotemData.data.GameAchievements.unlocked = [false, false, false, false, false, false, false, false, false, false];
TotemData.data.GameAchievements.points = [50, 10, 5, 25, 5, 50, 15, 25, 5, 10];
TotemData.data.GameAchievementsVersion = "0.9.0.6";
};
if (TotemData.data.StatusVersion != "0.9.0.7"){
TotemData.data.Status = new Object();
TotemData.data.Status.aiwon = new int(0);
TotemData.data.Status.ailost = new int(0);
TotemData.data.Status.won = new int(0);
TotemData.data.Status.lost = new int(0);
TotemData.data.StatusVersion = "0.9.0.7";
};
TotemData.flush();
}
public static function GetFolderById(_arg1:int):Object{
var _local2:Object;
var _local3:int;
_local2 = new Object();
if (_arg1 != -1){
_local3 = 0;
while (_local3 < TotemData.data.Editor.folders.length) {
if (TotemData.data.Editor.folders[_local3].id == _arg1){
_local2 = TotemData.data.Editor.folders[_local3];
break;
};
_local3++;
};
} else {
_local2.id = -1;
_local2.name = "root";
_local2.parentId = -1;
};
return (_local2);
}
public static function DeleteLevel(_arg1:int){
var _local2:int;
var _local3:Array;
_local2 = 0;
while (_local2 < TotemData.data.Editor.levels.length) {
if (TotemData.data.Editor.levels[_local2].id == _arg1){
_local3 = TotemData.data.Editor.levels.splice(_local2, 1);
break;
};
_local2++;
};
TotemData.flush();
}
public static function GetPath(_arg1:int):String{
var _local2:String;
var _local3:int;
var _local4:Object;
_local2 = "root/";
if (_arg1 == -1){
return (_local2);
};
_local3 = _arg1;
_local4 = GetFolderById(_local3);
_local2 = (_local4.name + "/");
while (_local3 != -1) {
_local3 = _local4.parentId;
_local4 = GetFolderById(_local3);
_local2 = ((_local4.name + "/") + _local2);
};
return (_local2);
}
public static function CheckSaveLevel(_arg1:int):Boolean{
var _local2:Boolean;
var _local3:int;
_local2 = true;
if (_arg1 != -1){
_local3 = 0;
while (_local3 < TotemData.data.Editor.levels.length) {
if (TotemData.data.Editor.levels[_local3].id == _arg1){
_local2 = false;
break;
};
_local3++;
};
};
return (_local2);
}
}
}//package TotemEngine
Section 199
//Debug (TotemEngine.Debug)
package TotemEngine {
import flash.text.*;
public class Debug {
private static var txField:TextField;
public static var doDebug:Boolean = false;
private static var i:int;
public static var AllTypes:Array = new Array("Normal", "Black", "Sloppy", "Combo", "Explosive", "Glass");
public static function Dump(_arg1:String){
var _local2:Array;
var _local3:Array;
var _local4:String;
if (doDebug){
txField.appendText((_arg1 + "\n"));
txField.scrollV = txField.maxScrollV;
i++;
if (i > 30){
_local2 = txField.text.split("\n");
_local3 = _local2.slice(15, 227);
_local4 = _local2.join("\n");
txField.text = _local4;
txField.scrollV = txField.maxScrollV;
i = 0;
};
};
}
public static function Init(_arg1:TextField){
txField = _arg1;
AllTypes[300] = "Floor";
AllTypes[100] = "Golden Idol";
}
}
}//package TotemEngine
Section 200
//Factory (TotemEngine.Factory)
package TotemEngine {
import flash.display.*;
import flash.events.*;
import Box2D.Dynamics.*;
import Box2D.Collision.Shapes.*;
import Box2D.Common.Math.*;
import Box2D.Dynamics.Joints.*;
import Box2D.Collision.*;
import Box2D.Dynamics.Contacts.*;
import General.*;
public class Factory {
public static var onTransition:Boolean = false;
public static var gameOverEnd:Boolean = false;
private static var root:MovieClip;
public static var StructureTypes:Array = new Array([0, 0.47, 1, 0.2, 1], [1, 0.5, 1.2, 0.12, 2], [2, 0.17, 0.66, 0.37, 3], [3, 0.47, 1, 0.2, 4], [4, 0.47, 1, 0.17, 5], [5, 0.34, 1, 0.05, 6]);
public static var gameWonCount:int = 0;
public static var BlockFrames:Array = new Array();
public static var gameWonEnd:Boolean = false;
public static function ScreenRemoval(_arg1:Event){
_arg1.currentTarget.life--;
if (_arg1.currentTarget.life <= 0){
_arg1.currentTarget.removeEventListener(Event.ENTER_FRAME, ScreenRemoval);
root.GAME.CURSOR.removeChild(_arg1.currentTarget);
onTransition = false;
Speaker.PlaneStop();
};
}
public static function NewComboPoint(_arg1:Number, _arg2:Number):MovieClip{
var _local3:MovieClip;
var _local4:MovieClip;
_local3 = new D_point_combo();
_local3.x = _arg1;
_local3.y = _arg2;
_local3.life = 25;
_local4 = root.GAME.DEBUG.addChild(_local3);
_local4.addEventListener(Event.ENTER_FRAME, PointDebug);
return (_local4);
}
public static function PointDebug(_arg1:Event){
_arg1.currentTarget.life--;
if (_arg1.currentTarget.life <= 0){
_arg1.currentTarget.removeEventListener(Event.ENTER_FRAME, PointDebug);
root.GAME.DEBUG.removeChild(_arg1.currentTarget);
};
}
public static function GameOver():MovieClip{
var _local1:MovieClip;
var _local2:MovieClip;
gameOverEnd = false;
_local1 = new G_gameover();
_local1.x = (690 / 2);
_local1.y = (480 / 2);
_local1.life = 110;
_local2 = root.GAME.EFFECTS.addChild(_local1);
_local2.addEventListener(Event.ENTER_FRAME, ScreenGameOver);
Speaker.NewFailSound();
return (_local2);
}
public static function EffectExplosion1(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):MovieClip{
var _local5:MovieClip;
var _local6:MovieClip;
if (Data.TotemData.data.Settings.graphics == 2){
_local5 = new E_exploder();
} else {
_local5 = new E_exploder2();
};
_local5.x = _arg1;
_local5.y = _arg2;
_local5.width = _arg3;
_local5.height = _arg4;
_local5.life = 26;
_local6 = root.GAME.EFFECTS.addChild(_local5);
_local6.addEventListener(Event.ENTER_FRAME, EffectNormalRemoval);
return (_local6);
}
public static function Achievement(_arg1:int):MovieClip{
var _local2:G_achievement;
var _local3:*;
_local2 = new G_achievement();
_local2.life = 140;
_local3 = root.GAME.TOP.addChild(_local2);
_local3.addEventListener(Event.ENTER_FRAME, TopStuffRemoval);
_local3.acvContainer.gpoints.text = (Data.TotemData.data.GameAchievements.points[_arg1] + "g");
_local3.acvContainer.ptico.gotoAndStop((_arg1 + 1));
return (_local3);
}
public static function ScreenGameOver(_arg1:Event){
if (!gameOverEnd){
_arg1.currentTarget.life--;
};
if (_arg1.currentTarget.life <= 0){
_arg1.currentTarget.removeEventListener(Event.ENTER_FRAME, ScreenGameOver);
root.GAME.EFFECTS.removeChild(_arg1.currentTarget);
gameOverEnd = true;
Gear.PlayGame(Gear.LastLevel, Gear.LastType);
trace("ITS OVER");
} else {
if (Key.isDown(81)){
_arg1.currentTarget.removeEventListener(Event.ENTER_FRAME, ScreenGameOver);
ChangeScreen();
root.GAME.EFFECTS.removeChild(_arg1.currentTarget);
gameOverEnd = true;
Gear.Clear();
Gear.gameMode = "none";
Gear.gameOver = false;
Gear.gameWon = false;
root.GAME.hud_bremaining.visible = false;
Speaker.StopInGameSong();
Gear.BuildMenu();
Gear.stage.quality = "HIGH";
Key.removeKey(81);
};
};
}
public static function ScreenGameWon(_arg1:Event){
var _local2:Boolean;
var _local3:int;
var _local4:Boolean;
var _local5:Boolean;
var _local6:Boolean;
var _local7:int;
var _local8:int;
var _local9:Object;
var _local10:int;
var _local11:Object;
if (!gameWonEnd){
_local2 = true;
_local3 = 0;
while (_local3 < Gear.gameIdols.length) {
if (Math.abs(Gear.gameIdols[_local3].GetLinearVelocity().x) > 0.23){
trace((Gear.gameIdols[_local3].GetLinearVelocity().x + " too fast"));
_local2 = false;
};
if (Math.abs(Gear.gameIdols[_local3].GetLinearVelocity().y) > 0.23){
trace((Gear.gameIdols[_local3].GetLinearVelocity().y + " too fast"));
_local2 = false;
};
if (Math.abs(Gear.gameIdols[_local3].GetAngularVelocity()) > 0.23){
trace((Gear.gameIdols[_local3].GetAngularVelocity() + " too fast"));
_local2 = false;
};
_local3++;
};
if (_local2){
gameWonCount++;
};
};
if ((((gameWonCount > 80)) && (!(gameWonEnd)))){
_arg1.currentTarget.gotoAndStop(2);
Speaker.NewVictorySound();
gameWonEnd = true;
} else {
if (gameWonCount > 80){
_arg1.currentTarget.life--;
};
};
if ((((_arg1.currentTarget.life <= 0)) || (Gear.gameOver))){
_arg1.currentTarget.removeEventListener(Event.ENTER_FRAME, ScreenGameWon);
root.GAME.EFFECTS.removeChild(_arg1.currentTarget);
gameWonEnd = true;
if ((((Gear.playMode == "story")) && (!(Gear.gameOver)))){
if (Math.floor((Gear.playTime / 40)) == 0){
Gear.DoAchievement(8);
};
if (Data.TotemData.data.Levels.records[Data.TotemData.data.Levels.current] == -1){
Data.TotemData.data.Levels.records[Data.TotemData.data.Levels.current] = Gear.playTime;
trace("records was undefined");
} else {
if (Gear.playTime < Data.TotemData.data.Levels.records[Data.TotemData.data.Levels.current]){
Data.TotemData.data.Levels.records[Data.TotemData.data.Levels.current] = Gear.playTime;
trace("NEW RECORD");
};
};
if (Data.TotemData.data.Levels.recordshighscores[Data.TotemData.data.Levels.current] == -1){
Data.TotemData.data.Levels.recordshighscores[Data.TotemData.data.Levels.current] = Gear.playTime;
trace("records hs was undefined");
} else {
if (Gear.playTime < Data.TotemData.data.Levels.recordshighscores[Data.TotemData.data.Levels.current]){
Data.TotemData.data.Levels.recordshighscores[Data.TotemData.data.Levels.current] = Gear.playTime;
trace("NEW HS RECORD");
};
};
if ((((((Data.TotemData.data.Levels.current == 49)) && ((Gear.gameMode == "playgame")))) && (Gear.gameWon))){
Data.TotemData.data.Status.won++;
if (Data.TotemData.data.GameBeaten){
trace("you already won the game, going back to main menu");
ChangeScreen();
Gear.Clear();
Gear.gameMode = "none";
Gear.gameOver = false;
Gear.gameWon = false;
root.GAME.hud_bremaining.visible = false;
Speaker.StopInGameSong();
root.GAME.BIRDZ.visible = false;
Gear.stage.quality = "HIGH";
Gear.BuildMenu();
} else {
Data.TotemData.data.GameBeaten = true;
Speaker.StopInGameSong();
Gear.stage.quality = "HIGH";
Gear.StartGameEnding();
};
} else {
Data.TotemData.data.Status.won++;
Data.TotemData.data.Levels.current++;
if (Data.TotemData.data.Levels.current > Data.TotemData.data.Levels.maxed){
Data.TotemData.data.Levels.maxed = Data.TotemData.data.Levels.current;
};
Data.TotemData.flush();
Gear.PlayGame(ILevels.MemoryLevels[Data.TotemData.data.Levels.current], "story");
};
} else {
if (!Gear.gameOver){
Data.TotemData.data.Status.won++;
Data.TotemData.flush();
Gear.stage.quality = "HIGH";
switch (Gear.playMode){
case "sponsor":
if (Gear.otherLeveli == 3){
Gear.DoAchievement(1);
};
if ((((Data.TotemData.data.SponsorLevels.records[Gear.otherLeveli] == -1)) || ((Gear.playTime < Data.TotemData.data.SponsorLevels.records[Gear.otherLeveli])))){
Data.TotemData.data.SponsorLevels.records[Gear.otherLeveli] = Gear.playTime;
};
Data.TotemData.flush();
ChangeScreen();
Gear.Clear();
Gear.playMode = "none";
Speaker.StopInGameSong();
root.GAME.BIRDZ.visible = false;
Gear.BuildLevelSelect(6);
break;
case "unlocked":
if ((((Data.TotemData.data.UnlockedLevels.records[Gear.otherLeveli] == -1)) || ((Gear.playTime < Data.TotemData.data.UnlockedLevels.records[Gear.otherLeveli])))){
Data.TotemData.data.UnlockedLevels.records[Gear.otherLeveli] = Gear.playTime;
};
_local4 = true;
_local7 = 0;
while (_local7 < Data.TotemData.data.UnlockedLevels.records.length) {
if (Data.TotemData.data.UnlockedLevels.records[_local7] == -1){
_local4 = false;
break;
};
_local7++;
};
if (_local4){
Gear.DoAchievement(5);
};
Data.TotemData.flush();
ChangeScreen();
Gear.Clear();
Gear.playMode = "none";
Speaker.StopInGameSong();
root.GAME.BIRDZ.visible = false;
Gear.BuildLevelSelect(7);
break;
case "classic":
if ((((Data.TotemData.data.ClassicLevels.records[Gear.otherLeveli] == -1)) || ((Gear.playTime < Data.TotemData.data.ClassicLevels.records[Gear.otherLeveli])))){
Data.TotemData.data.ClassicLevels.records[Gear.otherLeveli] = Gear.playTime;
};
_local5 = true;
_local8 = 0;
while (_local8 < Data.TotemData.data.ClassicLevels.records.length) {
if (Data.TotemData.data.ClassicLevels.records[_local8] == -1){
_local5 = false;
break;
};
_local8++;
};
if (_local5){
Gear.DoAchievement(3);
};
Data.TotemData.flush();
if (Gear.otherLeveli >= 24){
ChangeScreen();
Gear.Clear();
Gear.playMode = "none";
Speaker.StopInGameSong();
Gear.BuildLevelSelect(7);
} else {
Gear.otherLeveli++;
_local9 = ILevels.ClassicLevels[Gear.otherLeveli];
Gear.PlayGame(_local9, Gear.LastType);
};
break;
case "custom":
_local6 = false;
_local10 = 0;
while (_local10 < Data.TotemData.data.MyLevels.length) {
if (Data.TotemData.data.MyLevels[_local10].id == Gear.otherLeveli){
if (Data.TotemData.data.MyLevels[_local10].record < Gear.playTime){
Data.TotemData.data.MyLevels[_local10].record = Gear.playTime;
};
_local6 = true;
break;
};
_local10++;
};
if (!_local6){
_local11 = new Object();
_local11.id = Gear.otherLeveli;
_local11.record = Gear.playTime;
Data.TotemData.data.MyLevels.push(_local11);
_local6 = true;
};
Gear.DoAchievement(4);
Data.TotemData.flush();
ChangeScreen();
Gear.Clear();
Gear.playMode = "none";
Speaker.StopInGameSong();
root.GAME.BIRDZ.visible = false;
Gear.BuildLevelSelect(9);
break;
default:
trace(Gear.playMode);
break;
};
};
};
trace("ITS OVER");
};
}
public static function EffectNormalRemoval(_arg1:Event){
_arg1.currentTarget.life--;
if (_arg1.currentTarget.life <= 0){
_arg1.currentTarget.removeEventListener(Event.ENTER_FRAME, EffectNormalRemoval);
root.GAME.EFFECTS.removeChild(_arg1.currentTarget);
};
}
public static function ChangeScreen():MovieClip{
var _local1:MovieClip;
var _local2:MovieClip;
var _local3:BitmapData;
var _local4:Bitmap;
_local1 = new G_bigfakeloading();
_local1.x = 0;
_local1.y = 0;
_local1.life = 152;
_local2 = root.GAME.CURSOR.addChild(_local1);
_local2.addEventListener(Event.ENTER_FRAME, ScreenRemoval);
_local3 = new BitmapData(690, 480, false);
_local3.draw(root);
_local4 = new Bitmap(_local3);
_local2.oldScreen.addChild(_local4);
onTransition = true;
Speaker.PlaneStart();
return (_local2);
}
public static function NewSoundPoint(_arg1:Number, _arg2:Number):MovieClip{
var _local3:MovieClip;
var _local4:MovieClip;
_local3 = new D_point_sound();
_local3.x = _arg1;
_local3.y = _arg2;
_local3.life = 15;
_local4 = root.GAME.DEBUG.addChild(_local3);
_local4.addEventListener(Event.ENTER_FRAME, PointDebug);
return (_local4);
}
public static function EffectComboNotifier(_arg1:Number, _arg2:Number):MovieClip{
var _local3:MovieClip;
var _local4:MovieClip;
_local3 = new E_combospin();
_local3.x = _arg1;
_local3.y = _arg2;
_local3.life = 50;
_local4 = root.GAME.EFFECTS.addChild(_local3);
_local4.addEventListener(Event.ENTER_FRAME, EffectNormalRemoval);
return (_local4);
}
public static function GameWon():MovieClip{
var _local1:MovieClip;
var _local2:MovieClip;
gameWonEnd = false;
gameWonCount = 0;
_local1 = new G_checkvictory();
_local1.x = 690;
_local1.y = 480;
_local1.life = 160;
_local2 = root.GAME.EFFECTS.addChild(_local1);
_local2.addEventListener(Event.ENTER_FRAME, ScreenGameWon);
return (_local2);
}
public static function ReadySetGo():MovieClip{
var _local1:MovieClip;
var _local2:MovieClip;
_local1 = new G_readysetgo();
_local1.x = (690 / 2);
_local1.y = 200;
_local1.life = 52;
_local2 = root.GAME.EFFECTS.addChild(_local1);
_local2.addEventListener(Event.ENTER_FRAME, ScreenReadySetGo);
return (_local2);
}
public static function Init(_arg1:MovieClip):void{
root = _arg1;
BlockFrames[30] = new Array();
BlockFrames[60] = new Array();
BlockFrames[90] = new Array();
BlockFrames[120] = new Array();
BlockFrames[150] = new Array();
BlockFrames[180] = new Array();
BlockFrames[210] = new Array();
BlockFrames[30][30] = 1;
BlockFrames[60][30] = 2;
BlockFrames[30][60] = 2;
BlockFrames[60][60] = 8;
BlockFrames[90][30] = 3;
BlockFrames[30][90] = 3;
BlockFrames[90][60] = 9;
BlockFrames[60][90] = 9;
BlockFrames[120][30] = 4;
BlockFrames[30][120] = 4;
BlockFrames[120][60] = 10;
BlockFrames[60][120] = 10;
BlockFrames[150][30] = 5;
BlockFrames[30][150] = 5;
BlockFrames[150][60] = 11;
BlockFrames[60][150] = 11;
BlockFrames[180][30] = 6;
BlockFrames[30][180] = 6;
BlockFrames[180][60] = 12;
BlockFrames[60][180] = 12;
BlockFrames[210][30] = 7;
BlockFrames[30][210] = 7;
BlockFrames[210][60] = 13;
BlockFrames[60][210] = 13;
Debug.Dump(("BFF: " + BlockFrames));
}
public static function NewBlock(_arg1:String, _arg2:int, _arg3:int, _arg4:Number, _arg5:Number, _arg6:Number):b2Body{
var _local7:Array;
var _local8:b2BodyDef;
var _local9:b2PolygonDef;
var _local10:MovieClip;
var _local11:b2Body;
switch (_arg1){
case "Normal":
_local7 = StructureTypes[0];
break;
case "Black":
_local7 = StructureTypes[1];
break;
case "Sloppy":
_local7 = StructureTypes[2];
break;
case "Combo":
_local7 = StructureTypes[3];
break;
case "Explosive":
_local7 = StructureTypes[4];
break;
case "Glass":
_local7 = StructureTypes[5];
break;
default:
_local7 = StructureTypes[0];
break;
};
_local8 = new b2BodyDef();
_local8.position.Set(TotemMath.Scale(_arg4), TotemMath.Scale(_arg5));
if (_arg3 > _arg2){
_arg6 = (_arg6 - 90);
};
_local8. = (_arg6 * (Math.PI / 180));
_local9 = new b2PolygonDef();
if (_arg3 > _arg2){
_local9.(TotemMath.Scale2((_arg3 * 30)), TotemMath.Scale2((_arg2 * 30)));
} else {
_local9.(TotemMath.Scale2((_arg2 * 30)), TotemMath.Scale2((_arg3 * 30)));
};
_local9.friction = _local7[1];
_local9.
= _local7[2];
_local9.restitution = _local7[3];
_local8.userData = new MovieClip();
switch (BlockFrames[(_arg2 * 30)][(_arg3 * 30)]){
case 1:
_local8.userData = new G_b30x30();
break;
case 2:
_local8.userData = new G_b60x30();
break;
case 3:
_local8.userData = new G_b90x30();
break;
case 4:
_local8.userData = new G_b120x30();
break;
case 5:
_local8.userData = new G_b150x30();
break;
case 6:
_local8.userData = new G_b180x30();
break;
case 7:
_local8.userData = new G_b210x30();
break;
case 8:
_local8.userData = new G_b60x60();
break;
case 9:
_local8.userData = new G_b90x60();
break;
case 10:
_local8.userData = new G_b120x60();
break;
case 11:
_local8.userData = new G_b150x60();
break;
case 12:
_local8.userData = new G_b180x60();
break;
case 13:
_local8.userData = new G_b210x60();
break;
default:
break;
};
_local8.userData.phystype = _local7[0];
_local8.userData.slidingHard = false;
_local8.userData.todie = false;
_local8.userData.action2 = 0;
_local8.userData.bsize = ((_arg2 + _arg3) - 1);
_local8.userData.bwidth = _arg2;
_local8.userData.bheight = _arg3;
_local10 = root.GAME.GRAPHICS.addChild(_local8.userData);
_local10.gotoAndStop(_local7[4]);
_local11 = Gear.totemWorld.(_local8);
_local11.(_local9);
_local11. ();
Debug.Dump(((((("BLOCK ADDED: " + _arg1) + "; width:") + _arg2) + "; height:") + _arg3));
return (_local11);
}
public static function EffectComboBox(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):MovieClip{
var _local6:MovieClip;
var _local7:MovieClip;
_local6 = new E_blowcombo();
_local6.x = _arg1;
_local6.y = _arg2;
_local6.width = (_arg3 * 30);
_local6.height = (_arg4 * 30);
_local6.rotation = _arg5;
_local6.life = 10;
_local7 = root.GAME.EFFECTS.addChild(_local6);
_local7.addEventListener(Event.ENTER_FRAME, EffectNormalRemoval);
return (_local7);
}
public static function EffectNormal1(_arg1:Number, _arg2:Number):MovieClip{
var _local3:MovieClip;
var _local4:MovieClip;
_local3 = new E_normal();
_local3.x = _arg1;
_local3.y = _arg2;
_local3.life = 13;
_local4 = root.GAME.EFFECTS.addChild(_local3);
_local4.addEventListener(Event.ENTER_FRAME, EffectNormalRemoval);
return (_local4);
}
public static function ScreenReadySetGo(_arg1:Event){
if (!onTransition){
_arg1.currentTarget.life--;
if (_arg1.currentTarget.currentFrame == 1){
_arg1.currentTarget.gotoAndPlay(2);
trace("LETS PLAY");
};
};
if (_arg1.currentTarget.life <= 0){
_arg1.currentTarget.removeEventListener(Event.ENTER_FRAME, ScreenReadySetGo);
root.GAME.EFFECTS.removeChild(_arg1.currentTarget);
Gear.playAct = "running";
trace("ITS ON");
};
}
public static function TopStuffRemoval(_arg1:Event){
_arg1.currentTarget.life--;
if (_arg1.currentTarget.life <= 0){
_arg1.currentTarget.removeEventListener(Event.ENTER_FRAME, TopStuffRemoval);
root.GAME.TOP.removeChild(_arg1.currentTarget);
};
}
public static function NewExplodingEyePoint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):MovieClip{
var _local5:MovieClip;
var _local6:MovieClip;
_local5 = new D_point_explosion();
_local5.x = _arg1;
_local5.y = _arg2;
_local5.width = _arg3;
_local5.height = _arg4;
_local5.life = 25;
_local6 = root.GAME.DEBUG.addChild(_local5);
_local6.addEventListener(Event.ENTER_FRAME, PointDebug);
return (_local6);
}
public static function NewTestPoint(_arg1:Number, _arg2:Number):MovieClip{
var _local3:MovieClip;
var _local4:MovieClip;
_local3 = new D_point_pink();
_local3.x = _arg1;
_local3.y = _arg2;
_local3.life = 10;
_local4 = root.GAME.DEBUG.addChild(_local3);
_local4.addEventListener(Event.ENTER_FRAME, PointDebug);
return (_local4);
}
}
}//package TotemEngine
Section 201
//Gear (TotemEngine.Gear)
package TotemEngine {
import flash.display.*;
import flash.events.*;
import Box2D.Dynamics.*;
import flash.utils.*;
import Box2D.Collision.Shapes.*;
import Box2D.Common.Math.*;
import Box2D.Dynamics.Joints.*;
import Box2D.Collision.*;
import flash.geom.*;
import flash.media.*;
import Box2D.Dynamics.Contacts.*;
import General.*;
import flash.net.*;
import fl.transitions.easing.*;
import fl.motion.easing.*;
import flash.ui.*;
public class Gear {
private static const BASE64_CHARS:String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
public static const version:String = "1.1.0";
public static var CheatsTabOn:Boolean = false;
private static var gameBlocks:Array = new Array();
public static var AiDelay:int = 30;
public static var playTime:int = 0;
private static var outOfBoundariesList:Array = new Array();
public static var upsideDown:Boolean = false;
private static var boxDef:b2PolygonDef;
public static var highScoresAll:Array = [[["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."]], [["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."]], [["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."]], [["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."], ["loading..", "..."]]];
private static var blocksLeft_game:int = 0;
private static var SettingsMenu;
public static var gravity:b2Vec2 = new b2Vec2(0, 6);
public static var totemWorld:b2World;
private static var MenuBlock:b2Body;
private static var Idol:b2Body;
private static var walkthroughActivated:Boolean = false;
public static var TopInvertMc;
public static var gameIdols:Array = new Array();
public static var LastLevel:Object;
public static var isPico:Boolean = false;
public static var otherLeveli:int;
private static var NewGameScreen;
public static var playDelay:int = 0;
public static var gameMode:String = "none";
private static var HighscoresScreen;
public static var isOn:Boolean = false;
public static var playAct:String = "hold";
private static var AchievementsScreen;
private static var PlayMenu;
private static var MenuBlockJoint:b2MouseJoint;
private static var leftToExplodeList:Array = new Array();
private static var root;
private static var bodiesSleep:Boolean = true;
public static var stage:Stage;
private static var bodyDef:b2BodyDef;
public static var InfoMc;
public static var playMode:String = "story";
public static var LastType:String;
private static var circleDef:b2CircleDef;
private static var Idols:Array = new Array();
private static var EndingMc;
public static var gameWon:Boolean = false;
private static var comboDestroyList:Array = new Array();
public static var InfoOn:Boolean = false;
public static var CheatsTab;
public static var totemWorld_timeStep:Number = 0.0333333333333333;
private static var EndingDone:Boolean;
public static var topInverted:Boolean = false;
public static var Cursor;
public static var delay:int = 0;
private static var CreditsScreen;
private static var LevelSelect;
private static var SubmitHighscoresMc;
private static var body:b2Body;
private static var SettingsMenuOpen:Boolean = false;
private static var blocksLeft_menu:int = 0;
public static var doDelay:Boolean = false;
private static var PlayMenuOpen:Boolean = false;
private static var gamePaused:Boolean = false;
private static var groundBody:b2Body;
private static var MenuLogo;
private static var MenuMain;
private static var runtime:int;
public static var totemWorld_iterations:int = 10;
public static var gameOver:Boolean = false;
public static var CursorOn:Boolean = false;
private static function DoMoreGames(_arg1:MouseEvent):void{
DoAchievement(9);
NewgroundsAPI.loadNewgrounds();
}
private static function ReplaceHsList(_arg1:int):void{
var _local2:Array;
var _local3:int;
_local2 = [[[HighscoresScreen.an1, HighscoresScreen.as1], [HighscoresScreen.an2, HighscoresScreen.as2], [HighscoresScreen.an3, HighscoresScreen.as3], [HighscoresScreen.an4, HighscoresScreen.as4], [HighscoresScreen.an5, HighscoresScreen.as5], [HighscoresScreen.an6, HighscoresScreen.as6], [HighscoresScreen.an7, HighscoresScreen.as7], [HighscoresScreen.an8, HighscoresScreen.as8], [HighscoresScreen.an9, HighscoresScreen.as9], [HighscoresScreen.an10, HighscoresScreen.as10], [HighscoresScreen.an11, HighscoresScreen.as11], [HighscoresScreen.an12, HighscoresScreen.as12], [HighscoresScreen.an13, HighscoresScreen.as13], [HighscoresScreen.an14, HighscoresScreen.as14], [HighscoresScreen.an15, HighscoresScreen.as15]], [[HighscoresScreen.bn1, HighscoresScreen.bs1], [HighscoresScreen.bn2, HighscoresScreen.bs2], [HighscoresScreen.bn3, HighscoresScreen.bs3], [HighscoresScreen.bn4, HighscoresScreen.bs4], [HighscoresScreen.bn5, HighscoresScreen.bs5], [HighscoresScreen.bn6, HighscoresScreen.bs6], [HighscoresScreen.bn7, HighscoresScreen.bs7], [HighscoresScreen.bn8, HighscoresScreen.bs8], [HighscoresScreen.bn9, HighscoresScreen.bs9], [HighscoresScreen.bn10, HighscoresScreen.bs10]]];
_local3 = 0;
while (_local3 < _local2[0].length) {
_local2[0][_local3][0].text = highScoresAll[0][_local3][0];
_local2[0][_local3][1].text = highScoresAll[0][_local3][1];
_local3++;
};
_local3 = 0;
while (_local3 < _local2[1].length) {
_local2[1][_local3][0].text = highScoresAll[_arg1][_local3][0];
_local2[1][_local3][1].text = highScoresAll[_arg1][_local3][1];
_local3++;
};
}
public static function AddTopInvert():void{
var _local1:G_topinvert;
_local1 = new G_topinvert();
TopInvertMc = root.GAME.TOP.addChild(_local1);
TopInvertMc.mouseEnabled = false;
TopInvertMc.mouseChildren = false;
topInverted = true;
}
private static function CreditsLuis(_arg1:MouseEvent):void{
NewgroundsAPI.loadCustomLink("LuisNG");
}
public static function encode(_arg1:String):String{
var _local2:ByteArray;
_local2 = new ByteArray();
_local2.writeUTFBytes(_arg1);
return (encodeByteArray(_local2));
}
public static function KillSubmitHighscores():void{
root.GAME.GRAPHICS.removeChild(SubmitHighscoresMc);
Speaker.StopNewGameSong();
}
private static function CloseSettingsMenu(_arg1:MouseEvent):void{
SettingsMenu.bt_close.removeEventListener(MouseEvent.CLICK, CloseSettingsMenu);
root.GAME.HUD.removeChild(SettingsMenu);
SettingsMenuOpen = false;
trace("REALLY CLOSED (SETTINGS)");
}
private static function ButtonMissionLevelPlay(_arg1:int):void{
if (Data.TotemData.data.Levels.maxed >= _arg1){
Factory.ChangeScreen();
KillLevelSelect();
Clear();
Data.TotemData.data.Levels.current = _arg1;
Data.TotemData.flush();
stage.focus = null;
PlayGame(ILevels.MemoryLevels[Data.TotemData.data.Levels.current], "story");
} else {
trace(((("CANNOT PLAY LEVEL: " + _arg1) + ". MAX: ") + Data.TotemData.data.Levels.maxed));
};
}
private static function MenuFunctions_settings(_arg1:MouseEvent){
var _local2:G_menusettings2;
if (!SettingsMenuOpen){
_local2 = new G_menusettings2();
_local2.x = 30;
_local2.y = 210;
SettingsMenu = root.GAME.HUD.addChild(_local2);
SettingsMenu.gotoAndPlay(2);
SettingsMenu.bt_close.addEventListener(MouseEvent.CLICK, CloseSettingsMenu);
SettingsMenu.bt_low.addEventListener(MouseEvent.CLICK, SettingsQualityLow);
SettingsMenu.bt_med.addEventListener(MouseEvent.CLICK, SettingsQualityMed);
SettingsMenu.bt_high.addEventListener(MouseEvent.CLICK, SettingsQualityHigh);
SettingsMenu.bt_on.addEventListener(MouseEvent.CLICK, SettingsMusicOn);
SettingsMenu.bt_off.addEventListener(MouseEvent.CLICK, SettingsMusicOff);
trace(("SHIPWRECK:" + SettingsMenu.txtinside.x));
if (Data.TotemData.data.Settings.music){
SettingsMenu.txtinside.musicindicator.gotoAndStop(1);
} else {
SettingsMenu.txtinside.musicindicator.gotoAndStop(2);
};
if (Data.TotemData.data.Settings.graphics == 0){
SettingsMenu.txtinside.graphicsindicator.gotoAndStop(1);
} else {
if (Data.TotemData.data.Settings.graphics == 1){
SettingsMenu.txtinside.graphicsindicator.gotoAndStop(2);
} else {
SettingsMenu.txtinside.graphicsindicator.gotoAndStop(3);
};
};
SettingsMenuOpen = true;
};
}
public static function Clear():void{
var _local1:*;
var _local2:*;
var _local3:*;
_local1 = totemWorld.;
while (_local1) {
_local2 = _local1;
_local1 = _local1.m_next;
if (_local2.m_userData != null){
_local3 = MovieClip(_local2.m_userData);
if (_local3.phystype != 300){
root.GAME.GRAPHICS.removeChild(_local3);
totemWorld.(_local2);
};
};
};
comboDestroyList = new Array();
leftToExplodeList = new Array();
outOfBoundariesList = new Array();
Idols = new Array();
if (CursorOn){
root.GAME.CURSOR.removeChild(Cursor);
Mouse.show();
CursorOn = false;
};
}
private static function DoDaily(_arg1:MouseEvent){
HighscoresScreen.mwdindic.gotoAndStop(3);
HighscoresScreen.hspick.gotoAndStop(3);
ReplaceHsList(3);
}
private static function CreditsGabs(_arg1:MouseEvent):void{
NewgroundsAPI.loadCustomLink("GabsTV");
}
private static function CreditsNewgrounds(_arg1:MouseEvent):void{
NewgroundsAPI.loadNewgrounds();
}
private static function LevelSelectPlayMenu(_arg1:MouseEvent):void{
Factory.ChangeScreen();
KillMenu();
Clear();
gameMode = "none";
BuildLevelSelect();
root.GAME.BIRDZ.visible = false;
}
public static function KillNewGame():void{
Data.TotemData.data.Levels.current = 0;
Factory.ChangeScreen();
root.GAME.HUD.removeChild(NewGameScreen);
trace("KILL NEW GAME FUNCTION: SUCCESS");
Speaker.StopNewGameSong();
SetTheSky();
Clear();
PlayGame(ILevels.MemoryLevels[Data.TotemData.data.Levels.current], "story");
}
private static function NewGamePlayMenu(_arg1:MouseEvent):void{
Factory.ChangeScreen();
KillMenu();
BuildNewGame();
root.GAME.BIRDZ.visible = false;
}
public static function BuildCredits(_arg1:MouseEvent):void{
var _local2:G_credits;
Factory.ChangeScreen();
KillMenu();
gameMode = "none";
Speaker.StartNewGameSong();
_local2 = new G_credits();
CreditsScreen = root.GAME.HUD.addChild(_local2);
CreditsScreen.bt_close.addEventListener(MouseEvent.CLICK, CloseCreditsBt);
CreditsScreen.bt_newgrounds.addEventListener(MouseEvent.CLICK, CreditsNewgrounds);
CreditsScreen.bt_gabs.addEventListener(MouseEvent.CLICK, CreditsGabs);
CreditsScreen.bt_luis.addEventListener(MouseEvent.CLICK, CreditsLuis);
root.GAME.BIRDZ.visible = false;
}
private static function SettingsMusicOff(_arg1:MouseEvent):void{
if (Data.TotemData.data.Settings.music){
Speaker.StopMenuSong();
Data.TotemData.data.Settings.music = false;
Data.TotemData.flush();
};
SettingsMenu.txtinside.musicindicator.gotoAndStop(2);
}
public static function BuildLevelSelect(_arg1:int=1):void{
var _local2:G_levelselect;
root.GAME.hud_bremaining.visible = false;
_local2 = new G_levelselect();
LevelSelect = root.GAME.GRAPHICS.addChild(_local2);
LevelSelect.levelscontainer.gotoAndStop(_arg1);
BuildWithPage();
LevelSelect.levelscontainer.l0.addEventListener(MouseEvent.CLICK, MissionButtonl0);
LevelSelect.levelscontainer.l1.addEventListener(MouseEvent.CLICK, MissionButtonl1);
LevelSelect.levelscontainer.l2.addEventListener(MouseEvent.CLICK, MissionButtonl2);
LevelSelect.levelscontainer.l3.addEventListener(MouseEvent.CLICK, MissionButtonl3);
LevelSelect.levelscontainer.l4.addEventListener(MouseEvent.CLICK, MissionButtonl4);
LevelSelect.levelscontainer.l5.addEventListener(MouseEvent.CLICK, MissionButtonl5);
LevelSelect.levelscontainer.l6.addEventListener(MouseEvent.CLICK, MissionButtonl6);
LevelSelect.levelscontainer.l7.addEventListener(MouseEvent.CLICK, MissionButtonl7);
LevelSelect.levelscontainer.l8.addEventListener(MouseEvent.CLICK, MissionButtonl8);
LevelSelect.levelscontainer.l9.addEventListener(MouseEvent.CLICK, MissionButtonl9);
LevelSelect.bt_back.addEventListener(MouseEvent.CLICK, LevelSelectBackButton);
LevelSelect.levelscontainer.bt_next.addEventListener(MouseEvent.CLICK, LevelSelectNextButton);
LevelSelect.levelscontainer.bt_previous.addEventListener(MouseEvent.CLICK, LevelSelectPreviousButton);
LevelSelect.bt_mainquestlevels.addEventListener(MouseEvent.CLICK, LevelSelectMissionLevels);
LevelSelect.bt_sponsorlevels.addEventListener(MouseEvent.CLICK, LevelSelectSponsorLevels);
LevelSelect.bt_unlockedlevels.addEventListener(MouseEvent.CLICK, LevelSelectUnlockedLevels);
LevelSelect.bt_classiclevels.addEventListener(MouseEvent.CLICK, LevelSelectClassicLevels);
LevelSelect.bt_mylevels.addEventListener(MouseEvent.CLICK, LevelSelectMyLevels);
LevelSelect.levelscontainer.ls_levels.addEventListener(MouseEvent.CLICK, ListClick);
LevelSelect.levelscontainer.bt_play.addEventListener(MouseEvent.CLICK, OtherLevelPlayButton);
Speaker.StartNewGameSong();
}
public static function ExplosiveDestroy(_arg1:b2Body):void{
if (!_arg1.m_userData.todie){
comboDestroyList.push(_arg1);
_arg1.m_userData.todie = true;
};
}
private static function SettingsQualityLow(_arg1:MouseEvent):void{
Data.TotemData.data.Settings.graphics = 0;
Data.TotemData.flush();
SettingsMenu.txtinside.graphicsindicator.gotoAndStop(1);
}
private static function LevelSelectMissionLevels(_arg1:MouseEvent):void{
LevelSelect.levelscontainer.gotoAndStop(1);
BuildWithPage();
}
private static function SubmitHighscoresPlayMenu(_arg1:MouseEvent):void{
Factory.ChangeScreen();
KillMenu();
Clear();
gameMode = "none";
trace("WTFHIGHSCORES");
BuildSubmitHighscores();
root.GAME.BIRDZ.visible = false;
}
private static function SubmitHsButton(_arg1:MouseEvent):void{
var _local2:Boolean;
var _local3:String;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:URLRequest;
var _local10:URLVariables;
var _local11:Number;
var _local12:String;
var _local13:String;
var _local14:String;
var _local15:String;
var _local16:String;
var _local17:String;
var _local18:URLLoader;
_local2 = true;
_local3 = root.loaderInfo.url;
trace(_local3);
_local4 = (_local3.indexOf("://") + 3);
_local5 = _local3.indexOf("/", _local4);
_local6 = _local3.substring(_local4, _local5);
_local7 = (_local6.lastIndexOf(".") - 1);
_local8 = (_local6.lastIndexOf(".", _local7) + 1);
_local6 = _local6.substring(_local8, _local6.length);
if (((((((((((((((((!((_local6 == ""))) && (!((_local6 == "newgrounds.com"))))) && (!((_local6 == "www.newgrounds.com"))))) && (!((_local6 == "gabs.tv"))))) && (!((_local6 == "www.gabs.tv"))))) && (!((_local6 == "uploads.ungrounded.net"))))) && (!((_local6 == "ungrounded.net"))))) && (!((_local6 == "brainwashstudios.com"))))) && (!((_local6 == "luiscastanon.com"))))){
_local2 = false;
};
if (SubmitHighscoresMc.currentFrame == 1){
if (((((((CheckHsOk()) && ((SubmitHighscoresMc.sendname.text.length > 2)))) && (!((SubmitHighscoresMc.sendname.text == "name is too short"))))) && (_local2))){
_local9 = new URLRequest("http://ungrounded.gabs.tv/managehs8931.php");
_local9.method = URLRequestMethod.POST;
_local10 = new URLVariables();
_local10.bmFtZTE = SubmitHighscoresMc.sendname.text;
_local11 = GetAllHs();
_local12 = String(_local11);
_local12 = _local12.split("0").join("U");
_local13 = encode(_local12);
_local14 = encode((_local13 + "pancakes123341"));
_local10.c2NvcmUx = _local14;
_local15 = String(Math.floor((GetAllHs() / 40)));
_local15 = _local15.split("0").join("U");
_local16 = encode(_local15);
_local17 = encode((String(_local16) + "pancakes123341"));
_local10.c2NvcmUy = _local17;
_local9.data = _local10;
_local18 = new URLLoader();
_local18.dataFormat = URLLoaderDataFormat.TEXT;
_local18.addEventListener(Event.COMPLETE, dataOnLoad);
_local18.load(_local9);
SubmitHighscoresMc.gotoAndStop(3);
} else {
if (SubmitHighscoresMc.sendname.text.length <= 2){
SubmitHighscoresMc.sendname.text = "name is too short";
};
};
} else {
if (SubmitHighscoresMc.currentFrame == 4){
};
};
}
private static function CloseAchievementsBt(_arg1:MouseEvent):void{
AchievementsScreen.bt_close.removeEventListener(MouseEvent.CLICK, CloseAchievementsBt);
Speaker.StopNewGameSong();
Factory.ChangeScreen();
root.GAME.HUD.removeChild(AchievementsScreen);
BuildMenu();
}
public static function BuildAchievements(_arg1:MouseEvent):void{
var _local2:G_achievements;
var _local3:Array;
var _local4:Array;
var _local5:int;
Factory.ChangeScreen();
KillMenu();
gameMode = "none";
Speaker.StartNewGameSong();
_local2 = new G_achievements();
AchievementsScreen = root.GAME.HUD.addChild(_local2);
_local3 = [AchievementsScreen.acvgold0, AchievementsScreen.acvgold1, AchievementsScreen.acvgold2, AchievementsScreen.acvgold3, AchievementsScreen.acvgold4, AchievementsScreen.acvgold5, AchievementsScreen.acvgold6, AchievementsScreen.acvgold7, AchievementsScreen.acvgold8, AchievementsScreen.acvgold9];
_local4 = [AchievementsScreen.ptico0, AchievementsScreen.ptico1, AchievementsScreen.ptico2, AchievementsScreen.ptico3, AchievementsScreen.ptico4, AchievementsScreen.ptico5, AchievementsScreen.ptico6, AchievementsScreen.ptico7, AchievementsScreen.ptico8, AchievementsScreen.ptico9];
_local5 = 0;
while (_local5 < Data.TotemData.data.GameAchievements.unlocked.length) {
if (Data.TotemData.data.GameAchievements.unlocked[_local5]){
_local3[_local5].text = (Data.TotemData.data.GameAchievements.points[_local5] + "g");
_local4[_local5].visible = true;
_local4[_local5].gotoAndStop((_local5 + 1));
} else {
_local3[_local5].text = "";
_local4[_local5].visible = false;
};
_local5++;
};
AchievementsScreen.bt_close.addEventListener(MouseEvent.CLICK, CloseAchievementsBt);
root.GAME.BIRDZ.visible = false;
}
private static function LevelSelectBackButton(_arg1:MouseEvent):void{
Factory.ChangeScreen();
LevelSelect.bt_back.removeEventListener(MouseEvent.CLICK, LevelSelectBackButton);
KillLevelSelect();
Clear();
BuildMenu();
}
public static function CheckMouse(_arg1:MouseEvent):void{
var _local2:int;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
_local2 = 0;
switch (gameMode){
case "test":
_local3 = totemWorld.;
while (_local3) {
_local4 = _local3;
_local3 = _local3.m_next;
if (_local4.m_userData != null){
_local5 = MovieClip(_local4.m_userData);
if (((((((((!((_local5.phystype == 300))) && (!((_local5.phystype == 3))))) && (!((_local5.phystype == 1))))) && (!((_local5.phystype == 1000))))) && (_local5.hitTestPoint(root.mouseX, root.mouseY, true)))){
if (((!(doDelay)) || (((doDelay) && ((delay <= 0)))))){
if (_local5.phystype == 4){
Debug.Dump("PHYS: Removing an explosion block");
Gear.ExplodingBlock(_local4);
Debug.Dump(("PHYS: tst " + _local4.m_userData.x));
} else {
Debug.Dump("PHYS: NOT AN EXPLODING BLOCK, DESTROYING");
root.GAME.GRAPHICS.removeChild(_local5);
totemWorld.(_local4);
};
if (doDelay){
delay = 16;
};
};
};
};
};
break;
case "menu":
break;
case "playgame":
if (((((!(gameOver)) && (!(gameWon)))) && ((playAct == "running")))){
_local6 = totemWorld.;
while (_local6) {
_local7 = _local6;
_local6 = _local6.m_next;
if (_local7.m_userData != null){
_local8 = MovieClip(_local7.m_userData);
if (((((((((!((_local8.phystype == 300))) && (!((_local8.phystype == 3))))) && (!((_local8.phystype == 1))))) && (!((_local8.phystype == 1000))))) && (_local8.hitTestPoint(root.mouseX, root.mouseY, true)))){
if (((!(doDelay)) || (((doDelay) && ((delay <= 0)))))){
if (_local8.phystype == 4){
Debug.Dump("PHYS: Removing an explosion block");
Gear.ExplodingBlock(_local7);
Debug.Dump(("PHYS: tst " + _local7.m_userData.x));
} else {
Debug.Dump("PHYS: NOT AN EXPLODING BLOCK, DESTROYING");
Factory.EffectNormal1(_local8.x, _local8.y);
root.GAME.GRAPHICS.removeChild(_local8);
totemWorld.(_local7);
Speaker.Effect(new S_explode(), 0, 0.5);
blocksLeft_game--;
if (blocksLeft_game >= 0){
root.GAME.hud_bremaining.lbdisplay.text = blocksLeft_game;
};
};
if (doDelay){
delay = 16;
};
};
};
};
};
};
break;
default:
break;
};
}
private static function LevelSelectPreviousButton(_arg1:MouseEvent):void{
LevelSelect.levelscontainer.gotoAndStop((LevelSelect.levelscontainer.currentFrame - 1));
BuildWithPage();
}
private static function ClosePlayMenu(_arg1:MouseEvent):void{
PlayMenu.bt_close.removeEventListener(MouseEvent.CLICK, ClosePlayMenu);
root.GAME.HUD.removeChild(PlayMenu);
PlayMenuOpen = false;
trace("REALLY CLOSED (PLAY)");
}
public static function ComboDestroy(_arg1:b2Body, _arg2:b2Body):void{
if (!_arg1.m_userData.todie){
comboDestroyList.push(_arg1);
_arg1.m_userData.todie = true;
};
if (!_arg2.m_userData.todie){
comboDestroyList.push(_arg2);
_arg2.m_userData.todie = true;
};
}
private static function CheatsTabOkButton(_arg1:MouseEvent):void{
var _local2:Boolean;
_local2 = Cheats.DoCheat(CheatsTab.cheatbox.text);
if (_local2){
Speaker.Effect(new S_yescheat(), 0, 1);
RemoveCheatsTab();
} else {
Speaker.Effect(new S_nocheat(), 0, 1);
};
}
private static function MenuFunctions_play(_arg1:MouseEvent){
var _local2:G_menuplaylft;
if (!PlayMenuOpen){
_local2 = new G_menuplaylft();
_local2.x = 30;
_local2.y = 210;
PlayMenu = root.GAME.HUD.addChild(_local2);
PlayMenu.gotoAndPlay(2);
PlayMenu.bt_close.addEventListener(MouseEvent.CLICK, ClosePlayMenu);
PlayMenu.bt_leveleditor.addEventListener(MouseEvent.CLICK, LevelEditorPlayMenu);
PlayMenu.bt_levelselect.addEventListener(MouseEvent.CLICK, LevelSelectPlayMenu);
PlayMenu.bt_newgame.addEventListener(MouseEvent.CLICK, NewGamePlayMenu);
PlayMenu.bt_continue.addEventListener(MouseEvent.CLICK, ContinueGame);
PlayMenu.bt_submithighscores.addEventListener(MouseEvent.CLICK, SubmitHighscoresPlayMenu);
PlayMenu.bt_highscores.addEventListener(MouseEvent.CLICK, BuildAllHighscores);
PlayMenu.bt_myachievements.addEventListener(MouseEvent.CLICK, BuildAchievements);
PlayMenuOpen = true;
};
}
public static function encodeByteArray(_arg1:ByteArray):String{
var _local2:String;
var _local3:Array;
var _local4:Array;
var _local5:uint;
var _local6:uint;
var _local7:uint;
_local2 = "";
_local4 = new Array(4);
_arg1.position = 0;
while (_arg1.bytesAvailable > 0) {
_local3 = new Array();
_local5 = 0;
while ((((_local5 < 3)) && ((_arg1.bytesAvailable > 0)))) {
_local3[_local5] = _arg1.readUnsignedByte();
_local5++;
};
_local4[0] = ((_local3[0] & 252) >> 2);
_local4[1] = (((_local3[0] & 3) << 4) | (_local3[1] >> 4));
_local4[2] = (((_local3[1] & 15) << 2) | (_local3[2] >> 6));
_local4[3] = (_local3[2] & 63);
_local6 = _local3.length;
while (_local6 < 3) {
_local4[(_local6 + 1)] = 64;
_local6++;
};
_local7 = 0;
while (_local7 < _local4.length) {
_local2 = (_local2 + BASE64_CHARS.charAt(_local4[_local7]));
_local7++;
};
};
return (_local2);
}
private static function CheatsTabCloseButton(_arg1:MouseEvent):void{
RemoveCheatsTab();
}
private static function BuildMenuLevel():void{
var _local1:int;
var _local2:int;
var _local3:Object;
var _local4:Array;
var _local5:int;
var _local6:int;
var _local7:*;
SetTheSky();
Clear();
blocksLeft_menu = 0;
gameIdols = new Array();
gameBlocks = new Array();
gameOver = false;
gameWon = false;
_local1 = Math.ceil((Math.random() * 5));
groundBody.m_userData.luis.gotoAndStop(_local1);
root.GAME.Luisfloor.luis.gotoAndStop(_local1);
_local2 = Math.floor((Math.random() * ILevels.MenuLevels.length));
_local3 = ILevels.MenuLevels[_local2];
_local4 = new Array("Normal", "Black", "Sloppy", "Combo", "Explosive", "Glass");
_local5 = 0;
while (_local5 < _local3.blocks.length) {
_local7 = Factory.NewBlock(_local4[(_local3.blocks[_local5].phystype - 1)], (_local3.blocks[_local5].sizex / 30), (_local3.blocks[_local5].sizey / 30), _local3.blocks[_local5].xpos, _local3.blocks[_local5].ypos, _local3.blocks[_local5].rotation);
if (((!((_local4[(_local3.blocks[_local5].phystype - 1)] == "Black"))) && (!((_local4[(_local3.blocks[_local5].phystype - 1)] == "Combo"))))){
blocksLeft_menu++;
gameBlocks.push(_local7);
};
_local5++;
};
_local6 = 0;
while (_local6 < _local3.idols.length) {
gameIdols.push(Gear.MakeIdol(_local3.idols[_local6].itype, _local3.idols[_local6].x, _local3.idols[_local6].y, _local3.idols[_local6].rotation));
_local6++;
};
delay = 30;
}
public static function ToggleUpsideDown():void{
if (upsideDown){
root.GAME.x = 0;
root.GAME.y = 0;
root.GAME.rotation = 0;
root.GAME.CURSOR.x = 0;
root.GAME.CURSOR.y = 0;
root.GAME.CURSOR.rotation = 0;
upsideDown = false;
} else {
root.GAME.x = 690;
root.GAME.y = 480;
root.GAME.rotation = 180;
root.GAME.CURSOR.x = 690;
root.GAME.CURSOR.y = 480;
root.GAME.CURSOR.rotation = 180;
upsideDown = true;
};
}
public static function ThrowGameOver():void{
if (!gameOver){
Data.TotemData.data.Status.lost++;
Data.TotemData.flush();
Factory.GameOver();
gameOver = true;
};
}
public static function AddInfo():void{
var _local1:G_info;
_local1 = new G_info();
InfoMc = root.GAME.CURSOR.addChild(_local1);
InfoMc.twon.text = String(Data.TotemData.data.Status.won);
InfoMc.tlost.text = String(Data.TotemData.data.Status.lost);
InfoMc.aitwon.text = String(Data.TotemData.data.Status.aiwon);
InfoMc.aitlost.text = String(Data.TotemData.data.Status.ailost);
InfoMc.msize.text = ((Math.round(((Data.TotemData.size / 0x0400) * 100)) / 100) + "kb");
trace(Data.TotemData.size);
InfoOn = true;
}
private static function ControlGameEnding(_arg1:Event):void{
if ((((EndingMc.currentFrame > 7203)) && (!(EndingDone)))){
EndingDone = true;
ClearGameEnding();
} else {
if ((((EndingMc.currentFrame > 3750)) && ((EndingMc.currentFrame < 7000)))){
DoAchievement(0);
};
};
}
public static function ExplosiveDestroyHold(_arg1:b2Body):void{
leftToExplodeList.push(_arg1);
}
public static function BuildHsHs():void{
var _local1:G_highscores;
var _local2:URLRequest;
var _local3:URLVariables;
var _local4:URLLoader;
gameMode = "none";
Speaker.StartNewGameSong();
_local1 = new G_highscores();
HighscoresScreen = root.GAME.HUD.addChild(_local1);
HighscoresScreen.bt_close.addEventListener(MouseEvent.CLICK, CloseHighscoresBt);
root.GAME.BIRDZ.visible = false;
HighscoresScreen.mwdindic.gotoAndStop(1);
HighscoresScreen.hspick.gotoAndStop(1);
HighscoresScreen.ngotherhs1.addEventListener(MouseEvent.CLICK, DoMoreGames);
HighscoresScreen.bt_monthly.addEventListener(MouseEvent.CLICK, DoMonthly);
HighscoresScreen.bt_weekly.addEventListener(MouseEvent.CLICK, DoWeekly);
HighscoresScreen.bt_daily.addEventListener(MouseEvent.CLICK, DoDaily);
_local2 = new URLRequest("http://ungrounded.gabs.tv/geths8931.php");
_local2.method = URLRequestMethod.POST;
_local3 = new URLVariables();
_local3.indicator = "syko227_regulargabs";
_local2.data = _local3;
_local4 = new URLLoader();
_local4.dataFormat = URLLoaderDataFormat.TEXT;
_local4.addEventListener(Event.COMPLETE, highscoresOnLoad);
_local4.load(_local2);
}
public static function BuildMenu(){
var _local1:G_menulogo;
var _local2:*;
gameMode = "menu";
root.GAME.hud_bremaining.visible = false;
_local1 = new G_menulogo();
_local1.x = 346.1;
_local1.y = 86;
MenuLogo = root.GAME.HUD.addChild(_local1);
_local2 = new G_defmenu();
_local2.x = 30;
_local2.y = 330.6;
MenuMain = root.GAME.HUD.addChild(_local2);
MenuLogo.addEventListener(MouseEvent.CLICK, ClickLogo);
MenuMain.bt_play.addEventListener(MouseEvent.CLICK, MenuFunctions_play);
MenuMain.bt_settings.addEventListener(MouseEvent.CLICK, MenuFunctions_settings);
MenuMain.bt_credits.addEventListener(MouseEvent.CLICK, BuildCredits);
MenuMain.bt_moregames.addEventListener(MouseEvent.CLICK, DoMoreGames);
SetTheSky();
BuildMenuLevel();
Speaker.StartMenuSong();
root.GAME.BIRDZ.visible = true;
}
public static function Update(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:int;
var _local7:*;
var _local8:*;
var _local9:int;
var _local10:*;
var _local11:*;
var _local12:int;
var _local13:*;
var _local14:*;
if (((Key.isDown(77)) && (!(CheatsTabOn)))){
if (Data.TotemData.data.Settings.music){
if (gameMode == "playgame"){
Speaker.StopInGameSong();
} else {
if (gameMode == "menu"){
Speaker.StopMenuSong();
};
};
if (gameMode == "none"){
} else {
Data.TotemData.data.Settings.music = false;
};
} else {
if (gameMode == "none"){
} else {
Data.TotemData.data.Settings.music = true;
};
if (gameMode == "playgame"){
if (playMode == "story"){
Speaker.StartInGameSong(Data.TotemData.data.Levels.current);
trace("WOOHOO");
} else {
Speaker.StartInGameSong();
};
} else {
if (gameMode == "menu"){
Speaker.StartMenuSong();
};
};
};
Data.TotemData.flush();
Key.removeKey(77);
};
if ((((playAct == "hold")) && ((gameMode == "playgame")))){
} else {
totemWorld.Step(totemWorld_timeStep, totemWorld_iterations);
};
_local2 = totemWorld.;
while (_local2) {
_local4 = _local2;
_local2 = _local2.m_next;
if (_local4.m_userData != null){
if ((_local4.m_userData is Sprite)){
_local4.m_userData.x = (_local4.GetPosition().x * TotemMath.SCALE);
_local4.m_userData.y = (_local4.GetPosition().y * 30);
_local4.m_userData.rotation = (_local4.GetAngle() * (180 / Math.PI));
if (_local4.m_userData.phystype == 5){
if ((((playAct == "hold")) && ((gameMode == "playgame")))){
} else {
_local4.ApplyForce(new b2Vec2(0, (-7.5 * _local4.m_userData.bsize)), _local4.GetPosition());
};
};
if ((((((_local4.m_userData.x > ((690 + (_local4.m_userData.width / 2)) - 5))) || ((_local4.m_userData.x < ((0 - (_local4.m_userData.width / 2)) + 5))))) || ((_local4.m_userData.y > 500)))){
if (!_local4.m_userData.todie){
switch (gameMode){
case "menu":
if (((!((_local4.m_userData.phystype == 1))) && (!((_local4.m_userData.phystype == 1000))))){
trace(blocksLeft_menu);
} else {
if (_local4.m_userData.phystype == 1000){
gameOver = true;
trace("GAME OVER FOR THE STUPID AI");
};
};
break;
case "playgame":
if (((!((_local4.m_userData.phystype == 1))) && (!((_local4.m_userData.phystype == 1000))))){
trace(blocksLeft_game);
} else {
if (_local4.m_userData.phystype == 1000){
ThrowGameOver();
trace("GAME OVER: IDOL OFF BOUNDS");
};
};
break;
case "test":
if (((!((_local4.m_userData.phystype == 1))) && (!((_local4.m_userData.phystype == 1000))))){
} else {
if (_local4.m_userData.phystype == 1000){
trace("[TEST] GAME OVER: IDOL OFF BOUNDS");
};
};
break;
default:
break;
};
_local4.m_userData.todie = true;
comboDestroyList.push(_local4);
};
} else {
if ((((_local4.m_userData.y < ((0 - (_local4.m_userData.height / 2)) - 10))) && ((_local4.m_userData.phystype == 5)))){
if (!_local4.m_userData.todie){
_local4.m_userData.todie = true;
comboDestroyList.push(_local4);
};
};
};
};
};
};
while (comboDestroyList.length > 0) {
_local5 = comboDestroyList.shift();
if (_local5.m_userData.phystype == 3){
Factory.EffectComboBox(_local5.m_userData.x, _local5.m_userData.y, _local5.m_userData.bwidth, _local5.m_userData.bheight, _local5.m_userData.rotation);
Factory.EffectComboNotifier(_local5.m_userData.x, _local5.m_userData.y);
};
_local6 = _local5.m_userData.phystype;
root.GAME.GRAPHICS.removeChild(_local5.m_userData);
totemWorld.(_local5);
switch (gameMode){
case "menu":
blocksLeft_menu--;
break;
case "playgame":
if (_local6 != 1){
blocksLeft_game--;
};
if (blocksLeft_game >= 0){
root.GAME.hud_bremaining.lbdisplay.text = blocksLeft_game;
};
break;
default:
break;
};
};
_local3 = Math.random();
if ((((leftToExplodeList.length > 0)) && ((_local3 > 0.5)))){
_local7 = leftToExplodeList.shift();
Gear.ExplodingBlock(_local7);
};
switch (gameMode){
case "menu":
if (((((Key.isDown(67)) && (Key.isDown(16)))) && (!(CheatsTabOn)))){
AddCheatsTab();
};
if ((((((blocksLeft_menu <= 0)) && (!(gameOver)))) && ((delay < -90)))){
if (root.GAME.GRAPHICS.alpha > 0){
root.GAME.GRAPHICS.alpha = (root.GAME.GRAPHICS.alpha - 0.1);
} else {
Data.TotemData.data.Status.aiwon = (Data.TotemData.data.Status.aiwon + 1);
Data.TotemData.flush();
BuildMenuLevel();
};
} else {
if (gameOver){
if (root.GAME.GRAPHICS.alpha > 0){
root.GAME.GRAPHICS.alpha = (root.GAME.GRAPHICS.alpha - 0.01);
} else {
Data.TotemData.data.Status.ailost = (Data.TotemData.data.Status.ailost + 1);
Data.TotemData.flush();
BuildMenuLevel();
};
} else {
if (root.GAME.GRAPHICS.alpha < 0.9){
root.GAME.GRAPHICS.alpha = (root.GAME.GRAPHICS.alpha + 0.1);
};
};
};
if ((((((delay <= 0)) && (!(gameOver)))) && ((blocksLeft_menu > 0)))){
_local8 = true;
_local9 = Math.floor((Math.random() * gameBlocks.length));
while (gameBlocks[_local9].m_userData.x == undefined) {
_local10 = gameBlocks.splice(_local9, 1);
_local9 = Math.floor((Math.random() * gameBlocks.length));
};
trace(gameBlocks[_local9].m_userData.x);
if (gameBlocks[_local9].m_userData.todie){
_local8 = false;
trace("MARTIN LAWRENCE TO DIE NOT");
_local11 = gameBlocks.splice(_local9, 1);
};
if (_local8){
if (gameBlocks[_local9].m_userData.phystype == 4){
_local12 = 0;
while (_local12 < leftToExplodeList.length) {
if (leftToExplodeList[_local12].m_userData.x == gameBlocks[_local9].m_userData.x){
_local8 = false;
trace("I GOT ONE");
};
_local12++;
};
if (_local8){
Debug.Dump("PHYS: Removing an explosion block");
Gear.ExplodingBlock(gameBlocks[_local9]);
_local13 = gameBlocks.splice(_local9, 1);
};
} else {
Factory.EffectNormal1(gameBlocks[_local9].m_userData.x, gameBlocks[_local9].m_userData.y);
root.GAME.GRAPHICS.removeChild(gameBlocks[_local9].m_userData);
totemWorld.(gameBlocks[_local9]);
_local14 = gameBlocks.splice(_local9, 1);
blocksLeft_menu--;
};
delay = AiDelay;
};
} else {
if (!gameOver){
delay--;
};
};
break;
case "playgame":
if (doDelay){
if (delay > 0){
Cursor.gotoAndStop(2);
} else {
Cursor.gotoAndStop(1);
};
delay--;
};
if ((((blocksLeft_game <= 0)) && (!(gameWon)))){
ThrowGameWon();
} else {
if (((((!(gameWon)) && (!(gameOver)))) && ((playAct == "running")))){
playTime++;
root.GAME.hud_bremaining.leveltime.text = Math.floor((playTime / 40));
if (Key.isDown(82)){
PlayGame(LastLevel, LastType);
Key.removeKey(82);
};
if (Key.isDown(81)){
Factory.ChangeScreen();
Clear();
gameMode = "none";
gameOver = false;
gameWon = false;
root.GAME.hud_bremaining.visible = false;
Speaker.StopInGameSong();
BuildMenu();
stage.quality = "HIGH";
Key.removeKey(81);
};
};
};
break;
default:
if (doDelay){
if (delay > 0){
Cursor.gotoAndStop(2);
} else {
Cursor.gotoAndStop(1);
};
delay--;
};
break;
};
}
private static function BuildWithPage():void{
var _local1:int;
var _local2:int;
var _local3:Array;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:Object;
var _local8:int;
var _local9:Object;
var _local10:int;
var _local11:Object;
var _local12:int;
var _local13:Object;
if (LevelSelect.levelscontainer.currentFrame < 6){
_local1 = ((LevelSelect.levelscontainer.currentFrame - 1) * 10);
_local2 = Data.TotemData.data.Levels.maxed;
_local3 = [LevelSelect.levelscontainer.l0, LevelSelect.levelscontainer.l1, LevelSelect.levelscontainer.l2, LevelSelect.levelscontainer.l3, LevelSelect.levelscontainer.l4, LevelSelect.levelscontainer.l5, LevelSelect.levelscontainer.l6, LevelSelect.levelscontainer.l7, LevelSelect.levelscontainer.l8, LevelSelect.levelscontainer.l9];
_local4 = 1;
while (_local4 < 11) {
_local5 = (_local4 - 1);
_local3[_local5].lvlname.txtvar.text = ("Level " + (_local1 + _local4));
if (_local2 >= (_local5 + _local1)){
_local3[_local5].beated.gotoAndStop(((_local1 + _local4) + 1));
} else {
_local3[_local5].beated.gotoAndStop(1);
};
if (Data.TotemData.data.Levels.records[(_local5 + _local1)] >= 0){
_local3[_local5].lvlseconds.txtvar.text = (Math.floor((Data.TotemData.data.Levels.records[(_local5 + _local1)] / 40)) + "s");
} else {
_local3[_local5].lvlseconds.txtvar.text = "none";
};
if (Data.TotemData.data.Levels.recordshighscores[(_local5 + _local1)] >= 0){
_local3[_local5].lvlsecondshighscores.txtvar.text = (Math.floor((Data.TotemData.data.Levels.recordshighscores[(_local5 + _local1)] / 40)) + "s");
} else {
_local3[_local5].lvlsecondshighscores.txtvar.text = "none";
};
_local4++;
};
LevelSelect.levelscontainer.ls_levels.x = -15;
LevelSelect.levelscontainer.ls_levels.y = -480;
LevelSelect.dotIndicator.gotoAndStop(1);
} else {
if (LevelSelect.levelscontainer.currentFrame == 6){
LevelSelect.levelscontainer.ls_levels.removeAll();
_local6 = 0;
while (_local6 < ILevels.SponsorLevels.length) {
_local7 = new Object();
_local7.label = ILevels.SponsorLevels[_local6].name;
_local7.data = _local6;
_local7.levelObj = ILevels.SponsorLevels[_local6];
_local7.playType = "sponsor";
LevelSelect.levelscontainer.ls_levels.addItem(_local7);
trace("LEVEL ADDED");
_local6++;
};
LevelSelect.levelscontainer.ls_levels.x = 0;
LevelSelect.levelscontainer.ls_levels.y = 60;
LevelSelect.dotIndicator.gotoAndStop(2);
} else {
if (LevelSelect.levelscontainer.currentFrame == 7){
LevelSelect.levelscontainer.ls_levels.removeAll();
_local8 = 0;
while (_local8 < ILevels.UnlockedLevels.length) {
_local9 = new Object();
_local9.label = ILevels.UnlockedLevels[_local8].name;
_local9.data = _local8;
_local9.levelObj = ILevels.UnlockedLevels[_local8];
_local9.playType = "unlocked";
if (Data.TotemData.data.UnlockedLevels.unlocked[_local8]){
LevelSelect.levelscontainer.ls_levels.addItem(_local9);
trace("LEVEL ADDED");
};
_local8++;
};
LevelSelect.levelscontainer.ls_levels.x = 0;
LevelSelect.levelscontainer.ls_levels.y = 60;
LevelSelect.dotIndicator.gotoAndStop(3);
} else {
if (LevelSelect.levelscontainer.currentFrame == 8){
LevelSelect.levelscontainer.ls_levels.removeAll();
_local10 = 0;
while (_local10 < ILevels.ClassicLevels.length) {
_local11 = new Object();
_local11.label = ILevels.ClassicLevels[_local10].name;
_local11.data = _local10;
_local11.levelObj = ILevels.ClassicLevels[_local10];
_local11.playType = "classic";
LevelSelect.levelscontainer.ls_levels.addItem(_local11);
trace("LEVEL ADDED");
_local10++;
};
LevelSelect.levelscontainer.ls_levels.x = 0;
LevelSelect.levelscontainer.ls_levels.y = 60;
LevelSelect.dotIndicator.gotoAndStop(4);
} else {
if (LevelSelect.levelscontainer.currentFrame == 9){
LevelSelect.levelscontainer.ls_levels.removeAll();
_local12 = 0;
while (_local12 < Data.TotemData.data.Editor.levels.length) {
_local13 = new Object();
_local13.label = Data.TotemData.data.Editor.levels[_local12].name;
_local13.data = Data.TotemData.data.Editor.levels[_local12].id;
_local13.levelObj = Data.TotemData.data.Editor.levels[_local12];
_local13.playType = "custom";
LevelSelect.levelscontainer.ls_levels.addItem(_local13);
trace("CUSTOM LEVEL ADDED");
_local12++;
};
LevelSelect.levelscontainer.ls_levels.x = 0;
LevelSelect.levelscontainer.ls_levels.y = 60;
LevelSelect.dotIndicator.gotoAndStop(5);
};
};
};
};
};
}
private static function SettingsQualityMed(_arg1:MouseEvent):void{
Data.TotemData.data.Settings.graphics = 1;
Data.TotemData.flush();
SettingsMenu.txtinside.graphicsindicator.gotoAndStop(2);
}
private static function DoMonthly(_arg1:MouseEvent){
HighscoresScreen.mwdindic.gotoAndStop(1);
HighscoresScreen.hspick.gotoAndStop(1);
ReplaceHsList(1);
}
private static function GetAllHs():int{
var _local1:int;
var _local2:int;
_local1 = 0;
_local2 = 0;
while (_local2 < Data.TotemData.data.Levels.recordshighscores.length) {
_local1 = (_local1 + Data.TotemData.data.Levels.recordshighscores[_local2]);
_local2++;
};
return (_local1);
}
public static function BuildSubmitHighscores():void{
var _local1:G_submithighscores;
var _local2:Boolean;
var _local3:String;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:int;
_local1 = new G_submithighscores();
SubmitHighscoresMc = root.GAME.GRAPHICS.addChild(_local1);
SubmitHighscoresMc.levelstatus.text = "";
SubmitHighscoresMc.allstatus.text = "";
trace("SHOULD BE ON SUBMIT HS");
Speaker.StartNewGameSong();
_local2 = true;
_local3 = root.loaderInfo.url;
trace(_local3);
_local4 = (_local3.indexOf("://") + 3);
_local5 = _local3.indexOf("/", _local4);
_local6 = _local3.substring(_local4, _local5);
_local7 = (_local6.lastIndexOf(".") - 1);
_local8 = (_local6.lastIndexOf(".", _local7) + 1);
_local6 = _local6.substring(_local8, _local6.length);
if (((((((((((((((((!((_local6 == ""))) && (!((_local6 == "newgrounds.com"))))) && (!((_local6 == "www.newgrounds.com"))))) && (!((_local6 == "gabs.tv"))))) && (!((_local6 == "www.gabs.tv"))))) && (!((_local6 == "uploads.ungrounded.net"))))) && (!((_local6 == "ungrounded.net"))))) && (!((_local6 == "brainwashstudios.com"))))) && (!((_local6 == "luiscastanon.com"))))){
_local2 = false;
};
_local9 = 0;
while (_local9 < Data.TotemData.data.Levels.recordshighscores.length) {
if (Data.TotemData.data.Levels.recordshighscores[_local9] < 0){
SubmitHighscoresMc.levelstatus.appendText((("Level " + (_local9 + 1)) + " NOT OK, no highscore data;\n"));
} else {
SubmitHighscoresMc.levelstatus.appendText((((("Level " + (_local9 + 1)) + " OK, record: ") + Math.floor((Data.TotemData.data.Levels.recordshighscores[_local9] / 40))) + " seconds;\n"));
};
_local9++;
};
if (!CheckHsOk()){
SubmitHighscoresMc.gotoAndStop(2);
if (!_local2){
SubmitHighscoresMc.allstatus.text = "Play this game on NEWGROUNDS.COM to have the highscores option!";
} else {
SubmitHighscoresMc.allstatus.text = "Please beat all the levels that have no highscore data. Once you submit the highscores, all level highscore data (orange timer icon) is cleared.";
};
} else {
if (!_local2){
SubmitHighscoresMc.allstatus.text = "Play this game on NEWGROUNDS.COM to have the highscores option!";
} else {
SubmitHighscoresMc.allstatus.text = (("Highscore: " + Math.floor((GetAllHs() / 40))) + "seconds. Once you submit the highscores, the level highscore data (orange timer icon) is cleared.");
};
};
SubmitHighscoresMc.bt_back.addEventListener(MouseEvent.CLICK, SubmitHighscoresBackButton);
SubmitHighscoresMc.bt_submit.addEventListener(MouseEvent.CLICK, SubmitHsButton);
SubmitHighscoresMc.ngBt1.addEventListener(MouseEvent.CLICK, DoMoreGames);
}
private static function LevelSelectClassicLevels(_arg1:MouseEvent):void{
LevelSelect.levelscontainer.gotoAndStop(8);
BuildWithPage();
}
private static function SettingsQualityHigh(_arg1:MouseEvent):void{
Data.TotemData.data.Settings.graphics = 2;
Data.TotemData.flush();
SettingsMenu.txtinside.graphicsindicator.gotoAndStop(3);
}
private static function DoWeekly(_arg1:MouseEvent){
HighscoresScreen.mwdindic.gotoAndStop(2);
HighscoresScreen.hspick.gotoAndStop(2);
ReplaceHsList(2);
}
public static function BuildAllHighscores(_arg1:MouseEvent):void{
Factory.ChangeScreen();
KillMenu();
BuildHsHs();
}
private static function OtherLevelPlayButton(_arg1:MouseEvent):void{
if (LevelSelect.levelscontainer.ls_levels.length > 0){
if (LevelSelect.levelscontainer.ls_levels.selectedItem != null){
Factory.ChangeScreen();
KillLevelSelect();
Clear();
otherLeveli = LevelSelect.levelscontainer.ls_levels.selectedItem.data;
PlayGame(LevelSelect.levelscontainer.ls_levels.selectedItem.levelObj, LevelSelect.levelscontainer.ls_levels.selectedItem.playType);
stage.focus = null;
};
};
}
private static function SettingsMusicOn(_arg1:MouseEvent):void{
if (!Data.TotemData.data.Settings.music){
Data.TotemData.data.Settings.music = true;
Speaker.StartMenuSong();
Data.TotemData.flush();
};
SettingsMenu.txtinside.musicindicator.gotoAndStop(1);
}
private static function walkthroughButton(_arg1:MouseEvent):void{
NewgroundsAPI.loadCustomLink("TD2 WAlkthrough");
}
public static function Init(_arg1, _arg2:Stage):void{
var _local3:b2AABB;
var _local4:*;
var _local5:Sound;
var _local6:b2Body;
root = _arg1;
stage = _arg2;
root.GAME.TOP.mouseChildren = false;
root.GAME.TOP.mouseEnabled = false;
root.GAME.CURSOR.mouseChildren = false;
root.GAME.CURSOR.mouseEnabled = false;
root.GAME.hud_bremaining.walkthrough.addEventListener(MouseEvent.CLICK, walkthroughButton);
root.GAME.hud_bremaining.walkthrough.visible = false;
Debug.Dump("Building TD2GEAR");
_local3 = new b2AABB();
_local3.lowerBound.Set(-120, -370);
_local3.upperBound.Set(120, 120);
Debug.Dump("TD2GEAR: Creating simulation world");
totemWorld = new b2World(_local3, gravity, bodiesSleep);
_local4 = new ContactManager();
totemWorld. (_local4);
bodyDef = new b2BodyDef();
bodyDef.position.Set(TotemMath.Scale(345), TotemMath.Scale(465));
boxDef = new b2PolygonDef();
boxDef.(TotemMath.Scale2(890), TotemMath.Scale2(30));
boxDef.friction = 0.35;
boxDef.
= 0;
bodyDef.userData = new G_floor();
bodyDef.userData.phystype = 300;
bodyDef.userData.todie = false;
bodyDef.userData.isGround = true;
_local5 = new S_mute();
bodyDef.userData.slidingChannel = _local5.play(0, 0);
bodyDef.userData.slidingHard = false;
root.GAME.GRAPHICS.addChild(bodyDef.userData);
groundBody = totemWorld.(bodyDef);
groundBody.(boxDef);
groundBody. ();
totemWorld.Step(totemWorld_timeStep, totemWorld_iterations);
_local6 = totemWorld.;
while (_local6) {
if ((_local6.m_userData is Sprite)){
_local6.m_userData.x = (_local6.GetPosition().x * TotemMath.SCALE);
_local6.m_userData.y = (_local6.GetPosition().y * 30);
_local6.m_userData.rotation = (_local6.GetAngle() * (180 / Math.PI));
};
_local6 = _local6.m_next;
};
stage.addEventListener(Event.ENTER_FRAME, Update);
stage.addEventListener(MouseEvent.CLICK, CheckMouse);
stage.addEventListener(MouseEvent.MOUSE_MOVE, MouseMove);
isOn = true;
root.GAME.EFFECTS.mouseChildren = false;
}
public static function RemoveCheatsTab():void{
CheatsTab.bt_close.removeEventListener(MouseEvent.CLICK, CheatsTabCloseButton);
CheatsTab.bt_ok.removeEventListener(MouseEvent.CLICK, CheatsTabOkButton);
root.GAME.CHEATSOR.removeChild(CheatsTab);
stage.focus = null;
CheatsTabOn = false;
}
private static function ClickLogo(_arg1:MouseEvent):void{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
_local2 = Math.ceil((Math.random() * 7));
_local3 = Math.ceil((Math.random() * 2));
_local4 = Math.ceil((Math.random() * 360));
_local5 = (45 + (Math.random() * 600));
body = Factory.NewBlock("Explosive", _local2, _local3, _local5, 30, _local4);
gameBlocks.push(body);
blocksLeft_menu++;
DoAchievement(2);
}
public static function KillLevelSelect():void{
root.GAME.GRAPHICS.removeChild(LevelSelect);
Speaker.StopNewGameSong();
}
public static function RemoveTopInvert():void{
root.GAME.TOP.removeChild(TopInvertMc);
topInverted = false;
}
private static function CheckHsOk():Boolean{
var _local1:Boolean;
var _local2:int;
_local1 = true;
_local2 = 0;
while (_local2 < Data.TotemData.data.Levels.recordshighscores.length) {
if (Data.TotemData.data.Levels.recordshighscores[_local2] < 0){
_local1 = false;
break;
};
_local2++;
};
return (_local1);
}
public static function ContinueGame(_arg1:MouseEvent):void{
if (Data.TotemData.data.Levels.current > 0){
Factory.ChangeScreen();
KillMenu();
PlayGame(ILevels.MemoryLevels[Data.TotemData.data.Levels.current], "story");
};
}
private static function DancingMenuLogo():void{
var _local1:ByteArray;
var _local2:ByteArray;
var _local3:int;
var _local4:int;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:int;
_local1 = new ByteArray();
_local2 = new ByteArray();
_local3 = 200;
_local4 = 0x0100;
SoundMixer.computeSpectrum(_local1, false, 0);
SoundMixer.computeSpectrum(_local2, true, 0);
_local5 = 0;
_local6 = 0;
_local7 = 0;
_local8 = 0;
_local9 = 0;
while (_local9 < _local4) {
_local8 = (_local1.readFloat() * _local3);
_local6 = _local2.readFloat();
if (_local9 < 32){
_local5 = (_local5 + _local6);
};
if (_local9 > 150){
_local7 = (_local7 + _local6);
};
_local9++;
};
_local5 = (_local5 * 0.6);
root.GAME.BG3.GG1.y = (0 + _local5);
root.GAME.BG3.GG2.y = (0 + _local7);
}
private static function NewGameBT(_arg1:MouseEvent):void{
if (NewGameScreen.currentFrame == 1){
NewGameScreen.gotoAndStop(2);
} else {
KillNewGame();
};
}
public static function MakeIdol(_arg1:int, _arg2:Number, _arg3:Number, _arg4:Number=0):b2Body{
var _local5:b2XForm;
var _local6:b2PolygonDef;
var _local7:Sound;
var _local8:b2XForm;
var _local9:b2PolygonDef;
var _local10:b2XForm;
var _local11:b2PolygonDef;
var _local12:Sound;
var _local13:b2CircleDef;
var _local14:b2PolygonDef;
var _local15:b2PolygonDef;
var _local16:b2PolygonDef;
var _local17:Sound;
var _local18:b2XForm;
var _local19:b2PolygonDef;
var _local20:b2XForm;
var _local21:b2PolygonDef;
var _local22:b2XForm;
var _local23:b2PolygonDef;
var _local24:b2XForm;
var _local25:b2PolygonDef;
var _local26:b2XForm;
var _local27:b2PolygonDef;
var _local28:b2XForm;
var _local29:b2PolygonDef;
var _local30:b2XForm;
var _local31:b2PolygonDef;
var _local32:Sound;
var _local33:b2XForm;
var _local34:b2PolygonDef;
var _local35:b2XForm;
var _local36:b2PolygonDef;
var _local37:b2XForm;
var _local38:b2PolygonDef;
var _local39:b2XForm;
var _local40:b2PolygonDef;
var _local41:Sound;
var _local42:b2XForm;
var _local43:b2PolygonDef;
var _local44:b2XForm;
var _local45:b2PolygonDef;
var _local46:b2XForm;
var _local47:b2PolygonDef;
var _local48:b2XForm;
var _local49:b2PolygonDef;
var _local50:b2XForm;
var _local51:b2PolygonDef;
var _local52:b2XForm;
var _local53:b2PolygonDef;
var _local54:Sound;
var _local55:b2XForm;
var _local56:b2PolygonDef;
var _local57:b2XForm;
var _local58:b2PolygonDef;
var _local59:b2XForm;
var _local60:b2PolygonDef;
var _local61:b2XForm;
var _local62:b2PolygonDef;
var _local63:Sound;
var _local64:b2XForm;
var _local65:b2PolygonDef;
var _local66:Sound;
var _local67:b2XForm;
var _local68:b2PolygonDef;
var _local69:b2XForm;
var _local70:b2PolygonDef;
var _local71:b2XForm;
var _local72:b2PolygonDef;
var _local73:b2XForm;
var _local74:b2PolygonDef;
var _local75:b2XForm;
var _local76:b2PolygonDef;
var _local77:b2XForm;
var _local78:b2PolygonDef;
var _local79:b2XForm;
var _local80:b2PolygonDef;
var _local81:b2XForm;
var _local82:b2PolygonDef;
var _local83:b2XForm;
var _local84:b2PolygonDef;
var _local85:b2XForm;
var _local86:b2PolygonDef;
var _local87:b2XForm;
var _local88:b2PolygonDef;
var _local89:Sound;
var _local90:b2XForm;
var _local91:b2PolygonDef;
var _local92:b2XForm;
var _local93:b2PolygonDef;
var _local94:b2XForm;
var _local95:b2PolygonDef;
var _local96:Sound;
var _local97:b2CircleDef;
var _local98:b2CircleDef;
var _local99:b2CircleDef;
var _local100:b2CircleDef;
var _local101:b2CircleDef;
var _local102:b2CircleDef;
var _local103:b2CircleDef;
var _local104:b2CircleDef;
var _local105:b2CircleDef;
var _local106:Sound;
bodyDef = new b2BodyDef();
bodyDef.position.Set(TotemMath.Scale(_arg2), TotemMath.Scale(_arg3));
bodyDef.userData = new MovieClip();
switch (_arg1){
case 0:
_local5 = new b2XForm();
_local6 = new b2PolygonDef();
_local6. = 3;
_local6.[0] = b2Math.b2MulX(_local5, new b2Vec2(TotemMath.Scale(-24), TotemMath.Scale(19)));
_local6.[1] = b2Math.b2MulX(_local5, new b2Vec2(TotemMath.Scale(0), TotemMath.Scale(-20)));
_local6.[2] = b2Math.b2MulX(_local5, new b2Vec2(TotemMath.Scale(24), TotemMath.Scale(19)));
_local6.
= 1;
bodyDef.userData = new G_idol2();
bodyDef.userData.phystype = 1000;
bodyDef.userData.todie = false;
_local7 = new S_mute();
bodyDef.userData.slidingChannel = _local7.play(0, 0);
bodyDef.userData.slidingHard = false;
root.GAME.GRAPHICS.addChild(bodyDef.userData);
Idol = totemWorld.(bodyDef);
Idol.(_local6);
Idol. ();
break;
case 1:
_local8 = new b2XForm();
_local9 = new b2PolygonDef();
_local9. = 8;
_local9.[0] = b2Math.b2MulX(_local8, new b2Vec2(TotemMath.Scale(-17), TotemMath.Scale(-19.5)));
_local9.[1] = b2Math.b2MulX(_local8, new b2Vec2(TotemMath.Scale(-4), TotemMath.Scale(-21.6)));
_local9.[2] = b2Math.b2MulX(_local8, new b2Vec2(TotemMath.Scale(4), TotemMath.Scale(-21.6)));
_local9.[3] = b2Math.b2MulX(_local8, new b2Vec2(TotemMath.Scale(17), TotemMath.Scale(-19.5)));
_local9.[4] = b2Math.b2MulX(_local8, new b2Vec2(TotemMath.Scale(17), TotemMath.Scale(3)));
_local9.[5] = b2Math.b2MulX(_local8, new b2Vec2(TotemMath.Scale(9.5), TotemMath.Scale(4.5)));
_local9.[6] = b2Math.b2MulX(_local8, new b2Vec2(TotemMath.Scale(-9.5), TotemMath.Scale(4.5)));
_local9.[7] = b2Math.b2MulX(_local8, new b2Vec2(TotemMath.Scale(-17), TotemMath.Scale(3)));
_local9.
= 1;
_local10 = new b2XForm();
_local11 = new b2PolygonDef();
_local11. = 4;
_local11.[0] = b2Math.b2MulX(_local10, new b2Vec2(TotemMath.Scale(-9), TotemMath.Scale(6)));
_local11.[1] = b2Math.b2MulX(_local10, new b2Vec2(TotemMath.Scale(9), TotemMath.Scale(6)));
_local11.[2] = b2Math.b2MulX(_local10, new b2Vec2(TotemMath.Scale(8), TotemMath.Scale(21)));
_local11.[3] = b2Math.b2MulX(_local10, new b2Vec2(TotemMath.Scale(-8), TotemMath.Scale(21)));
_local11.
= 1;
bodyDef.userData = new G_idol1();
bodyDef.userData.phystype = 1000;
bodyDef.userData.todie = false;
_local12 = new S_mute();
bodyDef.userData.slidingChannel = _local12.play(0, 0);
bodyDef.userData.slidingHard = false;
root.GAME.GRAPHICS.addChild(bodyDef.userData);
Idol = totemWorld.(bodyDef);
Idol.(_local9);
Idol.(_local11);
Idol. ();
break;
case 2:
_local13 = new b2CircleDef();
_local13. = TotemMath.Scale((47.3 / 2));
_local13.
= 1;
_local14 = new b2PolygonDef();
_local14.(TotemMath.Scale2(4.7), TotemMath.Scale2(10.4), new b2Vec2(TotemMath.Scale(-15.3), TotemMath.Scale(17.1)));
_local15 = new b2PolygonDef();
_local15.(TotemMath.Scale2(20), TotemMath.Scale2(11.3), new b2Vec2(TotemMath.Scale(0), TotemMath.Scale(20.1)));
_local16 = new b2PolygonDef();
_local16.(TotemMath.Scale2(4.7), TotemMath.Scale2(10.4), new b2Vec2(TotemMath.Scale(15.3), TotemMath.Scale(17.1)));
bodyDef.userData = new G_idol3();
bodyDef.userData.phystype = 1000;
bodyDef.userData.todie = false;
_local17 = new S_mute();
bodyDef.userData.slidingChannel = _local17.play(0, 0);
bodyDef.userData.slidingHard = false;
root.GAME.GRAPHICS.addChild(bodyDef.userData);
Idol = totemWorld.(bodyDef);
Idol.(_local13);
Idol.(_local14);
Idol.(_local15);
Idol.(_local16);
Idol. ();
break;
case 3:
_local18 = new b2XForm();
_local19 = new b2PolygonDef();
_local19. = 3;
_local19.[0] = b2Math.b2MulX(_local18, new b2Vec2(TotemMath.Scale(-10.5), TotemMath.Scale(-16.1)));
_local19.[1] = b2Math.b2MulX(_local18, new b2Vec2(TotemMath.Scale(-8.7), TotemMath.Scale(-22.4)));
_local19.[2] = b2Math.b2MulX(_local18, new b2Vec2(TotemMath.Scale(-5.3), TotemMath.Scale(-15.7)));
_local19.
= 1;
_local20 = new b2XForm();
_local21 = new b2PolygonDef();
_local21. = 3;
_local21.[0] = b2Math.b2MulX(_local20, new b2Vec2(TotemMath.Scale(5.5), TotemMath.Scale(-15.8)));
_local21.[1] = b2Math.b2MulX(_local20, new b2Vec2(TotemMath.Scale(7.1), TotemMath.Scale(-22.6)));
_local21.[2] = b2Math.b2MulX(_local20, new b2Vec2(TotemMath.Scale(9.6), TotemMath.Scale(-16.1)));
_local21.
= 1;
_local22 = new b2XForm();
_local23 = new b2PolygonDef();
_local23. = 6;
_local23.[0] = b2Math.b2MulX(_local22, new b2Vec2(TotemMath.Scale(-19.1), TotemMath.Scale(0.6)));
_local23.[1] = b2Math.b2MulX(_local22, new b2Vec2(TotemMath.Scale(-16.4), TotemMath.Scale(-11.9)));
_local23.[2] = b2Math.b2MulX(_local22, new b2Vec2(TotemMath.Scale(-10.5), TotemMath.Scale(-16.1)));
_local23.[3] = b2Math.b2MulX(_local22, new b2Vec2(TotemMath.Scale(-0.2), TotemMath.Scale(-15.3)));
_local23.[4] = b2Math.b2MulX(_local22, new b2Vec2(TotemMath.Scale(0), TotemMath.Scale(5)));
_local23.[5] = b2Math.b2MulX(_local22, new b2Vec2(TotemMath.Scale(-15.9), TotemMath.Scale(5.1)));
_local23.
= 1;
_local24 = new b2XForm();
_local25 = new b2PolygonDef();
_local25. = 6;
_local25.[0] = b2Math.b2MulX(_local24, new b2Vec2(TotemMath.Scale(-0.2), TotemMath.Scale(-15.3)));
_local25.[1] = b2Math.b2MulX(_local24, new b2Vec2(TotemMath.Scale(9.6), TotemMath.Scale(-16.1)));
_local25.[2] = b2Math.b2MulX(_local24, new b2Vec2(TotemMath.Scale(17.8), TotemMath.Scale(-12.2)));
_local25.[3] = b2Math.b2MulX(_local24, new b2Vec2(TotemMath.Scale(20.9), TotemMath.Scale(1.1)));
_local25.[4] = b2Math.b2MulX(_local24, new b2Vec2(TotemMath.Scale(17.4), TotemMath.Scale(6.1)));
_local25.[5] = b2Math.b2MulX(_local24, new b2Vec2(TotemMath.Scale(0), TotemMath.Scale(5)));
_local25.
= 1;
_local26 = new b2XForm();
_local27 = new b2PolygonDef();
_local27. = 5;
_local27.[0] = b2Math.b2MulX(_local26, new b2Vec2(TotemMath.Scale(-17.6), TotemMath.Scale(13.4)));
_local27.[1] = b2Math.b2MulX(_local26, new b2Vec2(TotemMath.Scale(-15.9), TotemMath.Scale(5.1)));
_local27.[2] = b2Math.b2MulX(_local26, new b2Vec2(TotemMath.Scale(0), TotemMath.Scale(5)));
_local27.[3] = b2Math.b2MulX(_local26, new b2Vec2(TotemMath.Scale(17.4), TotemMath.Scale(6.1)));
_local27.[4] = b2Math.b2MulX(_local26, new b2Vec2(TotemMath.Scale(19), TotemMath.Scale(13.4)));
_local27.
= 1;
_local28 = new b2XForm();
_local29 = new b2PolygonDef();
_local29. = 5;
_local29.[0] = b2Math.b2MulX(_local28, new b2Vec2(TotemMath.Scale(-16.4), TotemMath.Scale(22.6)));
_local29.[1] = b2Math.b2MulX(_local28, new b2Vec2(TotemMath.Scale(-14.9), TotemMath.Scale(12.3)));
_local29.[2] = b2Math.b2MulX(_local28, new b2Vec2(TotemMath.Scale(1.1), TotemMath.Scale(11.3)));
_local29.[3] = b2Math.b2MulX(_local28, new b2Vec2(TotemMath.Scale(1.1), TotemMath.Scale(18.6)));
_local29.[4] = b2Math.b2MulX(_local28, new b2Vec2(TotemMath.Scale(-9), TotemMath.Scale(22.6)));
_local29.
= 1;
_local30 = new b2XForm();
_local31 = new b2PolygonDef();
_local31. = 5;
_local31.[0] = b2Math.b2MulX(_local30, new b2Vec2(TotemMath.Scale(1.1), TotemMath.Scale(11.3)));
_local31.[1] = b2Math.b2MulX(_local30, new b2Vec2(TotemMath.Scale(16.3), TotemMath.Scale(11.1)));
_local31.[2] = b2Math.b2MulX(_local30, new b2Vec2(TotemMath.Scale(18.1), TotemMath.Scale(22.6)));
_local31.[3] = b2Math.b2MulX(_local30, new b2Vec2(TotemMath.Scale(10.9), TotemMath.Scale(22.6)));
_local31.[4] = b2Math.b2MulX(_local30, new b2Vec2(TotemMath.Scale(1.1), TotemMath.Scale(18.6)));
_local31.
= 1;
bodyDef.userData = new G_idol4();
bodyDef.userData.phystype = 1000;
bodyDef.userData.todie = false;
_local32 = new S_mute();
bodyDef.userData.slidingChannel = _local32.play(0, 0);
bodyDef.userData.slidingHard = false;
root.GAME.GRAPHICS.addChild(bodyDef.userData);
Idol = totemWorld.(bodyDef);
Idol.(_local19);
Idol.(_local21);
Idol.(_local23);
Idol.(_local25);
Idol.(_local27);
Idol.(_local29);
Idol.(_local31);
Idol. ();
break;
case 4:
_local33 = new b2XForm();
_local34 = new b2PolygonDef();
_local34. = 6;
_local34.[0] = b2Math.b2MulX(_local33, new b2Vec2(TotemMath.Scale(-15.6), TotemMath.Scale(-9.5)));
_local34.[1] = b2Math.b2MulX(_local33, new b2Vec2(TotemMath.Scale(-10.1), TotemMath.Scale(-22.6)));
_local34.[2] = b2Math.b2MulX(_local33, new b2Vec2(TotemMath.Scale(0), TotemMath.Scale(-25.6)));
_local34.[3] = b2Math.b2MulX(_local33, new b2Vec2(TotemMath.Scale(7.4), TotemMath.Scale(-22.5)));
_local34.[4] = b2Math.b2MulX(_local33, new b2Vec2(TotemMath.Scale(11.9), TotemMath.Scale(-17.1)));
_local34.[5] = b2Math.b2MulX(_local33, new b2Vec2(TotemMath.Scale(14.6), TotemMath.Scale(-10.2)));
_local34.
= 1;
_local35 = new b2XForm();
_local36 = new b2PolygonDef();
_local36. = 4;
_local36.[0] = b2Math.b2MulX(_local35, new b2Vec2(TotemMath.Scale(-15.6), TotemMath.Scale(-9.5)));
_local36.[1] = b2Math.b2MulX(_local35, new b2Vec2(TotemMath.Scale(14.6), TotemMath.Scale(-10.2)));
_local36.[2] = b2Math.b2MulX(_local35, new b2Vec2(TotemMath.Scale(14), TotemMath.Scale(1.3)));
_local36.[3] = b2Math.b2MulX(_local35, new b2Vec2(TotemMath.Scale(-15), TotemMath.Scale(1.3)));
_local36.
= 1;
_local37 = new b2XForm();
_local38 = new b2PolygonDef();
_local38. = 6;
_local38.[0] = b2Math.b2MulX(_local37, new b2Vec2(TotemMath.Scale(-15), TotemMath.Scale(1.3)));
_local38.[1] = b2Math.b2MulX(_local37, new b2Vec2(TotemMath.Scale(14), TotemMath.Scale(1.3)));
_local38.[2] = b2Math.b2MulX(_local37, new b2Vec2(TotemMath.Scale(16), TotemMath.Scale(11.7)));
_local38.[3] = b2Math.b2MulX(_local37, new b2Vec2(TotemMath.Scale(8.1), TotemMath.Scale(19.9)));
_local38.[4] = b2Math.b2MulX(_local37, new b2Vec2(TotemMath.Scale(-9.8), TotemMath.Scale(18.9)));
_local38.[5] = b2Math.b2MulX(_local37, new b2Vec2(TotemMath.Scale(-15.9), TotemMath.Scale(11.7)));
_local38.
= 1;
_local39 = new b2XForm();
_local40 = new b2PolygonDef();
_local40. = 6;
_local40.[0] = b2Math.b2MulX(_local39, new b2Vec2(TotemMath.Scale(-9.8), TotemMath.Scale(18.9)));
_local40.[1] = b2Math.b2MulX(_local39, new b2Vec2(TotemMath.Scale(8.1), TotemMath.Scale(19.9)));
_local40.[2] = b2Math.b2MulX(_local39, new b2Vec2(TotemMath.Scale(7.8), TotemMath.Scale(23.1)));
_local40.[3] = b2Math.b2MulX(_local39, new b2Vec2(TotemMath.Scale(6.1), TotemMath.Scale(25.3)));
_local40.[4] = b2Math.b2MulX(_local39, new b2Vec2(TotemMath.Scale(-8.7), TotemMath.Scale(25.5)));
_local40.[5] = b2Math.b2MulX(_local39, new b2Vec2(TotemMath.Scale(-10.2), TotemMath.Scale(23.8)));
_local40.
= 1;
if (isPico){
bodyDef.userData = new G_idol6_pico();
} else {
bodyDef.userData = new G_idol6();
};
bodyDef.userData.phystype = 1000;
bodyDef.userData.todie = false;
_local41 = new S_mute();
bodyDef.userData.slidingChannel = _local41.play(0, 0);
bodyDef.userData.slidingHard = false;
root.GAME.GRAPHICS.addChild(bodyDef.userData);
Idol = totemWorld.(bodyDef);
Idol.(_local34);
Idol.(_local36);
Idol.(_local38);
Idol.(_local40);
Idol. ();
break;
case 5:
_local42 = new b2XForm();
_local43 = new b2PolygonDef();
_local43. = 6;
_local43.[0] = b2Math.b2MulX(_local42, new b2Vec2(TotemMath.Scale(-20.3), TotemMath.Scale(3.9)));
_local43.[1] = b2Math.b2MulX(_local42, new b2Vec2(TotemMath.Scale(-19.2), TotemMath.Scale(-11.6)));
_local43.[2] = b2Math.b2MulX(_local42, new b2Vec2(TotemMath.Scale(-10.4), TotemMath.Scale(-0.9)));
_local43.[3] = b2Math.b2MulX(_local42, new b2Vec2(TotemMath.Scale(-9.6), TotemMath.Scale(7.5)));
_local43.[4] = b2Math.b2MulX(_local42, new b2Vec2(TotemMath.Scale(-10.9), TotemMath.Scale(16.4)));
_local43.[5] = b2Math.b2MulX(_local42, new b2Vec2(TotemMath.Scale(-19.2), TotemMath.Scale(20)));
_local43.
= 1;
_local44 = new b2XForm();
_local45 = new b2PolygonDef();
_local45. = 6;
_local45.[0] = b2Math.b2MulX(_local44, new b2Vec2(TotemMath.Scale(9.3), TotemMath.Scale(7.8)));
_local45.[1] = b2Math.b2MulX(_local44, new b2Vec2(TotemMath.Scale(10.4), TotemMath.Scale(-0.9)));
_local45.[2] = b2Math.b2MulX(_local44, new b2Vec2(TotemMath.Scale(19.2), TotemMath.Scale(-10.7)));
_local45.[3] = b2Math.b2MulX(_local44, new b2Vec2(TotemMath.Scale(20.2), TotemMath.Scale(4)));
_local45.[4] = b2Math.b2MulX(_local44, new b2Vec2(TotemMath.Scale(19.2), TotemMath.Scale(20)));
_local45.[5] = b2Math.b2MulX(_local44, new b2Vec2(TotemMath.Scale(10.9), TotemMath.Scale(15.9)));
_local45.
= 1;
_local46 = new b2XForm();
_local47 = new b2PolygonDef();
_local47. = 3;
_local47.[0] = b2Math.b2MulX(_local46, new b2Vec2(TotemMath.Scale(-4.3), TotemMath.Scale(-13.9)));
_local47.[1] = b2Math.b2MulX(_local46, new b2Vec2(TotemMath.Scale(-0.1), TotemMath.Scale(-20)));
_local47.[2] = b2Math.b2MulX(_local46, new b2Vec2(TotemMath.Scale(4), TotemMath.Scale(-13.9)));
_local47.
= 1;
_local48 = new b2XForm();
_local49 = new b2PolygonDef();
_local49. = 4;
_local49.[0] = b2Math.b2MulX(_local48, new b2Vec2(TotemMath.Scale(-19.2), TotemMath.Scale(-11.6)));
_local49.[1] = b2Math.b2MulX(_local48, new b2Vec2(TotemMath.Scale(-12.3), TotemMath.Scale(-15.7)));
_local49.[2] = b2Math.b2MulX(_local48, new b2Vec2(TotemMath.Scale(-4.3), TotemMath.Scale(-13.9)));
_local49.[3] = b2Math.b2MulX(_local48, new b2Vec2(TotemMath.Scale(-10.4), TotemMath.Scale(-0.9)));
_local49.
= 1;
_local50 = new b2XForm();
_local51 = new b2PolygonDef();
_local51. = 4;
_local51.[0] = b2Math.b2MulX(_local50, new b2Vec2(TotemMath.Scale(4), TotemMath.Scale(-13.9)));
_local51.[1] = b2Math.b2MulX(_local50, new b2Vec2(TotemMath.Scale(12.8), TotemMath.Scale(-15.2)));
_local51.[2] = b2Math.b2MulX(_local50, new b2Vec2(TotemMath.Scale(19.2), TotemMath.Scale(-10.7)));
_local51.[3] = b2Math.b2MulX(_local50, new b2Vec2(TotemMath.Scale(10.4), TotemMath.Scale(-0.9)));
_local51.
= 1;
_local52 = new b2XForm();
_local53 = new b2PolygonDef();
_local53. = 5;
_local53.[0] = b2Math.b2MulX(_local52, new b2Vec2(TotemMath.Scale(-10.4), TotemMath.Scale(-0.9)));
_local53.[1] = b2Math.b2MulX(_local52, new b2Vec2(TotemMath.Scale(-4.3), TotemMath.Scale(-13.9)));
_local53.[2] = b2Math.b2MulX(_local52, new b2Vec2(TotemMath.Scale(4), TotemMath.Scale(-13.9)));
_local53.[3] = b2Math.b2MulX(_local52, new b2Vec2(TotemMath.Scale(10.4), TotemMath.Scale(-0.9)));
_local53.[4] = b2Math.b2MulX(_local52, new b2Vec2(TotemMath.Scale(-0.1), TotemMath.Scale(2)));
_local53.
= 1;
bodyDef.userData = new G_idol5();
bodyDef.userData.phystype = 1000;
bodyDef.userData.todie = false;
_local54 = new S_mute();
bodyDef.userData.slidingChannel = _local54.play(0, 0);
bodyDef.userData.slidingHard = false;
root.GAME.GRAPHICS.addChild(bodyDef.userData);
Idol = totemWorld.(bodyDef);
Idol.(_local43);
Idol.(_local45);
Idol.(_local47);
Idol.(_local49);
Idol.(_local51);
Idol.(_local53);
Idol. ();
break;
case 6:
_local55 = new b2XForm();
_local56 = new b2PolygonDef();
_local56. = 6;
_local56.[0] = b2Math.b2MulX(_local55, new b2Vec2(TotemMath.Scale(-15.6), TotemMath.Scale(-9.5)));
_local56.[1] = b2Math.b2MulX(_local55, new b2Vec2(TotemMath.Scale(-10.1), TotemMath.Scale(-22.6)));
_local56.[2] = b2Math.b2MulX(_local55, new b2Vec2(TotemMath.Scale(0), TotemMath.Scale(-25.6)));
_local56.[3] = b2Math.b2MulX(_local55, new b2Vec2(TotemMath.Scale(7.4), TotemMath.Scale(-22.5)));
_local56.[4] = b2Math.b2MulX(_local55, new b2Vec2(TotemMath.Scale(11.9), TotemMath.Scale(-17.1)));
_local56.[5] = b2Math.b2MulX(_local55, new b2Vec2(TotemMath.Scale(14.6), TotemMath.Scale(-10.2)));
_local56.
= 1;
_local57 = new b2XForm();
_local58 = new b2PolygonDef();
_local58. = 4;
_local58.[0] = b2Math.b2MulX(_local57, new b2Vec2(TotemMath.Scale(-15.6), TotemMath.Scale(-9.5)));
_local58.[1] = b2Math.b2MulX(_local57, new b2Vec2(TotemMath.Scale(14.6), TotemMath.Scale(-10.2)));
_local58.[2] = b2Math.b2MulX(_local57, new b2Vec2(TotemMath.Scale(14), TotemMath.Scale(1.3)));
_local58.[3] = b2Math.b2MulX(_local57, new b2Vec2(TotemMath.Scale(-15), TotemMath.Scale(1.3)));
_local58.
= 1;
_local59 = new b2XForm();
_local60 = new b2PolygonDef();
_local60. = 6;
_local60.[0] = b2Math.b2MulX(_local59, new b2Vec2(TotemMath.Scale(-15), TotemMath.Scale(1.3)));
_local60.[1] = b2Math.b2MulX(_local59, new b2Vec2(TotemMath.Scale(14), TotemMath.Scale(1.3)));
_local60.[2] = b2Math.b2MulX(_local59, new b2Vec2(TotemMath.Scale(16), TotemMath.Scale(11.7)));
_local60.[3] = b2Math.b2MulX(_local59, new b2Vec2(TotemMath.Scale(8.1), TotemMath.Scale(19.9)));
_local60.[4] = b2Math.b2MulX(_local59, new b2Vec2(TotemMath.Scale(-9.8), TotemMath.Scale(18.9)));
_local60.[5] = b2Math.b2MulX(_local59, new b2Vec2(TotemMath.Scale(-15.9), TotemMath.Scale(11.7)));
_local60.
= 1;
_local61 = new b2XForm();
_local62 = new b2PolygonDef();
_local62. = 6;
_local62.[0] = b2Math.b2MulX(_local61, new b2Vec2(TotemMath.Scale(-9.8), TotemMath.Scale(18.9)));
_local62.[1] = b2Math.b2MulX(_local61, new b2Vec2(TotemMath.Scale(8.1), TotemMath.Scale(19.9)));
_local62.[2] = b2Math.b2MulX(_local61, new b2Vec2(TotemMath.Scale(7.8), TotemMath.Scale(23.1)));
_local62.[3] = b2Math.b2MulX(_local61, new b2Vec2(TotemMath.Scale(6.1), TotemMath.Scale(25.3)));
_local62.[4] = b2Math.b2MulX(_local61, new b2Vec2(TotemMath.Scale(-8.7), TotemMath.Scale(25.5)));
_local62.[5] = b2Math.b2MulX(_local61, new b2Vec2(TotemMath.Scale(-10.2), TotemMath.Scale(23.8)));
_local62.
= 1;
bodyDef.userData = new G_idol7();
bodyDef.userData.phystype = 1000;
bodyDef.userData.todie = false;
_local63 = new S_mute();
bodyDef.userData.slidingChannel = _local63.play(0, 0);
bodyDef.userData.slidingHard = false;
root.GAME.GRAPHICS.addChild(bodyDef.userData);
Idol = totemWorld.(bodyDef);
Idol.(_local56);
Idol.(_local58);
Idol.(_local60);
Idol.(_local62);
Idol. ();
break;
case 7:
_local64 = new b2XForm();
_local65 = new b2PolygonDef();
_local65. = 4;
_local65.[0] = b2Math.b2MulX(_local64, new b2Vec2(TotemMath.Scale(-7.8), TotemMath.Scale(-15.9)));
_local65.[1] = b2Math.b2MulX(_local64, new b2Vec2(TotemMath.Scale(7.8), TotemMath.Scale(-15.9)));
_local65.[2] = b2Math.b2MulX(_local64, new b2Vec2(TotemMath.Scale(5.3), TotemMath.Scale(15.9)));
_local65.[3] = b2Math.b2MulX(_local64, new b2Vec2(TotemMath.Scale(-5.3), TotemMath.Scale(15.9)));
_local65.
= 1;
bodyDef.userData = new G_idol8();
bodyDef.userData.phystype = 1000;
bodyDef.userData.todie = false;
_local66 = new S_mute();
bodyDef.userData.slidingChannel = _local66.play(0, 0);
bodyDef.userData.slidingHard = false;
root.GAME.GRAPHICS.addChild(bodyDef.userData);
Idol = totemWorld.(bodyDef);
Idol.(_local65);
Idol. ();
break;
case 8:
_local67 = new b2XForm();
_local68 = new b2PolygonDef();
_local68. = 4;
_local68.[0] = b2Math.b2MulX(_local67, new b2Vec2(TotemMath.Scale(-16.9), TotemMath.Scale(-16.7)));
_local68.[1] = b2Math.b2MulX(_local67, new b2Vec2(TotemMath.Scale(-4.8), TotemMath.Scale(-16.7)));
_local68.[2] = b2Math.b2MulX(_local67, new b2Vec2(TotemMath.Scale(-4.8), TotemMath.Scale(-13.7)));
_local68.[3] = b2Math.b2MulX(_local67, new b2Vec2(TotemMath.Scale(-16.9), TotemMath.Scale(-13.7)));
_local68.
= 1;
_local69 = new b2XForm();
_local70 = new b2PolygonDef();
_local70. = 4;
_local70.[0] = b2Math.b2MulX(_local69, new b2Vec2(TotemMath.Scale(-7.8), TotemMath.Scale(-13.7)));
_local70.[1] = b2Math.b2MulX(_local69, new b2Vec2(TotemMath.Scale(-4.8), TotemMath.Scale(-13.7)));
_local70.[2] = b2Math.b2MulX(_local69, new b2Vec2(TotemMath.Scale(-4.8), TotemMath.Scale(-10.7)));
_local70.[3] = b2Math.b2MulX(_local69, new b2Vec2(TotemMath.Scale(-7.8), TotemMath.Scale(-10.7)));
_local70.
= 1;
_local71 = new b2XForm();
_local72 = new b2PolygonDef();
_local72. = 4;
_local72.[0] = b2Math.b2MulX(_local71, new b2Vec2(TotemMath.Scale(-9.7), TotemMath.Scale(-10.7)));
_local72.[1] = b2Math.b2MulX(_local71, new b2Vec2(TotemMath.Scale(-4.8), TotemMath.Scale(-10.7)));
_local72.[2] = b2Math.b2MulX(_local71, new b2Vec2(TotemMath.Scale(-4.8), TotemMath.Scale(-5.9)));
_local72.[3] = b2Math.b2MulX(_local71, new b2Vec2(TotemMath.Scale(-9.7), TotemMath.Scale(-5.9)));
_local72.
= 1;
_local73 = new b2XForm();
_local74 = new b2PolygonDef();
_local74. = 4;
_local74.[0] = b2Math.b2MulX(_local73, new b2Vec2(TotemMath.Scale(4.9), TotemMath.Scale(-16.7)));
_local74.[1] = b2Math.b2MulX(_local73, new b2Vec2(TotemMath.Scale(16.9), TotemMath.Scale(-16.7)));
_local74.[2] = b2Math.b2MulX(_local73, new b2Vec2(TotemMath.Scale(16.9), TotemMath.Scale(-13.7)));
_local74.[3] = b2Math.b2MulX(_local73, new b2Vec2(TotemMath.Scale(4.9), TotemMath.Scale(-13.7)));
_local74.
= 1;
_local75 = new b2XForm();
_local76 = new b2PolygonDef();
_local76. = 4;
_local76.[0] = b2Math.b2MulX(_local75, new b2Vec2(TotemMath.Scale(4.9), TotemMath.Scale(-13.7)));
_local76.[1] = b2Math.b2MulX(_local75, new b2Vec2(TotemMath.Scale(7.9), TotemMath.Scale(-13.7)));
_local76.[2] = b2Math.b2MulX(_local75, new b2Vec2(TotemMath.Scale(7.9), TotemMath.Scale(-10.7)));
_local76.[3] = b2Math.b2MulX(_local75, new b2Vec2(TotemMath.Scale(4.9), TotemMath.Scale(-10.7)));
_local76.
= 1;
_local77 = new b2XForm();
_local78 = new b2PolygonDef();
_local78. = 4;
_local78.[0] = b2Math.b2MulX(_local77, new b2Vec2(TotemMath.Scale(4.9), TotemMath.Scale(-10.7)));
_local78.[1] = b2Math.b2MulX(_local77, new b2Vec2(TotemMath.Scale(9.7), TotemMath.Scale(-10.7)));
_local78.[2] = b2Math.b2MulX(_local77, new b2Vec2(TotemMath.Scale(9.7), TotemMath.Scale(-5.9)));
_local78.[3] = b2Math.b2MulX(_local77, new b2Vec2(TotemMath.Scale(4.9), TotemMath.Scale(-5.9)));
_local78.
= 1;
_local79 = new b2XForm();
_local80 = new b2PolygonDef();
_local80. = 4;
_local80.[0] = b2Math.b2MulX(_local79, new b2Vec2(TotemMath.Scale(-9.7), TotemMath.Scale(-5.9)));
_local80.[1] = b2Math.b2MulX(_local79, new b2Vec2(TotemMath.Scale(9.7), TotemMath.Scale(-5.9)));
_local80.[2] = b2Math.b2MulX(_local79, new b2Vec2(TotemMath.Scale(9.7), TotemMath.Scale(3)));
_local80.[3] = b2Math.b2MulX(_local79, new b2Vec2(TotemMath.Scale(-9.7), TotemMath.Scale(3)));
_local80.
= 1;
_local81 = new b2XForm();
_local82 = new b2PolygonDef();
_local82. = 4;
_local82.[0] = b2Math.b2MulX(_local81, new b2Vec2(TotemMath.Scale(-2.4), TotemMath.Scale(3)));
_local82.[1] = b2Math.b2MulX(_local81, new b2Vec2(TotemMath.Scale(2.4), TotemMath.Scale(3)));
_local82.[2] = b2Math.b2MulX(_local81, new b2Vec2(TotemMath.Scale(2.4), TotemMath.Scale(7.8)));
_local82.[3] = b2Math.b2MulX(_local81, new b2Vec2(TotemMath.Scale(-2.4), TotemMath.Scale(7.8)));
_local82.
= 1;
_local83 = new b2XForm();
_local84 = new b2PolygonDef();
_local84. = 4;
_local84.[0] = b2Math.b2MulX(_local83, new b2Vec2(TotemMath.Scale(-10.1), TotemMath.Scale(7.8)));
_local84.[1] = b2Math.b2MulX(_local83, new b2Vec2(TotemMath.Scale(10.2), TotemMath.Scale(7.8)));
_local84.[2] = b2Math.b2MulX(_local83, new b2Vec2(TotemMath.Scale(10.2), TotemMath.Scale(10.7)));
_local84.[3] = b2Math.b2MulX(_local83, new b2Vec2(TotemMath.Scale(-10.1), TotemMath.Scale(10.7)));
_local84.
= 1;
_local85 = new b2XForm();
_local86 = new b2PolygonDef();
_local86. = 4;
_local86.[0] = b2Math.b2MulX(_local85, new b2Vec2(TotemMath.Scale(-10.1), TotemMath.Scale(10.7)));
_local86.[1] = b2Math.b2MulX(_local85, new b2Vec2(TotemMath.Scale(-7.1), TotemMath.Scale(10.7)));
_local86.[2] = b2Math.b2MulX(_local85, new b2Vec2(TotemMath.Scale(-7.1), TotemMath.Scale(16.8)));
_local86.[3] = b2Math.b2MulX(_local85, new b2Vec2(TotemMath.Scale(-10.1), TotemMath.Scale(16.8)));
_local86.
= 1;
_local87 = new b2XForm();
_local88 = new b2PolygonDef();
_local88. = 4;
_local88.[0] = b2Math.b2MulX(_local87, new b2Vec2(TotemMath.Scale(7.2), TotemMath.Scale(10.7)));
_local88.[1] = b2Math.b2MulX(_local87, new b2Vec2(TotemMath.Scale(10.2), TotemMath.Scale(10.7)));
_local88.[2] = b2Math.b2MulX(_local87, new b2Vec2(TotemMath.Scale(10.2), TotemMath.Scale(16.8)));
_local88.[3] = b2Math.b2MulX(_local87, new b2Vec2(TotemMath.Scale(7.2), TotemMath.Scale(16.8)));
_local88.
= 1;
bodyDef.userData = new G_idol9();
bodyDef.userData.phystype = 1000;
bodyDef.userData.todie = false;
_local89 = new S_mute();
bodyDef.userData.slidingChannel = _local89.play(0, 0);
bodyDef.userData.slidingHard = false;
root.GAME.GRAPHICS.addChild(bodyDef.userData);
Idol = totemWorld.(bodyDef);
Idol.(_local68);
Idol.(_local70);
Idol.(_local72);
Idol.(_local74);
Idol.(_local76);
Idol.(_local78);
Idol.(_local80);
Idol.(_local82);
Idol.(_local84);
Idol.(_local86);
Idol.(_local88);
Idol. ();
break;
case 9:
_local90 = new b2XForm();
_local91 = new b2PolygonDef();
_local91. = 5;
_local91.[0] = b2Math.b2MulX(_local90, new b2Vec2(TotemMath.Scale(-21.4), TotemMath.Scale(-11.4)));
_local91.[1] = b2Math.b2MulX(_local90, new b2Vec2(TotemMath.Scale(-8.6), TotemMath.Scale(-11.4)));
_local91.[2] = b2Math.b2MulX(_local90, new b2Vec2(TotemMath.Scale(-6.4), TotemMath.Scale(-1.4)));
_local91.[3] = b2Math.b2MulX(_local90, new b2Vec2(TotemMath.Scale(-6.4), TotemMath.Scale(11.4)));
_local91.[4] = b2Math.b2MulX(_local90, new b2Vec2(TotemMath.Scale(-21.4), TotemMath.Scale(1.5)));
_local91.
= 1;
_local92 = new b2XForm();
_local93 = new b2PolygonDef();
_local93. = 5;
_local93.[0] = b2Math.b2MulX(_local92, new b2Vec2(TotemMath.Scale(6.5), TotemMath.Scale(-1.4)));
_local93.[1] = b2Math.b2MulX(_local92, new b2Vec2(TotemMath.Scale(8.6), TotemMath.Scale(-11.4)));
_local93.[2] = b2Math.b2MulX(_local92, new b2Vec2(TotemMath.Scale(21.4), TotemMath.Scale(-11.4)));
_local93.[3] = b2Math.b2MulX(_local92, new b2Vec2(TotemMath.Scale(21.4), TotemMath.Scale(1.5)));
_local93.[4] = b2Math.b2MulX(_local92, new b2Vec2(TotemMath.Scale(6.5), TotemMath.Scale(11.4)));
_local93.
= 1;
_local94 = new b2XForm();
_local95 = new b2PolygonDef();
_local95. = 4;
_local95.[0] = b2Math.b2MulX(_local94, new b2Vec2(TotemMath.Scale(-6.4), TotemMath.Scale(-1.4)));
_local95.[1] = b2Math.b2MulX(_local94, new b2Vec2(TotemMath.Scale(6.5), TotemMath.Scale(-1.4)));
_local95.[2] = b2Math.b2MulX(_local94, new b2Vec2(TotemMath.Scale(6.5), TotemMath.Scale(11.4)));
_local95.[3] = b2Math.b2MulX(_local94, new b2Vec2(TotemMath.Scale(-6.4), TotemMath.Scale(11.4)));
_local95.
= 1;
bodyDef.userData = new G_idol10();
bodyDef.userData.phystype = 1000;
bodyDef.userData.todie = false;
_local96 = new S_mute();
bodyDef.userData.slidingChannel = _local96.play(0, 0);
bodyDef.userData.slidingHard = false;
root.GAME.GRAPHICS.addChild(bodyDef.userData);
Idol = totemWorld.(bodyDef);
Idol.(_local91);
Idol.(_local93);
Idol.(_local95);
Idol. ();
break;
case 10:
_local97 = new b2CircleDef();
_local97. = TotemMath.Scale2(25.9);
_local97.
= 1;
_local98 = new b2CircleDef();
_local98. = TotemMath.Scale2(8.5);
_local98.
.Set(TotemMath.Scale(0), TotemMath.Scale(-15.5));
_local98.
= 1;
_local99 = new b2CircleDef();
_local99. = TotemMath.Scale2(8.5);
_local99.
.Set(TotemMath.Scale(10.9), TotemMath.Scale(-11));
_local99.
= 1;
_local100 = new b2CircleDef();
_local100. = TotemMath.Scale2(8.5);
_local100.
.Set(TotemMath.Scale(15.6), TotemMath.Scale(0));
_local100.
= 1;
_local101 = new b2CircleDef();
_local101. = TotemMath.Scale2(8.5);
_local101.
.Set(TotemMath.Scale(11), TotemMath.Scale(10.9));
_local101.
= 1;
_local102 = new b2CircleDef();
_local102. = TotemMath.Scale2(8.5);
_local102.
.Set(TotemMath.Scale(0), TotemMath.Scale(15.5));
_local102.
= 1;
_local103 = new b2CircleDef();
_local103. = TotemMath.Scale2(8.5);
_local103.
.Set(TotemMath.Scale(-11.1), TotemMath.Scale(11));
_local103.
= 1;
_local104 = new b2CircleDef();
_local104. = TotemMath.Scale2(8.5);
_local104.
.Set(TotemMath.Scale(-15.5), TotemMath.Scale(0));
_local104.
= 1;
_local105 = new b2CircleDef();
_local105. = TotemMath.Scale2(8.5);
_local105.
.Set(TotemMath.Scale(-11.1), TotemMath.Scale(-11));
_local105.
= 1;
bodyDef.userData = new G_idol11();
bodyDef.userData.phystype = 1000;
bodyDef.userData.todie = false;
_local106 = new S_mute();
bodyDef.userData.slidingChannel = _local106.play(0, 0);
bodyDef.userData.slidingHard = false;
root.GAME.GRAPHICS.addChild(bodyDef.userData);
Idol = totemWorld.(bodyDef);
Idol.(_local97);
Idol.(_local98);
Idol.(_local99);
Idol.(_local100);
Idol.(_local101);
Idol.(_local102);
Idol.(_local103);
Idol.(_local104);
Idol.(_local105);
Idol. ();
break;
default:
break;
};
Idols.push(Idol);
Idol.
(Idol.GetPosition(), (_arg4 * (Math.PI / 180)));
return (Idol);
}
public static function PlayGame(_arg1:Object, _arg2:String):void{
var _local3:int;
var _local4:Array;
var _local5:int;
var _local6:int;
var _local7:*;
Clear();
DrawCursor();
gameIdols = new Array();
gameBlocks = new Array();
gameOver = false;
gameWon = false;
playAct = "hold";
gameMode = "playgame";
playMode = _arg2;
Factory.ReadySetGo();
blocksLeft_game = 0;
playTime = 0;
LastLevel = _arg1;
LastType = _arg2;
root.GAME.hud_bremaining.leveltime.text = 0;
_local3 = Math.ceil((5 * Math.random()));
if (playMode == "story"){
_local3 = Math.ceil((Data.TotemData.data.Levels.current / 10));
if ((Data.TotemData.data.Levels.current % 2) == 0){
root.GAME.BIRDZ.visible = true;
} else {
root.GAME.BIRDZ.visible = false;
};
} else {
if (_local3 == 1){
root.GAME.BIRDZ.visible = true;
};
};
groundBody.m_userData.luis.gotoAndStop(_local3);
root.GAME.Luisfloor.luis.gotoAndStop(_local3);
_local4 = new Array("Normal", "Black", "Sloppy", "Combo", "Explosive", "Glass");
_local5 = 0;
while (_local5 < _arg1.blocks.length) {
_local7 = Factory.NewBlock(_local4[(_arg1.blocks[_local5].phystype - 1)], (_arg1.blocks[_local5].sizex / 30), (_arg1.blocks[_local5].sizey / 30), _arg1.blocks[_local5].xpos, _arg1.blocks[_local5].ypos, _arg1.blocks[_local5].rotation);
if (_local4[(_arg1.blocks[_local5].phystype - 1)] != "Black"){
blocksLeft_game++;
gameBlocks.push(_local7);
};
_local5++;
};
_local6 = 0;
while (_local6 < _arg1.idols.length) {
gameIdols.push(Gear.MakeIdol(_arg1.idols[_local6].itype, _arg1.idols[_local6].x, _arg1.idols[_local6].y, _arg1.idols[_local6].rotation));
_local6++;
};
doDelay = _arg1.blockdelay;
if (playMode == "story"){
root.GAME.hud_bremaining.levelnumber.text = (Data.TotemData.data.Levels.current + 1);
root.GAME.hud_bremaining.walkthrough.visible = true;
root.GAME.hud_bremaining.levelname.text = "";
Speaker.StartInGameSong(Data.TotemData.data.Levels.current);
} else {
root.GAME.hud_bremaining.walkthrough.visible = false;
root.GAME.hud_bremaining.levelnumber.text = "";
root.GAME.hud_bremaining.levelname.text = _arg1.name;
Speaker.StartInGameSong();
};
root.GAME.hud_bremaining.lbdisplay.text = blocksLeft_game;
root.GAME.hud_bremaining.visible = true;
switch (Data.TotemData.data.Settings.graphics){
case 0:
stage.quality = "LOW";
break;
case 1:
stage.quality = "MEDIUM";
break;
case 2:
stage.quality = "HIGH";
break;
default:
break;
};
totemWorld.Step(totemWorld_timeStep, totemWorld_iterations);
}
public static function RemoveInfo():void{
root.GAME.CURSOR.removeChild(InfoMc);
InfoOn = false;
}
private static function ListClick(_arg1:MouseEvent):void{
var _local2:int;
if (LevelSelect.levelscontainer.ls_levels.length > 0){
if (LevelSelect.levelscontainer.ls_levels.selectedItem != null){
LevelSelect.levelscontainer.lvlname.txtvar.text = LevelSelect.levelscontainer.ls_levels.selectedItem.label;
if (LevelSelect.levelscontainer.ls_levels.selectedItem.playType == "sponsor"){
if (Data.TotemData.data.SponsorLevels.records[LevelSelect.levelscontainer.ls_levels.selectedItem.data] != -1){
LevelSelect.levelscontainer.lvlseconds.txtvar.text = (Math.floor((Data.TotemData.data.SponsorLevels.records[LevelSelect.levelscontainer.ls_levels.selectedItem.data] / 40)) + "s");
} else {
LevelSelect.levelscontainer.lvlseconds.txtvar.text = "none";
};
} else {
if (LevelSelect.levelscontainer.ls_levels.selectedItem.playType == "unlocked"){
if (Data.TotemData.data.UnlockedLevels.records[LevelSelect.levelscontainer.ls_levels.selectedItem.data] != -1){
LevelSelect.levelscontainer.lvlseconds.txtvar.text = (Math.floor((Data.TotemData.data.UnlockedLevels.records[LevelSelect.levelscontainer.ls_levels.selectedItem.data] / 40)) + "s");
} else {
LevelSelect.levelscontainer.lvlseconds.txtvar.text = "none";
};
} else {
if (LevelSelect.levelscontainer.ls_levels.selectedItem.playType == "classic"){
if (Data.TotemData.data.ClassicLevels.records[LevelSelect.levelscontainer.ls_levels.selectedItem.data] != -1){
LevelSelect.levelscontainer.lvlseconds.txtvar.text = (Math.floor((Data.TotemData.data.ClassicLevels.records[LevelSelect.levelscontainer.ls_levels.selectedItem.data] / 40)) + "s");
} else {
LevelSelect.levelscontainer.lvlseconds.txtvar.text = "none";
};
} else {
if (LevelSelect.levelscontainer.ls_levels.selectedItem.playType == "custom"){
LevelSelect.levelscontainer.lvlseconds.txtvar.text = "none";
_local2 = 0;
while (_local2 < Data.TotemData.data.MyLevels.length) {
if (Data.TotemData.data.MyLevels[_local2].id == LevelSelect.levelscontainer.ls_levels.selectedItem.data){
LevelSelect.levelscontainer.lvlseconds.txtvar.text = (Math.floor((Data.TotemData.data.MyLevels[_local2].record / 40)) + "s");
};
_local2++;
};
};
};
};
};
};
};
}
private static function MissionButtonl0(_arg1:MouseEvent){
var _local2:int;
var _local3:int;
_local2 = (LevelSelect.levelscontainer.currentFrame - 1);
_local3 = (_local2 * 10);
ButtonMissionLevelPlay((_local3 + 0));
}
public static function BuildNewGame():void{
var _local1:G_newgame;
gameMode = "none";
Speaker.StartNewGameSong();
_local1 = new G_newgame();
NewGameScreen = root.GAME.HUD.addChild(_local1);
NewGameScreen.confirmButton.addEventListener(MouseEvent.CLICK, NewGameBT);
root.GAME.BIRDZ.visible = false;
}
private static function MissionButtonl3(_arg1:MouseEvent){
var _local2:int;
var _local3:int;
_local2 = (LevelSelect.levelscontainer.currentFrame - 1);
_local3 = (_local2 * 10);
ButtonMissionLevelPlay((_local3 + 3));
}
private static function highscoresOnLoad(_arg1:Event){
var _local2:Array;
var _local3:int;
var _local4:int;
_local2 = _arg1.currentTarget.data.split("##_table_##");
_local3 = 0;
while (_local3 < _local2.length) {
_local2[_local3] = _local2[_local3].split("#_#_#_");
_local4 = 0;
while (_local4 < _local2[_local3].length) {
_local2[_local3][_local4] = _local2[_local3][_local4].split("*..*..*");
_local4++;
};
_local3++;
};
highScoresAll = _local2;
ReplaceHsList(1);
}
private static function LevelSelectSponsorLevels(_arg1:MouseEvent):void{
LevelSelect.levelscontainer.gotoAndStop(6);
BuildWithPage();
}
private static function MissionButtonl1(_arg1:MouseEvent){
var _local2:int;
var _local3:int;
_local2 = (LevelSelect.levelscontainer.currentFrame - 1);
_local3 = (_local2 * 10);
ButtonMissionLevelPlay((_local3 + 1));
}
private static function MissionButtonl2(_arg1:MouseEvent){
var _local2:int;
var _local3:int;
_local2 = (LevelSelect.levelscontainer.currentFrame - 1);
_local3 = (_local2 * 10);
ButtonMissionLevelPlay((_local3 + 2));
}
private static function MissionButtonl4(_arg1:MouseEvent){
var _local2:int;
var _local3:int;
_local2 = (LevelSelect.levelscontainer.currentFrame - 1);
_local3 = (_local2 * 10);
ButtonMissionLevelPlay((_local3 + 4));
}
private static function MissionButtonl5(_arg1:MouseEvent){
var _local2:int;
var _local3:int;
_local2 = (LevelSelect.levelscontainer.currentFrame - 1);
_local3 = (_local2 * 10);
ButtonMissionLevelPlay((_local3 + 5));
}
private static function MissionButtonl6(_arg1:MouseEvent){
var _local2:int;
var _local3:int;
_local2 = (LevelSelect.levelscontainer.currentFrame - 1);
_local3 = (_local2 * 10);
ButtonMissionLevelPlay((_local3 + 6));
}
private static function MissionButtonl7(_arg1:MouseEvent){
var _local2:int;
var _local3:int;
_local2 = (LevelSelect.levelscontainer.currentFrame - 1);
_local3 = (_local2 * 10);
ButtonMissionLevelPlay((_local3 + 7));
}
public static function DoAchievement(_arg1:int):void{
var _local2:Boolean;
var _local3:int;
if (!Data.TotemData.data.GameAchievements.unlocked[_arg1]){
Factory.Achievement(_arg1);
Data.TotemData.data.GameAchievements.unlocked[_arg1] = true;
if (_arg1 == 0){
NewgroundsAPI.logCustomEvent("BeatTD2");
Data.TotemData.data.UnlockedLevels.unlocked[0] = true;
Data.TotemData.data.UnlockedLevels.unlocked[4] = true;
Data.TotemData.data.UnlockedLevels.unlocked[7] = true;
Data.TotemData.data.UnlockedLevels.unlocked[8] = true;
Data.TotemData.data.UnlockedLevels.unlocked[9] = true;
_local2 = true;
_local3 = 0;
while (_local3 < Data.TotemData.data.UnlockedLevels.unlocked.length) {
if (Data.TotemData.data.UnlockedLevels.unlocked[_local3] == false){
_local2 = false;
break;
};
_local3++;
};
if (_local2){
DoAchievement(6);
};
};
Data.TotemData.flush();
};
}
private static function MissionButtonl8(_arg1:MouseEvent){
var _local2:int;
var _local3:int;
_local2 = (LevelSelect.levelscontainer.currentFrame - 1);
_local3 = (_local2 * 10);
ButtonMissionLevelPlay((_local3 + 8));
}
public static function StartGameEnding():void{
var _local1:_GengingMc_;
Clear();
gameMode = "none";
gameOver = false;
gameWon = false;
root.GAME.hud_bremaining.visible = false;
_local1 = new _GengingMc_();
EndingDone = false;
EndingMc = root.GAME.EFFECTS.addChild(_local1);
stage.addEventListener(Event.ENTER_FRAME, ControlGameEnding);
}
public static function ThrowGameWon():void{
if (!gameOver){
Factory.GameWon();
gameWon = true;
trace("GAME WON");
};
}
private static function CloseCreditsBt(_arg1:MouseEvent):void{
CreditsScreen.bt_close.removeEventListener(MouseEvent.CLICK, CloseCreditsBt);
Speaker.StopNewGameSong();
Factory.ChangeScreen();
root.GAME.HUD.removeChild(CreditsScreen);
BuildMenu();
}
private static function LevelSelectNextButton(_arg1:MouseEvent):void{
LevelSelect.levelscontainer.gotoAndStop((LevelSelect.levelscontainer.currentFrame + 1));
BuildWithPage();
}
private static function MissionButtonl9(_arg1:MouseEvent){
var _local2:int;
var _local3:int;
_local2 = (LevelSelect.levelscontainer.currentFrame - 1);
_local3 = (_local2 * 10);
ButtonMissionLevelPlay((_local3 + 9));
}
private static function dataOnLoad(_arg1:Event){
SubmitHighscoresMc.gotoAndStop(4);
DoAchievement(7);
Data.TotemData.data.Levels.recordshighscores = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1];
Data.TotemData.flush();
Factory.ChangeScreen();
root.GAME.GRAPHICS.removeChild(SubmitHighscoresMc);
Speaker.StopNewGameSong();
BuildHsHs();
}
private static function ClearGameEnding():void{
stage.removeEventListener(Event.ENTER_FRAME, ControlGameEnding);
Factory.ChangeScreen();
root.GAME.EFFECTS.removeChild(EndingMc);
Clear();
gameMode = "none";
gameOver = false;
gameWon = false;
BuildMenu();
}
private static function LevelEditorPlayMenu(_arg1:MouseEvent):void{
Factory.ChangeScreen();
PlayMenu.bt_close.removeEventListener(MouseEvent.CLICK, ClosePlayMenu);
PlayMenu.bt_leveleditor.removeEventListener(MouseEvent.CLICK, LevelEditorPlayMenu);
PlayMenu.bt_submithighscores.removeEventListener(MouseEvent.CLICK, SubmitHighscoresPlayMenu);
KillMenu();
LevelEditor.Build();
root.GAME.BIRDZ.visible = false;
}
public static function SetTheSky():void{
var _local1:Date;
var _local2:Array;
_local1 = new Date();
_local2 = [5, 5, 5, 5, 5, 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 5];
if (Data.TotemData.data.Settings.timesky){
root.GAME.BG.gotoAndStop(_local2[_local1.hours]);
};
}
private static function LevelSelectUnlockedLevels(_arg1:MouseEvent):void{
LevelSelect.levelscontainer.gotoAndStop(7);
BuildWithPage();
}
public static function DrawCursor(){
var _local1:G_cursor;
_local1 = new G_cursor();
_local1.x = root.mouseX;
_local1.y = root.mouseY;
_local1.mouseEnabled = false;
Cursor = root.GAME.CURSOR.addChild(_local1);
CursorOn = true;
Mouse.hide();
}
private static function LevelSelectMyLevels(_arg1:MouseEvent):void{
LevelSelect.levelscontainer.gotoAndStop(9);
BuildWithPage();
}
private static function CloseHighscoresBt(_arg1:MouseEvent):void{
HighscoresScreen.bt_close.removeEventListener(MouseEvent.CLICK, CloseHighscoresBt);
Speaker.StopNewGameSong();
Factory.ChangeScreen();
root.GAME.HUD.removeChild(HighscoresScreen);
BuildMenu();
}
public static function ExplodingBlock(_arg1:b2Body):void{
var _local2:*;
var _local3:Number;
var _local4:Number;
var _local5:Point;
var _local6:b2Body;
var _local7:*;
var _local8:Number;
var _local9:Number;
var _local10:b2Vec2;
_local2 = _arg1.m_userData;
_local3 = (Math.sqrt(((_local2.width * _local2.width) + (_local2.height * _local2.height))) / (30 * 3));
_local4 = (Math.sqrt(((_local2.width * _local2.width) + (_local2.height * _local2.height))) + 0);
Debug.Dump(("PHYS: Exploding AREA is " + _local4));
_local5 = new Point(_local2.x, _local2.y);
_local2.action2 = 300;
_local6 = totemWorld.;
while (_local6) {
_local7 = _local6.m_userData;
if (_local7 != null){
_local8 = Math.sqrt((((_local7.x - _local5.x) * (_local7.x - _local5.x)) + ((_local7.y - _local5.y) * (_local7.y - _local5.y))));
Debug.Dump(((((("PHYS: Distance is " + _local8) + " >>> Expl x is ") + _local5.x) + " >>> Target x is ") + _local7.x));
Factory.EffectExplosion1(_local5.x, _local5.y, (37 + (_local3 * (30 * 0.2))), (37 + (_local3 * (30 * 0.2))));
if (_local8 <= _local4){
_local9 = Math.atan2((_local7.y - _local5.y), (_local7.x - _local5.x));
Debug.Dump(((("PHYS: Angle is is " + _local9) + " (") + (_local9 * (180 / Math.PI))));
_local10 = new b2Vec2(((Math.cos(_local9) * _local3) * 150), ((Math.sin(_local9) * _local3) * 150));
_local6.ApplyForce(_local10, new b2Vec2((_local5.x / 30), (_local5.y / 30)));
if ((((((_local7.phystype == 4)) && (((!((_local2.x == _local7.x))) || (!((_local2.y == _local7.y))))))) && (!((_local7.action2 == 300))))){
_local7.action2 = 300;
Gear.ExplosiveDestroyHold(_local6);
};
};
};
_local6 = _local6.m_next;
};
Gear.ExplosiveDestroy(_arg1);
}
private static function SubmitHighscoresBackButton(_arg1:MouseEvent):void{
Factory.ChangeScreen();
SubmitHighscoresMc.bt_back.removeEventListener(MouseEvent.CLICK, SubmitHighscoresBackButton);
KillSubmitHighscores();
Clear();
BuildMenu();
}
public static function MouseMove(_arg1:MouseEvent):void{
if (CursorOn){
Cursor.x = root.mouseX;
Cursor.y = root.mouseY;
};
_arg1.updateAfterEvent();
}
public static function AddCheatsTab():void{
var _local1:G_cheats;
_local1 = new G_cheats();
CheatsTab = root.GAME.CHEATSOR.addChild(_local1);
CheatsTab.bt_close.addEventListener(MouseEvent.CLICK, CheatsTabCloseButton);
CheatsTab.bt_ok.addEventListener(MouseEvent.CLICK, CheatsTabOkButton);
CheatsTabOn = true;
}
public static function KillMenu():void{
root.GAME.HUD.removeChild(MenuLogo);
if (PlayMenuOpen){
root.GAME.HUD.removeChild(PlayMenu);
PlayMenuOpen = false;
};
if (SettingsMenuOpen){
root.GAME.HUD.removeChild(SettingsMenu);
SettingsMenuOpen = false;
};
root.GAME.HUD.removeChild(MenuMain);
if (InfoOn){
RemoveInfo();
};
if (CheatsTabOn){
RemoveCheatsTab();
};
PlayMenuOpen = false;
trace("KILL MENU FUNCTION: SUCCESS");
Speaker.StopMenuSong();
SetTheSky();
Clear();
root.GAME.GRAPHICS.alpha = 1;
}
}
}//package TotemEngine
Section 202
//ILevels (TotemEngine.ILevels)
package TotemEngine {
public class ILevels {
public static var ClassicLevels:Array;
private static var tempBiggerBlock:Array;
public static var SponsorLevels:Array;
public static var MenuLevels:Array;
private static var tempInsideIdol:Object;
public static var MemoryLevels:Array;
private static var tempInsideLevel:Object;
public static var UnlockedLevels:Array;
private static var tempInsideBlock:Object;
private static function BuildMemory():void{
MenuLevels = new Array();
MemoryLevels = new Array();
SponsorLevels = new Array();
UnlockedLevels = new Array();
ClassicLevels = new Array();
tempInsideLevel = new Object();
tempInsideLevel.name = "Menu - Simplistic";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 525;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 465;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 510;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 525;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 465;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 495;
tempInsideIdol.y = 273;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MenuLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Menu - Trio Problem";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 540;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 540;
tempInsideBlock.ypos = 360;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 540;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 600;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 600;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 600;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 600;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 600;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 600;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 540;
tempInsideBlock.ypos = 105;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 570;
tempInsideIdol.y = 285;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 510;
tempInsideIdol.y = 285;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 540;
tempInsideIdol.y = 60;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 0;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MenuLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Simple Timing";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 540;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 570;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 555;
tempInsideIdol.y = 0xFF;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MenuLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "The ET";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 630;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 600;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 615;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 600;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 525;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 540;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 510;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 525;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 570;
tempInsideBlock.ypos = 330;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 510;
tempInsideBlock.ypos = 330;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 540;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 540;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 540;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = -90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 585;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 540;
tempInsideIdol.y = 135;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 8;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MenuLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Idol Brothers";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 600;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 570;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 510;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 540;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 540;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 585;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 540;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 510;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 465;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 360;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 600;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 180;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 600;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 585;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 630;
tempInsideBlock.ypos = 240;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 510;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 540;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 615;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 600;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 495;
tempInsideIdol.y = 195;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 9;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 585;
tempInsideIdol.y = 195;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 9;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MenuLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Fatso Trouble";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 540;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 510;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 525;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 540;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 510;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 540;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 510;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 540;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 510;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 525;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 525;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 525;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 525;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 525;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 525;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 525;
tempInsideIdol.y = 90;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 2;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MenuLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Simple Tower";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 555;
tempInsideIdol.y = 90;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 2;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MenuLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Lightweight";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 555;
tempInsideIdol.y = 90;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 1;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MenuLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Trouble 3";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 615;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 615;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 615;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 615;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 615;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 375;
tempInsideIdol.y = 281;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 0;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 495;
tempInsideIdol.y = 277;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 1;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 615;
tempInsideIdol.y = 281;
tempInsideIdol.rotation = 20;
tempInsideIdol.itype = 10;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MenuLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "MoustachoMan";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 570;
tempInsideBlock.ypos = 360;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 360;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 585;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 585;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 585;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 570;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 570;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 570;
tempInsideIdol.y = 159;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 5;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 420;
tempInsideIdol.y = 159;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 5;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MenuLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Dangerzone";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 585;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 525;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 465;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 585;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 525;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 465;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 510;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 528;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 462;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 540;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 495;
tempInsideIdol.y = 274;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MenuLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Explosive Comeback";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 213;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Lightweight";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 97;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 1;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Simple Tower";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 94;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 2;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Domino";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 15;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 90;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 15;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 180;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 615;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 105;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 611;
tempInsideIdol.y = 405;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Frogland I";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 465;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 225;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 127;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 3;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Hammer On";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 360;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 300;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 270;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 218;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 1;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Double Trouble";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 360;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 240;
tempInsideBlock.ypos = 300;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 300;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 210;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 315;
tempInsideIdol.y = 102;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 8;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 375;
tempInsideIdol.y = 102;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 8;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Simple Thing";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 252;
tempInsideIdol.rotation = 21;
tempInsideIdol.itype = 10;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Containers";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 270;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 330;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 210;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 300;
tempInsideIdol.y = 223;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 5;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Paths";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 45;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = -90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 75;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 75;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 75;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 75;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 75;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 75;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 75;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 75;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 433;
tempInsideBlock.ypos = 330;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 433;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 448;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 418;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 15;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 433;
tempInsideIdol.y = 283;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 8;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Attached";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 129;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 193;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 225;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 8;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 161;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 8;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "The Bunker";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 105;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 70;
tempInsideIdol.rotation = 24;
tempInsideIdol.itype = 10;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Frogland II";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = -90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 187;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 3;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Kenney";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 180;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 180;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 375;
tempInsideIdol.y = 130;
tempInsideIdol.rotation = -4;
tempInsideIdol.itype = 10;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 315;
tempInsideIdol.y = 130;
tempInsideIdol.rotation = 3;
tempInsideIdol.itype = 10;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Hurry!";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 330;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 240;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 131;
tempInsideIdol.rotation = 21;
tempInsideIdol.itype = 10;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Heavy Landing";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 47;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 9;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Popout";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 90;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 30;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 180;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 165;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 165;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 165;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 403;
tempInsideIdol.y = 134;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Impact";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 270;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 75;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 660;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 660;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 585;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 30;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 197;
tempInsideBlock.ypos = 415;
tempInsideBlock.rotation = -25;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 240;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 135;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 105;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 135;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 105;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 135;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 105;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 75;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 105;
tempInsideIdol.y = 310;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 135;
tempInsideIdol.y = 343;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 105;
tempInsideIdol.y = 343;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 135;
tempInsideIdol.y = 310;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Fork";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 154;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 0xFF;
tempInsideIdol.y = 159;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 5;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Pick a side";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 240;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 45;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 645;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 564;
tempInsideBlock.ypos = 419;
tempInsideBlock.rotation = -23;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 125;
tempInsideBlock.ypos = 419;
tempInsideBlock.rotation = 23;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 654;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 36;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 187;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 5;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "TNT";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 105;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 150;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 105;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 75;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 75;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 243;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Slido";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 180;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 330;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 330;
tempInsideIdol.y = 100;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 0;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Frogland III";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 270;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 240;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 90;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 3;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Idol Brothers";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 360;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 180;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 240;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 300;
tempInsideIdol.y = 195;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 9;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 390;
tempInsideIdol.y = 195;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 9;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Tots";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 360;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 360;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 240;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 405;
tempInsideIdol.y = 273;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 285;
tempInsideIdol.y = 273;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Border Hangin'";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 360;
tempInsideIdol.y = 100;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 0;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "It's not Rocket Science";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 360;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 300;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 240;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 180;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 120;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 346;
tempInsideIdol.y = 71;
tempInsideIdol.rotation = 30;
tempInsideIdol.itype = 10;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Enough space";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 360;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 250;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 0;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 370;
tempInsideIdol.y = 245;
tempInsideIdol.rotation = -120;
tempInsideIdol.itype = 9;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 320;
tempInsideIdol.y = 245;
tempInsideIdol.rotation = 120;
tempInsideIdol.itype = 9;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 203;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 3;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Missing Pieces";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 391;
tempInsideBlock.ypos = 362;
tempInsideBlock.rotation = -33;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 299;
tempInsideBlock.ypos = 362;
tempInsideBlock.rotation = 33;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 160;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 0;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "The ET";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 330;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 330;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = -90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 330;
tempInsideIdol.y = 135;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 8;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Bouncy times";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 180;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 346;
tempInsideIdol.y = 123;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 270;
tempInsideIdol.y = 128;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 3;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 420;
tempInsideIdol.y = 124;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 2;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Heavy Lift";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 105;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 105;
tempInsideBlock.ypos = 360;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 585;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 585;
tempInsideBlock.ypos = 360;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 117;
tempInsideIdol.y = 303;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 2;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "A house of cards I";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 105;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 225;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 465;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 585;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 135;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 645;
tempInsideBlock.ypos = 270;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 45;
tempInsideBlock.ypos = 270;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 645;
tempInsideBlock.ypos = 210;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 45;
tempInsideBlock.ypos = 210;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 210;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 210;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 540;
tempInsideBlock.ypos = 270;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 150;
tempInsideBlock.ypos = 270;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 540;
tempInsideBlock.ypos = 210;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 150;
tempInsideBlock.ypos = 210;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 90;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 600;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 465;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 465;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 465;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 225;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 225;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 225;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 645;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 135;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 45;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 570;
tempInsideBlock.ypos = 105;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 120;
tempInsideBlock.ypos = 105;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 100;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 0;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 600;
tempInsideIdol.y = 70;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 0;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 90;
tempInsideIdol.y = 70;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 0;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Wood";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 240;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 315;
tempInsideIdol.y = 195;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 375;
tempInsideIdol.y = 195;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 360;
tempInsideIdol.y = 195;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 330;
tempInsideIdol.y = 195;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 195;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "The basket";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 60;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 60;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 90;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 30;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 90;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 30;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 510;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 60;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 60;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 570;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 570;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 240;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 60;
tempInsideIdol.y = 0xFF;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 8;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Frogland IV";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 360;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 300;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 180;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 105;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 105;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 45;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 45;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 75;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 75;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 216;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 3;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Aliens";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 630;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 180;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 614;
tempInsideIdol.y = 378;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 9;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 614;
tempInsideIdol.y = 309;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 9;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 614;
tempInsideIdol.y = 332;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 9;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 614;
tempInsideIdol.y = 355;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 9;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Extreme Ways";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 75;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 75;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 105;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 105;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 180;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 100;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 0;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 380;
tempInsideIdol.y = 103;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 310;
tempInsideIdol.y = 103;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Landing Trouble";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 165;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 102;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 0;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Fatso Trouble";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 90;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 2;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Trial and Caos";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 105;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 360;
tempInsideBlock.rotation = -90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 105;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 105;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 120;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 240;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 150;
tempInsideBlock.rotation = -90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 180;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 35;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 69;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 103;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Damnit";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 334;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 2;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 303;
tempInsideIdol.rotation = -90;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "V.";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 585;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 105;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 105;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 585;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 645;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 525;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 165;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 45;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 60;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 540;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 600;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 120;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 570;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 90;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 525;
tempInsideBlock.ypos = 330;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 45;
tempInsideBlock.ypos = 330;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 660;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 600;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 120;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 150;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 180;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 180;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 660;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 630;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 660;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 630;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 600;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 630;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 150;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 120;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 180;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 150;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 123;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 585;
tempInsideIdol.y = 246;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 3;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 105;
tempInsideIdol.y = 246;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 3;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Crazy Robot";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 360;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 240;
tempInsideBlock.ypos = 360;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 300;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 135;
tempInsideBlock.ypos = 300;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 300;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 195;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 210;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 180;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 180;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 510;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 510;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 510;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 180;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 600;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 570;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 75;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 45;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 105;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 180;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 75;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 37;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 1;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 375;
tempInsideIdol.y = 43;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 315;
tempInsideIdol.y = 43;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "The Tower";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 150;
tempInsideBlock.rotation = -90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 240;
tempInsideBlock.rotation = -90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 240;
tempInsideBlock.rotation = -90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = -90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = -90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = -90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = -90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 93;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Flying High";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 570;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 540;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 150;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 120;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 180;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 135;
tempInsideBlock.ypos = 330;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 180;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 330;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 135;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 135;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 135;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 195;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 486;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 204;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 420;
tempInsideIdol.y = 225;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 270;
tempInsideIdol.y = 225;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Frogbits";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 225;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 465;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 210;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 240;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 240;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 240;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 240;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 210;
tempInsideBlock.ypos = 240;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 195;
tempInsideBlock.ypos = 180;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 180;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 525;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 165;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 525;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 165;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 525;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 165;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 525;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 165;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 525;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 165;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 103;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 8;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 495;
tempInsideIdol.y = 126;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 3;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 195;
tempInsideIdol.y = 126;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 3;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Not really";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 213;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 2;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Like balloons";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 377;
tempInsideBlock.ypos = 300;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 313;
tempInsideBlock.ypos = 300;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 300;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 377;
tempInsideBlock.ypos = 270;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 270;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 313;
tempInsideBlock.ypos = 270;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 377;
tempInsideBlock.ypos = 240;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 240;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 313;
tempInsideBlock.ypos = 240;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 377;
tempInsideBlock.ypos = 210;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 313;
tempInsideBlock.ypos = 210;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 210;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 377;
tempInsideBlock.ypos = 330;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 313;
tempInsideBlock.ypos = 330;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 330;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 377;
tempInsideBlock.ypos = 360;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 313;
tempInsideBlock.ypos = 360;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 180;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 150;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 377;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 313;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 112;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 1;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Soda";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 180;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 465;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 465;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 465;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 420;
tempInsideIdol.y = 309;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 5;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
MemoryLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Secret Plans";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 375;
tempInsideIdol.y = 134;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 134;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
SponsorLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Stuck in the Middle";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 330;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 75;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 105;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 465;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 75;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 105;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 240;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 225;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 240;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 214;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 2;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
SponsorLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Protecting Your Garden";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 214;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 2;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
SponsorLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "The Impossible Level";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 180;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 105;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 75;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 45;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 15;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = -15;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
SponsorLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Launch Site";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 135;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
SponsorLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Nogrip";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 180;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 180;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 105;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 75;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 41;
tempInsideIdol.rotation = 22;
tempInsideIdol.itype = 10;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
SponsorLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Trigger";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 615;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 615;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 630;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 600;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 585;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 675;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 615;
tempInsideBlock.ypos = 180;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 615;
tempInsideBlock.ypos = 240;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 615;
tempInsideBlock.ypos = 300;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 346;
tempInsideIdol.y = 398;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 1;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
SponsorLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Mister & Mistress";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 381;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 309;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 365;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 325;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 379;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 312;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 347;
tempInsideIdol.y = 155;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 6;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 346;
tempInsideIdol.y = 364;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = false;
SponsorLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "TouchDown";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 300;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 465;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 330;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 288;
tempInsideIdol.y = 405;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = false;
SponsorLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Fractal";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 330;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 210;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 300;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = false;
SponsorLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Things falling on my head";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 135;
tempInsideBlock.ypos = 105;
tempInsideBlock.rotation = -75;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 300;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 360;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 60;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 273;
tempInsideIdol.y = 349;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 9;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = false;
SponsorLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Inevitable Rise";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 105;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 165;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 225;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 150;
tempInsideBlock.ypos = 180;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 165;
tempInsideBlock.ypos = 240;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 135;
tempInsideBlock.ypos = 240;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 180;
tempInsideBlock.ypos = 300;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 150;
tempInsideBlock.ypos = 300;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 120;
tempInsideBlock.ypos = 300;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 150;
tempInsideIdol.y = 135;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 8;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = false;
SponsorLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Heaven's Gift";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = -105;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = -105;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 210;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 370;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 5;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = false;
SponsorLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Jog";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 135;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 525;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 165;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 150;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 346;
tempInsideIdol.y = 110;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 6;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = false;
SponsorLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "The Rope";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 135;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 240;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 135;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 240;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 240;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 240;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 240;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 240;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 240;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 60;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 60;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 630;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 630;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 630;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 630;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 60;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 60;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 60;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 60;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 630;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 630;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 630;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 60;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 540;
tempInsideIdol.y = 188;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 1;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 150;
tempInsideIdol.y = 188;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 1;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = false;
SponsorLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Hominid";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 240;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 240;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 240;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 180;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 210;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 210;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 360;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 210;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 240;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 180;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 105;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 150;
tempInsideBlock.ypos = 105;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 180;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 210;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 225;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 240;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 90;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 60;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 120;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 165;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 150;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 150;
tempInsideBlock.ypos = 360;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 180;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 180;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 165;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 180;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 240;
tempInsideIdol.y = 0;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 10;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 285;
tempInsideIdol.y = 30;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 10;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 240;
tempInsideIdol.y = 60;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 10;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 285;
tempInsideIdol.y = 90;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 10;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 240;
tempInsideIdol.y = 120;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 10;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 285;
tempInsideIdol.y = 150;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 10;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = false;
SponsorLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Luck";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 397;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 293;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 397;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 293;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 280;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 10;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
UnlockedLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Easy";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 387;
tempInsideBlock.ypos = 283;
tempInsideBlock.rotation = 68;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 305;
tempInsideBlock.ypos = 283;
tempInsideBlock.rotation = -68;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 346;
tempInsideIdol.y = 274;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
UnlockedLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Hard";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 105;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 45;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 75;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 120;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 30;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 75;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 75;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 675;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 600;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 645;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 585;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 615;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 615;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 615;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 330;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 90;
tempInsideIdol.y = 314;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 8;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 615;
tempInsideIdol.y = 285;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 347;
tempInsideIdol.y = 154;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
UnlockedLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Roni's Level";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 105;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 105;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 585;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 645;
tempInsideBlock.ypos = 330;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 585;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 585;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 585;
tempInsideBlock.ypos = 180;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 585;
tempInsideIdol.y = 140;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
UnlockedLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Beka";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 155;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 6;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
UnlockedLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "THISisNOTaLEVEL";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 90;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 90;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 90;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 90;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 120;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 150;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 90;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 180;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 180;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 180;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 150;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 180;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 150;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 120;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 240;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 240;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 240;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 240;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 570;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 600;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 630;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 600;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 570;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 540;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 540;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 630;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 600;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 570;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 210;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 240;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 180;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 150;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 510;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 540;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 570;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 600;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 630;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 360;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 210;
tempInsideBlock.ypos = 360;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 510;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 630;
tempInsideBlock.ypos = 360;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 120;
tempInsideBlock.ypos = 360;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 150;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 120;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 570;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 540;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 600;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 540;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 285;
tempInsideIdol.y = 285;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = false;
UnlockedLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "The REAL Impossible Level";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 347;
tempInsideIdol.y = 155;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 6;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
UnlockedLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Everything";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 225;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 465;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 275;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 238;
tempInsideBlock.rotation = -3;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 466;
tempInsideBlock.ypos = 199;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 225;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 210;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 346;
tempInsideBlock.ypos = 152;
tempInsideBlock.rotation = 1;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 210;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 240;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 540;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 150;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 311;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 0;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 285;
tempInsideIdol.y = 278;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 1;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 405;
tempInsideIdol.y = 274;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 2;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 225;
tempInsideIdol.y = 247;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 3;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 461;
tempInsideIdol.y = 250;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 5;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 420;
tempInsideIdol.y = 120;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 307;
tempInsideIdol.y = 119;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 8;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 267;
tempInsideIdol.y = 124;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 9;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 385;
tempInsideIdol.y = 119;
tempInsideIdol.rotation = 20;
tempInsideIdol.itype = 10;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 111;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
UnlockedLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "The Bell";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 240;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 154;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 2;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
UnlockedLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Besides";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 180;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 495;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 180;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 195;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 390;
tempInsideIdol.y = 195;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideIdol = new Object();
tempInsideIdol.x = 300;
tempInsideIdol.y = 195;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 7;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
UnlockedLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Classic - 01";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 300;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 346;
tempInsideIdol.y = 245;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
ClassicLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Classic - 02";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 302;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 330;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 347;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 348;
tempInsideIdol.y = 244;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
ClassicLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Classic - 03";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 240;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 346;
tempInsideIdol.y = 244;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
ClassicLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Classic - 04";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 290;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 290;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 347;
tempInsideIdol.y = 215;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
ClassicLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Classic - 05";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 350;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 370;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 356;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 358;
tempInsideIdol.y = 185;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
ClassicLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Classic - 06";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 360;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 330;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 4;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 275;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
ClassicLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Classic - 07";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 360;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 180;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 346;
tempInsideIdol.y = 125;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
ClassicLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Classic - 08";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 300;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 180;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 317;
tempInsideIdol.y = 125;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
ClassicLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Classic - 09";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 330;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 330;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 270;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 465;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 180;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 332;
tempInsideIdol.y = 125;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
ClassicLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Classic - 10";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 300;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 300;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 300;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 346;
tempInsideIdol.y = 125;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
ClassicLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Classic - 11";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 330;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 270;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 270;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 346;
tempInsideIdol.y = 95;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
ClassicLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Classic - 12";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 300;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 370;
tempInsideBlock.ypos = 210;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 320;
tempInsideBlock.ypos = 210;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 400;
tempInsideBlock.ypos = 120;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 290;
tempInsideBlock.ypos = 120;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 125;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
ClassicLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Classic - 13";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 330;
tempInsideBlock.rotation = -90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 135;
tempInsideBlock.ypos = 330;
tempInsideBlock.rotation = -90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 528;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 162;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 453;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 120;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 237;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 60;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 347;
tempInsideIdol.y = 275;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
ClassicLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Classic - 14";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 240;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 250;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 195;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 195;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 180;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 180;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 180;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 180;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 180;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 465;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 510;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 440;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 300;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 300;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 331;
tempInsideIdol.y = 125;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
ClassicLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Classic - 15";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 240;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 300;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 460;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 230;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 94;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
ClassicLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Classic - 16";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 465;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 225;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 340;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 355;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 325;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 310;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 370;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 340;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 325;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 370;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 355;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 400;
tempInsideBlock.ypos = 300;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 280;
tempInsideBlock.ypos = 300;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 308;
tempInsideIdol.y = 185;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
ClassicLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Classic - 17";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 210;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 510;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 180;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 510;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 180;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 210;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 510;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 180;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 240;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 6;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 240;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 498;
tempInsideIdol.y = 154;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
ClassicLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Classic - 18";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 450;
tempInsideBlock.ypos = 240;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 240;
tempInsideBlock.ypos = 240;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 105;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 105;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 75;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 75;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 346;
tempInsideIdol.y = 275;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
ClassicLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Classic - 19";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 385;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 385;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 305;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 305;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 240;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 150;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 465;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 225;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 200;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 490;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 210;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 346;
tempInsideIdol.y = 95;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
ClassicLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Classic - 20";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 195;
tempInsideBlock.ypos = 240;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 195;
tempInsideBlock.ypos = 360;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 195;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 75;
tempInsideBlock.ypos = 360;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 75;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 75;
tempInsideBlock.ypos = 240;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 75;
tempInsideBlock.ypos = 300;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 135;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 135;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 135;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 5;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 135;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 195;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 0xFF;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 135;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 435;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 330;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 480;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 555;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 525;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 154;
tempInsideIdol.y = 155;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
ClassicLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Classic - 21";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 90;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 265;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 265;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 265;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 265;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 265;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 425;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 425;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 425;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 425;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 425;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 215;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
ClassicLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Classic - 22";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 346;
tempInsideIdol.y = 124;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
ClassicLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Classic - 23";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 420;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 285;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 0xFF;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 120;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 330;
tempInsideIdol.y = 245;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
ClassicLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Classic - 24";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 390;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 360;
tempInsideBlock.ypos = 330;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 270;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 330;
tempInsideBlock.ypos = 210;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 345;
tempInsideIdol.y = 125;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
ClassicLevels.push(tempInsideLevel);
tempInsideLevel = new Object();
tempInsideLevel.name = "Classic - 25";
tempInsideLevel.blocks = new Array();
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 435;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 150;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 405;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 405;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 2;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 285;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 420;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 3;
tempInsideBlock.sizex = 90;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 135;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 270;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 60;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 270;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 165;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 195;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 300;
tempInsideBlock.ypos = 225;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 270;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 60;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 390;
tempInsideBlock.ypos = 315;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 375;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 315;
tempInsideBlock.ypos = 375;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideBlock = new Object();
tempInsideBlock.phystype = 1;
tempInsideBlock.sizex = 30;
tempInsideBlock.sizey = 30;
tempInsideBlock.xpos = 345;
tempInsideBlock.ypos = 345;
tempInsideBlock.rotation = 0;
tempInsideLevel.blocks.push(tempInsideBlock);
tempInsideLevel.idols = new Array();
tempInsideIdol = new Object();
tempInsideIdol.x = 346;
tempInsideIdol.y = 95;
tempInsideIdol.rotation = 0;
tempInsideIdol.itype = 4;
tempInsideLevel.idols.push(tempInsideIdol);
tempInsideLevel.type = 0;
tempInsideLevel.blockdelay = true;
ClassicLevels.push(tempInsideLevel);
}
public static function Init(){
BuildMemory();
}
}
}//package TotemEngine
Section 203
//LevelEditor (TotemEngine.LevelEditor)
package TotemEngine {
import flash.display.*;
import flash.events.*;
import Box2D.Dynamics.*;
import Box2D.Collision.Shapes.*;
import Box2D.Common.Math.*;
import Box2D.Dynamics.Joints.*;
import Box2D.Collision.*;
import flash.geom.*;
import Box2D.Dynamics.Contacts.*;
import General.*;
public class LevelEditor {
private static var dummiesSelected:Array = new Array();
private static var dummiesList:Array = new Array();
private static var IdolInstance;
private static var currentIdolIndex:int = 0;
private static var ld_folder:int = -1;
private static var testing:Boolean = false;
private static var editorInstance;
private static var blockRotation = 0;
private static var ld_blocks:Array = new Array();
private static var ObjectsId:int = 0;
private static var humptyDumptyType:int;
private static var ld_blockdelay:Boolean = true;
private static var ld_id:int = -1;
private static var regPoint1:Point;
private static var regPoint2:Point;
private static var regPoint3:Point;
private static var regPoint4:Point;
private static var ld_idoltype:int = 0;
private static var humptyDumptyRotation:Boolean;
private static var idolsList:Array = new Array();
private static var BROWSER_MODE:String = "LOAD";
private static var selectorInstance;
private static var ld_type:int = 0;
private static var humptyIdolType:int;
private static var enableShortcuts:Boolean = true;
private static var ld_idols:Array = new Array();
private static var ld_idolamount:int = 0;
private static var ld_idolx:Number = 345;
private static var ld_idoly:Number = 30;
private static var PATH_TO_ID:int = -1;
private static var MoveIdol:Boolean = false;
private static var blockScutMc;
private static var onDrag1:Boolean = false;
private static var onDrag2:Boolean = false;
private static var onDrag3:Boolean = false;
private static var onDrag4:Boolean = false;
private static var root:MovieClip;
private static var humptyDumptySize:String;
private static var ld_name:String = "New Level";
private static var idolsSelected:Array = new Array();
private static var stage:Stage;
private static function dummyDrag(_arg1:Event):void{
var _local2:int;
var _local3:int;
var _local4:Array;
var _local5:int;
var _local6:Array;
if (Key.isDown(37)){
_local2 = 0;
while (_local2 < dummiesSelected.length) {
if (Key.isDown(16)){
dummiesSelected[_local2].x--;
} else {
dummiesSelected[_local2].x = (Math.ceil(((dummiesSelected[_local2].x / 15) - 1)) * 15);
};
_local2++;
};
_local2 = 0;
while (_local2 < idolsSelected.length) {
if (Key.isDown(16)){
idolsSelected[_local2].x--;
} else {
idolsSelected[_local2].x = (Math.ceil(((idolsSelected[_local2].x / 15) - 1)) * 15);
};
_local2++;
};
dummySelect();
Key.removeKey(37);
};
if (Key.isDown(39)){
_local2 = 0;
while (_local2 < dummiesSelected.length) {
if (Key.isDown(16)){
dummiesSelected[_local2].x++;
} else {
dummiesSelected[_local2].x = (Math.floor(((dummiesSelected[_local2].x / 15) + 1)) * 15);
};
_local2++;
};
_local2 = 0;
while (_local2 < idolsSelected.length) {
if (Key.isDown(16)){
idolsSelected[_local2].x++;
} else {
idolsSelected[_local2].x = (Math.floor(((idolsSelected[_local2].x / 15) + 1)) * 15);
};
_local2++;
};
dummySelect();
Key.removeKey(39);
};
if (Key.isDown(38)){
_local2 = 0;
while (_local2 < dummiesSelected.length) {
if (Key.isDown(16)){
dummiesSelected[_local2].y--;
} else {
dummiesSelected[_local2].y = (Math.ceil(((dummiesSelected[_local2].y / 15) - 1)) * 15);
};
_local2++;
};
_local2 = 0;
while (_local2 < idolsSelected.length) {
if (Key.isDown(16)){
idolsSelected[_local2].y--;
} else {
idolsSelected[_local2].y = (Math.ceil(((idolsSelected[_local2].y / 15) - 1)) * 15);
};
_local2++;
};
dummySelect();
Key.removeKey(38);
};
if (Key.isDown(40)){
_local2 = 0;
while (_local2 < dummiesSelected.length) {
if (Key.isDown(16)){
dummiesSelected[_local2].y++;
} else {
dummiesSelected[_local2].y = (Math.floor(((dummiesSelected[_local2].y / 15) + 1)) * 15);
};
_local2++;
};
_local2 = 0;
while (_local2 < idolsSelected.length) {
if (Key.isDown(16)){
idolsSelected[_local2].y++;
} else {
idolsSelected[_local2].y = (Math.floor(((idolsSelected[_local2].y / 15) + 1)) * 15);
};
_local2++;
};
dummySelect();
Key.removeKey(40);
};
if (((Key.isDown(109)) || (Key.isDown(188)))){
_local2 = 0;
while (_local2 < dummiesSelected.length) {
if (Key.isDown(16)){
dummiesSelected[_local2].rotation--;
} else {
dummiesSelected[_local2].rotation = (Math.ceil(((dummiesSelected[_local2].rotation / 15) - 1)) * 15);
};
_local2++;
};
_local2 = 0;
while (_local2 < idolsSelected.length) {
if (Key.isDown(16)){
idolsSelected[_local2].rotation--;
} else {
idolsSelected[_local2].rotation = (Math.ceil(((idolsSelected[_local2].rotation / 15) - 1)) * 15);
};
_local2++;
};
dummySelect();
Key.removeKey(109);
Key.removeKey(188);
};
if (((Key.isDown(107)) || (Key.isDown(190)))){
_local2 = 0;
while (_local2 < dummiesSelected.length) {
if (Key.isDown(16)){
dummiesSelected[_local2].rotation++;
} else {
dummiesSelected[_local2].rotation = (Math.floor(((dummiesSelected[_local2].rotation / 15) + 1)) * 15);
};
_local2++;
};
_local2 = 0;
while (_local2 < idolsSelected.length) {
if (Key.isDown(16)){
idolsSelected[_local2].rotation++;
} else {
idolsSelected[_local2].rotation = (Math.floor(((idolsSelected[_local2].rotation / 15) + 1)) * 15);
};
_local2++;
};
dummySelect();
Key.removeKey(107);
Key.removeKey(190);
};
if (Key.isDown(46)){
_local2 = 0;
while (_local2 < dummiesSelected.length) {
_local3 = 0;
while (_local3 < dummiesList.length) {
if (dummiesSelected[_local2].bid == dummiesList[_local3].bid){
root.GAME.EDT.removeChild(dummiesList[_local3]);
_local4 = dummiesList.splice(_local3, 1);
CheckBlocksRemaining();
break;
};
_local3++;
};
_local2++;
};
_local2 = 0;
while (_local2 < idolsSelected.length) {
_local5 = 0;
while (_local5 < idolsList.length) {
if (idolsSelected[_local2].bid == idolsList[_local5].bid){
root.GAME.EDIDOL.removeChild(idolsList[_local5]);
_local6 = idolsList.splice(_local5, 1);
break;
};
_local5++;
};
_local2++;
};
dummiesSelected = new Array();
idolsSelected = new Array();
dummySelect();
Key.removeKey(46);
};
}
public static function CloseExport2(_arg1:MouseEvent){
editorInstance.w_export2.x = 1999;
}
public static function IFDoubleClick(_arg1:MouseEvent):void{
if (editorInstance.w_import.l_implist.selectedItem.type == "FOLDER"){
PATH_TO_ID = editorInstance.w_import.l_implist.selectedItem.data;
UpdateImportBrowser();
};
}
public static function DeletionCancel(_arg1:MouseEvent):void{
editorInstance.w_c_delete.x = 3000;
editorInstance.w_c_delete.y = (480 / 2);
}
public static function DeletionConfirm(_arg1:MouseEvent):void{
var _local2:Object;
editorInstance.w_c_delete.x = 3000;
editorInstance.w_c_delete.y = (480 / 2);
_local2 = editorInstance.w_loadlevel.l_current.selectedItem;
if (_local2.type == "FOLDER"){
Data.DeleteFolder(_local2.data);
} else {
Data.DeleteLevel(_local2.data);
};
UpdateLevelBrowser();
}
private static function ParseImportData(_arg1:String):void{
var _local2:Boolean;
var _local3:Array;
var _local4:int;
var _local5:Array;
var _local6:Object;
var _local7:Array;
var _local8:int;
var _local9:Array;
var _local10:Array;
var _local11:int;
var _local12:Array;
var _local13:int;
var _local14:String;
var _local15:int;
var _local16:Boolean;
var _local17:int;
var _local18:Array;
var _local19:Object;
var _local20:Array;
var _local21:Object;
_local2 = true;
editorInstance.w_import2.t_status.text = "/// STARTING TO IMPORT DATA\n";
_local3 = _arg1.split("@T2|BD@");
_local4 = 0;
while (_local4 < _local3.length) {
_local5 = _local3[_local4].split("@#T2|LF#@");
_local6 = new Object();
_local6.name = _local5[0];
_local6.id = Data.NewFolder(_local6.name, PATH_TO_ID);
editorInstance.w_import2.t_status.appendText((("FOLDER '" + _local6.name) + "' created.\n"));
if (_local5[1].length > 5){
_local7 = _local5[1].split("@#T2/LL#@");
_local8 = 0;
while (_local8 < _local7.length) {
_local9 = _local7[_local8].split("@###@");
if (_local9.length != 5){
editorInstance.w_import2.t_status.appendText("LEVEL DATA CORRUPT, CURRENT LEVEL IS NOT GOING TO BE IMPORTED\n");
trace("%%%LEVEL DATA CORRUPT, NOT GOING TO BE IMPORTED%%%");
} else {
editorInstance.w_import2.t_status.appendText((("Importing a level to '" + _local6.name) + "' folder.\n"));
_local10 = _local9[1].split("*b b*");
_local11 = 0;
while (_local11 < _local10.length) {
_local18 = _local10[_local11].split("*b p*");
if (_local18.length != 6){
editorInstance.w_import2.t_status.appendText("##BLOCK DATA CORRUPT\n");
_local10 = new Array();
break;
} else {
_local19 = new Object();
_local19.phystype = int(_local18[0]);
_local19.sizex = int(_local18[1]);
_local19.sizey = int(_local18[2]);
_local19.xpos = Number(_local18[3]);
_local19.ypos = Number(_local18[4]);
_local19.rotation = Number(_local18[5]);
_local10[_local11] = _local19;
};
_local11++;
};
_local12 = _local9[2].split("*i i*");
_local13 = 0;
while (_local13 < _local12.length) {
_local20 = _local12[_local13].split("*i p*");
if (_local20.length != 4){
editorInstance.w_import2.t_status.appendText("##IDOL DATA CORRUPT\n");
_local12 = new Array();
break;
} else {
_local21 = new Object();
_local21.x = Number(_local20[0]);
_local21.y = Number(_local20[1]);
_local21.rotation = Number(_local20[2]);
_local21.itype = int(_local20[3]);
_local12[_local13] = _local21;
};
_local13++;
};
_local14 = String(_local9[0]);
_local15 = int(_local9[3]);
if (_local9[4] == "true"){
_local16 = true;
} else {
_local16 = false;
};
_local17 = Data.SaveLevel(_local14, _local10, _local12, -1, _local6.id, _local15, _local16);
editorInstance.w_import2.t_status.appendText((("LEVEL '" + _local14) + "' created.\n"));
};
_local8++;
};
} else {
trace("THIS FOLDER IS EMPTY");
editorInstance.w_import2.t_status.appendText((("FOLDER '" + _local6.name) + "' seems to be empty.\n"));
};
_local4++;
};
editorInstance.w_import2.t_status.appendText("/// DONE");
}
public static function ShowQuitWindow(_arg1:MouseEvent){
if (!testing){
editorInstance.w_c_nosave.x = (690 / 2);
editorInstance.w_c_nosave.y = (480 / 2);
};
}
private static function LoadLevel(_arg1:int):void{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:*;
var _local7:*;
_local2 = 0;
while (_local2 < Data.TotemData.data.Editor.levels.length) {
if (_arg1 == Data.TotemData.data.Editor.levels[_local2].id){
ld_id = Data.TotemData.data.Editor.levels[_local2].id;
ld_blocks = Data.TotemData.data.Editor.levels[_local2].blocks;
ld_name = Data.TotemData.data.Editor.levels[_local2].name;
ld_folder = Data.TotemData.data.Editor.levels[_local2].folder;
ld_type = Data.TotemData.data.Editor.levels[_local2].type;
ld_blockdelay = Data.TotemData.data.Editor.levels[_local2].blockdelay;
editorInstance.w_levelcfg.ckb_delay.selected = ld_blockdelay;
ld_idols = Data.TotemData.data.Editor.levels[_local2].idols;
editorInstance.w_levelcfg.ckb_delay.selected = ld_blockdelay;
if (testing){
root.GAME.EDT.visible = true;
root.GAME.EDIDOL.visible = true;
editorInstance.grid.visible = true;
Gear.Clear();
editorInstance.testbool.gotoAndStop(1);
testing = false;
Gear.gameMode = "test";
};
dummiesSelected = new Array();
_local3 = 0;
while (_local3 < dummiesList.length) {
root.GAME.EDT.removeChild(dummiesList[_local3]);
delete dummiesList[_local3];
_local3++;
};
dummiesList = new Array();
editorInstance.w_levelcfg.ls_idol.selectedIndex = ld_idoltype;
editorInstance.w_levelcfg.t_lvlname.text = ld_name;
_local4 = 0;
while (_local4 < ld_blocks.length) {
_local6 = returnMovieClip(((ld_blocks[_local4].sizex + "x") + ld_blocks[_local4].sizey));
_local6.bsize = ((ld_blocks[_local4].sizex + "x") + ld_blocks[_local4].sizey);
_local6.btype = ld_blocks[_local4].phystype;
_local6.bwidth = returnMovieClip(((ld_blocks[_local4].sizex + "x") + ld_blocks[_local4].sizey), "width");
_local6.bheight = returnMovieClip(((ld_blocks[_local4].sizex + "x") + ld_blocks[_local4].sizey), "height");
_local6.x = ld_blocks[_local4].xpos;
_local6.y = ld_blocks[_local4].ypos;
_local6.rotation = ld_blocks[_local4].rotation;
_local6.bid = dummiesList.length;
_local6.bselected = false;
_local7 = root.GAME.EDT.addChild(_local6);
_local7.gotoAndStop(ld_blocks[_local4].phystype);
dummiesList.push(_local7);
_local4++;
};
while (root.GAME.EDIDOL.numChildren > 0) {
root.GAME.EDIDOL.removeChildAt(0);
};
idolsList = new Array();
_local5 = 0;
while (_local5 < ld_idols.length) {
Pdol(ld_idols[_local5].itype, ld_idols[_local5].x, ld_idols[_local5].y, ld_idols[_local5].rotation);
_local5++;
};
break;
};
_local2++;
};
CheckBlocksRemaining();
}
private static function TestLevel(_arg1:MouseEvent):void{
var _local2:Array;
var _local3:int;
var _local4:int;
if (!testing){
root.GAME.EDT.visible = false;
root.GAME.EDIDOL.visible = false;
editorInstance.grid.visible = false;
_local2 = new Array("Normal", "Black", "Sloppy", "Combo", "Explosive", "Glass");
_local3 = 0;
while (_local3 < dummiesList.length) {
Factory.NewBlock(_local2[(dummiesList[_local3].btype - 1)], (dummiesList[_local3].bwidth / 30), (dummiesList[_local3].bheight / 30), dummiesList[_local3].x, dummiesList[_local3].y, dummiesList[_local3].rotation);
_local3++;
};
_local4 = 0;
while (_local4 < idolsList.length) {
Gear.MakeIdol(idolsList[_local4].itype, idolsList[_local4].x, idolsList[_local4].y, idolsList[_local4].rotation);
_local4++;
};
editorInstance.testbool.gotoAndStop(2);
editorInstance.w_addblock.x = 800;
editorInstance.w_addblock.y = 240;
editorInstance.w_c_nosave.x = 1000;
editorInstance.w_c_nosave.y = 1000;
editorInstance.w_levelcfg.x = 1000;
editorInstance.w_levelcfg.y = 1000;
editorInstance.w_c_overwrite.x = 1000;
editorInstance.w_c_overwrite.y = 1000;
editorInstance.w_c_delete.x = 1000;
editorInstance.w_c_delete.y = 1000;
editorInstance.w_export.x = 1000;
editorInstance.w_export.y = 1000;
editorInstance.w_import.x = 1000;
editorInstance.w_import.y = 1000;
editorInstance.w_loadlevel.x = 1000;
editorInstance.w_loadlevel.y = 1000;
editorInstance.w_loadsave.x = 1000;
editorInstance.w_loadsave.y = 1000;
testing = true;
dummiesSelected = new Array();
idolsSelected = new Array();
dummySelect();
Gear.gameMode = "test";
Gear.delay = 0;
ld_blockdelay = editorInstance.w_levelcfg.ckb_delay.selected;
Gear.doDelay = ld_blockdelay;
Gear.DrawCursor();
blockScutMc.alpha = 0;
editorInstance.alpha = 0.9;
editorInstance.cards.visible = false;
} else {
root.GAME.EDT.visible = true;
root.GAME.EDIDOL.visible = true;
editorInstance.grid.visible = true;
Gear.Clear();
editorInstance.testbool.gotoAndStop(1);
testing = false;
Gear.gameMode = "test";
editorInstance.alpha = 1;
editorInstance.cards.visible = true;
};
}
private static function CloseNewFolderWindow2():void{
editorInstance.w_import.NewFolder.x = 3000.5;
editorInstance.w_import.NewFolder.y = -78.8;
editorInstance.w_import.NewFolder.visible = false;
}
public static function Init(_arg1:MovieClip, _arg2:Stage){
root = _arg1;
stage = _arg2;
}
public static function ShowExport(_arg1:MouseEvent){
editorInstance.w_loadsave.x = 1999;
editorInstance.w_loadlevel.x = 1999;
editorInstance.w_export.x = (690 / 2);
editorInstance.w_export.y = (480 / 2);
UpdateExportBrowser();
}
public static function DragEnd2(_arg1:MouseEvent){
onDrag2 = false;
stage.focus = null;
}
public static function DragEnd3(_arg1:MouseEvent){
onDrag3 = false;
stage.focus = null;
}
public static function CloseImport2(_arg1:MouseEvent){
editorInstance.w_import2.x = 1999;
}
private static function NewLevelButton(_arg1:MouseEvent):void{
var _local2:int;
if (testing){
root.GAME.EDT.visible = true;
root.GAME.EDIDOL.visible = true;
editorInstance.grid.visible = true;
Gear.Clear();
editorInstance.testbool.gotoAndStop(1);
testing = false;
Gear.gameMode = "test";
};
ld_id = -1;
dummiesSelected = new Array();
_local2 = 0;
while (_local2 < dummiesList.length) {
root.GAME.EDT.removeChild(dummiesList[_local2]);
delete dummiesList[_local2];
_local2++;
};
dummiesList = new Array();
editorInstance.w_levelcfg.t_lvlname.text = "New Level! hurray :)";
while (root.GAME.EDIDOL.numChildren > 0) {
root.GAME.EDIDOL.removeChildAt(0);
};
idolsList = new Array();
editorInstance.w_loadsave.x = 1999;
editorInstance.w_loadlevel.x = 1999;
stage.focus = null;
}
public static function DragEnd1(_arg1:MouseEvent){
onDrag1 = false;
stage.focus = null;
}
public static function ShowImport(_arg1:MouseEvent){
editorInstance.w_loadsave.x = 1999;
editorInstance.w_loadlevel.x = 1999;
editorInstance.w_import.x = (690 / 2);
editorInstance.w_import.y = (480 / 2);
UpdateImportBrowser();
}
public static function ShowLevelBrowser_save(_arg1:MouseEvent){
var _local2:Boolean;
SwitchBrowserMode("SAVE");
_local2 = Data.CheckSaveLevel(ld_id);
if (!_local2){
editorInstance.w_loadsave.x = 999;
editorInstance.w_c_overwrite.x = (690 / 2);
editorInstance.w_c_overwrite.y = (480 / 2);
} else {
editorInstance.w_loadsave.x = 999;
editorInstance.w_loadlevel.x = (690 / 2);
editorInstance.w_loadlevel.y = (480 / 2);
UpdateLevelBrowser();
};
}
private static function CancelSave(_arg1:MouseEvent):void{
editorInstance.w_c_overwrite.x = 1000;
editorInstance.w_c_overwrite.y = (480 / 2);
stage.focus = null;
}
public static function DoExport(_arg1:MouseEvent){
var _local2:Array;
var _local3:int;
if (editorInstance.w_export.l_explist.selectedItems.length > 0){
_local2 = new Array();
_local3 = 0;
while (_local3 < editorInstance.w_export.l_explist.selectedItems.length) {
_local2.push(editorInstance.w_export.l_explist.selectedItems[_local3].data);
_local3++;
};
editorInstance.w_export.x = 1999;
editorInstance.w_export2.x = (690 / 2);
editorInstance.w_export2.y = (480 / 2);
Data.PrepareExport(_local2, "TDL");
editorInstance.w_export2.t_output.text = Data.dataOutput;
};
}
private static function CheckBlocksRemaining():void{
var _local1:int;
var _local2:int;
_local1 = 0;
_local2 = 0;
while (_local2 < dummiesList.length) {
if (dummiesList[_local2].btype != 2){
_local1++;
};
_local2++;
};
editorInstance.w_levelcfg.numericblocks.maximum = _local1;
editorInstance.w_levelcfg.numericblocks.value = _local1;
}
private static function CloseLoadLevel(_arg1:MouseEvent):void{
editorInstance.w_loadlevel.x = 1200;
stage.focus = null;
}
public static function DoImport(_arg1:MouseEvent){
var _local2:Array;
var _local3:int;
_local2 = new Array();
_local3 = 0;
while (_local3 < editorInstance.w_export.l_explist.selectedItems.length) {
_local2.push(editorInstance.w_export.l_explist.selectedItems[_local3].data);
_local3++;
};
editorInstance.w_import.x = 1999;
editorInstance.w_import2.x = (690 / 2);
editorInstance.w_import2.y = (480 / 2);
ParseImportData(editorInstance.w_import.t_input.text);
}
private static function addButton(_arg1:MouseEvent):void{
var _local2:int;
_local2 = 0;
if (editorInstance.w_addblock.addb_90.selected){
_local2 = 90;
};
addDummyBlock(editorInstance.w_addblock.ls_size.selectedItem.data, editorInstance.w_addblock.ls_type.selectedItem.data, _local2);
stage.focus = null;
}
private static function SaveLevelRoots(_arg1:Boolean=false):void{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:Object;
var _local6:*;
ld_blocks = new Array();
_local2 = 0;
while (_local2 < dummiesList.length) {
_local5 = new Object();
_local5.phystype = dummiesList[_local2].btype;
_local5.sizex = dummiesList[_local2].bwidth;
_local5.sizey = dummiesList[_local2].bheight;
_local5.xpos = dummiesList[_local2].x;
_local5.ypos = dummiesList[_local2].y;
_local5.rotation = dummiesList[_local2].rotation;
ld_blocks.push(_local5);
_local2++;
};
ld_name = editorInstance.w_levelcfg.t_lvlname.text;
ld_idols = new Array();
_local3 = 0;
while (_local3 < idolsList.length) {
_local6 = new Object();
_local6.x = idolsList[_local3].x;
_local6.y = idolsList[_local3].y;
_local6.rotation = idolsList[_local3].rotation;
_local6.itype = idolsList[_local3].itype;
ld_idols.push(_local6);
_local3++;
};
if (!_arg1){
ld_folder = PATH_TO_ID;
};
ld_type = 0;
ld_blockdelay = editorInstance.w_levelcfg.ckb_delay.selected;
_local4 = Data.SaveLevel(ld_name, ld_blocks, ld_idols, ld_id, ld_folder, ld_type, ld_blockdelay);
ld_id = _local4;
}
private static function addDummyBlock(_arg1:String, _arg2:int, _arg3:Number=0, _arg4:int=345, _arg5:int=15){
var _local6:*;
var _local7:*;
_local6 = returnMovieClip(_arg1);
_local6.bsize = _arg1;
_local6.btype = _arg2;
_local6.bwidth = returnMovieClip(_arg1, "width");
_local6.bheight = returnMovieClip(_arg1, "height");
_local6.x = _arg4;
_local6.y = _arg5;
_local6.rotation = _arg3;
ObjectsId++;
_local6.bid = ObjectsId;
_local6.bselected = false;
_local7 = root.GAME.EDT.addChild(_local6);
_local7.gotoAndStop(_arg2);
dummiesList.push(_local7);
CheckBlocksRemaining();
}
public static function LevelCfgChange():void{
var _local1:MovieClip;
var _local2:*;
while (editorInstance.w_levelcfg.placeapples.numChildren > 0) {
editorInstance.w_levelcfg.placeapples.removeChildAt(0);
};
_local1 = returnMovieClip(("i" + editorInstance.w_levelcfg.ls_idol.selectedItem.data));
_local1.scaleX = 0.7;
_local1.scaleY = 0.7;
_local2 = editorInstance.w_levelcfg.placeapples.addChild(_local1);
}
private static function CloseLevelcfg(_arg1:MouseEvent):void{
editorInstance.w_levelcfg.x = 800;
enableShortcuts = false;
stage.focus = null;
}
public static function CancelQuitWindow(_arg1:MouseEvent){
editorInstance.w_c_nosave.x = 2000;
editorInstance.w_c_nosave.y = 2000;
}
public static function UpdateImportBrowser():void{
var _local1:int;
var _local2:int;
var _local3:Object;
var _local4:Object;
editorInstance.w_import.l_implist.removeAll();
editorInstance.w_import.t_path.text = Data.GetPath(PATH_TO_ID);
_local1 = Data.GetParentIdById(PATH_TO_ID);
if (PATH_TO_ID != -1){
_local3 = new Object();
_local3.type = "FOLDER";
_local3.iconSource = new Icon_Back();
_local3.label = "back to parent folder";
_local3.data = _local1;
editorInstance.w_import.l_implist.addItem(_local3);
};
_local2 = 0;
while (_local2 < Data.TotemData.data.Editor.folders.length) {
_local4 = new Object();
_local4.type = "FOLDER";
_local4.iconSource = new Icon_Folder();
_local4.label = Data.TotemData.data.Editor.folders[_local2].name;
_local4.data = Data.TotemData.data.Editor.folders[_local2].id;
if (Data.TotemData.data.Editor.folders[_local2].parentId == PATH_TO_ID){
editorInstance.w_import.l_implist.addItem(_local4);
};
_local2++;
};
}
private static function CloseAddBlock(_arg1:MouseEvent):void{
editorInstance.w_addblock.x = 800;
stage.focus = null;
}
public static function DrawMingies():void{
var _local1:MovieClip;
var _local2:*;
while (editorInstance.w_addblock.placerocks.numChildren > 0) {
editorInstance.w_addblock.placerocks.removeChildAt(0);
};
_local1 = returnMovieClip(editorInstance.w_addblock.ls_size.selectedItem.data);
_local1.scaleX = 0.32;
_local1.scaleY = 0.32;
if (editorInstance.w_addblock.addb_90.selected){
_local1.rotation = 90;
};
_local2 = editorInstance.w_addblock.placerocks.addChild(_local1);
_local2.gotoAndStop(editorInstance.w_addblock.ls_type.selectedItem.data);
humptyDumptySize = editorInstance.w_addblock.ls_size.selectedItem.data;
humptyDumptyType = editorInstance.w_addblock.ls_type.selectedItem.data;
humptyDumptyRotation = editorInstance.w_addblock.addb_90.selected;
}
public static function Build(_arg1:int=-1){
var _local2:Sprite;
var _local3:G_leveleditor;
var _local4:MovieClip;
var _local5:MovieClip;
Gear.gameMode = "none";
_local2 = new Sprite();
selectorInstance = root.GAME.DEBUG.addChild(_local2);
_local3 = new G_leveleditor();
editorInstance = root.GAME.HUD.addChild(_local3);
editorInstance.bt_addblock.addEventListener(MouseEvent.CLICK, ShowAddBlockWindow);
editorInstance.bt_levelcfg.addEventListener(MouseEvent.CLICK, ShowLevelcfgWindow);
editorInstance.bt_loadsave.addEventListener(MouseEvent.CLICK, ShowLoadSaveWindow);
editorInstance.bt_quit.addEventListener(MouseEvent.CLICK, ShowQuitWindow);
editorInstance.bt_help.addEventListener(MouseEvent.CLICK, ShowHelpWindow);
editorInstance.w_help.bt_close.addEventListener(MouseEvent.CLICK, CloseHelpWindow);
editorInstance.w_c_nosave.bt_yes.addEventListener(MouseEvent.CLICK, ConfirmQuitWindow);
editorInstance.w_c_nosave.bt_no.addEventListener(MouseEvent.CLICK, CancelQuitWindow);
editorInstance.w_addblock.addEventListener(Event.ENTER_FRAME, Dragging1);
editorInstance.w_levelcfg.addEventListener(Event.ENTER_FRAME, Dragging2);
editorInstance.w_loadsave.addEventListener(Event.ENTER_FRAME, Dragging3);
editorInstance.w_levelcfg.ls_idol.addEventListener(Event.CHANGE, SliderChangeIdol);
editorInstance.w_loadsave.bt_load.addEventListener(MouseEvent.CLICK, ShowLevelBrowser);
editorInstance.w_addblock.bt_drag.addEventListener(MouseEvent.MOUSE_DOWN, DragStart1);
editorInstance.w_levelcfg.bt_drag.addEventListener(MouseEvent.MOUSE_DOWN, DragStart2);
editorInstance.w_loadsave.bt_drag.addEventListener(MouseEvent.MOUSE_DOWN, DragStart3);
editorInstance.w_addblock.bt_drag.addEventListener(MouseEvent.MOUSE_UP, DragEnd1);
editorInstance.w_levelcfg.bt_drag.addEventListener(MouseEvent.MOUSE_UP, DragEnd2);
editorInstance.w_loadsave.bt_drag.addEventListener(MouseEvent.MOUSE_UP, DragEnd3);
editorInstance.w_addblock.bt_addblock.addEventListener(MouseEvent.CLICK, addButton);
editorInstance.w_levelcfg.bt_addidol.addEventListener(MouseEvent.CLICK, PlaceIdol);
editorInstance.w_addblock.bt_close.addEventListener(MouseEvent.CLICK, CloseAddBlock);
editorInstance.w_levelcfg.bt_close.addEventListener(MouseEvent.CLICK, CloseLevelcfg);
editorInstance.w_loadsave.bt_close.addEventListener(MouseEvent.CLICK, CloseLoadSave);
editorInstance.w_loadlevel.bt_close.addEventListener(MouseEvent.CLICK, CloseLoadLevel);
editorInstance.w_loadlevel.bt_load.addEventListener(MouseEvent.CLICK, LoadButton);
editorInstance.w_loadlevel.bt_save.addEventListener(MouseEvent.CLICK, SaveLevel);
editorInstance.w_loadlevel.bt_newfolder.addEventListener(MouseEvent.CLICK, ShowAddNewFolderWindow);
editorInstance.w_loadlevel.NewFolder.bt_create.addEventListener(MouseEvent.CLICK, AddFolderButton);
editorInstance.w_loadlevel.NewFolder.bt_cancel.addEventListener(MouseEvent.CLICK, NoFolderButton);
editorInstance.w_loadlevel.addEventListener(MouseEvent.DOUBLE_CLICK, FFDoubleClick);
editorInstance.w_loadlevel.bt_delete.addEventListener(MouseEvent.CLICK, CallDeletion);
editorInstance.w_c_delete.bt_yes.addEventListener(MouseEvent.CLICK, DeletionConfirm);
editorInstance.w_c_delete.bt_no.addEventListener(MouseEvent.CLICK, DeletionCancel);
editorInstance.w_loadsave.bt_save.addEventListener(MouseEvent.CLICK, ShowLevelBrowser_save);
editorInstance.w_loadsave.bt_new.addEventListener(MouseEvent.CLICK, NewLevelButton);
editorInstance.w_loadsave.bt_export.addEventListener(MouseEvent.CLICK, ShowExport);
editorInstance.w_loadsave.bt_import.addEventListener(MouseEvent.CLICK, ShowImport);
editorInstance.w_export.bt_close.addEventListener(MouseEvent.CLICK, CloseExport);
editorInstance.w_export2.bt_close.addEventListener(MouseEvent.CLICK, CloseExport2);
editorInstance.w_export.bt_export.addEventListener(MouseEvent.CLICK, DoExport);
editorInstance.w_export.addEventListener(MouseEvent.DOUBLE_CLICK, EFDoubleClick);
editorInstance.w_import.bt_close.addEventListener(MouseEvent.CLICK, CloseImport);
editorInstance.w_import2.bt_close.addEventListener(MouseEvent.CLICK, CloseImport2);
editorInstance.w_import.bt_import.addEventListener(MouseEvent.CLICK, DoImport);
editorInstance.w_import.bt_newfolder.addEventListener(MouseEvent.CLICK, ShowAddNewFolderWindow2);
editorInstance.w_import.NewFolder.bt_create.addEventListener(MouseEvent.CLICK, AddFolderButton2);
editorInstance.w_import.NewFolder.bt_cancel.addEventListener(MouseEvent.CLICK, NoFolderButton2);
editorInstance.w_import.addEventListener(MouseEvent.DOUBLE_CLICK, IFDoubleClick);
editorInstance.w_c_overwrite.bt_no.addEventListener(MouseEvent.CLICK, CancelSave);
editorInstance.w_c_overwrite.bt_yes.addEventListener(MouseEvent.CLICK, Overwrite);
editorInstance.w_c_overwrite.bt_copy.addEventListener(MouseEvent.CLICK, SaveNew);
editorInstance.bt_test.addEventListener(MouseEvent.CLICK, TestLevel);
editorInstance.w_addblock.ls_type.selectedIndex = 0;
editorInstance.w_addblock.ls_size.selectedIndex = 0;
editorInstance.w_levelcfg.ls_idol.selectedIndex = 0;
currentIdolIndex = 0;
editorInstance.w_levelcfg.ckb_delay.selected = true;
root.addEventListener(Event.ENTER_FRAME, dummyDrag);
humptyDumptySize = editorInstance.w_addblock.ls_size.selectedItem.data;
humptyDumptyType = editorInstance.w_addblock.ls_type.selectedItem.data;
humptyDumptyRotation = editorInstance.w_addblock.addb_90.selected;
_local4 = returnMovieClip(editorInstance.w_addblock.ls_size.selectedItem.data);
_local4.scaleX = 0.32;
_local4.scaleY = 0.32;
editorInstance.w_addblock.placerocks.addChild(_local4);
root.addEventListener(MouseEvent.CLICK, ControlSelection);
editorInstance.grid.mouseEnabled = false;
editorInstance.grid.mouseChildren = false;
IdolInstance = root.GAME.EDIDOL.addChild(new MovieClip());
LevelCfgChange();
_local5 = new MovieClip();
blockScutMc = root.GAME.CURSOR.addChild(_local5);
blockScutMc.alpha = 0;
blockScutMc.mouseEnabled = false;
root.GAME.CURSOR.mouseEnabled = false;
root.GAME.CURSOR.mouseChildren = false;
editorInstance.w_loadlevel.l_current.iconField = "iconSource";
editorInstance.w_export.l_explist.iconField = "iconSource";
editorInstance.w_import.l_implist.iconField = "iconSource";
editorInstance.w_loadlevel.NewFolder.visible = false;
editorInstance.w_import.NewFolder.visible = false;
}
public static function UpdateExportBrowser():void{
var _local1:int;
var _local2:int;
var _local3:Object;
var _local4:Object;
editorInstance.w_export.l_explist.removeAll();
_local1 = Data.GetParentIdById(PATH_TO_ID);
if (PATH_TO_ID != -1){
_local3 = new Object();
_local3.type = "FOLDER";
_local3.iconSource = new Icon_Back();
_local3.label = "back to parent folder";
_local3.data = _local1;
editorInstance.w_export.l_explist.addItem(_local3);
};
_local2 = 0;
while (_local2 < Data.TotemData.data.Editor.folders.length) {
_local4 = new Object();
_local4.type = "FOLDER";
_local4.iconSource = new Icon_Folder();
_local4.label = Data.TotemData.data.Editor.folders[_local2].name;
_local4.data = Data.TotemData.data.Editor.folders[_local2].id;
if (Data.TotemData.data.Editor.folders[_local2].parentId == PATH_TO_ID){
editorInstance.w_export.l_explist.addItem(_local4);
};
_local2++;
};
}
public static function FFDoubleClick(_arg1:MouseEvent):void{
if (editorInstance.w_loadlevel.l_current.selectedItem.type == "FOLDER"){
PATH_TO_ID = editorInstance.w_loadlevel.l_current.selectedItem.data;
UpdateLevelBrowser();
} else {
if (editorInstance.w_loadlevel.l_current.selectedItem.type == "FILE"){
editorInstance.w_loadlevel.x = 1200;
stage.focus = null;
LoadLevel(editorInstance.w_loadlevel.l_current.selectedItem.data);
};
};
}
public static function AddFolderButton(_arg1:MouseEvent):void{
var _local2:String;
_local2 = editorInstance.w_loadlevel.NewFolder.nameField.text;
if (_local2.length > 0){
Data.NewFolder(_local2, PATH_TO_ID);
UpdateLevelBrowser();
CloseNewFolderWindow();
};
}
public static function CallDeletion(_arg1:MouseEvent):void{
if (editorInstance.w_loadlevel.l_current.selectedItem.data != undefined){
editorInstance.w_c_delete.x = (690 / 2);
editorInstance.w_c_delete.y = (480 / 2);
};
}
private static function CloseLoadSave(_arg1:MouseEvent):void{
editorInstance.w_loadsave.x = 800;
stage.focus = null;
}
private static function returnMovieClip(_arg1:String, _arg2:String="mc"){
switch (_arg1){
case "30x30":
if (_arg2 == "width"){
return (30);
};
if (_arg2 == "height"){
return (30);
};
return (new G_b30x30());
case "60x30":
if (_arg2 == "width"){
return (60);
};
if (_arg2 == "height"){
return (30);
};
return (new G_b60x30());
case "90x30":
if (_arg2 == "width"){
return (90);
};
if (_arg2 == "height"){
return (30);
};
return (new G_b90x30());
case "120x30":
if (_arg2 == "width"){
return (120);
};
if (_arg2 == "height"){
return (30);
};
return (new G_b120x30());
case "150x30":
if (_arg2 == "width"){
return (150);
};
if (_arg2 == "height"){
return (30);
};
return (new G_b150x30());
case "180x30":
if (_arg2 == "width"){
return (180);
};
if (_arg2 == "height"){
return (30);
};
return (new G_b180x30());
case "210x30":
if (_arg2 == "width"){
return (210);
};
if (_arg2 == "height"){
return (30);
};
return (new G_b210x30());
case "60x60":
if (_arg2 == "width"){
return (60);
};
if (_arg2 == "height"){
return (60);
};
return (new G_b60x60());
case "90x60":
if (_arg2 == "width"){
return (90);
};
if (_arg2 == "height"){
return (60);
};
return (new G_b90x60());
case "120x60":
if (_arg2 == "width"){
return (120);
};
if (_arg2 == "height"){
return (60);
};
return (new G_b120x60());
case "150x60":
if (_arg2 == "width"){
return (150);
};
if (_arg2 == "height"){
return (60);
};
return (new G_b150x60());
case "180x60":
if (_arg2 == "width"){
return (180);
};
if (_arg2 == "height"){
return (60);
};
return (new G_b180x60());
case "210x60":
if (_arg2 == "width"){
return (210);
};
if (_arg2 == "height"){
return (60);
};
return (new G_b210x60());
case "i0":
return (new G_idol2());
case "i1":
return (new G_idol1());
case "i2":
return (new G_idol3());
case "i3":
return (new G_idol4());
case "i4":
return (new G_idol6());
case "i5":
return (new G_idol5());
case "i6":
return (new G_idol7());
case "i7":
return (new G_idol8());
case "i8":
return (new G_idol9());
case "i9":
return (new G_idol10());
case "i10":
return (new G_idol11());
default:
return (new MovieClip());
};
}
public static function DragStart1(_arg1:MouseEvent){
onDrag1 = true;
regPoint1 = new Point(editorInstance.w_addblock.mouseX, editorInstance.w_addblock.mouseY);
}
public static function DragStart3(_arg1:MouseEvent){
onDrag3 = true;
regPoint3 = new Point(editorInstance.w_loadsave.mouseX, editorInstance.w_loadsave.mouseY);
}
public static function CloseHelpWindow(_arg1:MouseEvent){
editorInstance.w_help.x = 2000;
editorInstance.w_help.y = 2000;
}
public static function DragStart2(_arg1:MouseEvent){
onDrag2 = true;
regPoint2 = new Point(editorInstance.w_levelcfg.mouseX, editorInstance.w_levelcfg.mouseY);
}
private static function UpdateLevelBrowser():void{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:Object;
var _local5:Object;
var _local6:Object;
editorInstance.w_loadlevel.l_current.removeAll();
editorInstance.w_loadlevel.t_path.text = Data.GetPath(PATH_TO_ID);
_local1 = Data.GetParentIdById(PATH_TO_ID);
if (PATH_TO_ID != -1){
_local4 = new Object();
_local4.type = "FOLDER";
_local4.iconSource = new Icon_Back();
_local4.label = "back to parent folder";
_local4.data = _local1;
editorInstance.w_loadlevel.l_current.addItem(_local4);
};
_local2 = 0;
while (_local2 < Data.TotemData.data.Editor.folders.length) {
_local5 = new Object();
_local5.type = "FOLDER";
_local5.iconSource = new Icon_Folder();
_local5.label = Data.TotemData.data.Editor.folders[_local2].name;
_local5.data = Data.TotemData.data.Editor.folders[_local2].id;
if (Data.TotemData.data.Editor.folders[_local2].parentId == PATH_TO_ID){
editorInstance.w_loadlevel.l_current.addItem(_local5);
};
_local2++;
};
_local3 = 0;
while (_local3 < Data.TotemData.data.Editor.levels.length) {
_local6 = new Object();
_local6.rid = Data.TotemData.data.Editor.levels[_local3].id;
_local6.label = Data.TotemData.data.Editor.levels[_local3].name;
_local6.data = Data.TotemData.data.Editor.levels[_local3].id;
_local6.type = "FILE";
_local6.iconSource = new Icon_File();
if (Data.TotemData.data.Editor.levels[_local3].folder == PATH_TO_ID){
editorInstance.w_loadlevel.l_current.addItem(_local6);
};
_local3++;
};
}
public static function ShowHelpWindow(_arg1:MouseEvent){
if (!testing){
editorInstance.w_help.x = (690 / 2);
editorInstance.w_help.y = (480 / 2);
};
}
public static function NoFolderButton2(_arg1:MouseEvent):void{
CloseNewFolderWindow2();
}
public static function ShowAddNewFolderWindow2(_arg1:MouseEvent):void{
editorInstance.w_import.NewFolder.x = -238.5;
editorInstance.w_import.NewFolder.y = -78.8;
editorInstance.w_import.NewFolder.pathField.text = Data.GetPath(PATH_TO_ID);
editorInstance.w_import.NewFolder.visible = true;
}
public static function CloseImport(_arg1:MouseEvent){
editorInstance.w_import.x = 1999;
}
public static function Dragging1(_arg1:Event){
if (onDrag1){
_arg1.currentTarget.x = (root.mouseX - regPoint1.x);
_arg1.currentTarget.y = (root.mouseY - regPoint1.y);
};
if (((((!((humptyDumptySize == editorInstance.w_addblock.ls_size.selectedItem.data))) || (!((humptyDumptyType == editorInstance.w_addblock.ls_type.selectedItem.data))))) || (!((humptyDumptyRotation == editorInstance.w_addblock.addb_90.selected))))){
DrawMingies();
};
}
public static function Dragging2(_arg1:Event){
if (onDrag2){
_arg1.currentTarget.x = (root.mouseX - regPoint2.x);
_arg1.currentTarget.y = (root.mouseY - regPoint2.y);
};
if (currentIdolIndex != editorInstance.w_levelcfg.ls_idol.selectedItem.data){
LevelCfgChange();
currentIdolIndex = editorInstance.w_levelcfg.ls_idol.selectedItem.data;
};
}
public static function Dragging3(_arg1:Event){
if (onDrag3){
_arg1.currentTarget.x = (root.mouseX - regPoint3.x);
_arg1.currentTarget.y = (root.mouseY - regPoint3.y);
};
}
public static function CloseExport(_arg1:MouseEvent){
editorInstance.w_export.x = 1999;
}
private static function Overwrite(_arg1:MouseEvent):void{
SaveLevelRoots(true);
editorInstance.w_c_overwrite.x = 1000;
editorInstance.w_c_overwrite.y = (480 / 2);
stage.focus = null;
}
public static function ShowLevelBrowser(_arg1:MouseEvent){
SwitchBrowserMode("LOAD");
editorInstance.w_loadsave.x = 999;
editorInstance.w_loadlevel.x = (690 / 2);
editorInstance.w_loadlevel.y = (480 / 2);
UpdateLevelBrowser();
}
private static function SaveNew(_arg1:MouseEvent):void{
ld_id = -1;
editorInstance.w_c_overwrite.x = 2000;
editorInstance.w_c_overwrite.y = 2000;
SwitchBrowserMode("SAVE");
editorInstance.w_loadsave.x = 999;
editorInstance.w_loadlevel.x = (690 / 2);
editorInstance.w_loadlevel.y = (480 / 2);
UpdateLevelBrowser();
}
private static function CloseNewFolderWindow():void{
editorInstance.w_loadlevel.NewFolder.x = 3000.5;
editorInstance.w_loadlevel.NewFolder.y = -78.8;
editorInstance.w_loadlevel.NewFolder.visible = false;
}
public static function NoFolderButton(_arg1:MouseEvent):void{
CloseNewFolderWindow();
}
private static function dummySelect():void{
var _local1:int;
var _local2:Sprite;
var _local3:Array;
var _local4:Sprite;
var _local5:Array;
var _local6:Sprite;
var _local7:Array;
while (selectorInstance.numChildren > 0) {
selectorInstance.removeChildAt(0);
};
_local1 = 0;
while (_local1 < dummiesSelected.length) {
stage.focus = null;
_local2 = new Sprite();
_local2.graphics.lineStyle(1, 0xFF, 1, true);
_local3 = TotemMath.returnRectangle(dummiesSelected[_local1].bwidth, dummiesSelected[_local1].bheight);
_local2.graphics.moveTo(_local3[0][0], _local3[0][1]);
_local2.graphics.lineTo(_local3[1][0], _local3[1][1]);
_local2.graphics.lineTo(_local3[2][0], _local3[2][1]);
_local2.graphics.lineTo(_local3[3][0], _local3[3][1]);
_local2.graphics.lineTo(_local3[0][0], _local3[0][1]);
_local2.x = dummiesSelected[_local1].x;
_local2.y = dummiesSelected[_local1].y;
_local2.rotation = dummiesSelected[_local1].rotation;
selectorInstance.addChild(_local2);
_local1++;
};
if (MoveIdol){
_local4 = new Sprite();
_local4.graphics.lineStyle(1, 0xFF00FF, 1, true);
_local5 = TotemMath.returnRectangle(IdolInstance.bwidth, IdolInstance.bheight);
_local4.graphics.moveTo(_local5[0][0], _local5[0][1]);
_local4.graphics.lineTo(_local5[1][0], _local5[1][1]);
_local4.graphics.lineTo(_local5[2][0], _local5[2][1]);
_local4.graphics.lineTo(_local5[3][0], _local5[3][1]);
_local4.graphics.lineTo(_local5[0][0], _local5[0][1]);
_local4.x = IdolInstance.x;
_local4.y = IdolInstance.y;
_local4.rotation = IdolInstance.rotation;
selectorInstance.addChild(_local4);
};
_local1 = 0;
while (_local1 < idolsSelected.length) {
stage.focus = null;
_local6 = new Sprite();
_local6.graphics.lineStyle(1, 0xFF00FF, 1, true);
_local7 = TotemMath.returnRectangle(idolsSelected[_local1].bwidth, idolsSelected[_local1].bheight);
_local6.graphics.moveTo(_local7[0][0], _local7[0][1]);
_local6.graphics.lineTo(_local7[1][0], _local7[1][1]);
_local6.graphics.lineTo(_local7[2][0], _local7[2][1]);
_local6.graphics.lineTo(_local7[3][0], _local7[3][1]);
_local6.graphics.lineTo(_local7[0][0], _local7[0][1]);
_local6.x = idolsSelected[_local1].x;
_local6.y = idolsSelected[_local1].y;
_local6.rotation = idolsSelected[_local1].rotation;
selectorInstance.addChild(_local6);
_local1++;
};
}
public static function PlaceIdol(_arg1:MouseEvent):void{
Pdol();
stage.focus = null;
}
private static function ControlSelection(_arg1:MouseEvent):void{
var _local2:int;
var _local3:*;
var _local4:int;
var _local5:int;
var _local6:*;
var _local7:int;
var _local8:Array;
var _local9:int;
var _local10:Array;
var _local11:int;
var _local12:int;
var _local13:int;
if (!testing){
_local2 = -1;
_local4 = 0;
while (_local4 < dummiesList.length) {
if (dummiesList[_local4].hitTestPoint(root.mouseX, root.mouseY, true)){
_local2 = dummiesList[_local4].bid;
_local3 = dummiesList[_local4];
};
_local4++;
};
if (dummiesSelected.length > 0){
_local12 = 0;
while (_local12 < dummiesSelected.length) {
if (dummiesSelected[_local12].bid == _local2){
dummiesSelected[_local12].bselected = false;
delete dummiesSelected[_local12];
} else {
if (!Key.isDown(16)){
dummiesSelected[_local12].bselected = false;
delete dummiesSelected[_local12];
};
};
_local12++;
};
};
_local5 = -1;
_local7 = 0;
while (_local7 < idolsList.length) {
if (idolsList[_local7].hitTestPoint(root.mouseX, root.mouseY, true)){
_local5 = idolsList[_local7].bid;
_local6 = idolsList[_local7];
};
_local7++;
};
if (idolsSelected.length > 0){
_local13 = 0;
while (_local13 < idolsSelected.length) {
if (idolsSelected[_local13].bid == _local5){
idolsSelected[_local13].bselected = false;
delete idolsSelected[_local13];
} else {
if (!Key.isDown(16)){
idolsSelected[_local13].bselected = false;
delete idolsSelected[_local13];
};
};
_local13++;
};
};
_local8 = new Array();
_local9 = 0;
while (_local9 < idolsSelected.length) {
if (idolsSelected[_local9] != null){
_local8.push(idolsSelected[_local9]);
};
_local9++;
};
_local10 = new Array();
_local11 = 0;
while (_local11 < dummiesSelected.length) {
if (dummiesSelected[_local11] != null){
_local10.push(dummiesSelected[_local11]);
};
_local11++;
};
dummiesSelected = _local10;
idolsSelected = _local8;
if (_local2 != -1){
dummiesSelected.push(_local3);
};
if (_local5 != -1){
idolsSelected.push(_local6);
};
if (dummiesSelected.length > 1){
};
dummySelect();
};
}
public static function ShowLoadSaveWindow(_arg1:MouseEvent){
if (!testing){
editorInstance.w_loadsave.x = 575;
editorInstance.w_loadsave.y = 250;
};
}
public static function EFDoubleClick(_arg1:MouseEvent):void{
if (editorInstance.w_export.l_explist.selectedItems[0].type == "FOLDER"){
PATH_TO_ID = editorInstance.w_export.l_explist.selectedItems[0].data;
UpdateExportBrowser();
};
}
public static function ShowAddNewFolderWindow(_arg1:MouseEvent):void{
editorInstance.w_loadlevel.NewFolder.x = -238.5;
editorInstance.w_loadlevel.NewFolder.y = -78.8;
editorInstance.w_loadlevel.NewFolder.pathField.text = Data.GetPath(PATH_TO_ID);
editorInstance.w_loadlevel.NewFolder.visible = true;
}
public static function ConfirmQuitWindow(_arg1:MouseEvent){
var _local2:int;
editorInstance.bt_addblock.removeEventListener(MouseEvent.CLICK, ShowAddBlockWindow);
editorInstance.bt_levelcfg.removeEventListener(MouseEvent.CLICK, ShowLevelcfgWindow);
editorInstance.bt_loadsave.removeEventListener(MouseEvent.CLICK, ShowLoadSaveWindow);
editorInstance.bt_quit.removeEventListener(MouseEvent.CLICK, ShowQuitWindow);
editorInstance.bt_help.removeEventListener(MouseEvent.CLICK, ShowHelpWindow);
editorInstance.w_help.bt_close.removeEventListener(MouseEvent.CLICK, CloseHelpWindow);
editorInstance.w_c_nosave.bt_yes.removeEventListener(MouseEvent.CLICK, ConfirmQuitWindow);
editorInstance.w_c_nosave.bt_no.removeEventListener(MouseEvent.CLICK, CancelQuitWindow);
editorInstance.w_addblock.removeEventListener(Event.ENTER_FRAME, Dragging1);
editorInstance.w_levelcfg.removeEventListener(Event.ENTER_FRAME, Dragging2);
editorInstance.w_loadsave.removeEventListener(Event.ENTER_FRAME, Dragging3);
editorInstance.w_levelcfg.ls_idol.removeEventListener(Event.CHANGE, SliderChangeIdol);
editorInstance.w_loadsave.bt_load.removeEventListener(MouseEvent.CLICK, ShowLevelBrowser);
editorInstance.w_addblock.bt_drag.removeEventListener(MouseEvent.MOUSE_DOWN, DragStart1);
editorInstance.w_levelcfg.bt_drag.removeEventListener(MouseEvent.MOUSE_DOWN, DragStart2);
editorInstance.w_loadsave.bt_drag.removeEventListener(MouseEvent.MOUSE_DOWN, DragStart3);
editorInstance.w_addblock.bt_drag.removeEventListener(MouseEvent.MOUSE_UP, DragEnd1);
editorInstance.w_levelcfg.bt_drag.removeEventListener(MouseEvent.MOUSE_UP, DragEnd2);
editorInstance.w_loadsave.bt_drag.removeEventListener(MouseEvent.MOUSE_UP, DragEnd3);
editorInstance.w_addblock.bt_addblock.removeEventListener(MouseEvent.CLICK, addButton);
editorInstance.w_levelcfg.bt_addidol.removeEventListener(MouseEvent.CLICK, PlaceIdol);
editorInstance.w_addblock.bt_close.removeEventListener(MouseEvent.CLICK, CloseAddBlock);
editorInstance.w_levelcfg.bt_close.removeEventListener(MouseEvent.CLICK, CloseLevelcfg);
editorInstance.w_loadsave.bt_close.removeEventListener(MouseEvent.CLICK, CloseLoadSave);
editorInstance.w_loadlevel.bt_close.removeEventListener(MouseEvent.CLICK, CloseLoadLevel);
editorInstance.w_loadlevel.bt_load.removeEventListener(MouseEvent.CLICK, LoadButton);
editorInstance.w_loadlevel.bt_save.removeEventListener(MouseEvent.CLICK, SaveLevel);
editorInstance.w_loadlevel.bt_newfolder.removeEventListener(MouseEvent.CLICK, ShowAddNewFolderWindow);
editorInstance.w_loadlevel.NewFolder.bt_create.removeEventListener(MouseEvent.CLICK, AddFolderButton);
editorInstance.w_loadlevel.NewFolder.bt_cancel.removeEventListener(MouseEvent.CLICK, NoFolderButton);
editorInstance.w_loadlevel.removeEventListener(MouseEvent.DOUBLE_CLICK, FFDoubleClick);
editorInstance.w_loadlevel.bt_delete.removeEventListener(MouseEvent.CLICK, CallDeletion);
editorInstance.w_c_delete.bt_yes.removeEventListener(MouseEvent.CLICK, DeletionConfirm);
editorInstance.w_c_delete.bt_no.removeEventListener(MouseEvent.CLICK, DeletionCancel);
editorInstance.w_loadsave.bt_save.removeEventListener(MouseEvent.CLICK, ShowLevelBrowser_save);
editorInstance.w_loadsave.bt_new.removeEventListener(MouseEvent.CLICK, NewLevelButton);
editorInstance.w_loadsave.bt_export.removeEventListener(MouseEvent.CLICK, ShowExport);
editorInstance.w_loadsave.bt_import.removeEventListener(MouseEvent.CLICK, ShowImport);
editorInstance.w_export.bt_close.removeEventListener(MouseEvent.CLICK, CloseExport);
editorInstance.w_export2.bt_close.removeEventListener(MouseEvent.CLICK, CloseExport2);
editorInstance.w_export.bt_export.removeEventListener(MouseEvent.CLICK, DoExport);
editorInstance.w_export.removeEventListener(MouseEvent.DOUBLE_CLICK, EFDoubleClick);
editorInstance.w_import.bt_close.removeEventListener(MouseEvent.CLICK, CloseImport);
editorInstance.w_import2.bt_close.removeEventListener(MouseEvent.CLICK, CloseImport2);
editorInstance.w_import.bt_import.removeEventListener(MouseEvent.CLICK, DoImport);
editorInstance.w_import.bt_newfolder.removeEventListener(MouseEvent.CLICK, ShowAddNewFolderWindow2);
editorInstance.w_import.NewFolder.bt_create.removeEventListener(MouseEvent.CLICK, AddFolderButton2);
editorInstance.w_import.NewFolder.bt_cancel.removeEventListener(MouseEvent.CLICK, NoFolderButton2);
editorInstance.w_import.removeEventListener(MouseEvent.DOUBLE_CLICK, IFDoubleClick);
editorInstance.w_c_overwrite.bt_no.removeEventListener(MouseEvent.CLICK, CancelSave);
editorInstance.w_c_overwrite.bt_yes.removeEventListener(MouseEvent.CLICK, Overwrite);
editorInstance.w_c_overwrite.bt_copy.removeEventListener(MouseEvent.CLICK, SaveNew);
editorInstance.bt_test.removeEventListener(MouseEvent.CLICK, TestLevel);
root.removeEventListener(Event.ENTER_FRAME, dummyDrag);
root.removeEventListener(MouseEvent.CLICK, ControlSelection);
Factory.ChangeScreen();
ld_id = -1;
dummiesSelected = new Array();
_local2 = 0;
while (_local2 < dummiesList.length) {
root.GAME.EDT.removeChild(dummiesList[_local2]);
delete dummiesList[_local2];
_local2++;
};
dummiesList = new Array();
editorInstance.w_levelcfg.t_lvlname.text = "New Level! hurray :)";
while (root.GAME.EDIDOL.numChildren > 0) {
root.GAME.EDIDOL.removeChildAt(0);
};
idolsList = new Array();
root.GAME.CURSOR.removeChild(blockScutMc);
root.GAME.DEBUG.removeChild(selectorInstance);
root.GAME.HUD.removeChild(editorInstance);
Gear.BuildMenu();
}
private static function LoadButton(_arg1:MouseEvent):void{
var _local2:*;
editorInstance.w_loadlevel.x = 1200;
stage.focus = null;
_local2 = editorInstance.w_loadlevel.l_current.getItemAt(editorInstance.w_loadlevel.l_current.selectedIndex);
trace(_local2.data);
trace(_local2.label);
trace(_local2);
LoadLevel(_local2.data);
}
private static function SliderChangeIdol(_arg1:Event):void{
ld_idoltype = editorInstance.w_levelcfg.ls_idol.selectedItem.data;
ld_idolx = IdolInstance.x;
ld_idoly = IdolInstance.y;
}
public static function ShowLevelcfgWindow(_arg1:MouseEvent){
if (!testing){
editorInstance.w_levelcfg.x = 575;
editorInstance.w_levelcfg.y = 250;
enableShortcuts = false;
};
}
private static function SaveLevel(_arg1:MouseEvent):void{
SaveLevelRoots();
editorInstance.w_loadlevel.LoadSaveIndicator2.gotoAndStop(3);
UpdateLevelBrowser();
}
public static function AddFolderButton2(_arg1:MouseEvent):void{
var _local2:String;
_local2 = editorInstance.w_import.NewFolder.nameField.text;
if (_local2.length > 0){
Data.NewFolder(_local2, PATH_TO_ID);
UpdateImportBrowser();
CloseNewFolderWindow2();
};
}
public static function SwitchBrowserMode(_arg1):void{
BROWSER_MODE = _arg1;
switch (BROWSER_MODE){
case "LOAD":
editorInstance.w_loadlevel.LoadSaveIndicator.gotoAndStop(1);
editorInstance.w_loadlevel.LoadSaveIndicator2.gotoAndStop(1);
editorInstance.w_loadlevel.bt_load.x = 146.6;
editorInstance.w_loadlevel.bt_load.y = 113.5;
editorInstance.w_loadlevel.bt_load.visible = true;
editorInstance.w_loadlevel.bt_save.x = 146.6;
editorInstance.w_loadlevel.bt_save.y = 233.4;
editorInstance.w_loadlevel.bt_save.visible = false;
break;
case "SAVE":
editorInstance.w_loadlevel.LoadSaveIndicator.gotoAndStop(2);
editorInstance.w_loadlevel.LoadSaveIndicator2.gotoAndStop(2);
editorInstance.w_loadlevel.bt_save.x = 146.6;
editorInstance.w_loadlevel.bt_save.y = 113.5;
editorInstance.w_loadlevel.bt_save.visible = true;
editorInstance.w_loadlevel.bt_load.x = 146.6;
editorInstance.w_loadlevel.bt_load.y = 233.4;
editorInstance.w_loadlevel.bt_load.visible = false;
break;
default:
break;
};
}
public static function Pdol(_arg1:int=-1, _arg2:Number=345, _arg3:Number=30, _arg4:Number=0):void{
var _local5:*;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:int;
while (selectorInstance.numChildren > 0) {
selectorInstance.removeChildAt(0);
};
dummySelect();
_local5 = new MovieClip();
_local6 = _arg2;
_local7 = _arg3;
_local8 = _arg4;
_local9 = int(editorInstance.w_levelcfg.ls_idol.selectedItem.data);
if (_arg1 != -1){
_local9 = _arg1;
};
switch (_local9){
case 0:
_local5 = new G_idol2();
_local5.x = _local6;
_local5.y = _local7;
_local5.rotation = _local8;
_local5.btype = 1000;
_local5.bwidth = 48;
_local5.bheight = 36;
_local5.bselected = false;
break;
case 1:
_local5 = new G_idol1();
_local5.x = _local6;
_local5.y = _local7;
_local5.rotation = _local8;
_local5.btype = 1000;
_local5.bwidth = 48;
_local5.bheight = 36;
_local5.bselected = false;
break;
case 2:
_local5 = new G_idol3();
_local5.x = _local6;
_local5.y = _local7;
_local5.rotation = _local8;
_local5.btype = 1000;
_local5.bwidth = 48;
_local5.bheight = 36;
_local5.bselected = false;
break;
case 3:
_local5 = new G_idol4();
_local5.x = _local6;
_local5.y = _local7;
_local5.rotation = _local8;
_local5.btype = 1000;
_local5.bwidth = 48;
_local5.bheight = 36;
_local5.bselected = false;
break;
case 4:
_local5 = new G_idol6();
_local5.x = _local6;
_local5.y = _local7;
_local5.rotation = _local8;
_local5.btype = 1000;
_local5.bwidth = 48;
_local5.bheight = 36;
_local5.bselected = false;
break;
case 5:
_local5 = new G_idol5();
_local5.x = _local6;
_local5.y = _local7;
_local5.rotation = _local8;
_local5.btype = 1000;
_local5.bwidth = 48;
_local5.bheight = 36;
_local5.bselected = false;
break;
case 6:
_local5 = new G_idol7();
_local5.x = _local6;
_local5.y = _local7;
_local5.rotation = _local8;
_local5.btype = 1000;
_local5.bwidth = 48;
_local5.bheight = 36;
_local5.bselected = false;
break;
case 7:
_local5 = new G_idol8();
_local5.x = _local6;
_local5.y = _local7;
_local5.rotation = _local8;
_local5.btype = 1000;
_local5.bwidth = 48;
_local5.bheight = 36;
_local5.bselected = false;
break;
case 8:
_local5 = new G_idol9();
_local5.x = _local6;
_local5.y = _local7;
_local5.rotation = _local8;
_local5.btype = 1000;
_local5.bwidth = 48;
_local5.bheight = 36;
_local5.bselected = false;
break;
case 9:
_local5 = new G_idol10();
_local5.x = _local6;
_local5.y = _local7;
_local5.rotation = _local8;
_local5.btype = 1000;
_local5.bwidth = 48;
_local5.bheight = 36;
_local5.bselected = false;
break;
case 10:
_local5 = new G_idol11();
_local5.x = _local6;
_local5.y = _local7;
_local5.rotation = _local8;
_local5.btype = 1000;
_local5.bwidth = 48;
_local5.bheight = 36;
_local5.bselected = false;
break;
default:
trace((("UHUL%" + editorInstance.w_levelcfg.ls_idol.selectedItem.data) + "%ss"));
break;
};
ObjectsId++;
_local5.bid = ObjectsId;
_local5.itype = _local9;
idolsList.push(root.GAME.EDIDOL.addChild(_local5));
dummySelect();
}
public static function ShowAddBlockWindow(_arg1:MouseEvent){
if (!testing){
editorInstance.w_addblock.x = 575;
editorInstance.w_addblock.y = 350;
};
}
private static function UpdateTblock():void{
var _local1:*;
var _local2:*;
while (blockScutMc.numChildren > 0) {
blockScutMc.removeChildAt(0);
};
blockScutMc.alpha = 0.2;
_local1 = returnMovieClip(editorInstance.w_addblock.ls_size.selectedItem.data);
_local2 = blockScutMc.addChild(_local1);
_local2.rotation = blockRotation;
_local2.gotoAndStop(editorInstance.w_addblock.ls_type.selectedItem.data);
}
}
}//package TotemEngine
Section 204
//Speaker (TotemEngine.Speaker)
package TotemEngine {
import flash.media.*;
public class Speaker {
private static var FailSound:Sound;
private static var VictorySoundChannel:SoundChannel;
private static var LuisPlaneSound:Sound;
private static var MenuSoundChannel:SoundChannel;
private static var LuisPlaneSoundTransform:SoundTransform;
private static var MenuSongTransform:SoundTransform;
private static var LuisPlaneSoundChannel:SoundChannel;
private static var InGameSong1:Sound;
private static var InGameSoundChannel2:SoundChannel;
private static var NewGameSoundChannel:SoundChannel;
public static var MenuCurrentSong:int = 1;
private static var MenuSong:Sound;
private static var InGameSoundChannel1:SoundChannel;
public static var InGameCurrentSoundNumber:int = 1;
private static var VictorySound:Sound;
private static var VictorySoundTransform:SoundTransform;
private static var NewGameSong:Sound;
private static var InGameSong2:Sound;
private static var FailSoundChannel:SoundChannel;
public static var InGameSoundStarted:Boolean = false;
private static var InGameSongTransform2:SoundTransform;
private static var NewGameSongTransform:SoundTransform;
private static var InGameSongTransform1:SoundTransform;
private static var FailSoundTransform:SoundTransform;
public static function StopNewGameSong():void{
if (Data.TotemData.data.Settings.music){
NewGameSoundChannel.stop();
};
}
public static function NewFailSound():void{
FailSound = new S_lost();
FailSoundTransform = new SoundTransform(0.97, 0);
FailSoundChannel = FailSound.play(0, 0, FailSoundTransform);
}
public static function PlaneStart():void{
LuisPlaneSound = new LuisPlane();
LuisPlaneSoundTransform = new SoundTransform(0.31, 0);
LuisPlaneSoundChannel = LuisPlaneSound.play(0, 3, LuisPlaneSoundTransform);
}
public static function Effect(_arg1:Sound, _arg2:Number, _arg3:Number):SoundChannel{
var _local4:SoundTransform;
_local4 = new SoundTransform(_arg3, _arg2);
return (_arg1.play(0, 0, _local4));
}
public static function NewVictorySound():void{
VictorySound = new S_won();
VictorySoundTransform = new SoundTransform(0.97, 0);
VictorySoundChannel = VictorySound.play(0, 0, VictorySoundTransform);
}
public static function StartNewGameSong():void{
if (Data.TotemData.data.Settings.music){
NewGameSong = new S_newgame();
NewGameSongTransform = new SoundTransform(0.7, 0);
NewGameSoundChannel = NewGameSong.play(0, 99999, NewGameSongTransform);
};
}
public static function StopInGameSong():void{
if (InGameSoundStarted){
if (InGameCurrentSoundNumber == 1){
InGameSoundChannel1.stop();
} else {
InGameSoundChannel2.stop();
};
InGameSoundStarted = false;
};
}
public static function StartInGameSong(_arg1:int=25):void{
if (Data.TotemData.data.Settings.music){
if (_arg1 > 24){
if (((!((InGameCurrentSoundNumber == 2))) && (InGameSoundStarted))){
InGameSoundChannel1.stop();
InGameSong2 = new S_ingame2();
InGameSongTransform2 = new SoundTransform(0.45, 0);
InGameSoundChannel2 = InGameSong2.play(0, 99999, InGameSongTransform2);
InGameCurrentSoundNumber = 2;
} else {
if (!InGameSoundStarted){
InGameSong2 = new S_ingame2();
InGameSongTransform2 = new SoundTransform(0.45, 0);
InGameSoundChannel2 = InGameSong2.play(0, 99999, InGameSongTransform2);
InGameSoundStarted = true;
InGameCurrentSoundNumber = 2;
};
};
} else {
if (((!((InGameCurrentSoundNumber == 1))) && (InGameSoundStarted))){
InGameSoundChannel2.stop();
InGameSong1 = new S_ingame1();
InGameSongTransform1 = new SoundTransform(0.55, 0);
InGameSoundChannel1 = InGameSong1.play(0, 99999, InGameSongTransform1);
InGameCurrentSoundNumber = 1;
} else {
if (!InGameSoundStarted){
InGameSong1 = new S_ingame1();
InGameSongTransform1 = new SoundTransform(0.55, 0);
InGameSoundChannel1 = InGameSong1.play(0, 99999, InGameSongTransform1);
InGameSoundStarted = true;
InGameCurrentSoundNumber = 1;
};
};
};
};
}
public static function StopMenuSong():void{
if (Data.TotemData.data.Settings.music){
MenuSoundChannel.stop();
};
}
public static function PlaneStop():void{
LuisPlaneSoundChannel.stop();
}
public static function StartMenuSong():void{
if (Data.TotemData.data.Settings.music){
if (MenuCurrentSong == 1){
MenuSong = new S_mainmenu();
} else {
MenuSong = new S_mainmenu_devil();
};
MenuSongTransform = new SoundTransform(0.7, 0);
MenuSoundChannel = MenuSong.play(0, 99999, MenuSongTransform);
};
}
}
}//package TotemEngine
Section 205
//TotemMath (TotemEngine.TotemMath)
package TotemEngine {
import flash.geom.*;
public class TotemMath {
public static const SCALE = 30;
public static function Hipo(_arg1:Number, _arg2:Number):Number{
return (Math.sqrt((Math.pow(_arg1, 2) + Math.pow(_arg2, 2))));
}
public static function Scale(_arg1:Number):Number{
return ((_arg1 / SCALE));
}
public static function Export(_arg1:Number):Number{
return ((_arg1 * SCALE));
}
public static function GetPan(_arg1:Number):Number{
var _local2:Number;
var _local3:Number;
_local2 = Export(_arg1);
_local3 = (((2 * _local2) - 690) / 690);
return (_local3);
}
public static function Scale2(_arg1:Number):Number{
return ((_arg1 / (SCALE * 2)));
}
public static function ExportRound(_arg1:Number):Number{
return ((Math.round(((_arg1 * SCALE) * 10)) / 10));
}
public static function returnRectangle(_arg1, _arg2):Array{
var _local3:Point;
var _local4:Point;
var _local5:Point;
var _local6:Point;
_local3 = new Point(0, 0);
_local3.x = (-(_arg1) / 2);
_local3.y = (-(_arg2) / 2);
_local4 = new Point(0, 0);
_local4.x = (_arg1 / 2);
_local4.y = (-(_arg2) / 2);
_local5 = new Point(0, 0);
_local5.x = (_arg1 / 2);
_local5.y = (_arg2 / 2);
_local6 = new Point(0, 0);
_local6.x = (-(_arg1) / 2);
_local6.y = (_arg2 / 2);
return (new Array(new Array(_local3.x, _local3.y), new Array(_local4.x, _local4.y), new Array(_local5.x, _local5.y), new Array(_local6.x, _local6.y)));
}
}
}//package TotemEngine
Section 206
//_GengingMc_ (_GengingMc_)
package {
import flash.display.*;
public dynamic class _GengingMc_ extends MovieClip {
public var BG:MovieClip;
public function _GengingMc_(){
addFrameScript(7204,
);
}
function
(){
stop();
}
}
}//package
Section 207
//CellRenderer_disabledSkin (CellRenderer_disabledSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_disabledSkin extends MovieClip {
}
}//package
Section 208
//CellRenderer_downSkin (CellRenderer_downSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_downSkin extends MovieClip {
}
}//package
Section 209
//CellRenderer_overSkin (CellRenderer_overSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_overSkin extends MovieClip {
}
}//package
Section 210
//CellRenderer_selectedDisabledSkin (CellRenderer_selectedDisabledSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_selectedDisabledSkin extends MovieClip {
}
}//package
Section 211
//CellRenderer_selectedDownSkin (CellRenderer_selectedDownSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_selectedDownSkin extends MovieClip {
}
}//package
Section 212
//CellRenderer_selectedOverSkin (CellRenderer_selectedOverSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_selectedOverSkin extends MovieClip {
}
}//package
Section 213
//CellRenderer_selectedUpSkin (CellRenderer_selectedUpSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_selectedUpSkin extends MovieClip {
}
}//package
Section 214
//CellRenderer_upSkin (CellRenderer_upSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_upSkin extends MovieClip {
}
}//package
Section 215
//CheckBox_disabledIcon (CheckBox_disabledIcon)
package {
import flash.display.*;
public dynamic class CheckBox_disabledIcon extends MovieClip {
}
}//package
Section 216
//CheckBox_downIcon (CheckBox_downIcon)
package {
import flash.display.*;
public dynamic class CheckBox_downIcon extends MovieClip {
}
}//package
Section 217
//CheckBox_overIcon (CheckBox_overIcon)
package {
import flash.display.*;
public dynamic class CheckBox_overIcon extends MovieClip {
}
}//package
Section 218
//CheckBox_selectedDisabledIcon (CheckBox_selectedDisabledIcon)
package {
import flash.display.*;
public dynamic class CheckBox_selectedDisabledIcon extends MovieClip {
}
}//package
Section 219
//CheckBox_selectedDownIcon (CheckBox_selectedDownIcon)
package {
import flash.display.*;
public dynamic class CheckBox_selectedDownIcon extends MovieClip {
}
}//package
Section 220
//CheckBox_selectedOverIcon (CheckBox_selectedOverIcon)
package {
import flash.display.*;
public dynamic class CheckBox_selectedOverIcon extends MovieClip {
}
}//package
Section 221
//CheckBox_selectedUpIcon (CheckBox_selectedUpIcon)
package {
import flash.display.*;
public dynamic class CheckBox_selectedUpIcon extends MovieClip {
}
}//package
Section 222
//CheckBox_upIcon (CheckBox_upIcon)
package {
import flash.display.*;
public dynamic class CheckBox_upIcon extends MovieClip {
}
}//package
Section 223
//D_point_combo (D_point_combo)
package {
import flash.display.*;
public dynamic class D_point_combo extends MovieClip {
}
}//package
Section 224
//D_point_explosion (D_point_explosion)
package {
import flash.display.*;
public dynamic class D_point_explosion extends MovieClip {
}
}//package
Section 225
//D_point_pink (D_point_pink)
package {
import flash.display.*;
public dynamic class D_point_pink extends MovieClip {
}
}//package
Section 226
//D_point_sound (D_point_sound)
package {
import flash.display.*;
public dynamic class D_point_sound extends MovieClip {
}
}//package
Section 227
//E_blowcombo (E_blowcombo)
package {
import flash.display.*;
public dynamic class E_blowcombo extends MovieClip {
public function E_blowcombo(){
addFrameScript(10, );
}
function (){
stop();
}
}
}//package
Section 228
//E_combospin (E_combospin)
package {
import flash.display.*;
public dynamic class E_combospin extends MovieClip {
public function E_combospin(){
addFrameScript(50, );
}
function (){
stop();
}
}
}//package
Section 229
//E_exploder (E_exploder)
package {
import flash.display.*;
public dynamic class E_exploder extends MovieClip {
public function E_exploder(){
addFrameScript(25, frame26);
}
function frame26(){
stop();
}
}
}//package
Section 230
//E_exploder2 (E_exploder2)
package {
import flash.display.*;
public dynamic class E_exploder2 extends MovieClip {
public function E_exploder2(){
addFrameScript(25, frame26);
}
function frame26(){
stop();
}
}
}//package
Section 231
//E_normal (E_normal)
package {
import flash.display.*;
public dynamic class E_normal extends MovieClip {
public function E_normal(){
addFrameScript(11, frame12);
}
function frame12(){
stop();
}
}
}//package
Section 232
//focusRectSkin (focusRectSkin)
package {
import flash.display.*;
public dynamic class focusRectSkin extends MovieClip {
}
}//package
Section 233
//G_achievement (G_achievement)
package {
import flash.display.*;
public dynamic class G_achievement extends MovieClip {
public var acvContainer:MovieClip;
public function G_achievement(){
addFrameScript(139,
);
}
function
(){
stop();
}
}
}//package
Section 234
//G_achievements (G_achievements)
package {
import flash.display.*;
import flash.text.*;
public dynamic class G_achievements extends MovieClip {
public var ptico0:MovieClip;
public var ptico4:MovieClip;
public var ptico5:MovieClip;
public var ptico6:MovieClip;
public var ptico9:MovieClip;
public var ptico2:MovieClip;
public var ptico8:MovieClip;
public var ptico1:MovieClip;
public var ptico3:MovieClip;
public var ptico7:MovieClip;
public var acvgold1:TextField;
public var acvgold2:TextField;
public var acvgold5:TextField;
public var acvgold6:TextField;
public var acvgold9:TextField;
public var acvgold7:TextField;
public var acvgold3:TextField;
public var acvgold4:TextField;
public var bt_close:SimpleButton;
public var acvgold8:TextField;
public var acvgold0:TextField;
}
}//package
Section 235
//G_b120x30 (G_b120x30)
package {
import flash.display.*;
public dynamic class G_b120x30 extends MovieClip {
}
}//package
Section 236
//G_b120x60 (G_b120x60)
package {
import flash.display.*;
public dynamic class G_b120x60 extends MovieClip {
public function G_b120x60(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 237
//G_b150x30 (G_b150x30)
package {
import flash.display.*;
public dynamic class G_b150x30 extends MovieClip {
public function G_b150x30(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 238
//G_b150x60 (G_b150x60)
package {
import flash.display.*;
public dynamic class G_b150x60 extends MovieClip {
public function G_b150x60(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 239
//G_b180x30 (G_b180x30)
package {
import flash.display.*;
public dynamic class G_b180x30 extends MovieClip {
public function G_b180x30(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 240
//G_b180x60 (G_b180x60)
package {
import flash.display.*;
public dynamic class G_b180x60 extends MovieClip {
public function G_b180x60(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 241
//G_b210x30 (G_b210x30)
package {
import flash.display.*;
public dynamic class G_b210x30 extends MovieClip {
public function G_b210x30(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 242
//G_b210x60 (G_b210x60)
package {
import flash.display.*;
public dynamic class G_b210x60 extends MovieClip {
public function G_b210x60(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 243
//G_b30x30 (G_b30x30)
package {
import flash.display.*;
public dynamic class G_b30x30 extends MovieClip {
public function G_b30x30(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 244
//G_b60x30 (G_b60x30)
package {
import flash.display.*;
public dynamic class G_b60x30 extends MovieClip {
public function G_b60x30(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 245
//G_b60x60 (G_b60x60)
package {
import flash.display.*;
public dynamic class G_b60x60 extends MovieClip {
public function G_b60x60(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 246
//G_b90x30 (G_b90x30)
package {
import flash.display.*;
public dynamic class G_b90x30 extends MovieClip {
public function G_b90x30(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 247
//G_b90x60 (G_b90x60)
package {
import flash.display.*;
public dynamic class G_b90x60 extends MovieClip {
public function G_b90x60(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 248
//G_bigfakeloading (G_bigfakeloading)
package {
import flash.display.*;
public dynamic class G_bigfakeloading extends MovieClip {
public var oldScreen:MovieClip;
public function G_bigfakeloading(){
addFrameScript(149, );
}
function (){
stop();
}
}
}//package
Section 249
//G_block (G_block)
package {
import flash.display.*;
public dynamic class G_block extends MovieClip {
public var blocktype:MovieClip;
public function G_block(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 250
//G_cheats (G_cheats)
package {
import flash.display.*;
import flash.text.*;
public dynamic class G_cheats extends MovieClip {
public var cheatbox:TextField;
public var bt_close:SimpleButton;
public var bt_ok:SimpleButton;
}
}//package
Section 251
//G_checkvictory (G_checkvictory)
package {
import flash.display.*;
public dynamic class G_checkvictory extends MovieClip {
public function G_checkvictory(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 252
//G_credits (G_credits)
package {
import flash.display.*;
public dynamic class G_credits extends MovieClip {
public var bt_newgrounds:SimpleButton;
public var bt_luis:SimpleButton;
public var bt_gabs:SimpleButton;
public var bt_close:SimpleButton;
}
}//package
Section 253
//G_cursor (G_cursor)
package {
import flash.display.*;
public dynamic class G_cursor extends MovieClip {
public function G_cursor(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 254
//G_defmenu (G_defmenu)
package {
import flash.display.*;
public dynamic class G_defmenu extends MovieClip {
public var bt_play:SimpleButton;
public var bt_settings:SimpleButton;
public var bt_credits:SimpleButton;
public var bt_moregames:SimpleButton;
}
}//package
Section 255
//G_floor (G_floor)
package {
import flash.display.*;
public dynamic class G_floor extends MovieClip {
public var luis:MovieClip;
}
}//package
Section 256
//G_gameover (G_gameover)
package {
import flash.display.*;
public dynamic class G_gameover extends MovieClip {
public function G_gameover(){
addFrameScript(89, );
}
function (){
stop();
}
}
}//package
Section 257
//G_highscores (G_highscores)
package {
import flash.display.*;
import flash.text.*;
public dynamic class G_highscores extends MovieClip {
public var bs1:TextField;
public var bs2:TextField;
public var bs4:TextField;
public var bs6:TextField;
public var bs5:TextField;
public var bs7:TextField;
public var bs8:TextField;
public var bs9:TextField;
public var bs3:TextField;
public var bs10:TextField;
public var ngotherhs1:SimpleButton;
public var as1:TextField;
public var as3:TextField;
public var as5:TextField;
public var as6:TextField;
public var as7:TextField;
public var as8:TextField;
public var as2:TextField;
public var as9:TextField;
public var as4:TextField;
public var an11:TextField;
public var bt_weekly:SimpleButton;
public var an14:TextField;
public var an10:TextField;
public var an12:TextField;
public var an13:TextField;
public var bt_monthly:SimpleButton;
public var an15:TextField;
public var bn1:TextField;
public var bn2:TextField;
public var bn5:TextField;
public var bn6:TextField;
public var bn7:TextField;
public var bn9:TextField;
public var bn3:TextField;
public var bn4:TextField;
public var bn10:TextField;
public var bn8:TextField;
public var mwdindic:MovieClip;
public var an1:TextField;
public var an4:TextField;
public var an6:TextField;
public var an3:TextField;
public var an5:TextField;
public var an7:TextField;
public var an8:TextField;
public var hspick:MovieClip;
public var an2:TextField;
public var an9:TextField;
public var as10:TextField;
public var bt_close:SimpleButton;
public var as12:TextField;
public var as13:TextField;
public var as14:TextField;
public var as15:TextField;
public var as11:TextField;
public var bt_daily:SimpleButton;
}
}//package
Section 258
//G_idol1 (G_idol1)
package {
import flash.display.*;
public dynamic class G_idol1 extends MovieClip {
public function G_idol1(){
addFrameScript(0, frame1, 14, );
}
function (){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 259
//G_idol10 (G_idol10)
package {
import flash.display.*;
public dynamic class G_idol10 extends MovieClip {
public function G_idol10(){
addFrameScript(0, frame1, 8, frame9);
}
function frame1(){
stop();
}
function frame9(){
stop();
}
}
}//package
Section 260
//G_idol11 (G_idol11)
package {
import flash.display.*;
public dynamic class G_idol11 extends MovieClip {
public function G_idol11(){
addFrameScript(0, frame1, 7, frame8);
}
function frame1(){
stop();
}
function frame8(){
stop();
}
}
}//package
Section 261
//G_idol2 (G_idol2)
package {
import flash.display.*;
public dynamic class G_idol2 extends MovieClip {
public function G_idol2(){
addFrameScript(0, frame1, 8, frame9);
}
function frame1(){
stop();
}
function frame9(){
stop();
}
}
}//package
Section 262
//G_idol3 (G_idol3)
package {
import flash.display.*;
public dynamic class G_idol3 extends MovieClip {
public function G_idol3(){
addFrameScript(0, frame1, 13, );
}
function (){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 263
//G_idol4 (G_idol4)
package {
import flash.display.*;
public dynamic class G_idol4 extends MovieClip {
public function G_idol4(){
addFrameScript(0, frame1, 12,
);
}
function frame1(){
stop();
}
function
(){
stop();
}
}
}//package
Section 264
//G_idol5 (G_idol5)
package {
import flash.display.*;
public dynamic class G_idol5 extends MovieClip {
public function G_idol5(){
addFrameScript(0, frame1, 7, frame8);
}
function frame1(){
stop();
}
function frame8(){
stop();
}
}
}//package
Section 265
//G_idol6 (G_idol6)
package {
import flash.display.*;
public dynamic class G_idol6 extends MovieClip {
public function G_idol6(){
addFrameScript(0, frame1, 11, frame12);
}
function frame12(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 266
//G_idol6_pico (G_idol6_pico)
package {
import flash.display.*;
public dynamic class G_idol6_pico extends MovieClip {
public function G_idol6_pico(){
addFrameScript(0, frame1, 11, frame12);
}
function frame12(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 267
//G_idol7 (G_idol7)
package {
import flash.display.*;
public dynamic class G_idol7 extends MovieClip {
public function G_idol7(){
addFrameScript(0, frame1, 29, );
}
function frame1(){
stop();
}
function (){
stop();
}
}
}//package
Section 268
//G_idol8 (G_idol8)
package {
import flash.display.*;
public dynamic class G_idol8 extends MovieClip {
public function G_idol8(){
addFrameScript(0, frame1, 6, );
}
function (){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 269
//G_idol9 (G_idol9)
package {
import flash.display.*;
public dynamic class G_idol9 extends MovieClip {
public function G_idol9(){
addFrameScript(0, frame1, 7, frame8);
}
function frame1(){
stop();
}
function frame8(){
stop();
}
}
}//package
Section 270
//G_info (G_info)
package {
import flash.display.*;
import flash.text.*;
public dynamic class G_info extends MovieClip {
public var aitlost:TextField;
public var tlost:TextField;
public var twon:TextField;
public var aitwon:TextField;
public var msize:TextField;
}
}//package
Section 271
//G_leveleditor (G_leveleditor)
package {
import fl.controls.*;
import flash.display.*;
import fl.data.*;
public dynamic class G_leveleditor extends MovieClip {
public var l_exptype:List;
public var w_help:MovieClip;
public var bt_help:SimpleButton;
public var ;
public var bt_quit:SimpleButton;
public var w_loadsave:MovieClip;
public var :DataProvider;
public var w_export2:MovieClip;
public var w_addblock:MovieClip;
public var bt_test:SimpleButton;
public var cards:MovieClip;
public var w_import:MovieClip;
public var w_export:MovieClip;
public var grid:MovieClip;
public var testbool:MovieClip;
public var w_import2:MovieClip;
public var w_loadlevel:MovieClip;
public var :Object;
public var w_levelcfg:MovieClip;
public var bt_levelcfg:SimpleButton;
public var bt_loadsave:SimpleButton;
public var w_c_delete:MovieClip;
public var :SimpleCollectionItem;
public var bt_addblock:SimpleButton;
public var :Array;
public var w_c_nosave:MovieClip;
public var i6:int;
public var w_c_overwrite:MovieClip;
public var w_c_unsaved:MovieClip;
public function G_leveleditor(){
();
}
function (){
try {
l_exptype["componentInspectorSetting"] = true;
} catch(e:Error) {
};
l_exptype.allowMultipleSelection = false;
= new DataProvider();
= [{label:"ActionScript 3.0 RAW (.as)", data:"RAW"}, {label:"Totem Destroyer Levels (.tdl)", data:"TDL"}];
i6 = 0;
while (i6 < .length) {
= new SimpleCollectionItem();
= [i6];
for ( in ) {
[] = [];
};
.addItem( );
i6++;
};
l_exptype.dataProvider = ;
l_exptype.enabled = true;
l_exptype.horizontalLineScrollSize = 4;
l_exptype.horizontalPageScrollSize = 0;
l_exptype.horizontalScrollPolicy = "auto";
l_exptype.verticalLineScrollSize = 4;
l_exptype.verticalPageScrollSize = 0;
l_exptype.verticalScrollPolicy = "auto";
l_exptype.visible = true;
try {
l_exptype["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 272
//G_levelselect (G_levelselect)
package {
import flash.display.*;
public dynamic class G_levelselect extends MovieClip {
public var bt_sponsorlevels:SimpleButton;
public var bt_classiclevels:SimpleButton;
public var bt_mylevels:SimpleButton;
public var bt_mainquestlevels:SimpleButton;
public var bt_unlockedlevels:SimpleButton;
public var bt_back:SimpleButton;
public var dotIndicator:MovieClip;
public var levelscontainer:MovieClip;
}
}//package
Section 273
//G_menulogo (G_menulogo)
package {
import flash.display.*;
public dynamic class G_menulogo extends MovieClip {
}
}//package
Section 274
//G_menuplaylft (G_menuplaylft)
package {
import flash.display.*;
public dynamic class G_menuplaylft extends MovieClip {
public var bt_levelselect:SimpleButton;
public var bt_continue:SimpleButton;
public var bt_highscores:SimpleButton;
public var bt_myachievements:SimpleButton;
public var bt_leveleditor:SimpleButton;
public var bt_submithighscores:SimpleButton;
public var bt_newgame:SimpleButton;
public var bt_close:SimpleButton;
public function G_menuplaylft(){
addFrameScript(0, frame1, 19, frame20);
}
function frame1(){
stop();
}
function frame20(){
stop();
}
}
}//package
Section 275
//G_menusettings2 (G_menusettings2)
package {
import flash.display.*;
public dynamic class G_menusettings2 extends MovieClip {
public var bt_off:SimpleButton;
public var bt_on:SimpleButton;
public var bt_med:SimpleButton;
public var bt_high:SimpleButton;
public var txtinside:MovieClip;
public var bt_close:SimpleButton;
public var bt_low:SimpleButton;
public function G_menusettings2(){
addFrameScript(0, frame1, 19, frame20);
}
function frame1(){
stop();
}
function frame20(){
stop();
}
}
}//package
Section 276
//G_newgame (G_newgame)
package {
import flash.display.*;
public dynamic class G_newgame extends MovieClip {
public var confirmButton:SimpleButton;
public var doIt:SimpleButton;
public function G_newgame(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 277
//G_readysetgo (G_readysetgo)
package {
import flash.display.*;
public dynamic class G_readysetgo extends MovieClip {
public function G_readysetgo(){
addFrameScript(0, frame1, 51,
);
}
function frame1(){
stop();
}
function
(){
stop();
}
}
}//package
Section 278
//G_submithighscores (G_submithighscores)
package {
import fl.controls.*;
import flash.display.*;
import flash.text.*;
public dynamic class G_submithighscores extends MovieClip {
public var sendname:TextField;
public var levelstatus:TextArea;
public var bt_submit:SimpleButton;
public var ngBt1:SimpleButton;
public var bt_back:SimpleButton;
public var allstatus:TextArea;
public function G_submithighscores(){
addFrameScript(0, frame1);
();
();
}
function (){
try {
allstatus["componentInspectorSetting"] = true;
} catch(e:Error) {
};
allstatus.condenseWhite = false;
allstatus.editable = false;
allstatus.enabled = true;
allstatus.horizontalScrollPolicy = "auto";
allstatus.htmlText = "";
allstatus.maxChars = 0;
allstatus.restrict = "";
allstatus.text = "";
allstatus.verticalScrollPolicy = "auto";
allstatus.visible = true;
allstatus.wordWrap = true;
try {
allstatus["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function (){
try {
levelstatus["componentInspectorSetting"] = true;
} catch(e:Error) {
};
levelstatus.condenseWhite = false;
levelstatus.editable = false;
levelstatus.enabled = true;
levelstatus.horizontalScrollPolicy = "auto";
levelstatus.htmlText = "";
levelstatus.maxChars = 0;
levelstatus.restrict = "";
levelstatus.text = "";
levelstatus.verticalScrollPolicy = "auto";
levelstatus.visible = true;
levelstatus.wordWrap = true;
try {
levelstatus["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame1(){
stop();
}
}
}//package
Section 279
//G_topinvert (G_topinvert)
package {
import flash.display.*;
public dynamic class G_topinvert extends MovieClip {
}
}//package
Section 280
//Icon_Back (Icon_Back)
package {
import flash.display.*;
public dynamic class Icon_Back extends MovieClip {
}
}//package
Section 281
//Icon_File (Icon_File)
package {
import flash.display.*;
public dynamic class Icon_File extends MovieClip {
}
}//package
Section 282
//Icon_Folder (Icon_Folder)
package {
import flash.display.*;
public dynamic class Icon_Folder extends MovieClip {
}
}//package
Section 283
//List_skin (List_skin)
package {
import flash.display.*;
public dynamic class List_skin extends MovieClip {
}
}//package
Section 284
//LuisPlane (LuisPlane)
package {
import flash.media.*;
public dynamic class LuisPlane extends Sound {
}
}//package
Section 285
//NewgroundsAPI (NewgroundsAPI)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.net.*;
public class NewgroundsAPI {
public static const ADS_APPROVED:Number = 3;
public static const bridge:Sprite = new Sprite();
private static const STAT_NEW_VERSION:Number = 4;
private static const STAT_AUTHOR_SITE:Number = 2;
private static const GATEWAY_URL:String = "http://www.ngads.com/gateway.php";
private static const NEWGROUNDS_URL:String = "http://www.newgrounds.com";
private static const STAT_CUSTOM_STATS:Number = 50;
private static const STAT_MOVIE_VIEWS:Number = 1;
private static const STAT_NEWGROUNDS:Number = 3;
public static const NEW_VERSION:Number = 2;
public static const DENY_HOST:Number = 1;
private static var tracker_id:Number;
private static var movie_options:Object = new Object();
private static var connected:Boolean;
private static var custom_events:Object = new Object();
private static var host:String;
private static var linked:Boolean;
private static var events:Object = new Object();
private static var debug:Boolean;
private static var version:String;
private static var custom_links:Object = new Object();
public static function getNewVersionURL(){
return (((((((GATEWAY_URL + "?&id=") + tracker_id) + "&host=") + escape(host)) + "&stat=") + STAT_NEW_VERSION));
}
private static function ReadGatewayData(_arg1:Object){
var _local2:*;
var _local3:String;
var _local4:*;
var _local5:URLLoader;
for (_local2 in _arg1) {
_arg1[_local2] = unescape(_arg1[_local2]);
movie_options[_local2] = _arg1[_local2];
};
if (_arg1["settings_loaded"]){
SendMessage("You have successfully connected to the Newgrounds API gateway!");
SendMessage((("Movie Identified as '" + movie_options["movie_name"]) + "'"));
if (movie_options["message"]){
SendMessage(movie_options["message"]);
};
if (movie_options["ad_url"]){
SendMessage("Your movie has been approved to run Flash Ads");
if (events[ADS_APPROVED]){
var _local6 = events;
_local6[ADS_APPROVED](movie_options["ad_url"]);
} else {
onAdsApproved(movie_options["ad_url"]);
};
};
if (((movie_options["movie_version"]) && (!((String(movie_options["movie_version"]) == String(version)))))){
SendMessage("WARNING: The movie version configured in your API settings does not match this movie's version!");
if (events[NEW_VERSION]){
_local6 = events;
_local6[NEW_VERSION]({version:movie_options["movie_version"], real_url:getMovieURL(), redirect_url:getNewVersionURL()});
} else {
onNewVersionAvailable(movie_options["movie_version"], getMovieURL(), getNewVersionURL());
};
};
if (movie_options["deny_host"]){
SendMessage("You have blocked 'localHost' in your API settings.");
SendMessage("If you wish to test your movie you will need to remove this block.");
if (events[DENY_HOST]){
_local6 = events;
_local6[DENY_HOST]({host:host, real_url:getMovieURL(), redirect_url:getNewVersionURL()});
} else {
onDenyHost(host, getMovieURL(), getNewVersionURL());
};
};
if (movie_options["request_portal_url"]){
_local3 = bridge.root.loaderInfo.url;
_local4 = ((((GATEWAY_URL + "?&id=") + tracker_id) + "&portal_url=") + escape(_local3));
_local5 = new URLLoader(new URLRequest(_local4));
};
if (events[69]){
_local6 = events;
_local6[69]();
};
} else {
if (!movie_options["settings_loaded"]){
SendError("Could not establish connection to the API gateway.");
};
};
}
public static function setMovieVersion(_arg1){
if (!_arg1){
SendError("Missing required 'version' in NewgroundsAPI.setMovieVersion(version:String)");
} else {
version = String(_arg1);
};
}
public static function loadCustomLink(_arg1:String){
if (!_arg1){
SendError("Missing required 'link_name' parameter in NewgroundsAPI.loadCustomLink(link_name:String)");
} else {
if (!custom_links[_arg1]){
SendError(("Attempted to open undefined custom link: " + _arg1));
} else {
SendLink(custom_links[_arg1]);
};
};
}
public static function addCustomLink(_arg1:Number, _arg2:String){
if (!_arg1){
SendError("Missing required 'id' parameter in NewgroundsAPI.AddCustomLink(id:Number, link_name:String)");
} else {
if (!_arg2){
SendError("Missing required 'link_name' parameter in NewgroundsAPI.AddCustomLink(id:Number, link_name:String)");
} else {
custom_links[_arg2] = (STAT_CUSTOM_STATS + _arg1);
SendMessage(((("Created custom link " + _arg1) + ": ") + _arg2));
};
};
}
public static function getMovieURL(){
if (movie_options["movie_url"]){
return (movie_options["movie_url"]);
};
return ("Newgrounds.com");
}
public static function debugMode(){
debug = true;
}
public static function getAdURL(){
return (movie_options["ad_url"]);
}
private static function SendStat(_arg1:Number, _arg2:Boolean, _arg3=null){
var target_url:*;
var XML_Loaded:Function;
var x:*;
var request:URLRequest;
var gateway_loader:URLLoader;
var stat_id = _arg1;
var open_in_browser = _arg2;
var extra = _arg3;
if (!tracker_id){
SendError("You must call NewgroundsAPI.connectMovie() with a valid movie id before using API features!");
} else {
XML_Loaded = function (_arg1:Event){
var _local2:XML;
var _local3:Object;
var _local4:XMLList;
var _local5:XML;
var _local6:*;
var _local7:*;
XML.ignoreWhitespace = true;
_local2 = XML(_arg1.target.data);
_local3 = new Object();
_local4 = _local2.children();
for each (_local5 in _local4) {
_local6 = _local5.localName();
_local7 = _local5.attribute("value");
if (_local7 == Number(_local7)){
_local7 = Number(_local7);
};
_local3[_local6] = _local7;
};
ReadGatewayData(_local3);
};
target_url = (((((((GATEWAY_URL + "?&id=") + tracker_id) + "&host=") + escape(host)) + "&stat=") + stat_id) + addSeed());
if (extra){
for (x in extra) {
target_url = (target_url + ((("&" + escape(x)) + "=") + escape(extra[x])));
};
};
if (debug){
target_url = (target_url + "&debug=1");
};
if (open_in_browser){
request = new URLRequest((target_url + addSeed()));
navigateToURL(request, "_blank");
} else {
gateway_loader = new URLLoader(new URLRequest((target_url + addSeed())));
gateway_loader.addEventListener(Event.COMPLETE, XML_Loaded);
};
};
}
public static function onAdsApproved(_arg1:String){
}
public static function loadMySite(_arg1:Event=null){
SendLink(STAT_AUTHOR_SITE);
}
private static function SendMessage(_arg1:String){
trace(("[NEWGROUNDS API] :: " + _arg1));
}
public static function linkAPI(_arg1){
_arg1.addChild(bridge);
linked = true;
}
public static function loadNewgrounds(_arg1:Event=null, _arg2:String=null){
var _local3:URLRequest;
var _local4:*;
if (!tracker_id){
_local3 = new URLRequest(((NEWGROUNDS_URL + "/") + _arg2));
navigateToURL(_local3, "_blank");
} else {
_local4 = null;
if (_arg2){
_local4 = new Object();
_local4.page = _arg2;
};
SendLink(STAT_NEWGROUNDS, _local4);
};
}
private static function SendLink(_arg1, _arg2=null){
SendStat(_arg1, true, _arg2);
}
public static function logCustomEvent(_arg1:String){
if (!_arg1){
SendError("Missing required 'event_name' parameter in NewgroundsAPI.logCustomEvent(event_name:String)");
} else {
if (!custom_events[_arg1]){
SendError(("Attempted to log undefined custom event: " + _arg1));
} else {
SendEvent(custom_events[_arg1]);
};
};
}
private static function SendError(_arg1:String){
trace(("[NEWGROUNDS API ERROR] :: " + _arg1));
}
public static function addCustomEvent(_arg1:Number, _arg2:String){
if (!_arg1){
SendError("Missing required 'id' parameter in NewgroundsAPI.AddCustomEvent(id:Number, event_name:String)");
} else {
if (!_arg2){
SendError("Missing required 'event_name' parameter in NewgroundsAPI.AddCustomEvent(id:Number, event_name:String)");
} else {
custom_events[_arg2] = (STAT_CUSTOM_STATS + _arg1);
SendMessage(("Created custom event: " + _arg2));
};
};
}
private static function addSeed(){
return (("&seed=" + Math.random()));
}
public static function addEventListener(_arg1:Number, _arg2:Function){
events[_arg1] = _arg2;
}
private static function SendEvent(_arg1){
SendStat(_arg1, false);
}
public static function onNewVersionAvailable(_arg1:String, _arg2:String, _arg3:String){
var sw:*;
var sh:*;
var tw:*;
var th:*;
var mg:*;
var _root:*;
var overlay:MovieClip;
var overlay_x:*;
var overlay_y:*;
var close_x:*;
var blankarea:TextField;
var header:TextField;
var header_format:TextFormat;
var msgtext:TextField;
var msgtext_format:TextFormat;
var msgtext_link:TextFormat;
var version = _arg1;
var movie_url = _arg2;
var redirect_url = _arg3;
sw = bridge.stage.stageWidth;
sh = bridge.stage.stageHeight;
tw = 350;
th = 160;
mg = 20;
_root = bridge.root;
overlay = new MovieClip();
overlay.graphics.beginFill(0, 0.6);
overlay.graphics.lineStyle(0, 0);
overlay.graphics.drawRect(0, 0, sw, sh);
overlay.graphics.endFill();
overlay_x = Math.round(((sw - tw) / 2));
overlay_y = Math.round(((sh - th) / 2));
overlay.graphics.beginFill(102);
overlay.graphics.lineStyle(10, 0);
overlay.graphics.drawRect((overlay_x - mg), (overlay_y - mg), (tw + mg), (th + mg));
overlay.graphics.endFill();
overlay.close = function (_arg1:Event){
_root.removeChild(overlay);
};
close_x = new MovieClip();
close_x.graphics.beginFill(0, 0.1);
close_x.graphics.lineStyle(3, 22015);
close_x.graphics.drawRect(0, 0, 16, 16);
close_x.graphics.endFill();
close_x.graphics.moveTo(4, 4);
close_x.graphics.lineTo(13, 13);
close_x.graphics.moveTo(13, 4);
close_x.graphics.lineTo(4, 13);
close_x.x = ((overlay_x + tw) - 26);
close_x.y = (overlay_y - 10);
close_x.addEventListener(MouseEvent.CLICK, overlay.close);
blankarea = new TextField();
blankarea.x = (overlay_x - mg);
blankarea.y = (overlay_y - mg);
blankarea.width = (tw + mg);
blankarea.height = (th + mg);
blankarea.selectable = false;
header = new TextField();
header.width = tw;
header.x = overlay_x;
header.y = overlay_y;
header.height = 100;
header.selectable = false;
header_format = new TextFormat();
header_format.font = "Arial Black";
header_format.color = 0xFFFFFF;
header_format.size = 20;
header.defaultTextFormat = header_format;
header.text = "New Version Available!";
msgtext = new TextField();
msgtext.x = overlay_x;
msgtext.y = (overlay_y + 70);
msgtext.width = tw;
msgtext.height = 60;
msgtext.selectable = false;
msgtext_format = new TextFormat();
msgtext_format.font = "Arial";
msgtext_format.color = 0xFFFFFF;
msgtext_format.size = 12;
msgtext_format.bold = true;
msgtext_link = new TextFormat();
msgtext_link.font = "Arial";
msgtext_link.color = 0xFFFF00;
msgtext_link.size = 12;
msgtext_link.bold = true;
msgtext_link.url = redirect_url;
msgtext_link.target = "_blank";
if (version){
version = ("Version " + version);
} else {
version = "A new version";
};
msgtext.defaultTextFormat = msgtext_format;
msgtext.appendText((version + " is now available"));
if (movie_url){
msgtext.appendText(" at:\n");
msgtext.defaultTextFormat = msgtext_link;
msgtext.appendText(movie_url);
} else {
msgtext.appendText("!");
};
_root.addChild(overlay);
overlay.addChild(blankarea);
overlay.addChild(header);
overlay.addChild(msgtext);
overlay.addChild(close_x);
}
public static function onDenyHost(_arg1:String, _arg2:String, _arg3:String){
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:MovieClip;
var _local10:TextField;
var _local11:TextField;
var _local12:TextFormat;
var _local13:TextField;
var _local14:TextFormat;
var _local15:TextFormat;
_local4 = bridge.stage.stageWidth;
_local5 = bridge.stage.stageHeight;
_local6 = 350;
_local7 = 160;
_local8 = bridge.root;
_local9 = new MovieClip();
_local9.graphics.beginFill(0x660000);
_local9.graphics.lineStyle(20, 0);
_local9.graphics.drawRect(0, 0, _local4, _local5);
_local9.graphics.endFill();
_local10 = new TextField();
_local10.x = 0;
_local10.y = 0;
_local10.width = _local4;
_local10.height = _local5;
_local10.selectable = false;
_local11 = new TextField();
_local11.x = Math.round(((_local4 - _local6) / 2));
_local11.y = Math.round(((_local5 - _local7) / 2.5));
_local11.width = _local6;
_local11.height = 100;
_local11.selectable = false;
_local12 = new TextFormat();
_local12.font = "Arial Black";
_local12.color = 0xFF0000;
_local12.size = 38;
_local11.defaultTextFormat = _local12;
_local11.text = "ERROR!";
_local13 = new TextField();
_local13.x = Math.round(((_local4 - _local6) / 2));
_local13.y = (Math.round(((_local5 - _local7) / 2.5)) + 80);
_local13.width = _local6;
_local13.height = 80;
_local13.selectable = false;
_local14 = new TextFormat();
_local14.font = "Arial";
_local14.color = 0xFFFFFF;
_local14.size = 12;
_local14.bold = true;
_local15 = new TextFormat();
_local15.font = "Arial";
_local15.color = 0xFFFF00;
_local15.size = 12;
_local15.bold = true;
_local15.url = _arg3;
_local15.target = "_blank";
_local13.defaultTextFormat = _local14;
_local13.appendText((("This movie has not been approved for use on " + _arg1) + "\n"));
_local13.appendText("For an approved copy, please visit:\n");
_local13.defaultTextFormat = _local15;
_local13.appendText(_arg2);
_local8.addChild(_local9);
_local9.addChild(_local10);
_local9.addChild(_local11);
_local9.addChild(_local13);
}
public static function connectMovie(_arg1:Number){
var _local2:String;
var _local3:*;
if (!_arg1){
SendError("Missing required 'id' parameter in NewgroundsAPI.connectMovie(id:Number)");
} else {
if (!linked){
SendError("Attempted to call MewgroundsAPI.connectMovie() without first calling NewgroundsAPI.linkAPI(this)");
} else {
if (!tracker_id){
SendMessage("Connecting to API gateway...");
tracker_id = _arg1;
_local2 = bridge.root.loaderInfo.url;
host = _local2.split("/")[2].toLowerCase();
if (host.length < 1){
host = "localhost";
};
_local3 = new Object();
SendEvent(STAT_MOVIE_VIEWS);
};
};
};
}
public static function isInstalled(){
return (true);
}
}
}//package
Section 286
//NumericStepperDownArrow_disabledSkin (NumericStepperDownArrow_disabledSkin)
package {
import flash.display.*;
public dynamic class NumericStepperDownArrow_disabledSkin extends MovieClip {
}
}//package
Section 287
//NumericStepperDownArrow_downSkin (NumericStepperDownArrow_downSkin)
package {
import flash.display.*;
public dynamic class NumericStepperDownArrow_downSkin extends MovieClip {
}
}//package
Section 288
//NumericStepperDownArrow_overSkin (NumericStepperDownArrow_overSkin)
package {
import flash.display.*;
public dynamic class NumericStepperDownArrow_overSkin extends MovieClip {
}
}//package
Section 289
//NumericStepperDownArrow_upSkin (NumericStepperDownArrow_upSkin)
package {
import flash.display.*;
public dynamic class NumericStepperDownArrow_upSkin extends MovieClip {
}
}//package
Section 290
//NumericStepperUpArrow_disabledSkin (NumericStepperUpArrow_disabledSkin)
package {
import flash.display.*;
public dynamic class NumericStepperUpArrow_disabledSkin extends MovieClip {
}
}//package
Section 291
//NumericStepperUpArrow_downSkin (NumericStepperUpArrow_downSkin)
package {
import flash.display.*;
public dynamic class NumericStepperUpArrow_downSkin extends MovieClip {
}
}//package
Section 292
//NumericStepperUpArrow_overSkin (NumericStepperUpArrow_overSkin)
package {
import flash.display.*;
public dynamic class NumericStepperUpArrow_overSkin extends MovieClip {
}
}//package
Section 293
//NumericStepperUpArrow_upSkin (NumericStepperUpArrow_upSkin)
package {
import flash.display.*;
public dynamic class NumericStepperUpArrow_upSkin extends MovieClip {
}
}//package
Section 294
//S_concrete_block_impact_hard2 (S_concrete_block_impact_hard2)
package {
import flash.media.*;
public dynamic class S_concrete_block_impact_hard2 extends Sound {
}
}//package
Section 295
//S_explode (S_explode)
package {
import flash.media.*;
public dynamic class S_explode extends Sound {
}
}//package
Section 296
//S_ingame1 (S_ingame1)
package {
import flash.media.*;
public dynamic class S_ingame1 extends Sound {
}
}//package
Section 297
//S_ingame2 (S_ingame2)
package {
import flash.media.*;
public dynamic class S_ingame2 extends Sound {
}
}//package
Section 298
//S_lost (S_lost)
package {
import flash.media.*;
public dynamic class S_lost extends Sound {
}
}//package
Section 299
//S_mainmenu (S_mainmenu)
package {
import flash.media.*;
public dynamic class S_mainmenu extends Sound {
}
}//package
Section 300
//S_mainmenu_devil (S_mainmenu_devil)
package {
import flash.media.*;
public dynamic class S_mainmenu_devil extends Sound {
}
}//package
Section 301
//S_mute (S_mute)
package {
import flash.media.*;
public dynamic class S_mute extends Sound {
}
}//package
Section 302
//S_newgame (S_newgame)
package {
import flash.media.*;
public dynamic class S_newgame extends Sound {
}
}//package
Section 303
//S_nocheat (S_nocheat)
package {
import flash.media.*;
public dynamic class S_nocheat extends Sound {
}
}//package
Section 304
//S_rock_impact_soft1 (S_rock_impact_soft1)
package {
import flash.media.*;
public dynamic class S_rock_impact_soft1 extends Sound {
}
}//package
Section 305
//S_rock_scrape_rough_loop1 (S_rock_scrape_rough_loop1)
package {
import flash.media.*;
public dynamic class S_rock_scrape_rough_loop1 extends Sound {
}
}//package
Section 306
//S_won (S_won)
package {
import flash.media.*;
public dynamic class S_won extends Sound {
}
}//package
Section 307
//S_yescheat (S_yescheat)
package {
import flash.media.*;
public dynamic class S_yescheat extends Sound {
}
}//package
Section 308
//ScrollArrowDown_disabledSkin (ScrollArrowDown_disabledSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_disabledSkin extends MovieClip {
}
}//package
Section 309
//ScrollArrowDown_downSkin (ScrollArrowDown_downSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_downSkin extends MovieClip {
}
}//package
Section 310
//ScrollArrowDown_overSkin (ScrollArrowDown_overSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_overSkin extends MovieClip {
}
}//package
Section 311
//ScrollArrowDown_upSkin (ScrollArrowDown_upSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_upSkin extends MovieClip {
}
}//package
Section 312
//ScrollArrowUp_disabledSkin (ScrollArrowUp_disabledSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_disabledSkin extends MovieClip {
}
}//package
Section 313
//ScrollArrowUp_downSkin (ScrollArrowUp_downSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_downSkin extends MovieClip {
}
}//package
Section 314
//ScrollArrowUp_overSkin (ScrollArrowUp_overSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_overSkin extends MovieClip {
}
}//package
Section 315
//ScrollArrowUp_upSkin (ScrollArrowUp_upSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_upSkin extends MovieClip {
}
}//package
Section 316
//ScrollBar_thumbIcon (ScrollBar_thumbIcon)
package {
import flash.display.*;
public dynamic class ScrollBar_thumbIcon extends MovieClip {
}
}//package
Section 317
//ScrollThumb_downSkin (ScrollThumb_downSkin)
package {
import flash.display.*;
public dynamic class ScrollThumb_downSkin extends MovieClip {
}
}//package
Section 318
//ScrollThumb_overSkin (ScrollThumb_overSkin)
package {
import flash.display.*;
public dynamic class ScrollThumb_overSkin extends MovieClip {
}
}//package
Section 319
//ScrollThumb_upSkin (ScrollThumb_upSkin)
package {
import flash.display.*;
public dynamic class ScrollThumb_upSkin extends MovieClip {
}
}//package
Section 320
//ScrollTrack_skin (ScrollTrack_skin)
package {
import flash.display.*;
public dynamic class ScrollTrack_skin extends MovieClip {
}
}//package
Section 321
//TextArea_disabledSkin (TextArea_disabledSkin)
package {
import flash.display.*;
public dynamic class TextArea_disabledSkin extends MovieClip {
}
}//package
Section 322
//TextArea_upSkin (TextArea_upSkin)
package {
import flash.display.*;
public dynamic class TextArea_upSkin extends MovieClip {
}
}//package
Section 323
//TextInput_disabledSkin (TextInput_disabledSkin)
package {
import flash.display.*;
public dynamic class TextInput_disabledSkin extends MovieClip {
}
}//package
Section 324
//TextInput_upSkin (TextInput_upSkin)
package {
import flash.display.*;
public dynamic class TextInput_upSkin extends MovieClip {
}
}//package
Section 325
//Tot (Tot)
package {
import flash.display.*;
public dynamic class Tot extends BitmapData {
public function Tot(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 326
//TotemDestroyer2Main (TotemDestroyer2Main)
package {
import fl.controls.*;
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
import flash.geom.*;
import fl.data.*;
import TotemEngine.*;
import General.*;
import org.flintparticles.twoD.actions.*;
import org.flintparticles.twoD.emitters.*;
import org.flintparticles.twoD.renderers.*;
import flash.net.*;
import flash.system.*;
public class TotemDestroyer2Main extends MovieClip {
public var GAME:MovieClip;
public var ;
public var LOADING:MovieClip;
public var :DataProvider;
public var MasterMovieClip:MovieClip;
public var BG:MovieClip;
public var :Dictionary;
private var :Boolean;// = false
private var :Boolean;// = false
public var debugControl:MovieClip;
private var
:Emitter2D;
public var :Object;
private var :Timer;
private var :BitmapData;
public var :SimpleCollectionItem;
public var :Array;
public var i7:int;
public var ls_type:List;
private var :DisplayObjectRenderer;
private static var trTarget;
public function TotemDestroyer2Main(){
= new Dictionary(true);
= false;
= false;
super();
addFrameScript(0, frame1, 2, , 4, , 5, , 1, );
trTarget = root;
Security.allowDomain("70.87.128.99");
Security.allowInsecureDomain("70.87.128.99");
Security.allowDomain("ads.shizmoo.com");
Security.allowInsecureDomain("ads.shizmoo.com");
Security.allowDomain("www.cpmstar.com");
Security.allowInsecureDomain("www.cpmstar.com");
Security.allowDomain("server.cpmstar.com");
Security.allowInsecureDomain("server.cpmstar.com");
NewgroundsAPI.linkAPI(this);
NewgroundsAPI.connectMovie(5223);
if (NewgroundsAPI.getAdURL()){
(NewgroundsAPI.getAdURL());
};
NewgroundsAPI.addCustomLink(1, "TD2 WAlkthrough");
NewgroundsAPI.addCustomLink(3, "LuisNG");
NewgroundsAPI.addCustomLink(4, "GabsTV");
NewgroundsAPI.addCustomEvent(2, "BeatTD2");
NewgroundsAPI.addEventListener(NewgroundsAPI.ADS_APPROVED,
);
LOADING.NEWGROUNDS.NG_Button.addEventListener(MouseEvent.CLICK, loadNGSite);
stage.showDefaultContextMenu = false;
debugControl.debugdump.mouseEnabled = false;
Debug.Init(debugControl.debugdump);
Console.Init(MovieClip(root));
Factory.Init(MovieClip(root));
Data.Init();
LevelEditor.Init(MovieClip(root), stage);
Debug.Dump("Totem Destroyer 2");
Debug.Dump((TotemMath.Scale(690) + " tiles wide"));
Debug.Dump((TotemMath.Scale(480) + " tiles high"));
debugControl.visible = false;
Key.initialize(stage);
LOADING.addEventListener(Event.ENTER_FRAME, );
}
public function loadNGSite(_arg1:Event){
NewgroundsAPI.loadNewgrounds();
}
public function
(_arg1){
var _local2:URLLoader;
_local2 = new URLLoader(new URLRequest(_arg1));
_local2.addEventListener(Event.COMPLETE, );
}
function (){
ILevels.Init();
}
public function (_arg1:Event){
if (((Key.isDown(192)) && (!()))){
if (!){
debugControl.visible = true;
= true;
stage.focus = debugControl.debugdo;
} else {
debugControl.visible = false;
= false;
stage.focus = null;
if ((((debugControl.debugdo.text == "'")) || ((debugControl.debugdo.text == "''")))){
debugControl.debugdo.text = "";
};
};
= true;
} else {
if (((!(Key.isDown(192))) && ())){
= false;
};
};
if (((Key.isDown(13)) && ())){
if (debugControl.debugdo.text != ""){
Console.Read(debugControl.debugdo.text);
debugControl.debugdo.text = "";
Key.removeKey(13);
};
};
}
function frame1(){
stop();
}
function (){
stage.frameRate = 40;
stop();
Gear.Init(root, stage);
Gear.BuildMenu();
}
public function (_arg1:Event){
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
_local2 = this.root.loaderInfo.bytesLoaded;
_local3 = this.root.loaderInfo.bytesTotal;
_local4 = (_local2 / 0x0400);
_local5 = (_local3 / 0x0400);
_local6 = Math.ceil(((_local2 / _local3) * 10));
_local7 = Math.ceil(((_local2 / _local3) * 100));
if (_local2 >= _local3){
_arg1.currentTarget.removeEventListener(Event.ENTER_FRAME, );
LOADING.NEWGROUNDS.NGLOADER.gotoAndPlay(100);
LOADING.removeEventListener(Event.ENTER_FRAME, );
} else {
LOADING.NEWGROUNDS.NGLOADER.gotoAndStop(_local7);
};
}
function (){
stop();
stage.frameRate = 30;
}
public function (_arg1:TimerEvent){
.removeEventListener(TimerEvent.TIMER_COMPLETE, );
MovieClip(root).play();
}
function (){
try {
ls_type["componentInspectorSetting"] = true;
} catch(e:Error) {
};
ls_type.allowMultipleSelection = false;
= new DataProvider();
= [{label:"Normal", data:0}, {label:"TimeAttack", data:1}, {label:"Multiplayer", data:2}];
i7 = 0;
while (i7 < .length) {
= new SimpleCollectionItem();
= [i7];
for ( in ) {
[] = [];
};
.addItem();
i7++;
};
ls_type.dataProvider = ;
ls_type.enabled = true;
ls_type.horizontalLineScrollSize = 2;
ls_type.horizontalPageScrollSize = 0;
ls_type.horizontalScrollPolicy = "auto";
ls_type.verticalLineScrollSize = 3;
ls_type.verticalPageScrollSize = 0;
ls_type.verticalScrollPolicy = "auto";
ls_type.visible = true;
try {
ls_type["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
public function (_arg1:Event){
var _local2:*;
var _local3:Loader;
_local2 = String(_arg1.target.data);
_local3 = new Loader();
_local3.load(new URLRequest(_local2));
LOADING.NEWGROUNDS.ng_ad.addChild(_local3);
}
function (_arg1:MouseEvent):void{
var _local2:Point;
_local2 = .globalToLocal(new Point(_arg1.stageX, _arg1.stageY));
.addAction(new Explosion(1.525, _local2.x, _local2.y, 500));
}
function (){
if (((([ls_type] == undefined)) || (!((int([ls_type]) == 2))))){
[ls_type] = currentFrame;
();
};
}
public static function TransitionFade(_arg1:Event):void{
_arg1.target.alpha = (_arg1.target.alpha - 0.1);
if (_arg1.target.alpha <= 0){
_arg1.target.removeEventListener(Event.ENTER_FRAME, _arg1.target);
while (MovieClip(trTarget).MasterMovieClip.numChildren > 0) {
MovieClip(trTarget).MasterMovieClip.removeChildAt(0);
};
_arg1.target.alpha = 1;
};
}
public static function GameTransition(_arg1):void{
var _local2:BitmapData;
var _local3:Bitmap;
var _local4:*;
_local2 = new BitmapData(690, 480, false);
_local2.draw(_arg1);
_local3 = new Bitmap(_local2);
_local4 = MovieClip(trTarget).MasterMovieClip.addChild(_local3);
MovieClip(trTarget).MasterMovieClip.addEventListener(Event.ENTER_FRAME, TransitionFade);
}
}
}//package