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

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

Contraption.swf

This is the info page for
Flash #98878

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


Text
BUY NOW

TM

Sign In

Sign Out

OK

My Levels

New User

Back

Submit

Player Levels

New Level

Account

Main Menu

Game by Colin Northway
Music by James Mark
Art by Sarah Collins

Play!

Play!

Cancel

My Designs

Save

Update

See Your Tweet

One last note:
Triangles,
Triangles,
Triangles

STOP

START

G

TEST

EDIT

<p align="center"><font face="Arial" size="12" color="#9d9d9d" letterSpacing="0.000000" kerning="1"><b>Un-Powered wheels: will roll if pushed, but not on their own</b></font></p>

Facebook

Share your contraptions on Facebook!

Publish

Working...

Next Level

To Menu

This will make it go

Use this to play the game

Continue

Levels

Designs

Support This Game

Skip Tutorial

Learn how to play

Play with no Ads or

Pop-ups!

FantasticContraption.com

be played

<p align="center"><font face="Arial" size="12" color="#663300" letterSpacing="0.000000" kerning="1">The way it was meant to</font></p>

Get the Full Version

Instantly!

Support this game and
get more user-made levels

$10!

Continue

Twitter

Share your contraptions on Twitter!

Twitter Username:

Twitter Password:

Message:

Send Tweet

Play!

Now draw water from the middle of

one wheel to the middle of the other wheel

This rod definitely has to go

Delete it

I don't think this is going to work

Hit stop when you've seen enough

Select the water tool

OK, let's see if we can fix this

Select the delete tool

I'm sure it's going to work this time

Start the Contraption!

Maybe that fixed it

Hit start to give it a try

Select the water tool again

This water doesn't look right

Click on it to delete it

This looks like a promising design

Hit start to test it out

Select the delete tool again

If it doesn't work hit stop

I'm sure we can get this working

This is definitely going to work

Draw water between the middle

of these two wheels

You don't have to get it right the first time

Let's teach you how to refine a design

Good Job

Now select the watery rods tool

We can use that to connect the two wheels

Welcome to Fantastic Contraption

Let's teach you how to play

This pink square is the goal
You win by getting the pink ball into it

Draw water from the middle of one wheel
to the middle of the other wheel

Excelent

Now start your contraption

You cannot change your contraption while it is running

This blue square is your workshop

You will build Contraptions here

This pink wheel is important

You win by getting it to the goal

Ok lets get started

First select the wheel tool

Now click your mouse
here to draw the wheel

Use the move tool to drag joints
or whole contraptions around

Water rods can flow right
past wheels and other rods

You can Save, too!  We'll give you a link
so you can share your crazy contraptions
with others.  Load and play your saved
designs from the My Designs page.

That's the end of the tutorial!
This level will be easy as pie,
but it gets harder as you go.
Have fun!

Wood rods will bump into wheels
and rods they aren't attached to

If a level is too hard, don't dispair!
Hit this back button and go try
a different one.

Zoom in or out

This wheel won't spin
unless you push it.

Use the delete tool to get
rid of parts you don't want

Okay, to recap:

These wheels will spin when you
attach a rod to their middle joint

Start to see your contraption run,
then Stop so you can edit again

ActionScript [AS3]

Section 1
//MultiCloud_107 (ArtAssets_fla.MultiCloud_107) package ArtAssets_fla { import flash.events.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class MultiCloud_107 extends MovieClip { public var randomStartingFrame:int; public function MultiCloud_107(){ addFrameScript(0, frame1); } function frame1(){ randomStartingFrame = (Math.round((Math.random() * (4 - 1))) + 1); gotoAndStop(randomStartingFrame); } } }//package ArtAssets_fla
Section 2
//b2BoxDef (Box2D.Collision.Shapes.b2BoxDef) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; public class b2BoxDef extends b2ShapeDef { public var extents:b2Vec2; public function b2BoxDef(){ type = b2Shape.e_boxShape; extents = new b2Vec2(1, 1); } } }//package Box2D.Collision.Shapes
Section 3
//b2CircleDef (Box2D.Collision.Shapes.b2CircleDef) package Box2D.Collision.Shapes { public class b2CircleDef extends b2ShapeDef { public var radius:Number; public function b2CircleDef(){ type = b2Shape.e_circleShape; radius = 1; } } }//package Box2D.Collision.Shapes
Section 4
//b2CircleShape (Box2D.Collision.Shapes.b2CircleShape) package Box2D.Collision.Shapes { import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.Math.*; public class b2CircleShape extends b2Shape { public var m_localPosition:b2Vec2; public var m_radius:Number; public function b2CircleShape(_arg1:b2ShapeDef, _arg2:b2Body, _arg3:b2Vec2){ var _local5:Number; var _local6:Number; m_localPosition = new b2Vec2(); super(_arg1, _arg2); var _local4:b2CircleDef = (_arg1 as b2CircleDef); m_localPosition.Set((_arg1.localPosition.x - _arg3.x), (_arg1.localPosition.y - _arg3.y)); m_type = b2Shape.e_circleShape; m_radius = _local4.radius; m_R.SetM(m_body.m_R); _local5 = ((m_R.col1.x * m_localPosition.x) + (m_R.col2.x * m_localPosition.y)); _local6 = ((m_R.col1.y * m_localPosition.x) + (m_R.col2.y * m_localPosition.y)); m_position.x = (m_body.m_position.x + _local5); m_position.y = (m_body.m_position.y + _local6); m_maxRadius = (Math.sqrt(((_local5 * _local5) + (_local6 * _local6))) + m_radius); var _local7:b2AABB = new b2AABB(); _local7.minVertex.Set((m_position.x - m_radius), (m_position.y - m_radius)); _local7.maxVertex.Set((m_position.x + m_radius), (m_position.y + m_radius)); var _local8:b2BroadPhase = m_body.m_world.m_broadPhase; if (_local8.InRange(_local7)){ m_proxyId = _local8.CreateProxy(_local7, this); } else { m_proxyId = b2Pair.b2_nullProxy; }; if (m_proxyId == b2Pair.b2_nullProxy){ m_body.Freeze(); }; } override public function Synchronize(_arg1:b2Vec2, _arg2:b2Mat22, _arg3:b2Vec2, _arg4:b2Mat22):void{ m_R.SetM(_arg4); m_position.x = (((_arg4.col1.x * m_localPosition.x) + (_arg4.col2.x * m_localPosition.y)) + _arg3.x); m_position.y = (((_arg4.col1.y * m_localPosition.x) + (_arg4.col2.y * m_localPosition.y)) + _arg3.y); if (m_proxyId == b2Pair.b2_nullProxy){ return; }; var _local5:Number = (_arg1.x + ((_arg2.col1.x * m_localPosition.x) + (_arg2.col2.x * m_localPosition.y))); var _local6:Number = (_arg1.y + ((_arg2.col1.y * m_localPosition.x) + (_arg2.col2.y * m_localPosition.y))); var _local7:Number = Math.min(_local5, m_position.x); var _local8:Number = Math.min(_local6, m_position.y); var _local9:Number = Math.max(_local5, m_position.x); var _local10:Number = Math.max(_local6, m_position.y); var _local11:b2AABB = new b2AABB(); _local11.minVertex.Set((_local7 - m_radius), (_local8 - m_radius)); _local11.maxVertex.Set((_local9 + m_radius), (_local10 + m_radius)); var _local12:b2BroadPhase = m_body.m_world.m_broadPhase; if (_local12.InRange(_local11)){ _local12.MoveProxy(m_proxyId, _local11); } else { m_body.Freeze(); }; } override public function Support(_arg1:Number, _arg2:Number, _arg3:b2Vec2):void{ var _local4:Number = Math.sqrt(((_arg1 * _arg1) + (_arg2 * _arg2))); _arg1 = (_arg1 / _local4); _arg2 = (_arg2 / _local4); _arg3.Set((m_position.x + (m_radius * _arg1)), (m_position.y + (m_radius * _arg2))); } override public function QuickSync(_arg1:b2Vec2, _arg2:b2Mat22):void{ m_R.SetM(_arg2); m_position.x = (((_arg2.col1.x * m_localPosition.x) + (_arg2.col2.x * m_localPosition.y)) + _arg1.x); m_position.y = (((_arg2.col1.y * m_localPosition.x) + (_arg2.col2.y * m_localPosition.y)) + _arg1.y); } override public function TestPoint(_arg1:b2Vec2):Boolean{ var _local2:b2Vec2 = new b2Vec2(); _local2.SetV(_arg1); _local2.Subtract(m_position); return ((b2Math.b2Dot(_local2, _local2) <= (m_radius * m_radius))); } override public function ResetProxy(_arg1:b2BroadPhase):void{ if (m_proxyId == b2Pair.b2_nullProxy){ return; }; var _local2:b2Proxy = _arg1.GetProxy(m_proxyId); _arg1.DestroyProxy(m_proxyId); _local2 = null; var _local3:b2AABB = new b2AABB(); _local3.minVertex.Set((m_position.x - m_radius), (m_position.y - m_radius)); _local3.maxVertex.Set((m_position.x + m_radius), (m_position.y + m_radius)); if (_arg1.InRange(_local3)){ m_proxyId = _arg1.CreateProxy(_local3, this); } else { m_proxyId = b2Pair.b2_nullProxy; }; if (m_proxyId == b2Pair.b2_nullProxy){ m_body.Freeze(); }; } } }//package Box2D.Collision.Shapes
Section 5
//b2MassData (Box2D.Collision.Shapes.b2MassData) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; public class b2MassData { public var mass:Number;// = 0 public var center:b2Vec2; public var I:Number;// = 0 public function b2MassData(){ center = new b2Vec2(0, 0); super(); } } }//package Box2D.Collision.Shapes
Section 6
//b2PolyDef (Box2D.Collision.Shapes.b2PolyDef) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2PolyDef extends b2ShapeDef { public var vertices:Array; public var vertexCount:int; public function b2PolyDef(){ vertices = new Array(b2Settings.b2_maxPolyVertices); super(); type = b2Shape.e_polyShape; vertexCount = 0; var _local1:int; while (_local1 < b2Settings.b2_maxPolyVertices) { vertices[_local1] = new b2Vec2(); _local1++; }; } } }//package Box2D.Collision.Shapes
Section 7
//b2PolyShape (Box2D.Collision.Shapes.b2PolyShape) package Box2D.Collision.Shapes { import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Common.*; public class b2PolyShape extends b2Shape { public var m_vertexCount:int; private var syncMat:b2Mat22; public var m_vertices:Array; public var m_coreVertices:Array; public var m_localCentroid:b2Vec2; public var m_normals:Array; private var syncAABB:b2AABB; public var m_localOBB:b2OBB; private static var tempVec:b2Vec2 = new b2Vec2(); private static var tAbsR:b2Mat22 = new b2Mat22(); public function b2PolyShape(_arg1:b2ShapeDef, _arg2:b2Body, _arg3:b2Vec2){ var _local4:int; var _local5:Number; var _local6:Number; var _local7:b2Vec2; var _local8:b2AABB; var _local9:b2Mat22; var _local14:int; var _local15:int; var _local19:b2BoxDef; var _local20:Number; var _local21:Number; var _local22:b2PolyDef; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; var _local27:Number; var _local28:b2Vec2; syncAABB = new b2AABB(); syncMat = new b2Mat22(); m_localCentroid = new b2Vec2(); m_localOBB = new b2OBB(); super(_arg1, _arg2); _local8 = new b2AABB(); m_vertices = new Array(b2Settings.b2_maxPolyVertices); m_coreVertices = new Array(b2Settings.b2_maxPolyVertices); m_normals = new Array(b2Settings.b2_maxPolyVertices); m_type = b2Shape.e_polyShape; _local9 = new b2Mat22(_arg1.localRotation); if (_arg1.type == b2Shape.e_boxShape){ m_localCentroid.x = (_arg1.localPosition.x - _arg3.x); m_localCentroid.y = (_arg1.localPosition.y - _arg3.y); _local19 = (_arg1 as b2BoxDef); m_vertexCount = 4; _local5 = _local19.extents.x; _local6 = _local19.extents.y; _local20 = Math.max(0, (_local5 - (2 * b2Settings.b2_linearSlop))); _local21 = Math.max(0, (_local6 - (2 * b2Settings.b2_linearSlop))); _local7 = (m_vertices[0] = new b2Vec2()); _local7.x = ((_local9.col1.x * _local5) + (_local9.col2.x * _local6)); _local7.y = ((_local9.col1.y * _local5) + (_local9.col2.y * _local6)); _local7 = (m_vertices[1] = new b2Vec2()); _local7.x = ((_local9.col1.x * -(_local5)) + (_local9.col2.x * _local6)); _local7.y = ((_local9.col1.y * -(_local5)) + (_local9.col2.y * _local6)); _local7 = (m_vertices[2] = new b2Vec2()); _local7.x = ((_local9.col1.x * -(_local5)) + (_local9.col2.x * -(_local6))); _local7.y = ((_local9.col1.y * -(_local5)) + (_local9.col2.y * -(_local6))); _local7 = (m_vertices[3] = new b2Vec2()); _local7.x = ((_local9.col1.x * _local5) + (_local9.col2.x * -(_local6))); _local7.y = ((_local9.col1.y * _local5) + (_local9.col2.y * -(_local6))); _local7 = (m_coreVertices[0] = new b2Vec2()); _local7.x = ((_local9.col1.x * _local20) + (_local9.col2.x * _local21)); _local7.y = ((_local9.col1.y * _local20) + (_local9.col2.y * _local21)); _local7 = (m_coreVertices[1] = new b2Vec2()); _local7.x = ((_local9.col1.x * -(_local20)) + (_local9.col2.x * _local21)); _local7.y = ((_local9.col1.y * -(_local20)) + (_local9.col2.y * _local21)); _local7 = (m_coreVertices[2] = new b2Vec2()); _local7.x = ((_local9.col1.x * -(_local20)) + (_local9.col2.x * -(_local21))); _local7.y = ((_local9.col1.y * -(_local20)) + (_local9.col2.y * -(_local21))); _local7 = (m_coreVertices[3] = new b2Vec2()); _local7.x = ((_local9.col1.x * _local20) + (_local9.col2.x * -(_local21))); _local7.y = ((_local9.col1.y * _local20) + (_local9.col2.y * -(_local21))); } else { _local22 = (_arg1 as b2PolyDef); m_vertexCount = _local22.vertexCount; PolyCentroid(_local22.vertices, _local22.vertexCount, tempVec); _local23 = tempVec.x; _local24 = tempVec.y; m_localCentroid.x = ((_arg1.localPosition.x + ((_local9.col1.x * _local23) + (_local9.col2.x * _local24))) - _arg3.x); m_localCentroid.y = ((_arg1.localPosition.y + ((_local9.col1.y * _local23) + (_local9.col2.y * _local24))) - _arg3.y); _local4 = 0; while (_local4 < m_vertexCount) { m_vertices[_local4] = new b2Vec2(); m_coreVertices[_local4] = new b2Vec2(); _local5 = (_local22.vertices[_local4].x - _local23); _local6 = (_local22.vertices[_local4].y - _local24); m_vertices[_local4].x = ((_local9.col1.x * _local5) + (_local9.col2.x * _local6)); m_vertices[_local4].y = ((_local9.col1.y * _local5) + (_local9.col2.y * _local6)); _local25 = m_vertices[_local4].x; _local26 = m_vertices[_local4].y; _local27 = Math.sqrt(((_local25 * _local25) + (_local26 * _local26))); if (_local27 > Number.MIN_VALUE){ _local25 = (_local25 * (1 / _local27)); _local26 = (_local26 * (1 / _local27)); }; m_coreVertices[_local4].x = (m_vertices[_local4].x - ((2 * b2Settings.b2_linearSlop) * _local25)); m_coreVertices[_local4].y = (m_vertices[_local4].y - ((2 * b2Settings.b2_linearSlop) * _local26)); _local4++; }; }; var _local10:Number = Number.MAX_VALUE; var _local11:Number = Number.MAX_VALUE; var _local12:Number = -(Number.MAX_VALUE); var _local13:Number = -(Number.MAX_VALUE); m_maxRadius = 0; _local4 = 0; while (_local4 < m_vertexCount) { _local28 = m_vertices[_local4]; _local10 = Math.min(_local10, _local28.x); _local11 = Math.min(_local11, _local28.y); _local12 = Math.max(_local12, _local28.x); _local13 = Math.max(_local13, _local28.y); m_maxRadius = Math.max(m_maxRadius, _local28.Length()); _local4++; }; m_localOBB.R.SetIdentity(); m_localOBB.center.Set(((_local10 + _local12) * 0.5), ((_local11 + _local13) * 0.5)); m_localOBB.extents.Set(((_local12 - _local10) * 0.5), ((_local13 - _local11) * 0.5)); _local4 = 0; while (_local4 < m_vertexCount) { m_normals[_local4] = new b2Vec2(); _local14 = _local4; _local15 = (((_local4 + 1) < m_vertexCount)) ? (_local4 + 1) : 0; m_normals[_local4].x = (m_vertices[_local15].y - m_vertices[_local14].y); m_normals[_local4].y = -((m_vertices[_local15].x - m_vertices[_local14].x)); m_normals[_local4].Normalize(); _local4++; }; _local4 = 0; while (_local4 < m_vertexCount) { _local14 = _local4; _local15 = (((_local4 + 1) < m_vertexCount)) ? (_local4 + 1) : 0; _local4++; }; m_R.SetM(m_body.m_R); m_position.x = (m_body.m_position.x + ((m_R.col1.x * m_localCentroid.x) + (m_R.col2.x * m_localCentroid.y))); m_position.y = (m_body.m_position.y + ((m_R.col1.y * m_localCentroid.x) + (m_R.col2.y * m_localCentroid.y))); tAbsR.col1.x = ((m_R.col1.x * m_localOBB.R.col1.x) + (m_R.col2.x * m_localOBB.R.col1.y)); tAbsR.col1.y = ((m_R.col1.y * m_localOBB.R.col1.x) + (m_R.col2.y * m_localOBB.R.col1.y)); tAbsR.col2.x = ((m_R.col1.x * m_localOBB.R.col2.x) + (m_R.col2.x * m_localOBB.R.col2.y)); tAbsR.col2.y = ((m_R.col1.y * m_localOBB.R.col2.x) + (m_R.col2.y * m_localOBB.R.col2.y)); tAbsR.Abs(); _local5 = ((tAbsR.col1.x * m_localOBB.extents.x) + (tAbsR.col2.x * m_localOBB.extents.y)); _local6 = ((tAbsR.col1.y * m_localOBB.extents.x) + (tAbsR.col2.y * m_localOBB.extents.y)); var _local16:Number = (m_position.x + ((m_R.col1.x * m_localOBB.center.x) + (m_R.col2.x * m_localOBB.center.y))); var _local17:Number = (m_position.y + ((m_R.col1.y * m_localOBB.center.x) + (m_R.col2.y * m_localOBB.center.y))); _local8.minVertex.x = (_local16 - _local5); _local8.minVertex.y = (_local17 - _local6); _local8.maxVertex.x = (_local16 + _local5); _local8.maxVertex.y = (_local17 + _local6); var _local18:b2BroadPhase = m_body.m_world.m_broadPhase; if (_local18.InRange(_local8)){ m_proxyId = _local18.CreateProxy(_local8, this); } else { m_proxyId = b2Pair.b2_nullProxy; }; if (m_proxyId == b2Pair.b2_nullProxy){ m_body.Freeze(); }; } override public function QuickSync(_arg1:b2Vec2, _arg2:b2Mat22):void{ m_R.SetM(_arg2); m_position.x = (_arg1.x + ((_arg2.col1.x * m_localCentroid.x) + (_arg2.col2.x * m_localCentroid.y))); m_position.y = (_arg1.y + ((_arg2.col1.y * m_localCentroid.x) + (_arg2.col2.y * m_localCentroid.y))); } override public function Support(_arg1:Number, _arg2:Number, _arg3:b2Vec2):void{ var _local9:Number; var _local4:Number = ((_arg1 * m_R.col1.x) + (_arg2 * m_R.col1.y)); var _local5:Number = ((_arg1 * m_R.col2.x) + (_arg2 * m_R.col2.y)); var _local6:int; var _local7:Number = ((m_coreVertices[0].x * _local4) + (m_coreVertices[0].y * _local5)); var _local8 = 1; while (_local8 < m_vertexCount) { _local9 = ((m_coreVertices[_local8].x * _local4) + (m_coreVertices[_local8].y * _local5)); if (_local9 > _local7){ _local6 = _local8; _local7 = _local9; }; _local8++; }; _arg3.Set((m_position.x + ((m_R.col1.x * m_coreVertices[_local6].x) + (m_R.col2.x * m_coreVertices[_local6].y))), (m_position.y + ((m_R.col1.y * m_coreVertices[_local6].x) + (m_R.col2.y * m_coreVertices[_local6].y)))); } override public function Synchronize(_arg1:b2Vec2, _arg2:b2Mat22, _arg3:b2Vec2, _arg4:b2Mat22):void{ var _local5:Number; var _local6:Number; m_R.SetM(_arg4); m_position.x = (m_body.m_position.x + ((_arg4.col1.x * m_localCentroid.x) + (_arg4.col2.x * m_localCentroid.y))); m_position.y = (m_body.m_position.y + ((_arg4.col1.y * m_localCentroid.x) + (_arg4.col2.y * m_localCentroid.y))); if (m_proxyId == b2Pair.b2_nullProxy){ return; }; var _local7:b2Vec2 = _arg2.col1; var _local8:b2Vec2 = _arg2.col2; var _local9:b2Vec2 = m_localOBB.R.col1; var _local10:b2Vec2 = m_localOBB.R.col2; syncMat.col1.x = ((_local7.x * _local9.x) + (_local8.x * _local9.y)); syncMat.col1.y = ((_local7.y * _local9.x) + (_local8.y * _local9.y)); syncMat.col2.x = ((_local7.x * _local10.x) + (_local8.x * _local10.y)); syncMat.col2.y = ((_local7.y * _local10.x) + (_local8.y * _local10.y)); syncMat.Abs(); _local5 = (m_localCentroid.x + m_localOBB.center.x); _local6 = (m_localCentroid.y + m_localOBB.center.y); var _local11:Number = (_arg1.x + ((_arg2.col1.x * _local5) + (_arg2.col2.x * _local6))); var _local12:Number = (_arg1.y + ((_arg2.col1.y * _local5) + (_arg2.col2.y * _local6))); _local5 = ((syncMat.col1.x * m_localOBB.extents.x) + (syncMat.col2.x * m_localOBB.extents.y)); _local6 = ((syncMat.col1.y * m_localOBB.extents.x) + (syncMat.col2.y * m_localOBB.extents.y)); syncAABB.minVertex.x = (_local11 - _local5); syncAABB.minVertex.y = (_local12 - _local6); syncAABB.maxVertex.x = (_local11 + _local5); syncAABB.maxVertex.y = (_local12 + _local6); _local7 = _arg4.col1; _local8 = _arg4.col2; _local9 = m_localOBB.R.col1; _local10 = m_localOBB.R.col2; syncMat.col1.x = ((_local7.x * _local9.x) + (_local8.x * _local9.y)); syncMat.col1.y = ((_local7.y * _local9.x) + (_local8.y * _local9.y)); syncMat.col2.x = ((_local7.x * _local10.x) + (_local8.x * _local10.y)); syncMat.col2.y = ((_local7.y * _local10.x) + (_local8.y * _local10.y)); syncMat.Abs(); _local5 = (m_localCentroid.x + m_localOBB.center.x); _local6 = (m_localCentroid.y + m_localOBB.center.y); _local11 = (_arg3.x + ((_arg4.col1.x * _local5) + (_arg4.col2.x * _local6))); _local12 = (_arg3.y + ((_arg4.col1.y * _local5) + (_arg4.col2.y * _local6))); _local5 = ((syncMat.col1.x * m_localOBB.extents.x) + (syncMat.col2.x * m_localOBB.extents.y)); _local6 = ((syncMat.col1.y * m_localOBB.extents.x) + (syncMat.col2.y * m_localOBB.extents.y)); syncAABB.minVertex.x = Math.min(syncAABB.minVertex.x, (_local11 - _local5)); syncAABB.minVertex.y = Math.min(syncAABB.minVertex.y, (_local12 - _local6)); syncAABB.maxVertex.x = Math.max(syncAABB.maxVertex.x, (_local11 + _local5)); syncAABB.maxVertex.y = Math.max(syncAABB.maxVertex.y, (_local12 + _local6)); var _local13:b2BroadPhase = m_body.m_world.m_broadPhase; if (_local13.InRange(syncAABB)){ _local13.MoveProxy(m_proxyId, syncAABB); } else { m_body.Freeze(); }; } override public function TestPoint(_arg1:b2Vec2):Boolean{ var _local4:b2Vec2; var _local5:Number; var _local2:b2Vec2 = new b2Vec2(); _local2.SetV(_arg1); _local2.Subtract(m_position); _local2.MulTM(m_R); var _local3:int; while (_local3 < m_vertexCount) { _local4 = new b2Vec2(); _local4.SetV(_local2); _local4.Subtract(m_vertices[_local3]); _local5 = b2Math.b2Dot(m_normals[_local3], _local4); if (_local5 > 0){ return (false); }; _local3++; }; return (true); } override public function ResetProxy(_arg1:b2BroadPhase):void{ if (m_proxyId == b2Pair.b2_nullProxy){ return; }; var _local2:b2Proxy = _arg1.GetProxy(m_proxyId); _arg1.DestroyProxy(m_proxyId); _local2 = null; var _local3:b2Mat22 = b2Math.b2MulMM(m_R, m_localOBB.R); var _local4:b2Mat22 = b2Math.b2AbsM(_local3); var _local5:b2Vec2 = b2Math.b2MulMV(_local4, m_localOBB.extents); var _local6:b2Vec2 = b2Math.b2MulMV(m_R, m_localOBB.center); _local6.Add(m_position); var _local7:b2AABB = new b2AABB(); _local7.minVertex.SetV(_local6); _local7.minVertex.Subtract(_local5); _local7.maxVertex.SetV(_local6); _local7.maxVertex.Add(_local5); if (_arg1.InRange(_local7)){ m_proxyId = _arg1.CreateProxy(_local7, this); } else { m_proxyId = b2Pair.b2_nullProxy; }; if (m_proxyId == b2Pair.b2_nullProxy){ m_body.Freeze(); }; } } }//package Box2D.Collision.Shapes
Section 8
//b2Shape (Box2D.Collision.Shapes.b2Shape) package Box2D.Collision.Shapes { import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Common.*; public class b2Shape { public var m_position:b2Vec2; public var m_maxRadius:Number; public var m_next:b2Shape; public var m_type:int; public var m_R:b2Mat22; public var m_friction:Number; public var m_proxyId:uint; public var m_maskBits:uint; public var m_groupIndex:int; public var m_userData;// = null public var m_body:b2Body; public var m_restitution:Number; public var m_categoryBits:uint; public static const e_boxShape:int = 1; public static const e_unknownShape:int = -1; public static const e_shapeTypeCount:int = 4; public static const e_circleShape:int = 0; public static const e_meshShape:int = 3; public static const e_polyShape:int = 2; public function b2Shape(_arg1:b2ShapeDef, _arg2:b2Body){ m_R = new b2Mat22(); m_position = new b2Vec2(); super(); m_userData = _arg1.userData; m_friction = _arg1.friction; m_restitution = _arg1.restitution; m_body = _arg2; m_proxyId = b2Pair.b2_nullProxy; m_maxRadius = 0; m_categoryBits = _arg1.categoryBits; m_maskBits = _arg1.maskBits; m_groupIndex = _arg1.groupIndex; } public function GetMaxRadius():Number{ return (m_maxRadius); } public function ResetProxy(_arg1:b2BroadPhase):void{ } public function QuickSync(_arg1:b2Vec2, _arg2:b2Mat22):void{ } public function GetNext():b2Shape{ return (m_next); } public function GetType():int{ return (m_type); } public function GetUserData(){ return (m_userData); } public function Support(_arg1:Number, _arg2:Number, _arg3:b2Vec2):void{ } public function Synchronize(_arg1:b2Vec2, _arg2:b2Mat22, _arg3:b2Vec2, _arg4:b2Mat22):void{ } public function GetRotationMatrix():b2Mat22{ return (m_R); } public function GetBody():b2Body{ return (m_body); } public function DestroyProxy():void{ if (m_proxyId != b2Pair.b2_nullProxy){ m_body.m_world.m_broadPhase.DestroyProxy(m_proxyId); m_proxyId = b2Pair.b2_nullProxy; }; } public function TestPoint(_arg1:b2Vec2):Boolean{ return (false); } public function GetPosition():b2Vec2{ return (m_position); } public static function Destroy(_arg1:b2Shape):void{ if (_arg1.m_proxyId != b2Pair.b2_nullProxy){ _arg1.m_body.m_world.m_broadPhase.DestroyProxy(_arg1.m_proxyId); }; } public static function PolyMass(_arg1:b2MassData, _arg2:Array, _arg3:int, _arg4:Number):void{ var _local11:b2Vec2; var _local12:b2Vec2; var _local13:b2Vec2; var _local14:b2Vec2; var _local15:b2Vec2; var _local16:Number; var _local17:Number; var _local18:b2Vec2; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; var _local5:b2Vec2 = new b2Vec2(); _local5.SetZero(); var _local6:Number = 0; var _local7:Number = 0; var _local8:b2Vec2 = new b2Vec2(0, 0); var _local9:Number = (1 / 3); var _local10:int; while (_local10 < _arg3) { _local11 = _local8; _local12 = _arg2[_local10]; _local13 = (((_local10 + 1) < _arg3)) ? _arg2[(_local10 + 1)] : _arg2[0]; _local14 = b2Math.SubtractVV(_local12, _local11); _local15 = b2Math.SubtractVV(_local13, _local11); _local16 = b2Math.b2CrossVV(_local14, _local15); _local17 = (0.5 * _local16); _local6 = (_local6 + _local17); _local18 = new b2Vec2(); _local18.SetV(_local11); _local18.Add(_local12); _local18.Add(_local13); _local18.Multiply((_local9 * _local17)); _local5.Add(_local18); _local19 = _local11.x; _local20 = _local11.y; _local21 = _local14.x; _local22 = _local14.y; _local23 = _local15.x; _local24 = _local15.y; _local25 = ((_local9 * ((0.25 * (((_local21 * _local21) + (_local23 * _local21)) + (_local23 * _local23))) + ((_local19 * _local21) + (_local19 * _local23)))) + ((0.5 * _local19) * _local19)); _local26 = ((_local9 * ((0.25 * (((_local22 * _local22) + (_local24 * _local22)) + (_local24 * _local24))) + ((_local20 * _local22) + (_local20 * _local24)))) + ((0.5 * _local20) * _local20)); _local7 = (_local7 + (_local16 * (_local25 + _local26))); _local10++; }; _arg1.mass = (_arg4 * _local6); _local5.Multiply((1 / _local6)); _arg1.center = _local5; _local7 = (_arg4 * (_local7 - (_local6 * b2Math.b2Dot(_local5, _local5)))); _arg1.I = _local7; } public static function PolyCentroid(_arg1:Array, _arg2:int, _arg3:b2Vec2):void{ var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local4:Number = 0; var _local5:Number = 0; var _local6:Number = 0; var _local7:Number = 0; var _local8:Number = 0; var _local9:Number = (1 / 3); var _local10:int; while (_local10 < _arg2) { _local11 = _local7; _local12 = _local8; _local13 = _arg1[_local10].x; _local14 = _arg1[_local10].y; _local15 = (((_local10 + 1) < _arg2)) ? _arg1[(_local10 + 1)].x : _arg1[0].x; _local16 = (((_local10 + 1) < _arg2)) ? _arg1[(_local10 + 1)].y : _arg1[0].y; _local17 = (_local13 - _local11); _local18 = (_local14 - _local12); _local19 = (_local15 - _local11); _local20 = (_local16 - _local12); _local21 = ((_local17 * _local20) - (_local18 * _local19)); _local22 = (0.5 * _local21); _local6 = (_local6 + _local22); _local4 = (_local4 + ((_local22 * _local9) * ((_local11 + _local13) + _local15))); _local5 = (_local5 + ((_local22 * _local9) * ((_local12 + _local14) + _local16))); _local10++; }; _local4 = (_local4 * (1 / _local6)); _local5 = (_local5 * (1 / _local6)); _arg3.Set(_local4, _local5); } public static function Create(_arg1:b2ShapeDef, _arg2:b2Body, _arg3:b2Vec2):b2Shape{ switch (_arg1.type){ case e_circleShape: return (new b2CircleShape(_arg1, _arg2, _arg3)); case e_boxShape: case e_polyShape: return (new b2PolyShape(_arg1, _arg2, _arg3)); }; return (null); } } }//package Box2D.Collision.Shapes
Section 9
//b2ShapeDef (Box2D.Collision.Shapes.b2ShapeDef) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2ShapeDef { public var type:int; public var groupIndex:int; public var localPosition:b2Vec2; public var categoryBits:int; public var localRotation:Number; public var density:Number; public var restitution:Number; public var userData;// = null public var maskBits:int; public var friction:Number; public function b2ShapeDef(){ type = b2Shape.e_unknownShape; userData = null; localPosition = new b2Vec2(0, 0); localRotation = 0; friction = 0.2; restitution = 0; density = 0; categoryBits = 1; maskBits = 0xFFFF; groupIndex = 0; } public function ComputeMass(_arg1:b2MassData):void{ var _local2:b2CircleDef; var _local3:b2BoxDef; var _local4:b2PolyDef; _arg1.center = new b2Vec2(0, 0); if (density == 0){ _arg1.mass = 0; _arg1.center.Set(0, 0); _arg1.I = 0; }; switch (type){ case b2Shape.e_circleShape: _local2 = (this as b2CircleDef); _arg1.mass = (((density * b2Settings.b2_pi) * _local2.radius) * _local2.radius); _arg1.center.Set(0, 0); _arg1.I = (((0.5 * _arg1.mass) * _local2.radius) * _local2.radius); break; case b2Shape.e_boxShape: _local3 = (this as b2BoxDef); _arg1.mass = (((4 * density) * _local3.extents.x) * _local3.extents.y); _arg1.center.Set(0, 0); _arg1.I = ((_arg1.mass / 3) * b2Math.b2Dot(_local3.extents, _local3.extents)); break; case b2Shape.e_polyShape: _local4 = (this as b2PolyDef); b2Shape.PolyMass(_arg1, _local4.vertices, _local4.vertexCount, density); break; default: _arg1.mass = 0; _arg1.center.Set(0, 0); _arg1.I = 0; break; }; } } }//package Box2D.Collision.Shapes
Section 10
//b2AABB (Box2D.Collision.b2AABB) package Box2D.Collision { import Box2D.Common.Math.*; public class b2AABB { public var minVertex:b2Vec2; public var maxVertex:b2Vec2; public function b2AABB(){ minVertex = new b2Vec2(); maxVertex = new b2Vec2(); super(); } public function IsValid():Boolean{ var _local1:Number = maxVertex.x; var _local2:Number = maxVertex.y; _local1 = maxVertex.x; _local2 = maxVertex.y; _local1 = (_local1 - minVertex.x); _local2 = (_local2 - minVertex.y); var _local3:Boolean = (((_local1 >= 0)) && ((_local2 >= 0))); _local3 = ((((_local3) && (minVertex.IsValid()))) && (maxVertex.IsValid())); return (_local3); } } }//package Box2D.Collision
Section 11
//b2Bound (Box2D.Collision.b2Bound) package Box2D.Collision { public class b2Bound { public var value:uint; public var proxyId:uint; public var stabbingCount:uint; public function Swap(_arg1:b2Bound):void{ var _local2:uint = value; var _local3:uint = proxyId; var _local4:uint = stabbingCount; value = _arg1.value; proxyId = _arg1.proxyId; stabbingCount = _arg1.stabbingCount; _arg1.value = _local2; _arg1.proxyId = _local3; _arg1.stabbingCount = _local4; } public function IsLower():Boolean{ return (((value & 1) == 0)); } public function IsUpper():Boolean{ return (((value & 1) == 1)); } } }//package Box2D.Collision
Section 12
//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 13
//b2BroadPhase (Box2D.Collision.b2BroadPhase) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2BroadPhase { public var m_bounds:Array; public var m_quantizationFactor:b2Vec2; public var m_worldAABB:b2AABB; public var m_freeProxy:uint; public var m_proxyCount:int; public var m_proxyPool:Array; public var m_queryResultCount:int; public var m_pairManager:b2PairManager; public var m_timeStamp:uint; public var m_queryResults:Array; public static const b2_nullEdge:uint = 0xFFFF; public static const b2_invalid:uint = 0xFFFF; public static var s_validate:Boolean = false; public function b2BroadPhase(_arg1:b2AABB, _arg2:b2PairCallback){ var _local3:int; var _local6:b2Proxy; var _local7:int; m_pairManager = new b2PairManager(); m_proxyPool = new Array(b2Settings.b2_maxPairs); m_bounds = new Array((2 * b2Settings.b2_maxProxies)); m_queryResults = new Array(b2Settings.b2_maxProxies); m_quantizationFactor = new b2Vec2(); super(); m_pairManager.Initialize(this, _arg2); m_worldAABB = _arg1; m_proxyCount = 0; _local3 = 0; while (_local3 < b2Settings.b2_maxProxies) { m_queryResults[_local3] = 0; _local3++; }; m_bounds = new Array(2); _local3 = 0; while (_local3 < 2) { m_bounds[_local3] = new Array((2 * b2Settings.b2_maxProxies)); _local7 = 0; while (_local7 < (2 * b2Settings.b2_maxProxies)) { m_bounds[_local3][_local7] = new b2Bound(); _local7++; }; _local3++; }; var _local4:Number = _arg1.maxVertex.x; var _local5:Number = _arg1.maxVertex.y; _local4 = (_local4 - _arg1.minVertex.x); _local5 = (_local5 - _arg1.minVertex.y); m_quantizationFactor.x = (b2Settings.USHRT_MAX / _local4); m_quantizationFactor.y = (b2Settings.USHRT_MAX / _local5); _local3 = 0; while (_local3 < (b2Settings.b2_maxProxies - 1)) { _local6 = new b2Proxy(); m_proxyPool[_local3] = _local6; _local6.SetNext((_local3 + 1)); _local6.timeStamp = 0; _local6.overlapCount = b2_invalid; _local6.userData = null; _local3++; }; _local6 = new b2Proxy(); m_proxyPool[(b2Settings.b2_maxProxies - 1)] = _local6; _local6.SetNext(b2Pair.b2_nullProxy); _local6.timeStamp = 0; _local6.overlapCount = b2_invalid; _local6.userData = null; m_freeProxy = 0; m_timeStamp = 1; m_queryResultCount = 0; } public function QueryAABB(_arg1:b2AABB, _arg2, _arg3:int):int{ var _local6:uint; var _local7:uint; var _local12:b2Proxy; var _local4:Array = new Array(); var _local5:Array = new Array(); ComputeBounds(_local4, _local5, _arg1); var _local8:Array = [_local6]; var _local9:Array = [_local7]; Query(_local8, _local9, _local4[0], _local5[0], m_bounds[0], (2 * m_proxyCount), 0); Query(_local8, _local9, _local4[1], _local5[1], m_bounds[1], (2 * m_proxyCount), 1); var _local10:int; var _local11:int; while ((((_local11 < m_queryResultCount)) && ((_local10 < _arg3)))) { _local12 = m_proxyPool[m_queryResults[_local11]]; _arg2[_local11] = _local12.userData; _local11++; _local10++; }; m_queryResultCount = 0; IncrementTimeStamp(); return (_local10); } public function Commit():void{ m_pairManager.Commit(); } public function GetProxy(_arg1:int):b2Proxy{ if ((((_arg1 == b2Pair.b2_nullProxy)) || ((m_proxyPool[_arg1].IsValid() == false)))){ return (null); }; return (m_proxyPool[_arg1]); } private function IncrementTimeStamp():void{ var _local1:uint; if (m_timeStamp == b2Settings.USHRT_MAX){ _local1 = 0; while (_local1 < b2Settings.b2_maxProxies) { m_proxyPool[_local1].timeStamp = 0; _local1++; }; m_timeStamp = 1; } else { m_timeStamp++; }; } private function Query(_arg1:Array, _arg2:Array, _arg3:uint, _arg4:uint, _arg5:Array, _arg6:uint, _arg7:int):void{ var _local11:int; var _local12:int; var _local13:b2Proxy; var _local8:uint = BinarySearch(_arg5, _arg6, _arg3); var _local9:uint = BinarySearch(_arg5, _arg6, _arg4); var _local10:uint = _local8; while (_local10 < _local9) { if (_arg5[_local10].IsLower()){ IncrementOverlapCount(_arg5[_local10].proxyId); }; _local10++; }; if (_local8 > 0){ _local11 = (_local8 - 1); _local12 = _arg5[_local11].stabbingCount; while (_local12) { if (_arg5[_local11].IsLower()){ _local13 = m_proxyPool[_arg5[_local11].proxyId]; if (_local8 <= _local13.upperBounds[_arg7]){ IncrementOverlapCount(_arg5[_local11].proxyId); _local12--; }; }; _local11--; }; }; _arg1[0] = _local8; _arg2[0] = _local9; } private function TestOverlapValidate(_arg1:b2Proxy, _arg2:b2Proxy):Boolean{ var _local4:Array; var _local3:int; while (_local3 < 2) { _local4 = m_bounds[_local3]; if (_local4[_arg1.lowerBounds[_local3]].value > _local4[_arg2.upperBounds[_local3]].value){ return (false); }; if (_local4[_arg1.upperBounds[_local3]].value < _local4[_arg2.lowerBounds[_local3]].value){ return (false); }; _local3++; }; return (true); } private function ComputeBounds(_arg1:Array, _arg2:Array, _arg3:b2AABB):void{ var _local4:Number = _arg3.minVertex.x; var _local5:Number = _arg3.minVertex.y; _local4 = b2Math.b2Min(_local4, m_worldAABB.maxVertex.x); _local5 = b2Math.b2Min(_local5, m_worldAABB.maxVertex.y); _local4 = b2Math.b2Max(_local4, m_worldAABB.minVertex.x); _local5 = b2Math.b2Max(_local5, m_worldAABB.minVertex.y); var _local6:Number = _arg3.maxVertex.x; var _local7:Number = _arg3.maxVertex.y; _local6 = b2Math.b2Min(_local6, m_worldAABB.maxVertex.x); _local7 = b2Math.b2Min(_local7, m_worldAABB.maxVertex.y); _local6 = b2Math.b2Max(_local6, m_worldAABB.minVertex.x); _local7 = b2Math.b2Max(_local7, m_worldAABB.minVertex.y); _arg1[0] = (uint((m_quantizationFactor.x * (_local4 - m_worldAABB.minVertex.x))) & (b2Settings.USHRT_MAX - 1)); _arg2[0] = ((uint((m_quantizationFactor.x * (_local6 - m_worldAABB.minVertex.x))) & 0xFFFF) | 1); _arg1[1] = (uint((m_quantizationFactor.y * (_local5 - m_worldAABB.minVertex.y))) & (b2Settings.USHRT_MAX - 1)); _arg2[1] = ((uint((m_quantizationFactor.y * (_local7 - m_worldAABB.minVertex.y))) & 0xFFFF) | 1); } public function CreateProxy(_arg1:b2AABB, _arg2):uint{ var _local3:uint; var _local4:b2Proxy; var _local11:Array; var _local12:uint; var _local13:uint; var _local14:Array; var _local15:Array; var _local16:Array; var _local17:int; var _local18:int; var _local19:b2Bound; var _local20:b2Bound; var _local21:int; var _local22:b2Proxy; var _local5:uint = m_freeProxy; _local4 = m_proxyPool[_local5]; m_freeProxy = _local4.GetNext(); _local4.overlapCount = 0; _local4.userData = _arg2; var _local6:uint = (2 * m_proxyCount); var _local7:Array = new Array(); var _local8:Array = new Array(); ComputeBounds(_local7, _local8, _arg1); var _local9:int; while (_local9 < 2) { _local11 = m_bounds[_local9]; _local14 = [_local12]; _local15 = [_local13]; Query(_local14, _local15, _local7[_local9], _local8[_local9], _local11, _local6, _local9); _local12 = _local14[0]; _local13 = _local15[0]; _local16 = new Array(); _local18 = (_local6 - _local13); _local17 = 0; while (_local17 < _local18) { _local16[_local17] = new b2Bound(); _local19 = _local16[_local17]; _local20 = _local11[(_local13 + _local17)]; _local19.value = _local20.value; _local19.proxyId = _local20.proxyId; _local19.stabbingCount = _local20.stabbingCount; _local17++; }; _local18 = _local16.length; _local21 = (_local13 + 2); _local17 = 0; while (_local17 < _local18) { _local20 = _local16[_local17]; _local19 = _local11[(_local21 + _local17)]; _local19.value = _local20.value; _local19.proxyId = _local20.proxyId; _local19.stabbingCount = _local20.stabbingCount; _local17++; }; _local16 = new Array(); _local18 = (_local13 - _local12); _local17 = 0; while (_local17 < _local18) { _local16[_local17] = new b2Bound(); _local19 = _local16[_local17]; _local20 = _local11[(_local12 + _local17)]; _local19.value = _local20.value; _local19.proxyId = _local20.proxyId; _local19.stabbingCount = _local20.stabbingCount; _local17++; }; _local18 = _local16.length; _local21 = (_local12 + 1); _local17 = 0; while (_local17 < _local18) { _local20 = _local16[_local17]; _local19 = _local11[(_local21 + _local17)]; _local19.value = _local20.value; _local19.proxyId = _local20.proxyId; _local19.stabbingCount = _local20.stabbingCount; _local17++; }; _local13++; _local11[_local12].value = _local7[_local9]; _local11[_local12].proxyId = _local5; _local11[_local13].value = _local8[_local9]; _local11[_local13].proxyId = _local5; _local11[_local12].stabbingCount = ((_local12 == 0)) ? 0 : _local11[(_local12 - 1)].stabbingCount; _local11[_local13].stabbingCount = _local11[(_local13 - 1)].stabbingCount; _local3 = _local12; while (_local3 < _local13) { _local11[_local3].stabbingCount++; _local3++; }; _local3 = _local12; while (_local3 < (_local6 + 2)) { _local22 = m_proxyPool[_local11[_local3].proxyId]; if (_local11[_local3].IsLower()){ _local22.lowerBounds[_local9] = _local3; } else { _local22.upperBounds[_local9] = _local3; }; _local3++; }; _local9++; }; m_proxyCount++; var _local10:int; while (_local10 < m_queryResultCount) { m_pairManager.AddBufferedPair(_local5, m_queryResults[_local10]); _local10++; }; m_pairManager.Commit(); m_queryResultCount = 0; IncrementTimeStamp(); return (_local5); } public function DestroyProxy(_arg1:uint):void{ var _local6:Array; var _local7:uint; var _local8:uint; var _local9:uint; var _local10:uint; var _local11:Array; var _local12:int; var _local13:int; var _local14:b2Bound; var _local15:b2Bound; var _local16:int; var _local17:uint; var _local18:int; var _local19:b2Proxy; var _local2:b2Proxy = m_proxyPool[_arg1]; var _local3:int = (2 * m_proxyCount); var _local4:int; while (_local4 < 2) { _local6 = m_bounds[_local4]; _local7 = _local2.lowerBounds[_local4]; _local8 = _local2.upperBounds[_local4]; _local9 = _local6[_local7].value; _local10 = _local6[_local8].value; _local11 = new Array(); _local13 = ((_local8 - _local7) - 1); _local12 = 0; while (_local12 < _local13) { _local11[_local12] = new b2Bound(); _local14 = _local11[_local12]; _local15 = _local6[((_local7 + 1) + _local12)]; _local14.value = _local15.value; _local14.proxyId = _local15.proxyId; _local14.stabbingCount = _local15.stabbingCount; _local12++; }; _local13 = _local11.length; _local16 = _local7; _local12 = 0; while (_local12 < _local13) { _local15 = _local11[_local12]; _local14 = _local6[(_local16 + _local12)]; _local14.value = _local15.value; _local14.proxyId = _local15.proxyId; _local14.stabbingCount = _local15.stabbingCount; _local12++; }; _local11 = new Array(); _local13 = ((_local3 - _local8) - 1); _local12 = 0; while (_local12 < _local13) { _local11[_local12] = new b2Bound(); _local14 = _local11[_local12]; _local15 = _local6[((_local8 + 1) + _local12)]; _local14.value = _local15.value; _local14.proxyId = _local15.proxyId; _local14.stabbingCount = _local15.stabbingCount; _local12++; }; _local13 = _local11.length; _local16 = (_local8 - 1); _local12 = 0; while (_local12 < _local13) { _local15 = _local11[_local12]; _local14 = _local6[(_local16 + _local12)]; _local14.value = _local15.value; _local14.proxyId = _local15.proxyId; _local14.stabbingCount = _local15.stabbingCount; _local12++; }; _local13 = (_local3 - 2); _local17 = _local7; while (_local17 < _local13) { _local19 = m_proxyPool[_local6[_local17].proxyId]; if (_local6[_local17].IsLower()){ _local19.lowerBounds[_local4] = _local17; } else { _local19.upperBounds[_local4] = _local17; }; _local17++; }; _local13 = (_local8 - 1); _local18 = _local7; while (_local18 < _local13) { _local6[_local18].stabbingCount--; _local18++; }; Query([0], [0], _local9, _local10, _local6, (_local3 - 2), _local4); _local4++; }; var _local5:int; while (_local5 < m_queryResultCount) { m_pairManager.RemoveBufferedPair(_arg1, m_queryResults[_local5]); _local5++; }; m_pairManager.Commit(); m_queryResultCount = 0; IncrementTimeStamp(); _local2.userData = null; _local2.overlapCount = b2_invalid; _local2.lowerBounds[0] = b2_invalid; _local2.lowerBounds[1] = b2_invalid; _local2.upperBounds[0] = b2_invalid; _local2.upperBounds[1] = b2_invalid; _local2.SetNext(m_freeProxy); m_freeProxy = _arg1; m_proxyCount--; } public function TestOverlap(_arg1:b2BoundValues, _arg2:b2Proxy):Boolean{ var _local4:Array; var _local3:int; while (_local3 < 2) { _local4 = m_bounds[_local3]; if (_arg1.lowerValues[_local3] > _local4[_arg2.upperBounds[_local3]].value){ return (false); }; if (_arg1.upperValues[_local3] < _local4[_arg2.lowerBounds[_local3]].value){ return (false); }; _local3++; }; return (true); } public function Validate():void{ var _local1:b2Pair; var _local2:b2Proxy; var _local3:b2Proxy; var _local4:Boolean; var _local6:b2Bound; var _local7:uint; var _local8:uint; var _local9:uint; var _local10:b2Bound; var _local5:int; while (_local5 < 2) { _local6 = m_bounds[_local5]; _local7 = (2 * m_proxyCount); _local8 = 0; _local9 = 0; while (_local9 < _local7) { _local10 = _local6[_local9]; if (_local10.IsLower() == true){ _local8++; } else { _local8--; }; _local9++; }; _local5++; }; } private function IncrementOverlapCount(_arg1:uint):void{ var _local2:b2Proxy = m_proxyPool[_arg1]; if (_local2.timeStamp < m_timeStamp){ _local2.timeStamp = m_timeStamp; _local2.overlapCount = 1; } else { _local2.overlapCount = 2; m_queryResults[m_queryResultCount] = _arg1; m_queryResultCount++; }; } public function InRange(_arg1:b2AABB):Boolean{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; _local2 = _arg1.minVertex.x; _local3 = _arg1.minVertex.y; _local2 = (_local2 - m_worldAABB.maxVertex.x); _local3 = (_local3 - m_worldAABB.maxVertex.y); _local4 = m_worldAABB.minVertex.x; _local5 = m_worldAABB.minVertex.y; _local4 = (_local4 - _arg1.maxVertex.x); _local5 = (_local5 - _arg1.maxVertex.y); _local2 = b2Math.b2Max(_local2, _local4); _local3 = b2Math.b2Max(_local3, _local5); return ((b2Math.b2Max(_local2, _local3) < 0)); } public function MoveProxy(_arg1:uint, _arg2:b2AABB):void{ var _local3:uint; var _local4:uint; var _local5:b2Bound; var _local6:b2Bound; var _local7:b2Bound; var _local8:uint; var _local9:b2Proxy; var _local14:Array; var _local15:uint; var _local16:uint; var _local17:uint; var _local18:uint; var _local19:int; var _local20:int; var _local21:uint; var _local22:b2Proxy; if ((((_arg1 == b2Pair.b2_nullProxy)) || ((b2Settings.b2_maxProxies <= _arg1)))){ return; }; if (_arg2.IsValid() == false){ return; }; var _local10:uint = (2 * m_proxyCount); var _local11:b2Proxy = m_proxyPool[_arg1]; var _local12:b2BoundValues = new b2BoundValues(); ComputeBounds(_local12.lowerValues, _local12.upperValues, _arg2); var _local13:b2BoundValues = new b2BoundValues(); _local3 = 0; while (_local3 < 2) { _local13.lowerValues[_local3] = m_bounds[_local3][_local11.lowerBounds[_local3]].value; _local13.upperValues[_local3] = m_bounds[_local3][_local11.upperBounds[_local3]].value; _local3++; }; _local3 = 0; while (_local3 < 2) { _local14 = m_bounds[_local3]; _local15 = _local11.lowerBounds[_local3]; _local16 = _local11.upperBounds[_local3]; _local17 = _local12.lowerValues[_local3]; _local18 = _local12.upperValues[_local3]; _local19 = (_local17 - _local14[_local15].value); _local20 = (_local18 - _local14[_local16].value); _local14[_local15].value = _local17; _local14[_local16].value = _local18; if (_local19 < 0){ _local4 = _local15; while ((((_local4 > 0)) && ((_local17 < _local14[(_local4 - 1)].value)))) { _local5 = _local14[_local4]; _local6 = _local14[(_local4 - 1)]; _local21 = _local6.proxyId; _local22 = m_proxyPool[_local6.proxyId]; _local6.stabbingCount++; if (_local6.IsUpper() == true){ if (TestOverlap(_local12, _local22)){ m_pairManager.AddBufferedPair(_arg1, _local21); }; var _local23 = _local22.upperBounds; var _local24 = _local3; var _local25 = (_local23[_local24] + 1); _local23[_local24] = _local25; _local5.stabbingCount++; } else { _local23 = _local22.lowerBounds; _local24 = _local3; _local25 = (_local23[_local24] + 1); _local23[_local24] = _local25; _local5.stabbingCount--; }; _local23 = _local11.lowerBounds; _local24 = _local3; _local25 = (_local23[_local24] - 1); _local23[_local24] = _local25; _local5.Swap(_local6); _local4--; }; }; if (_local20 > 0){ _local4 = _local16; while ((((_local4 < (_local10 - 1))) && ((_local14[(_local4 + 1)].value <= _local18)))) { _local5 = _local14[_local4]; _local7 = _local14[(_local4 + 1)]; _local8 = _local7.proxyId; _local9 = m_proxyPool[_local8]; _local7.stabbingCount++; if (_local7.IsLower() == true){ if (TestOverlap(_local12, _local9)){ m_pairManager.AddBufferedPair(_arg1, _local8); }; _local23 = _local9.lowerBounds; _local24 = _local3; _local25 = (_local23[_local24] - 1); _local23[_local24] = _local25; _local5.stabbingCount++; } else { _local23 = _local9.upperBounds; _local24 = _local3; _local25 = (_local23[_local24] - 1); _local23[_local24] = _local25; _local5.stabbingCount--; }; _local23 = _local11.upperBounds; _local24 = _local3; _local25 = (_local23[_local24] + 1); _local23[_local24] = _local25; _local5.Swap(_local7); _local4++; }; }; if (_local19 > 0){ _local4 = _local15; while ((((_local4 < (_local10 - 1))) && ((_local14[(_local4 + 1)].value <= _local17)))) { _local5 = _local14[_local4]; _local7 = _local14[(_local4 + 1)]; _local8 = _local7.proxyId; _local9 = m_proxyPool[_local8]; _local7.stabbingCount--; if (_local7.IsUpper()){ if (TestOverlap(_local13, _local9)){ m_pairManager.RemoveBufferedPair(_arg1, _local8); }; _local23 = _local9.upperBounds; _local24 = _local3; _local25 = (_local23[_local24] - 1); _local23[_local24] = _local25; _local5.stabbingCount--; } else { _local23 = _local9.lowerBounds; _local24 = _local3; _local25 = (_local23[_local24] - 1); _local23[_local24] = _local25; _local5.stabbingCount++; }; _local23 = _local11.lowerBounds; _local24 = _local3; _local25 = (_local23[_local24] + 1); _local23[_local24] = _local25; _local5.Swap(_local7); _local4++; }; }; if (_local20 < 0){ _local4 = _local16; while ((((_local4 > 0)) && ((_local18 < _local14[(_local4 - 1)].value)))) { _local5 = _local14[_local4]; _local6 = _local14[(_local4 - 1)]; _local21 = _local6.proxyId; _local22 = m_proxyPool[_local21]; _local6.stabbingCount--; if (_local6.IsLower() == true){ if (TestOverlap(_local13, _local22)){ m_pairManager.RemoveBufferedPair(_arg1, _local21); }; _local23 = _local22.lowerBounds; _local24 = _local3; _local25 = (_local23[_local24] + 1); _local23[_local24] = _local25; _local5.stabbingCount--; } else { _local23 = _local22.upperBounds; _local24 = _local3; _local25 = (_local23[_local24] + 1); _local23[_local24] = _local25; _local5.stabbingCount++; }; _local23 = _local11.upperBounds; _local24 = _local3; _local25 = (_local23[_local24] - 1); _local23[_local24] = _local25; _local5.Swap(_local6); _local4--; }; }; _local3++; }; } public static function BinarySearch(_arg1:Array, _arg2:int, _arg3:uint):uint{ var _local6:int; var _local4:int; var _local5:int = (_arg2 - 1); while (_local4 <= _local5) { _local6 = ((_local4 + _local5) / 2); if (_arg1[_local6].value > _arg3){ _local5 = (_local6 - 1); } else { if (_arg1[_local6].value < _arg3){ _local4 = (_local6 + 1); } else { return (uint(_local6)); }; }; }; return (uint(_local4)); } } }//package Box2D.Collision
Section 14
//b2BufferedPair (Box2D.Collision.b2BufferedPair) package Box2D.Collision { public class b2BufferedPair { public var proxyId1:uint; public var proxyId2:uint; } }//package Box2D.Collision
Section 15
//b2Collision (Box2D.Collision.b2Collision) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2Collision { public static const b2_nullFeature:uint = 0xFF; private static var b2CollidePolyTempVec:b2Vec2 = new b2Vec2(); public static function EdgeSeparation(_arg1:b2PolyShape, _arg2:int, _arg3:b2PolyShape):Number{ var _local21:b2Vec2; var _local22:Number; var _local4:Array = _arg1.m_vertices; var _local5:int = _arg3.m_vertexCount; var _local6:Array = _arg3.m_vertices; var _local7:Number = _arg1.m_normals[_arg2].x; var _local8:Number = _arg1.m_normals[_arg2].y; var _local9:Number = _local7; var _local10:b2Mat22 = _arg1.m_R; _local7 = ((_local10.col1.x * _local9) + (_local10.col2.x * _local8)); _local8 = ((_local10.col1.y * _local9) + (_local10.col2.y * _local8)); var _local11:Number = _local7; var _local12:Number = _local8; _local10 = _arg3.m_R; _local9 = ((_local11 * _local10.col1.x) + (_local12 * _local10.col1.y)); _local12 = ((_local11 * _local10.col2.x) + (_local12 * _local10.col2.y)); _local11 = _local9; var _local13:int; var _local14:Number = Number.MAX_VALUE; var _local15:int; while (_local15 < _local5) { _local21 = _local6[_local15]; _local22 = ((_local21.x * _local11) + (_local21.y * _local12)); if (_local22 < _local14){ _local14 = _local22; _local13 = _local15; }; _local15++; }; _local10 = _arg1.m_R; var _local16:Number = (_arg1.m_position.x + ((_local10.col1.x * _local4[_arg2].x) + (_local10.col2.x * _local4[_arg2].y))); var _local17:Number = (_arg1.m_position.y + ((_local10.col1.y * _local4[_arg2].x) + (_local10.col2.y * _local4[_arg2].y))); _local10 = _arg3.m_R; var _local18:Number = (_arg3.m_position.x + ((_local10.col1.x * _local6[_local13].x) + (_local10.col2.x * _local6[_local13].y))); var _local19:Number = (_arg3.m_position.y + ((_local10.col1.y * _local6[_local13].x) + (_local10.col2.y * _local6[_local13].y))); _local18 = (_local18 - _local16); _local19 = (_local19 - _local17); var _local20:Number = ((_local18 * _local7) + (_local19 * _local8)); return (_local20); } public static function b2TestOverlap(_arg1:b2AABB, _arg2:b2AABB):Boolean{ var _local3:b2Vec2 = _arg2.minVertex; var _local4:b2Vec2 = _arg1.maxVertex; var _local5:Number = (_local3.x - _local4.x); var _local6:Number = (_local3.y - _local4.y); _local3 = _arg1.minVertex; _local4 = _arg2.maxVertex; var _local7:Number = (_local3.x - _local4.x); var _local8:Number = (_local3.y - _local4.y); if ((((_local5 > 0)) || ((_local6 > 0)))){ return (false); }; if ((((_local7 > 0)) || ((_local8 > 0)))){ return (false); }; return (true); } public static function FindIncidentEdge(_arg1:Array, _arg2:b2PolyShape, _arg3:int, _arg4:b2PolyShape):void{ var _local21:int; var _local22:int; var _local25:ClipVertex; var _local26:int; var _local27:int; var _local28:Number; var _local29:Number; var _local30:Number; var _local5:int = _arg2.m_vertexCount; var _local6:Array = _arg2.m_vertices; var _local7:int = _arg4.m_vertexCount; var _local8:Array = _arg4.m_vertices; var _local9:int = _arg3; var _local10:int = (((_arg3 + 1) == _local5)) ? 0 : (_arg3 + 1); var _local11:b2Vec2 = _local6[_local10]; var _local12:Number = _local11.x; var _local13:Number = _local11.y; _local11 = _local6[_local9]; _local12 = (_local12 - _local11.x); _local13 = (_local13 - _local11.y); var _local14:Number = _local12; _local12 = _local13; _local13 = -(_local14); var _local15:Number = (1 / Math.sqrt(((_local12 * _local12) + (_local13 * _local13)))); _local12 = (_local12 * _local15); _local13 = (_local13 * _local15); var _local16:Number = _local12; var _local17:Number = _local13; _local14 = _local16; var _local18:b2Mat22 = _arg2.m_R; _local16 = ((_local18.col1.x * _local14) + (_local18.col2.x * _local17)); _local17 = ((_local18.col1.y * _local14) + (_local18.col2.y * _local17)); var _local19:Number = _local16; var _local20:Number = _local17; _local18 = _arg4.m_R; _local14 = ((_local19 * _local18.col1.x) + (_local20 * _local18.col1.y)); _local20 = ((_local19 * _local18.col2.x) + (_local20 * _local18.col2.y)); _local19 = _local14; var _local23:Number = Number.MAX_VALUE; var _local24:int; while (_local24 < _local7) { _local26 = _local24; _local27 = (((_local24 + 1) < _local7)) ? (_local24 + 1) : 0; _local11 = _local8[_local27]; _local28 = _local11.x; _local29 = _local11.y; _local11 = _local8[_local26]; _local28 = (_local28 - _local11.x); _local29 = (_local29 - _local11.y); _local14 = _local28; _local28 = _local29; _local29 = -(_local14); _local15 = (1 / Math.sqrt(((_local28 * _local28) + (_local29 * _local29)))); _local28 = (_local28 * _local15); _local29 = (_local29 * _local15); _local30 = ((_local28 * _local19) + (_local29 * _local20)); if (_local30 < _local23){ _local23 = _local30; _local21 = _local26; _local22 = _local27; }; _local24++; }; _local25 = _arg1[0]; _local11 = _local25.v; _local11.SetV(_local8[_local21]); _local11.MulM(_arg4.m_R); _local11.Add(_arg4.m_position); _local25.id.features.referenceFace = _arg3; _local25.id.features.incidentEdge = _local21; _local25.id.features.incidentVertex = _local21; _local25 = _arg1[1]; _local11 = _local25.v; _local11.SetV(_local8[_local22]); _local11.MulM(_arg4.m_R); _local11.Add(_arg4.m_position); _local25.id.features.referenceFace = _arg3; _local25.id.features.incidentEdge = _local21; _local25.id.features.incidentVertex = _local22; } public static function b2CollidePolyAndCircle(_arg1:b2Manifold, _arg2:b2PolyShape, _arg3:b2CircleShape, _arg4:Boolean):void{ var _local5:b2ContactPoint; var _local6:Number; var _local7:Number; var _local12:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:b2Vec2; _arg1.pointCount = 0; var _local8:Number = (_arg3.m_position.x - _arg2.m_position.x); var _local9:Number = (_arg3.m_position.y - _arg2.m_position.y); var _local10:b2Mat22 = _arg2.m_R; var _local11:Number = ((_local8 * _local10.col1.x) + (_local9 * _local10.col1.y)); _local9 = ((_local8 * _local10.col2.x) + (_local9 * _local10.col2.y)); _local8 = _local11; var _local13:int; var _local14:Number = -(Number.MAX_VALUE); var _local15:Number = _arg3.m_radius; var _local16:int; while (_local16 < _arg2.m_vertexCount) { _local25 = ((_arg2.m_normals[_local16].x * (_local8 - _arg2.m_vertices[_local16].x)) + (_arg2.m_normals[_local16].y * (_local9 - _arg2.m_vertices[_local16].y))); if (_local25 > _local15){ return; }; if (_local25 > _local14){ _local14 = _local25; _local13 = _local16; }; _local16++; }; if (_local14 < Number.MIN_VALUE){ _arg1.pointCount = 1; _local26 = _arg2.m_normals[_local13]; _arg1.normal.x = ((_local10.col1.x * _local26.x) + (_local10.col2.x * _local26.y)); _arg1.normal.y = ((_local10.col1.y * _local26.x) + (_local10.col2.y * _local26.y)); _local5 = _arg1.points[0]; _local5.id.features.incidentEdge = _local13; _local5.id.features.incidentVertex = b2_nullFeature; _local5.id.features.referenceFace = b2_nullFeature; _local5.id.features.flip = 0; _local5.position.x = (_arg3.m_position.x - (_local15 * _arg1.normal.x)); _local5.position.y = (_arg3.m_position.y - (_local15 * _arg1.normal.y)); _local5.separation = (_local14 - _local15); return; }; var _local17:int = _local13; var _local18:int = (((_local17 + 1) < _arg2.m_vertexCount)) ? (_local17 + 1) : 0; var _local19:Number = (_arg2.m_vertices[_local18].x - _arg2.m_vertices[_local17].x); var _local20:Number = (_arg2.m_vertices[_local18].y - _arg2.m_vertices[_local17].y); var _local21:Number = Math.sqrt(((_local19 * _local19) + (_local20 * _local20))); _local19 = (_local19 / _local21); _local20 = (_local20 / _local21); if (_local21 < Number.MIN_VALUE){ _local6 = (_local8 - _arg2.m_vertices[_local17].x); _local7 = (_local9 - _arg2.m_vertices[_local17].y); _local12 = Math.sqrt(((_local6 * _local6) + (_local7 * _local7))); _local6 = (_local6 / _local12); _local7 = (_local7 / _local12); if (_local12 > _local15){ return; }; _arg1.pointCount = 1; _arg1.normal.Set(((_local10.col1.x * _local6) + (_local10.col2.x * _local7)), ((_local10.col1.y * _local6) + (_local10.col2.y * _local7))); _local5 = _arg1.points[0]; _local5.id.features.incidentEdge = b2_nullFeature; _local5.id.features.incidentVertex = _local17; _local5.id.features.referenceFace = b2_nullFeature; _local5.id.features.flip = 0; _local5.position.x = (_arg3.m_position.x - (_local15 * _arg1.normal.x)); _local5.position.y = (_arg3.m_position.y - (_local15 * _arg1.normal.y)); _local5.separation = (_local12 - _local15); return; }; var _local22:Number = (((_local8 - _arg2.m_vertices[_local17].x) * _local19) + ((_local9 - _arg2.m_vertices[_local17].y) * _local20)); _local5 = _arg1.points[0]; _local5.id.features.incidentEdge = b2_nullFeature; _local5.id.features.incidentVertex = b2_nullFeature; _local5.id.features.referenceFace = b2_nullFeature; _local5.id.features.flip = 0; if (_local22 <= 0){ _local23 = _arg2.m_vertices[_local17].x; _local24 = _arg2.m_vertices[_local17].y; _local5.id.features.incidentVertex = _local17; } else { if (_local22 >= _local21){ _local23 = _arg2.m_vertices[_local18].x; _local24 = _arg2.m_vertices[_local18].y; _local5.id.features.incidentVertex = _local18; } else { _local23 = ((_local19 * _local22) + _arg2.m_vertices[_local17].x); _local24 = ((_local20 * _local22) + _arg2.m_vertices[_local17].y); _local5.id.features.incidentEdge = _local17; }; }; _local6 = (_local8 - _local23); _local7 = (_local9 - _local24); _local12 = Math.sqrt(((_local6 * _local6) + (_local7 * _local7))); _local6 = (_local6 / _local12); _local7 = (_local7 / _local12); if (_local12 > _local15){ return; }; _arg1.pointCount = 1; _arg1.normal.Set(((_local10.col1.x * _local6) + (_local10.col2.x * _local7)), ((_local10.col1.y * _local6) + (_local10.col2.y * _local7))); _local5.position.x = (_arg3.m_position.x - (_local15 * _arg1.normal.x)); _local5.position.y = (_arg3.m_position.y - (_local15 * _arg1.normal.y)); _local5.separation = (_local12 - _local15); } public static function FindMaxSeparation(_arg1:Array, _arg2:b2PolyShape, _arg3:b2PolyShape, _arg4:Boolean):Number{ var _local18:int; var _local19:Number; var _local20:int; var _local21:Number; var _local5:int = _arg2.m_vertexCount; var _local6:Number = (_arg3.m_position.x - _arg2.m_position.x); var _local7:Number = (_arg3.m_position.y - _arg2.m_position.y); var _local8:Number = ((_local6 * _arg2.m_R.col1.x) + (_local7 * _arg2.m_R.col1.y)); var _local9:Number = ((_local6 * _arg2.m_R.col2.x) + (_local7 * _arg2.m_R.col2.y)); var _local10:int; var _local11:Number = -(Number.MAX_VALUE); var _local12:int; while (_local12 < _local5) { _local21 = ((_arg2.m_normals[_local12].x * _local8) + (_arg2.m_normals[_local12].y * _local9)); if (_local21 > _local11){ _local11 = _local21; _local10 = _local12; }; _local12++; }; var _local13:Number = EdgeSeparation(_arg2, _local10, _arg3); if ((((_local13 > 0)) && ((_arg4 == false)))){ return (_local13); }; var _local14:int = (((_local10 - 1) >= 0)) ? (_local10 - 1) : (_local5 - 1); var _local15:Number = EdgeSeparation(_arg2, _local14, _arg3); if ((((_local15 > 0)) && ((_arg4 == false)))){ return (_local15); }; var _local16:int = (((_local10 + 1) < _local5)) ? (_local10 + 1) : 0; var _local17:Number = EdgeSeparation(_arg2, _local16, _arg3); if ((((_local17 > 0)) && ((_arg4 == false)))){ return (_local17); }; if ((((_local15 > _local13)) && ((_local15 > _local17)))){ _local20 = -1; _local18 = _local14; _local19 = _local15; } else { if (_local17 > _local13){ _local20 = 1; _local18 = _local16; _local19 = _local17; } else { _arg1[0] = _local10; return (_local13); }; }; while (true) { if (_local20 == -1){ _local10 = (((_local18 - 1) >= 0)) ? (_local18 - 1) : (_local5 - 1); } else { _local10 = (((_local18 + 1) < _local5)) ? (_local18 + 1) : 0; }; _local13 = EdgeSeparation(_arg2, _local10, _arg3); if ((((_local13 > 0)) && ((_arg4 == false)))){ return (_local13); }; if (_local13 > _local19){ _local18 = _local10; _local19 = _local13; } else { break; }; }; _arg1[0] = _local18; return (_local19); } public static function ClipSegmentToLine(_arg1:Array, _arg2:Array, _arg3:b2Vec2, _arg4:Number):int{ var _local7:b2Vec2; var _local8:Number; var _local10:Number; var _local11:b2Vec2; var _local5:int; var _local6:b2Vec2 = _arg2[0].v; _local7 = _arg2[1].v; _local8 = (b2Math.b2Dot(_arg3, _arg2[0].v) - _arg4); var _local9:Number = (b2Math.b2Dot(_arg3, _arg2[1].v) - _arg4); if (_local8 <= 0){ var _temp1 = _local5; _local5 = (_local5 + 1); var _local12 = _temp1; _arg1[_local12] = _arg2[0]; }; if (_local9 <= 0){ var _temp2 = _local5; _local5 = (_local5 + 1); _local12 = _temp2; _arg1[_local12] = _arg2[1]; }; if ((_local8 * _local9) < 0){ _local10 = (_local8 / (_local8 - _local9)); _local11 = _arg1[_local5].v; _local11.x = (_local6.x + (_local10 * (_local7.x - _local6.x))); _local11.y = (_local6.y + (_local10 * (_local7.y - _local6.y))); if (_local8 > 0){ _arg1[_local5].id = _arg2[0].id; } else { _arg1[_local5].id = _arg2[1].id; }; _local5++; }; return (_local5); } public static function b2CollidePoly(_arg1:b2Manifold, _arg2:b2PolyShape, _arg3:b2PolyShape, _arg4:Boolean):void{ var _local11:b2PolyShape; var _local12:b2PolyShape; var _local13:int; var _local14:int; var _local40:int; var _local43:b2Vec2; var _local44:Number; var _local45:b2ContactPoint; _arg1.pointCount = 0; var _local5:int; var _local6:Array = [_local5]; var _local7:Number = FindMaxSeparation(_local6, _arg2, _arg3, _arg4); _local5 = _local6[0]; if ((((_local7 > 0)) && ((_arg4 == false)))){ return; }; var _local8:int; var _local9:Array = [_local8]; var _local10:Number = FindMaxSeparation(_local9, _arg3, _arg2, _arg4); _local8 = _local9[0]; if ((((_local10 > 0)) && ((_arg4 == false)))){ return; }; var _local15:Number = 0.98; var _local16:Number = 0.001; if (_local10 > ((_local15 * _local7) + _local16)){ _local11 = _arg3; _local12 = _arg2; _local13 = _local8; _local14 = 1; } else { _local11 = _arg2; _local12 = _arg3; _local13 = _local5; _local14 = 0; }; var _local17:Array = [new ClipVertex(), new ClipVertex()]; FindIncidentEdge(_local17, _local11, _local13, _local12); var _local18:int = _local11.m_vertexCount; var _local19:Array = _local11.m_vertices; var _local20:b2Vec2 = _local19[_local13]; var _local21:b2Vec2 = (((_local13 + 1) < _local18)) ? _local19[(_local13 + 1)] : _local19[0]; var _local22:Number = (_local21.x - _local20.x); var _local23:Number = (_local21.y - _local20.y); var _local24:Number = (_local21.x - _local20.x); var _local25:Number = (_local21.y - _local20.y); var _local26:Number = _local24; var _local27:b2Mat22 = _local11.m_R; _local24 = ((_local27.col1.x * _local26) + (_local27.col2.x * _local25)); _local25 = ((_local27.col1.y * _local26) + (_local27.col2.y * _local25)); var _local28:Number = (1 / Math.sqrt(((_local24 * _local24) + (_local25 * _local25)))); _local24 = (_local24 * _local28); _local25 = (_local25 * _local28); var _local29:Number = _local24; var _local30:Number = _local25; _local26 = _local29; _local29 = _local30; _local30 = -(_local26); var _local31:Number = _local20.x; var _local32:Number = _local20.y; _local26 = _local31; _local27 = _local11.m_R; _local31 = ((_local27.col1.x * _local26) + (_local27.col2.x * _local32)); _local32 = ((_local27.col1.y * _local26) + (_local27.col2.y * _local32)); _local31 = (_local31 + _local11.m_position.x); _local32 = (_local32 + _local11.m_position.y); var _local33:Number = _local21.x; var _local34:Number = _local21.y; _local26 = _local33; _local27 = _local11.m_R; _local33 = ((_local27.col1.x * _local26) + (_local27.col2.x * _local34)); _local34 = ((_local27.col1.y * _local26) + (_local27.col2.y * _local34)); _local33 = (_local33 + _local11.m_position.x); _local34 = (_local34 + _local11.m_position.y); var _local35:Number = ((_local29 * _local31) + (_local30 * _local32)); var _local36:Number = -(((_local24 * _local31) + (_local25 * _local32))); var _local37:Number = ((_local24 * _local33) + (_local25 * _local34)); var _local38:Array = [new ClipVertex(), new ClipVertex()]; var _local39:Array = [new ClipVertex(), new ClipVertex()]; b2CollidePolyTempVec.Set(-(_local24), -(_local25)); _local40 = ClipSegmentToLine(_local38, _local17, b2CollidePolyTempVec, _local36); if (_local40 < 2){ return; }; b2CollidePolyTempVec.Set(_local24, _local25); _local40 = ClipSegmentToLine(_local39, _local38, b2CollidePolyTempVec, _local37); if (_local40 < 2){ return; }; if (_local14){ _arg1.normal.Set(-(_local29), -(_local30)); } else { _arg1.normal.Set(_local29, _local30); }; var _local41:int; var _local42:int; while (_local42 < b2Settings.b2_maxManifoldPoints) { _local43 = _local39[_local42].v; _local44 = (((_local29 * _local43.x) + (_local30 * _local43.y)) - _local35); if ((((_local44 <= 0)) || ((_arg4 == true)))){ _local45 = _arg1.points[_local41]; _local45.separation = _local44; _local45.position.SetV(_local39[_local42].v); _local45.id.Set(_local39[_local42].id); _local45.id.features.flip = _local14; _local41++; }; _local42++; }; _arg1.pointCount = _local41; } public static function b2CollideCircle(_arg1:b2Manifold, _arg2:b2CircleShape, _arg3:b2CircleShape, _arg4:Boolean):void{ var _local9:Number; var _local11:Number; var _local12:Number; _arg1.pointCount = 0; var _local5:Number = (_arg3.m_position.x - _arg2.m_position.x); var _local6:Number = (_arg3.m_position.y - _arg2.m_position.y); var _local7:Number = ((_local5 * _local5) + (_local6 * _local6)); var _local8:Number = (_arg2.m_radius + _arg3.m_radius); if ((((_local7 > (_local8 * _local8))) && ((_arg4 == false)))){ return; }; if (_local7 < Number.MIN_VALUE){ _local9 = -(_local8); _arg1.normal.Set(0, 1); } else { _local11 = Math.sqrt(_local7); _local9 = (_local11 - _local8); _local12 = (1 / _local11); _arg1.normal.x = (_local12 * _local5); _arg1.normal.y = (_local12 * _local6); }; _arg1.pointCount = 1; var _local10:b2ContactPoint = _arg1.points[0]; _local10.id.key = 0; _local10.separation = _local9; _local10.position.x = (_arg3.m_position.x - (_arg3.m_radius * _arg1.normal.x)); _local10.position.y = (_arg3.m_position.y - (_arg3.m_radius * _arg1.normal.y)); } } }//package Box2D.Collision
Section 16
//b2ContactID (Box2D.Collision.b2ContactID) package Box2D.Collision { public class b2ContactID { public var _key:uint; public var features:Features; public function b2ContactID(){ features = new Features(); super(); features._m_id = this; } public function Set(_arg1:b2ContactID):void{ key = _arg1._key; } public function Copy():b2ContactID{ var _local1:b2ContactID = new b2ContactID(); _local1.key = key; return (_local1); } public function set key(_arg1:uint):void{ _key = _arg1; features._referenceFace = (_key & 0xFF); features._incidentEdge = (((_key & 0xFF00) >> 8) & 0xFF); features._incidentVertex = (((_key & 0xFF0000) >> 16) & 0xFF); features._flip = (((_key & 4278190080) >> 24) & 0xFF); } public function get key():uint{ return (_key); } } }//package Box2D.Collision
Section 17
//b2ContactPoint (Box2D.Collision.b2ContactPoint) package Box2D.Collision { import Box2D.Common.Math.*; public class b2ContactPoint { public var tangentImpulse:Number; public var separation:Number; public var position:b2Vec2; public var id:b2ContactID; public var normalImpulse:Number; public function b2ContactPoint(){ position = new b2Vec2(); id = new b2ContactID(); super(); } } }//package Box2D.Collision
Section 18
//b2Manifold (Box2D.Collision.b2Manifold) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2Manifold { public var points:Array; public var normal:b2Vec2; public var pointCount:int; public function b2Manifold(){ points = new Array(b2Settings.b2_maxManifoldPoints); var _local1:int; while (_local1 < b2Settings.b2_maxManifoldPoints) { points[_local1] = new b2ContactPoint(); _local1++; }; normal = new b2Vec2(); } } }//package Box2D.Collision
Section 19
//b2OBB (Box2D.Collision.b2OBB) package Box2D.Collision { import Box2D.Common.Math.*; public class b2OBB { public var R:b2Mat22; public var center:b2Vec2; public var extents:b2Vec2; public function b2OBB(){ R = new b2Mat22(); center = new b2Vec2(); extents = new b2Vec2(); super(); } } }//package Box2D.Collision
Section 20
//b2Pair (Box2D.Collision.b2Pair) package Box2D.Collision { public class b2Pair { public var proxyId1:uint; public var userData;// = null public var proxyId2:uint; public var status:uint; public var next:uint; public static var e_pairFinal:uint = 4; public static var b2_tableMask:int = (b2_tableCapacity - 1); public static var e_pairRemoved:uint = 2; public static var b2_nullPair:uint = 0xFFFF; public static var e_pairBuffered:uint = 1; public static var b2_nullProxy:uint = 0xFFFF; public static var b2_tableCapacity:int = 8192; public function SetBuffered():void{ status = (status | e_pairBuffered); } public function IsBuffered():Boolean{ return (((status & e_pairBuffered) == e_pairBuffered)); } public function IsFinal():Boolean{ return (((status & e_pairFinal) == e_pairFinal)); } public function ClearRemoved():void{ status = (status & ~(e_pairRemoved)); } public function SetFinal():void{ status = (status | e_pairFinal); } public function IsRemoved():Boolean{ return (((status & e_pairRemoved) == e_pairRemoved)); } public function ClearBuffered():void{ status = (status & ~(e_pairBuffered)); } public function SetRemoved():void{ status = (status | e_pairRemoved); } } }//package Box2D.Collision
Section 21
//b2PairCallback (Box2D.Collision.b2PairCallback) package Box2D.Collision { public class b2PairCallback { public function PairRemoved(_arg1, _arg2, _arg3):void{ } public function PairAdded(_arg1, _arg2){ return (null); } } }//package Box2D.Collision
Section 22
//b2PairManager (Box2D.Collision.b2PairManager) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2PairManager { public var m_pairCount:int; public var m_pairBuffer:Array; public var m_hashTable:Array; public var m_callback:b2PairCallback; public var m_pairs:Array; public var m_pairBufferCount:int; public var m_broadPhase:b2BroadPhase; public var m_freePair:uint; public function b2PairManager(){ var _local1:uint; super(); m_hashTable = new Array(b2Pair.b2_tableCapacity); _local1 = 0; while (_local1 < b2Pair.b2_tableCapacity) { m_hashTable[_local1] = b2Pair.b2_nullPair; _local1++; }; m_pairs = new Array(b2Settings.b2_maxPairs); _local1 = 0; while (_local1 < b2Settings.b2_maxPairs) { m_pairs[_local1] = new b2Pair(); _local1++; }; m_pairBuffer = new Array(b2Settings.b2_maxPairs); _local1 = 0; while (_local1 < b2Settings.b2_maxPairs) { m_pairBuffer[_local1] = new b2BufferedPair(); _local1++; }; _local1 = 0; while (_local1 < b2Settings.b2_maxPairs) { m_pairs[_local1].proxyId1 = b2Pair.b2_nullProxy; m_pairs[_local1].proxyId2 = b2Pair.b2_nullProxy; m_pairs[_local1].userData = null; m_pairs[_local1].status = 0; m_pairs[_local1].next = (_local1 + 1); _local1++; }; m_pairs[(b2Settings.b2_maxPairs - 1)].next = b2Pair.b2_nullPair; m_pairCount = 0; } private function FindHash(_arg1:uint, _arg2:uint, _arg3:uint):b2Pair{ var _local4:uint = m_hashTable[_arg3]; while (((!((_local4 == b2Pair.b2_nullPair))) && ((Equals(m_pairs[_local4], _arg1, _arg2) == false)))) { _local4 = m_pairs[_local4].next; }; if (_local4 == b2Pair.b2_nullPair){ return (null); }; return (m_pairs[_local4]); } private function Find(_arg1:uint, _arg2:uint):b2Pair{ var _local4:uint; if (_arg1 > _arg2){ _local4 = _arg1; _arg1 = _arg2; _arg2 = _local4; }; var _local3:uint = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask); return (FindHash(_arg1, _arg2, _local3)); } private function ValidateBuffer():void{ } public function Commit():void{ var _local1:int; var _local4:b2Pair; var _local5:b2Proxy; var _local6:b2Proxy; var _local2:int; var _local3:Array = m_broadPhase.m_proxyPool; _local1 = 0; while (_local1 < m_pairBufferCount) { _local4 = Find(m_pairBuffer[_local1].proxyId1, m_pairBuffer[_local1].proxyId2); _local4.ClearBuffered(); _local5 = _local3[_local4.proxyId1]; _local6 = _local3[_local4.proxyId2]; if (_local4.IsRemoved()){ if (_local4.IsFinal() == true){ m_callback.PairRemoved(_local5.userData, _local6.userData, _local4.userData); }; m_pairBuffer[_local2].proxyId1 = _local4.proxyId1; m_pairBuffer[_local2].proxyId2 = _local4.proxyId2; _local2++; } else { if (_local4.IsFinal() == false){ _local4.userData = m_callback.PairAdded(_local5.userData, _local6.userData); _local4.SetFinal(); }; }; _local1++; }; _local1 = 0; while (_local1 < _local2) { RemovePair(m_pairBuffer[_local1].proxyId1, m_pairBuffer[_local1].proxyId2); _local1++; }; m_pairBufferCount = 0; if (b2BroadPhase.s_validate){ ValidateTable(); }; } public function RemoveBufferedPair(_arg1:int, _arg2:int):void{ var _local3:b2Pair = Find(_arg1, _arg2); if (_local3 == null){ return; }; if (_local3.IsBuffered() == false){ _local3.SetBuffered(); m_pairBuffer[m_pairBufferCount].proxyId1 = _local3.proxyId1; m_pairBuffer[m_pairBufferCount].proxyId2 = _local3.proxyId2; m_pairBufferCount++; }; _local3.SetRemoved(); if (b2BroadPhase.s_validate){ ValidateBuffer(); }; } private function RemovePair(_arg1:uint, _arg2:uint){ var _local6:uint; var _local7:uint; var _local8:b2Pair; var _local9:*; if (_arg1 > _arg2){ _local6 = _arg1; _arg1 = _arg2; _arg2 = _local6; }; var _local3:uint = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask); var _local4:uint = m_hashTable[_local3]; var _local5:b2Pair; while (_local4 != b2Pair.b2_nullPair) { if (Equals(m_pairs[_local4], _arg1, _arg2)){ _local7 = _local4; if (_local5){ _local5.next = m_pairs[_local4].next; } else { m_hashTable[_local3] = m_pairs[_local4].next; }; _local8 = m_pairs[_local7]; _local9 = _local8.userData; _local8.next = m_freePair; _local8.proxyId1 = b2Pair.b2_nullProxy; _local8.proxyId2 = b2Pair.b2_nullProxy; _local8.userData = null; _local8.status = 0; m_freePair = _local7; m_pairCount--; return (_local9); } else { _local5 = m_pairs[_local4]; _local4 = _local5.next; }; }; return (null); } public function Initialize(_arg1:b2BroadPhase, _arg2:b2PairCallback):void{ m_broadPhase = _arg1; m_callback = _arg2; } public function AddBufferedPair(_arg1:int, _arg2:int):void{ var _local3:b2Pair = AddPair(_arg1, _arg2); if (_local3.IsBuffered() == false){ _local3.SetBuffered(); m_pairBuffer[m_pairBufferCount].proxyId1 = _local3.proxyId1; m_pairBuffer[m_pairBufferCount].proxyId2 = _local3.proxyId2; m_pairBufferCount++; }; _local3.ClearRemoved(); if (b2BroadPhase.s_validate){ ValidateBuffer(); }; } private function AddPair(_arg1:uint, _arg2:uint):b2Pair{ var _local6:uint; if (_arg1 > _arg2){ _local6 = _arg1; _arg1 = _arg2; _arg2 = _local6; }; var _local3:uint = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask); var _local4 = FindHash(_arg1, _arg2, _local3); if (_local4 != null){ return (_local4); }; var _local5:uint = m_freePair; _local4 = m_pairs[_local5]; m_freePair = _local4.next; _local4.proxyId1 = _arg1; _local4.proxyId2 = _arg2; _local4.status = 0; _local4.userData = null; _local4.next = m_hashTable[_local3]; m_hashTable[_local3] = _local5; m_pairCount++; return (_local4); } private function ValidateTable():void{ } public static function EqualsPair(_arg1:b2BufferedPair, _arg2:b2BufferedPair):Boolean{ return ((((_arg1.proxyId1 == _arg2.proxyId1)) && ((_arg1.proxyId2 == _arg2.proxyId2)))); } public static function Hash(_arg1:uint, _arg2:uint):uint{ var _local3:uint = (((_arg2 << 16) & 4294901760) | _arg1); _local3 = (~(_local3) + ((_local3 << 15) & 4294934528)); _local3 = (_local3 ^ ((_local3 >> 12) & 1048575)); _local3 = (_local3 + ((_local3 << 2) & 4294967292)); _local3 = (_local3 ^ ((_local3 >> 4) & 268435455)); _local3 = (_local3 * 2057); _local3 = (_local3 ^ ((_local3 >> 16) & 0xFFFF)); return (_local3); } public static function Equals(_arg1:b2Pair, _arg2:uint, _arg3:uint):Boolean{ return ((((_arg1.proxyId1 == _arg2)) && ((_arg1.proxyId2 == _arg3)))); } } }//package Box2D.Collision
Section 23
//b2Proxy (Box2D.Collision.b2Proxy) package Box2D.Collision { public class b2Proxy { public var overlapCount:uint; public var userData;// = null public var lowerBounds:Array; public var upperBounds:Array; public var timeStamp:uint; public function b2Proxy(){ lowerBounds = [uint(0), uint(0)]; upperBounds = [uint(0), uint(0)]; super(); } public function GetNext():uint{ return (lowerBounds[0]); } public function IsValid():Boolean{ return (!((overlapCount == b2BroadPhase.b2_invalid))); } public function SetNext(_arg1:uint):void{ lowerBounds[0] = (_arg1 & 0xFFFF); } } }//package Box2D.Collision
Section 24
//ClipVertex (Box2D.Collision.ClipVertex) package Box2D.Collision { import Box2D.Common.Math.*; public class ClipVertex { public var id:b2ContactID; public var v:b2Vec2; public function ClipVertex(){ v = new b2Vec2(); id = new b2ContactID(); super(); } } }//package Box2D.Collision
Section 25
//Features (Box2D.Collision.Features) package Box2D.Collision { public class Features { public var _referenceFace:int; public var _incidentEdge:int; public var _flip:int; public var _incidentVertex:int; public var _m_id:b2ContactID; public function get referenceFace():int{ return (_referenceFace); } public function set incidentVertex(_arg1:int):void{ _incidentVertex = _arg1; _m_id._key = ((_m_id._key & 4278255615) | ((_incidentVertex << 16) & 0xFF0000)); } public function get flip():int{ return (_flip); } public function get incidentEdge():int{ return (_incidentEdge); } public function set referenceFace(_arg1:int):void{ _referenceFace = _arg1; _m_id._key = ((_m_id._key & 4294967040) | (_referenceFace & 0xFF)); } public function get incidentVertex():int{ return (_incidentVertex); } public function set flip(_arg1:int):void{ _flip = _arg1; _m_id._key = ((_m_id._key & 0xFFFFFF) | ((_flip << 24) & 4278190080)); } public function set incidentEdge(_arg1:int):void{ _incidentEdge = _arg1; _m_id._key = ((_m_id._key & 4294902015) | ((_incidentEdge << 8) & 0xFF00)); } } }//package Box2D.Collision
Section 26
//b2Mat22 (Box2D.Common.Math.b2Mat22) package Box2D.Common.Math { public class b2Mat22 { public var col1:b2Vec2; public var col2:b2Vec2; public function b2Mat22(_arg1:Number=0, _arg2:b2Vec2=null, _arg3:b2Vec2=null){ var _local4:Number; var _local5:Number; col1 = new b2Vec2(); col2 = new b2Vec2(); super(); if (((!((_arg2 == null))) && (!((_arg3 == null))))){ col1.SetV(_arg2); col2.SetV(_arg3); } else { _local4 = Math.cos(_arg1); _local5 = Math.sin(_arg1); col1.x = _local4; col2.x = -(_local5); col1.y = _local5; col2.y = _local4; }; } public function SetIdentity():void{ col1.x = 1; col2.x = 0; col1.y = 0; col2.y = 1; } public function SetVV(_arg1:b2Vec2, _arg2:b2Vec2):void{ col1.SetV(_arg1); col2.SetV(_arg2); } public function Set(_arg1:Number):void{ var _local2:Number; _local2 = Math.cos(_arg1); var _local3:Number = Math.sin(_arg1); col1.x = _local2; col2.x = -(_local3); col1.y = _local3; col2.y = _local2; } public function SetZero():void{ col1.x = 0; col2.x = 0; col1.y = 0; col2.y = 0; } public function SetM(_arg1:b2Mat22):void{ col1.SetV(_arg1.col1); col2.SetV(_arg1.col2); } public function AddM(_arg1:b2Mat22):void{ col1.x = (col1.x + _arg1.col1.x); col1.y = (col1.y + _arg1.col1.y); col2.x = (col2.x + _arg1.col2.x); col2.y = (col2.y + _arg1.col2.y); } public function Abs():void{ col1.Abs(); col2.Abs(); } public function Copy():b2Mat22{ return (new b2Mat22(0, col1, col2)); } public function Invert(_arg1:b2Mat22):b2Mat22{ var _local2:Number; var _local4:Number; var _local6:Number; _local2 = col1.x; var _local3:Number = col2.x; _local4 = col1.y; var _local5:Number = col2.y; _local6 = ((_local2 * _local5) - (_local3 * _local4)); _local6 = (1 / _local6); _arg1.col1.x = (_local6 * _local5); _arg1.col2.x = (-(_local6) * _local3); _arg1.col1.y = (-(_local6) * _local4); _arg1.col2.y = (_local6 * _local2); return (_arg1); } public function Solve(_arg1:b2Vec2, _arg2:Number, _arg3:Number):b2Vec2{ var _local4:Number = col1.x; var _local5:Number = col2.x; var _local6:Number = col1.y; var _local7:Number = col2.y; var _local8:Number = ((_local4 * _local7) - (_local5 * _local6)); _local8 = (1 / _local8); _arg1.x = (_local8 * ((_local7 * _arg2) - (_local5 * _arg3))); _arg1.y = (_local8 * ((_local4 * _arg3) - (_local6 * _arg2))); return (_arg1); } } }//package Box2D.Common.Math
Section 27
//b2Math (Box2D.Common.Math.b2Math) package Box2D.Common.Math { public class b2Math { public static function b2CrossVF(_arg1:b2Vec2, _arg2:Number):b2Vec2{ var _local3:b2Vec2 = new b2Vec2((_arg2 * _arg1.y), (-(_arg2) * _arg1.x)); return (_local3); } public static function AddVV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2 = new b2Vec2((_arg1.x + _arg2.x), (_arg1.y + _arg2.y)); return (_local3); } public static function b2IsValid(_arg1:Number):Boolean{ return (isFinite(_arg1)); } public static function b2Swap(_arg1:Array, _arg2:Array):void{ var _local3:* = _arg1[0]; _arg1[0] = _arg2[0]; _arg2[0] = _local3; } public static function b2Abs(_arg1:Number):Number{ return (((_arg1 > 0)) ? _arg1 : -(_arg1)); } public static function b2AbsM(_arg1:b2Mat22):b2Mat22{ var _local2:b2Mat22 = new b2Mat22(0, b2AbsV(_arg1.col1), b2AbsV(_arg1.col2)); return (_local2); } public static function SubtractVV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2 = new b2Vec2((_arg1.x - _arg2.x), (_arg1.y - _arg2.y)); return (_local3); } public static function b2CrossVV(_arg1:b2Vec2, _arg2:b2Vec2):Number{ return (((_arg1.x * _arg2.y) - (_arg1.y * _arg2.x))); } public static function b2Clamp(_arg1:Number, _arg2:Number, _arg3:Number):Number{ return (b2Max(_arg2, b2Min(_arg1, _arg3))); } public static function b2AbsV(_arg1:b2Vec2):b2Vec2{ var _local2:b2Vec2 = new b2Vec2(b2Abs(_arg1.x), b2Abs(_arg1.y)); return (_local2); } public static function b2MinV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2 = new b2Vec2(b2Min(_arg1.x, _arg2.x), b2Min(_arg1.y, _arg2.y)); return (_local3); } public static function b2Dot(_arg1:b2Vec2, _arg2:b2Vec2):Number{ return (((_arg1.x * _arg2.x) + (_arg1.y * _arg2.y))); } public static function b2CrossFV(_arg1:Number, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2 = new b2Vec2((-(_arg1) * _arg2.y), (_arg1 * _arg2.x)); return (_local3); } public static function AddMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{ var _local3:b2Mat22 = new b2Mat22(0, AddVV(_arg1.col1, _arg2.col1), AddVV(_arg1.col2, _arg2.col2)); return (_local3); } public static function b2MulTMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{ var _local3:b2Vec2 = new b2Vec2(b2Dot(_arg1.col1, _arg2.col1), b2Dot(_arg1.col2, _arg2.col1)); var _local4:b2Vec2 = new b2Vec2(b2Dot(_arg1.col1, _arg2.col2), b2Dot(_arg1.col2, _arg2.col2)); var _local5:b2Mat22 = new b2Mat22(0, _local3, _local4); return (_local5); } public static function b2MaxV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2 = new b2Vec2(b2Max(_arg1.x, _arg2.x), b2Max(_arg1.y, _arg2.y)); return (_local3); } public static function b2IsPowerOfTwo(_arg1:uint):Boolean{ var _local2:Boolean = (((_arg1 > 0)) && (((_arg1 & (_arg1 - 1)) == 0))); return (_local2); } public static function b2ClampV(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Vec2):b2Vec2{ return (b2MaxV(_arg2, b2MinV(_arg1, _arg3))); } public static function MulFV(_arg1:Number, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2 = new b2Vec2((_arg1 * _arg2.x), (_arg1 * _arg2.y)); return (_local3); } public static function b2MulTMV(_arg1:b2Mat22, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2 = new b2Vec2(b2Dot(_arg2, _arg1.col1), b2Dot(_arg2, _arg1.col2)); return (_local3); } public static function b2Min(_arg1:Number, _arg2:Number):Number{ return (((_arg1 < _arg2)) ? _arg1 : _arg2); } public static function b2Random():Number{ return (((Math.random() * 2) - 1)); } public static function b2MulMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{ var _local3:b2Mat22 = new b2Mat22(0, b2MulMV(_arg1, _arg2.col1), b2MulMV(_arg1, _arg2.col2)); return (_local3); } public static function b2NextPowerOfTwo(_arg1:uint):uint{ _arg1 = (_arg1 | ((_arg1 >> 1) & 2147483647)); _arg1 = (_arg1 | ((_arg1 >> 2) & 1073741823)); _arg1 = (_arg1 | ((_arg1 >> 4) & 268435455)); _arg1 = (_arg1 | ((_arg1 >> 8) & 0xFFFFFF)); _arg1 = (_arg1 | ((_arg1 >> 16) & 0xFFFF)); return ((_arg1 + 1)); } public static function b2Max(_arg1:Number, _arg2:Number):Number{ return (((_arg1 > _arg2)) ? _arg1 : _arg2); } public static function b2MulMV(_arg1:b2Mat22, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2 = new b2Vec2(((_arg1.col1.x * _arg2.x) + (_arg1.col2.x * _arg2.y)), ((_arg1.col1.y * _arg2.x) + (_arg1.col2.y * _arg2.y))); return (_local3); } } }//package Box2D.Common.Math
Section 28
//b2Vec2 (Box2D.Common.Math.b2Vec2) package Box2D.Common.Math { public class b2Vec2 { public var y:Number; public var x:Number; public function b2Vec2(_arg1:Number=0, _arg2:Number=0):void{ x = _arg1; y = _arg2; } public function Add(_arg1:b2Vec2):void{ x = (x + _arg1.x); y = (y + _arg1.y); } public function Set(_arg1:Number=0, _arg2:Number=0):void{ x = _arg1; y = _arg2; } public function Multiply(_arg1:Number):void{ x = (x * _arg1); y = (y * _arg1); } public function Length():Number{ return (Math.sqrt(((x * x) + (y * y)))); } public function MulM(_arg1:b2Mat22):void{ var _local2:Number = x; x = ((_arg1.col1.x * _local2) + (_arg1.col2.x * y)); y = ((_arg1.col1.y * _local2) + (_arg1.col2.y * y)); } public function SetZero():void{ x = 0; y = 0; } public function MinV(_arg1:b2Vec2):void{ x = ((x < _arg1.x)) ? x : _arg1.x; y = ((y < _arg1.y)) ? y : _arg1.y; } public function Normalize():Number{ var _local1:Number = Length(); if (_local1 < Number.MIN_VALUE){ return (0); }; var _local2:Number = (1 / _local1); x = (x * _local2); y = (y * _local2); return (_local1); } public function CrossVF(_arg1:Number):void{ var _local2:Number = x; x = (_arg1 * y); y = (-(_arg1) * _local2); } public function MaxV(_arg1:b2Vec2):void{ x = ((x > _arg1.x)) ? x : _arg1.x; y = ((y > _arg1.y)) ? y : _arg1.y; } public function SetV(_arg1:b2Vec2):void{ x = _arg1.x; y = _arg1.y; } public function Negative():b2Vec2{ return (new b2Vec2(-(x), -(y))); } public function CrossFV(_arg1:Number):void{ var _local2:Number = x; x = (-(_arg1) * y); y = (_arg1 * _local2); } public function Abs():void{ x = Math.abs(x); y = Math.abs(y); } public function Subtract(_arg1:b2Vec2):void{ x = (x - _arg1.x); y = (y - _arg1.y); } public function Copy():b2Vec2{ return (new b2Vec2(x, y)); } public function MulTM(_arg1:b2Mat22):void{ var _local2:Number = b2Math.b2Dot(this, _arg1.col1); y = b2Math.b2Dot(this, _arg1.col2); x = _local2; } public function IsValid():Boolean{ return (((b2Math.b2IsValid(x)) && (b2Math.b2IsValid(y)))); } public static function Make(_arg1:Number, _arg2:Number):b2Vec2{ return (new b2Vec2(_arg1, _arg2)); } } }//package Box2D.Common.Math
Section 29
//b2Settings (Box2D.Common.b2Settings) package Box2D.Common { import Box2D.Common.Math.*; public class b2Settings { public static const b2_lengthUnitsPerMeter:Number = 30; public static const b2_angularSleepTolerance:Number = 0.0111111111111111; public static const b2_linearSleepTolerance:Number = 0.3; public static const b2_angularSlop:Number = 0.0349065850398866; public static const b2_linearSlop:Number = 0.15; public static const b2_pi:Number = 3.14159265358979; public static const b2_maxShapesPerBody:int = 64; public static const b2_maxProxies:int = 0x0400; public static const b2_velocityThreshold:Number = 30; public static const b2_timeToSleep:Number = 0.5; public static const b2_contactBaumgarte:Number = 0.2; public static const b2_maxPairs:int = 8192; public static const b2_maxManifoldPoints:int = 2; public static const b2_massUnitsPerKilogram:Number = 1; public static const b2_maxAngularCorrection:Number = 0.139626340159546; public static const USHRT_MAX:int = 0xFFFF; public static const b2_maxLinearCorrection:Number = 6; public static const b2_maxPolyVertices:int = 8; public static const b2_timeUnitsPerSecond:Number = 1; public static function b2Assert(_arg1:Boolean):void{ var _local2:b2Vec2; if (!_arg1){ _local2.x++; }; } } }//package Box2D.Common
Section 30
//b2CircleContact (Box2D.Dynamics.Contacts.b2CircleContact) package Box2D.Dynamics.Contacts { import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2CircleContact extends b2Contact { public var m_manifold:Array; public function b2CircleContact(_arg1:b2Shape, _arg2:b2Shape){ m_manifold = [new b2Manifold()]; super(_arg1, _arg2); m_manifold[0].pointCount = 0; m_manifold[0].points[0].normalImpulse = 0; m_manifold[0].points[0].tangentImpulse = 0; } override public function Evaluate():void{ b2Collision.b2CollideCircle(m_manifold[0], (m_shape1 as b2CircleShape), (m_shape2 as b2CircleShape), false); if (m_manifold[0].pointCount > 0){ m_manifoldCount = 1; } else { m_manifoldCount = 0; }; } override public function GetManifolds():Array{ return (m_manifold); } public static function Destroy(_arg1:b2Contact, _arg2):void{ } public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{ return (new b2CircleContact(_arg1, _arg2)); } } }//package Box2D.Dynamics.Contacts
Section 31
//b2Contact (Box2D.Dynamics.Contacts.b2Contact) package Box2D.Dynamics.Contacts { import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2Contact { public var m_shape1:b2Shape; public var m_shape2:b2Shape; public var m_next:b2Contact; public var m_prev:b2Contact; public var m_friction:Number; public var m_manifoldCount:int; public var m_node1:b2ContactNode; public var m_node2:b2ContactNode; public var m_restitution:Number; public var m_flags:uint; public static var s_registers:Array; public static var s_initialized:Boolean = false; public static var e_islandFlag:uint = 1; public static var e_destroyFlag:uint = 2; public function b2Contact(_arg1:b2Shape=null, _arg2:b2Shape=null){ m_node1 = new b2ContactNode(); m_node2 = new b2ContactNode(); super(); m_flags = 0; if (((!(_arg1)) || (!(_arg2)))){ m_shape1 = null; m_shape2 = null; return; }; m_shape1 = _arg1; m_shape2 = _arg2; m_manifoldCount = 0; m_friction = Math.sqrt((m_shape1.m_friction * m_shape2.m_friction)); m_restitution = b2Math.b2Max(m_shape1.m_restitution, m_shape2.m_restitution); m_prev = null; m_next = null; m_node1.contact = null; m_node1.prev = null; m_node1.next = null; m_node1.other = null; m_node2.contact = null; m_node2.prev = null; m_node2.next = null; m_node2.other = null; } public function GetShape1():b2Shape{ return (m_shape1); } public function GetShape2():b2Shape{ return (m_shape2); } public function GetManifoldCount():int{ return (m_manifoldCount); } public function GetNext():b2Contact{ return (m_next); } public function GetManifolds():Array{ return (null); } public function Evaluate():void{ } public static function InitializeRegisters():void{ var _local2:int; s_registers = new Array(b2Shape.e_shapeTypeCount); var _local1:int; while (_local1 < b2Shape.e_shapeTypeCount) { s_registers[_local1] = new Array(b2Shape.e_shapeTypeCount); _local2 = 0; while (_local2 < b2Shape.e_shapeTypeCount) { s_registers[_local1][_local2] = new b2ContactRegister(); _local2++; }; _local1++; }; AddType(b2CircleContact.Create, b2CircleContact.Destroy, b2Shape.e_circleShape, b2Shape.e_circleShape); AddType(b2PolyAndCircleContact.Create, b2PolyAndCircleContact.Destroy, b2Shape.e_polyShape, b2Shape.e_circleShape); AddType(b2PolyContact.Create, b2PolyContact.Destroy, b2Shape.e_polyShape, b2Shape.e_polyShape); } public static function Destroy(_arg1:b2Contact, _arg2):void{ if (_arg1.GetManifoldCount() > 0){ _arg1.m_shape1.m_body.WakeUp(); _arg1.m_shape2.m_body.WakeUp(); }; var _local3:int = _arg1.m_shape1.m_type; var _local4:int = _arg1.m_shape2.m_type; var _local5:* = s_registers[_local3][_local4].destroyFcn; _local5(_arg1, _arg2); } public static function AddType(_arg1, _arg2, _arg3:int, _arg4:int):void{ s_registers[_arg3][_arg4].createFcn = _arg1; s_registers[_arg3][_arg4].destroyFcn = _arg2; s_registers[_arg3][_arg4].primary = true; if (_arg3 != _arg4){ s_registers[_arg4][_arg3].createFcn = _arg1; s_registers[_arg4][_arg3].destroyFcn = _arg2; s_registers[_arg4][_arg3].primary = false; }; } public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{ var _local7:b2Contact; var _local8:int; var _local9:b2Manifold; if (s_initialized == false){ InitializeRegisters(); s_initialized = true; }; var _local4:int = _arg1.m_type; var _local5:int = _arg2.m_type; var _local6:* = s_registers[_local4][_local5].createFcn; if (_local6){ if (s_registers[_local4][_local5].primary){ return (_local6(_arg1, _arg2, _arg3)); }; _local7 = _local6(_arg2, _arg1, _arg3); _local8 = 0; while (_local8 < _local7.GetManifoldCount()) { _local9 = _local7.GetManifolds()[_local8]; _local7.GetManifolds()[_local8].normal = _local9.normal.Negative(); _local8++; }; return (_local7); //unresolved jump }; return (null); } } }//package Box2D.Dynamics.Contacts
Section 32
//b2ContactConstraint (Box2D.Dynamics.Contacts.b2ContactConstraint) package Box2D.Dynamics.Contacts { import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Common.*; public class b2ContactConstraint { public var points:Array; public var normal:b2Vec2; public var restitution:Number; public var body1:b2Body; public var manifold:b2Manifold; public var body2:b2Body; public var friction:Number; public var pointCount:int; public function b2ContactConstraint(){ normal = new b2Vec2(); super(); points = new Array(b2Settings.b2_maxManifoldPoints); var _local1:int; while (_local1 < b2Settings.b2_maxManifoldPoints) { points[_local1] = new b2ContactConstraintPoint(); _local1++; }; } } }//package Box2D.Dynamics.Contacts
Section 33
//b2ContactConstraintPoint (Box2D.Dynamics.Contacts.b2ContactConstraintPoint) package Box2D.Dynamics.Contacts { import Box2D.Common.Math.*; public class b2ContactConstraintPoint { public var separation:Number; public var positionImpulse:Number; public var normalImpulse:Number; public var tangentImpulse:Number; public var localAnchor1:b2Vec2; public var localAnchor2:b2Vec2; public var tangentMass:Number; public var normalMass:Number; public var velocityBias:Number; public function b2ContactConstraintPoint(){ localAnchor1 = new b2Vec2(); localAnchor2 = new b2Vec2(); super(); } } }//package Box2D.Dynamics.Contacts
Section 34
//b2ContactNode (Box2D.Dynamics.Contacts.b2ContactNode) package Box2D.Dynamics.Contacts { import Box2D.Dynamics.*; public class b2ContactNode { public var other:b2Body; public var prev:b2ContactNode; public var contact:b2Contact; public var next:b2ContactNode; } }//package Box2D.Dynamics.Contacts
Section 35
//b2ContactRegister (Box2D.Dynamics.Contacts.b2ContactRegister) package Box2D.Dynamics.Contacts { public class b2ContactRegister { public var primary:Boolean; public var createFcn; public var destroyFcn; } }//package Box2D.Dynamics.Contacts
Section 36
//b2ContactSolver (Box2D.Dynamics.Contacts.b2ContactSolver) package Box2D.Dynamics.Contacts { import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Common.*; public class b2ContactSolver { public var m_constraintCount:int; public var m_constraints:Array; public var m_allocator; public function b2ContactSolver(_arg1:Array, _arg2:int, _arg3){ var _local4:int; var _local5:b2Vec2; var _local6:b2Mat22; var _local8:b2Contact; var _local9:b2Body; var _local10:b2Body; var _local11:int; var _local12:Array; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:int; var _local22:b2Manifold; var _local23:Number; var _local24:Number; var _local25:b2ContactConstraint; var _local26:uint; var _local27:b2ContactPoint; var _local28:b2ContactConstraintPoint; var _local29:Number; var _local30:Number; var _local31:Number; var _local32:Number; var _local33:Number; var _local34:Number; var _local35:Number; var _local36:Number; var _local37:Number; var _local38:Number; var _local39:Number; var _local40:Number; var _local41:Number; var _local42:Number; var _local43:Number; var _local44:Number; var _local45:Number; m_constraints = new Array(); super(); m_allocator = _arg3; m_constraintCount = 0; _local4 = 0; while (_local4 < _arg2) { m_constraintCount = (m_constraintCount + _arg1[_local4].GetManifoldCount()); _local4++; }; _local4 = 0; while (_local4 < m_constraintCount) { m_constraints[_local4] = new b2ContactConstraint(); _local4++; }; var _local7:int; _local4 = 0; while (_local4 < _arg2) { _local8 = _arg1[_local4]; _local9 = _local8.m_shape1.m_body; _local10 = _local8.m_shape2.m_body; _local11 = _local8.GetManifoldCount(); _local12 = _local8.GetManifolds(); _local13 = _local8.m_friction; _local14 = _local8.m_restitution; _local15 = _local9.m_linearVelocity.x; _local16 = _local9.m_linearVelocity.y; _local17 = _local10.m_linearVelocity.x; _local18 = _local10.m_linearVelocity.y; _local19 = _local9.m_angularVelocity; _local20 = _local10.m_angularVelocity; _local21 = 0; while (_local21 < _local11) { _local22 = _local12[_local21]; _local23 = _local22.normal.x; _local24 = _local22.normal.y; _local25 = m_constraints[_local7]; _local25.body1 = _local9; _local25.body2 = _local10; _local25.manifold = _local22; _local25.normal.x = _local23; _local25.normal.y = _local24; _local25.pointCount = _local22.pointCount; _local25.friction = _local13; _local25.restitution = _local14; _local26 = 0; while (_local26 < _local25.pointCount) { _local27 = _local22.points[_local26]; _local28 = _local25.points[_local26]; _local28.normalImpulse = _local27.normalImpulse; _local28.tangentImpulse = _local27.tangentImpulse; _local28.separation = _local27.separation; _local29 = (_local27.position.x - _local9.m_position.x); _local30 = (_local27.position.y - _local9.m_position.y); _local31 = (_local27.position.x - _local10.m_position.x); _local32 = (_local27.position.y - _local10.m_position.y); _local5 = _local28.localAnchor1; _local6 = _local9.m_R; _local5.x = ((_local29 * _local6.col1.x) + (_local30 * _local6.col1.y)); _local5.y = ((_local29 * _local6.col2.x) + (_local30 * _local6.col2.y)); _local5 = _local28.localAnchor2; _local6 = _local10.m_R; _local5.x = ((_local31 * _local6.col1.x) + (_local32 * _local6.col1.y)); _local5.y = ((_local31 * _local6.col2.x) + (_local32 * _local6.col2.y)); _local33 = ((_local29 * _local29) + (_local30 * _local30)); _local34 = ((_local31 * _local31) + (_local32 * _local32)); _local35 = ((_local29 * _local23) + (_local30 * _local24)); _local36 = ((_local31 * _local23) + (_local32 * _local24)); _local37 = (_local9.m_invMass + _local10.m_invMass); _local37 = (_local37 + ((_local9.m_invI * (_local33 - (_local35 * _local35))) + (_local10.m_invI * (_local34 - (_local36 * _local36))))); _local28.normalMass = (1 / _local37); _local38 = _local24; _local39 = -(_local23); _local40 = ((_local29 * _local38) + (_local30 * _local39)); _local41 = ((_local31 * _local38) + (_local32 * _local39)); _local42 = (_local9.m_invMass + _local10.m_invMass); _local42 = (_local42 + ((_local9.m_invI * (_local33 - (_local40 * _local40))) + (_local10.m_invI * (_local34 - (_local41 * _local41))))); _local28.tangentMass = (1 / _local42); _local28.velocityBias = 0; if (_local28.separation > 0){ _local28.velocityBias = (-60 * _local28.separation); }; _local43 = (((_local17 + (-(_local20) * _local32)) - _local15) - (-(_local19) * _local30)); _local44 = (((_local18 + (_local20 * _local31)) - _local16) - (_local19 * _local29)); _local45 = ((_local25.normal.x * _local43) + (_local25.normal.y * _local44)); if (_local45 < -(b2Settings.b2_velocityThreshold)){ _local28.velocityBias = (_local28.velocityBias + (-(_local25.restitution) * _local45)); }; _local26++; }; _local7++; _local21++; }; _local4++; }; } public function SolveVelocityConstraints():void{ var _local1:int; var _local2:b2ContactConstraintPoint; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:b2Mat22; var _local14:b2Vec2; var _local16:b2ContactConstraint; var _local17:b2Body; var _local18:b2Body; var _local19:Number; var _local20:b2Vec2; var _local21:Number; var _local22:b2Vec2; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; var _local27:Number; var _local28:Number; var _local29:Number; var _local30:Number; var _local31:int; var _local32:Number; var _local33:Number; var _local34:Number; var _local15:int; while (_local15 < m_constraintCount) { _local16 = m_constraints[_local15]; _local17 = _local16.body1; _local18 = _local16.body2; _local19 = _local17.m_angularVelocity; _local20 = _local17.m_linearVelocity; _local21 = _local18.m_angularVelocity; _local22 = _local18.m_linearVelocity; _local23 = _local17.m_invMass; _local24 = _local17.m_invI; _local25 = _local18.m_invMass; _local26 = _local18.m_invI; _local27 = _local16.normal.x; _local28 = _local16.normal.y; _local29 = _local28; _local30 = -(_local27); _local31 = _local16.pointCount; _local1 = 0; while (_local1 < _local31) { _local2 = _local16.points[_local1]; _local13 = _local17.m_R; _local14 = _local2.localAnchor1; _local3 = ((_local13.col1.x * _local14.x) + (_local13.col2.x * _local14.y)); _local4 = ((_local13.col1.y * _local14.x) + (_local13.col2.y * _local14.y)); _local13 = _local18.m_R; _local14 = _local2.localAnchor2; _local5 = ((_local13.col1.x * _local14.x) + (_local13.col2.x * _local14.y)); _local6 = ((_local13.col1.y * _local14.x) + (_local13.col2.y * _local14.y)); _local7 = (((_local22.x + (-(_local21) * _local6)) - _local20.x) - (-(_local19) * _local4)); _local8 = (((_local22.y + (_local21 * _local5)) - _local20.y) - (_local19 * _local3)); _local32 = ((_local7 * _local27) + (_local8 * _local28)); _local9 = (-(_local2.normalMass) * (_local32 - _local2.velocityBias)); _local10 = b2Math.b2Max((_local2.normalImpulse + _local9), 0); _local9 = (_local10 - _local2.normalImpulse); _local11 = (_local9 * _local27); _local12 = (_local9 * _local28); _local20.x = (_local20.x - (_local23 * _local11)); _local20.y = (_local20.y - (_local23 * _local12)); _local19 = (_local19 - (_local24 * ((_local3 * _local12) - (_local4 * _local11)))); _local22.x = (_local22.x + (_local25 * _local11)); _local22.y = (_local22.y + (_local25 * _local12)); _local21 = (_local21 + (_local26 * ((_local5 * _local12) - (_local6 * _local11)))); _local2.normalImpulse = _local10; _local7 = (((_local22.x + (-(_local21) * _local6)) - _local20.x) - (-(_local19) * _local4)); _local8 = (((_local22.y + (_local21 * _local5)) - _local20.y) - (_local19 * _local3)); _local33 = ((_local7 * _local29) + (_local8 * _local30)); _local9 = (_local2.tangentMass * -(_local33)); _local34 = (_local16.friction * _local2.normalImpulse); _local10 = b2Math.b2Clamp((_local2.tangentImpulse + _local9), -(_local34), _local34); _local9 = (_local10 - _local2.tangentImpulse); _local11 = (_local9 * _local29); _local12 = (_local9 * _local30); _local20.x = (_local20.x - (_local23 * _local11)); _local20.y = (_local20.y - (_local23 * _local12)); _local19 = (_local19 - (_local24 * ((_local3 * _local12) - (_local4 * _local11)))); _local22.x = (_local22.x + (_local25 * _local11)); _local22.y = (_local22.y + (_local25 * _local12)); _local21 = (_local21 + (_local26 * ((_local5 * _local12) - (_local6 * _local11)))); _local2.tangentImpulse = _local10; _local1++; }; _local17.m_angularVelocity = _local19; _local18.m_angularVelocity = _local21; _local15++; }; } public function PreSolve():void{ var _local1:b2Vec2; var _local2:b2Vec2; var _local3:b2Mat22; var _local5:b2ContactConstraint; var _local6:b2Body; var _local7:b2Body; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:int; var _local17:int; var _local18:b2ContactConstraintPoint; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:b2ContactConstraintPoint; var _local4:int; while (_local4 < m_constraintCount) { _local5 = m_constraints[_local4]; _local6 = _local5.body1; _local7 = _local5.body2; _local8 = _local6.m_invMass; _local9 = _local6.m_invI; _local10 = _local7.m_invMass; _local11 = _local7.m_invI; _local12 = _local5.normal.x; _local13 = _local5.normal.y; _local14 = _local13; _local15 = -(_local12); if (b2World.s_enableWarmStarting){ _local17 = _local5.pointCount; _local16 = 0; while (_local16 < _local17) { _local18 = _local5.points[_local16]; _local19 = ((_local18.normalImpulse * _local12) + (_local18.tangentImpulse * _local14)); _local20 = ((_local18.normalImpulse * _local13) + (_local18.tangentImpulse * _local15)); _local3 = _local6.m_R; _local1 = _local18.localAnchor1; _local21 = ((_local3.col1.x * _local1.x) + (_local3.col2.x * _local1.y)); _local22 = ((_local3.col1.y * _local1.x) + (_local3.col2.y * _local1.y)); _local3 = _local7.m_R; _local1 = _local18.localAnchor2; _local23 = ((_local3.col1.x * _local1.x) + (_local3.col2.x * _local1.y)); _local24 = ((_local3.col1.y * _local1.x) + (_local3.col2.y * _local1.y)); _local6.m_angularVelocity = (_local6.m_angularVelocity - (_local9 * ((_local21 * _local20) - (_local22 * _local19)))); _local6.m_linearVelocity.x = (_local6.m_linearVelocity.x - (_local8 * _local19)); _local6.m_linearVelocity.y = (_local6.m_linearVelocity.y - (_local8 * _local20)); _local7.m_angularVelocity = (_local7.m_angularVelocity + (_local11 * ((_local23 * _local20) - (_local24 * _local19)))); _local7.m_linearVelocity.x = (_local7.m_linearVelocity.x + (_local10 * _local19)); _local7.m_linearVelocity.y = (_local7.m_linearVelocity.y + (_local10 * _local20)); _local18.positionImpulse = 0; _local16++; }; } else { _local17 = _local5.pointCount; _local16 = 0; while (_local16 < _local17) { _local25 = _local5.points[_local16]; _local25.normalImpulse = 0; _local25.tangentImpulse = 0; _local25.positionImpulse = 0; _local16++; }; }; _local4++; }; } public function SolvePositionConstraints(_arg1:Number):Boolean{ var _local3:b2Mat22; var _local4:b2Vec2; var _local6:b2ContactConstraint; var _local7:b2Body; var _local8:b2Body; var _local9:b2Vec2; var _local10:Number; var _local11:b2Vec2; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:int; var _local22:int; var _local23:b2ContactConstraintPoint; var _local24:Number; var _local25:Number; var _local26:Number; var _local27:Number; var _local28:Number; var _local29:Number; var _local30:Number; var _local31:Number; var _local32:Number; var _local33:Number; var _local34:Number; var _local35:Number; var _local36:Number; var _local37:Number; var _local38:Number; var _local39:Number; var _local2:Number = 0; var _local5:int; while (_local5 < m_constraintCount) { _local6 = m_constraints[_local5]; _local7 = _local6.body1; _local8 = _local6.body2; _local9 = _local7.m_position; _local10 = _local7.m_rotation; _local11 = _local8.m_position; _local12 = _local8.m_rotation; _local13 = _local7.m_invMass; _local14 = _local7.m_invI; _local15 = _local8.m_invMass; _local16 = _local8.m_invI; _local17 = _local6.normal.x; _local18 = _local6.normal.y; _local19 = _local18; _local20 = -(_local17); _local21 = _local6.pointCount; _local22 = 0; while (_local22 < _local21) { _local23 = _local6.points[_local22]; _local3 = _local7.m_R; _local4 = _local23.localAnchor1; _local24 = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y)); _local25 = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y)); _local3 = _local8.m_R; _local4 = _local23.localAnchor2; _local26 = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y)); _local27 = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y)); _local28 = (_local9.x + _local24); _local29 = (_local9.y + _local25); _local30 = (_local11.x + _local26); _local31 = (_local11.y + _local27); _local32 = (_local30 - _local28); _local33 = (_local31 - _local29); _local34 = (((_local32 * _local17) + (_local33 * _local18)) + _local23.separation); _local2 = b2Math.b2Min(_local2, _local34); _local35 = (_arg1 * b2Math.b2Clamp((_local34 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0)); _local36 = (-(_local23.normalMass) * _local35); _local37 = _local23.positionImpulse; _local23.positionImpulse = b2Math.b2Max((_local37 + _local36), 0); _local36 = (_local23.positionImpulse - _local37); _local38 = (_local36 * _local17); _local39 = (_local36 * _local18); _local9.x = (_local9.x - (_local13 * _local38)); _local9.y = (_local9.y - (_local13 * _local39)); _local10 = (_local10 - (_local14 * ((_local24 * _local39) - (_local25 * _local38)))); _local7.m_R.Set(_local10); _local11.x = (_local11.x + (_local15 * _local38)); _local11.y = (_local11.y + (_local15 * _local39)); _local12 = (_local12 + (_local16 * ((_local26 * _local39) - (_local27 * _local38)))); _local8.m_R.Set(_local12); _local22++; }; _local7.m_rotation = _local10; _local8.m_rotation = _local12; _local5++; }; return ((_local2 >= -(b2Settings.b2_linearSlop))); } public function PostSolve():void{ var _local2:b2ContactConstraint; var _local3:b2Manifold; var _local4:int; var _local5:b2ContactPoint; var _local6:b2ContactConstraintPoint; var _local1:int; while (_local1 < m_constraintCount) { _local2 = m_constraints[_local1]; _local3 = _local2.manifold; _local4 = 0; while (_local4 < _local2.pointCount) { _local5 = _local3.points[_local4]; _local6 = _local2.points[_local4]; _local5.normalImpulse = _local6.normalImpulse; _local5.tangentImpulse = _local6.tangentImpulse; _local4++; }; _local1++; }; } } }//package Box2D.Dynamics.Contacts
Section 37
//b2NullContact (Box2D.Dynamics.Contacts.b2NullContact) package Box2D.Dynamics.Contacts { public class b2NullContact extends b2Contact { public function b2NullContact():void{ } override public function Evaluate():void{ } override public function GetManifolds():Array{ return (null); } } }//package Box2D.Dynamics.Contacts
Section 38
//b2PolyAndCircleContact (Box2D.Dynamics.Contacts.b2PolyAndCircleContact) package Box2D.Dynamics.Contacts { import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2PolyAndCircleContact extends b2Contact { public var m_manifold:Array; public function b2PolyAndCircleContact(_arg1:b2Shape, _arg2:b2Shape){ m_manifold = [new b2Manifold()]; super(_arg1, _arg2); b2Settings.b2Assert((m_shape1.m_type == b2Shape.e_polyShape)); b2Settings.b2Assert((m_shape2.m_type == b2Shape.e_circleShape)); m_manifold[0].pointCount = 0; m_manifold[0].points[0].normalImpulse = 0; m_manifold[0].points[0].tangentImpulse = 0; } override public function Evaluate():void{ b2Collision.b2CollidePolyAndCircle(m_manifold[0], (m_shape1 as b2PolyShape), (m_shape2 as b2CircleShape), false); if (m_manifold[0].pointCount > 0){ m_manifoldCount = 1; } else { m_manifoldCount = 0; }; } override public function GetManifolds():Array{ return (m_manifold); } public static function Destroy(_arg1:b2Contact, _arg2):void{ } public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{ return (new b2PolyAndCircleContact(_arg1, _arg2)); } } }//package Box2D.Dynamics.Contacts
Section 39
//b2PolyContact (Box2D.Dynamics.Contacts.b2PolyContact) package Box2D.Dynamics.Contacts { import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2PolyContact extends b2Contact { public var m_manifold:Array; private var m0:b2Manifold; public function b2PolyContact(_arg1:b2Shape, _arg2:b2Shape):void{ m0 = new b2Manifold(); m_manifold = [new b2Manifold()]; super(_arg1, _arg2); m_manifold[0].pointCount = 0; } override public function Evaluate():void{ var _local4:b2ContactPoint; var _local5:b2ContactPoint; var _local6:Array; var _local7:int; var _local8:b2ContactPoint; var _local9:uint; var _local10:int; var _local11:b2ContactPoint; var _local12:b2ContactID; var _local1:b2Manifold = m_manifold[0]; var _local2:Array = m0.points; var _local3:int; while (_local3 < _local1.pointCount) { _local4 = _local2[_local3]; _local5 = _local1.points[_local3]; _local4.normalImpulse = _local5.normalImpulse; _local4.tangentImpulse = _local5.tangentImpulse; _local4.id = _local5.id.Copy(); _local3++; }; m0.pointCount = _local1.pointCount; b2Collision.b2CollidePoly(_local1, (m_shape1 as b2PolyShape), (m_shape2 as b2PolyShape), false); if (_local1.pointCount > 0){ _local6 = [false, false]; _local7 = 0; while (_local7 < _local1.pointCount) { _local8 = _local1.points[_local7]; _local8.normalImpulse = 0; _local8.tangentImpulse = 0; _local9 = _local8.id.key; _local10 = 0; while (_local10 < m0.pointCount) { if (_local6[_local10] == true){ } else { _local11 = m0.points[_local10]; _local12 = _local11.id; if (_local12.key == _local9){ _local6[_local10] = true; _local8.normalImpulse = _local11.normalImpulse; _local8.tangentImpulse = _local11.tangentImpulse; break; }; }; _local10++; }; _local7++; }; m_manifoldCount = 1; } else { m_manifoldCount = 0; }; } override public function GetManifolds():Array{ return (m_manifold); } public static function Destroy(_arg1:b2Contact, _arg2):void{ } public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{ return (new b2PolyContact(_arg1, _arg2)); } } }//package Box2D.Dynamics.Contacts
Section 40
//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_localAnchor1:b2Vec2; public var m_localAnchor2:b2Vec2; public var m_u:b2Vec2; public var m_impulse:Number; public var m_length:Number; public var m_mass:Number; public function b2DistanceJoint(_arg1:b2DistanceJointDef){ var _local2:b2Mat22; var _local3:Number; var _local4:Number; m_localAnchor1 = new b2Vec2(); m_localAnchor2 = new b2Vec2(); m_u = new b2Vec2(); super(_arg1); _local2 = m_body1.m_R; _local3 = (_arg1.anchorPoint1.x - m_body1.m_position.x); _local4 = (_arg1.anchorPoint1.y - m_body1.m_position.y); m_localAnchor1.x = ((_local3 * _local2.col1.x) + (_local4 * _local2.col1.y)); m_localAnchor1.y = ((_local3 * _local2.col2.x) + (_local4 * _local2.col2.y)); _local2 = m_body2.m_R; _local3 = (_arg1.anchorPoint2.x - m_body2.m_position.x); _local4 = (_arg1.anchorPoint2.y - m_body2.m_position.y); m_localAnchor2.x = ((_local3 * _local2.col1.x) + (_local4 * _local2.col1.y)); m_localAnchor2.y = ((_local3 * _local2.col2.x) + (_local4 * _local2.col2.y)); _local3 = (_arg1.anchorPoint2.x - _arg1.anchorPoint1.x); _local4 = (_arg1.anchorPoint2.y - _arg1.anchorPoint1.y); m_length = Math.sqrt(((_local3 * _local3) + (_local4 * _local4))); m_impulse = 0; } override public function GetAnchor1():b2Vec2{ return (b2Math.AddVV(m_body1.m_position, b2Math.b2MulMV(m_body1.m_R, m_localAnchor1))); } override public function GetAnchor2():b2Vec2{ return (b2Math.AddVV(m_body2.m_position, b2Math.b2MulMV(m_body2.m_R, m_localAnchor2))); } override public function GetReactionTorque(_arg1:Number):Number{ return (0); } override public function GetReactionForce(_arg1:Number):b2Vec2{ var _local2:b2Vec2 = new b2Vec2(); _local2.SetV(m_u); _local2.Multiply((m_impulse * _arg1)); return (_local2); } override public function SolvePositionConstraints():Boolean{ var _local1:b2Mat22; _local1 = m_body1.m_R; var _local2:Number = ((_local1.col1.x * m_localAnchor1.x) + (_local1.col2.x * m_localAnchor1.y)); var _local3:Number = ((_local1.col1.y * m_localAnchor1.x) + (_local1.col2.y * m_localAnchor1.y)); _local1 = m_body2.m_R; var _local4:Number = ((_local1.col1.x * m_localAnchor2.x) + (_local1.col2.x * m_localAnchor2.y)); var _local5:Number = ((_local1.col1.y * m_localAnchor2.x) + (_local1.col2.y * m_localAnchor2.y)); var _local6:Number = (((m_body2.m_position.x + _local4) - m_body1.m_position.x) - _local2); var _local7:Number = (((m_body2.m_position.y + _local5) - m_body1.m_position.y) - _local3); var _local8:Number = Math.sqrt(((_local6 * _local6) + (_local7 * _local7))); _local6 = (_local6 / _local8); _local7 = (_local7 / _local8); var _local9:Number = (_local8 - m_length); _local9 = b2Math.b2Clamp(_local9, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection); var _local10:Number = (-(m_mass) * _local9); m_u.Set(_local6, _local7); var _local11:Number = (_local10 * m_u.x); var _local12:Number = (_local10 * m_u.y); m_body1.m_position.x = (m_body1.m_position.x - (m_body1.m_invMass * _local11)); m_body1.m_position.y = (m_body1.m_position.y - (m_body1.m_invMass * _local12)); m_body1.m_rotation = (m_body1.m_rotation - (m_body1.m_invI * ((_local2 * _local12) - (_local3 * _local11)))); m_body2.m_position.x = (m_body2.m_position.x + (m_body2.m_invMass * _local11)); m_body2.m_position.y = (m_body2.m_position.y + (m_body2.m_invMass * _local12)); m_body2.m_rotation = (m_body2.m_rotation + (m_body2.m_invI * ((_local4 * _local12) - (_local5 * _local11)))); m_body1.m_R.Set(m_body1.m_rotation); m_body2.m_R.Set(m_body2.m_rotation); return ((b2Math.b2Abs(_local9) < b2Settings.b2_linearSlop)); } override public function PrepareVelocitySolver():void{ var _local1:b2Mat22; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local9:Number; var _local10:Number; _local1 = m_body1.m_R; _local2 = ((_local1.col1.x * m_localAnchor1.x) + (_local1.col2.x * m_localAnchor1.y)); _local3 = ((_local1.col1.y * m_localAnchor1.x) + (_local1.col2.y * m_localAnchor1.y)); _local1 = m_body2.m_R; _local4 = ((_local1.col1.x * m_localAnchor2.x) + (_local1.col2.x * m_localAnchor2.y)); _local5 = ((_local1.col1.y * m_localAnchor2.x) + (_local1.col2.y * m_localAnchor2.y)); m_u.x = (((m_body2.m_position.x + _local4) - m_body1.m_position.x) - _local2); m_u.y = (((m_body2.m_position.y + _local5) - m_body1.m_position.y) - _local3); var _local6:Number = Math.sqrt(((m_u.x * m_u.x) + (m_u.y * m_u.y))); if (_local6 > b2Settings.b2_linearSlop){ m_u.Multiply((1 / _local6)); } else { m_u.SetZero(); }; var _local7:Number = ((_local2 * m_u.y) - (_local3 * m_u.x)); var _local8:Number = ((_local4 * m_u.y) - (_local5 * m_u.x)); m_mass = (((m_body1.m_invMass + ((m_body1.m_invI * _local7) * _local7)) + m_body2.m_invMass) + ((m_body2.m_invI * _local8) * _local8)); m_mass = (1 / m_mass); if (b2World.s_enableWarmStarting){ _local9 = (m_impulse * m_u.x); _local10 = (m_impulse * m_u.y); m_body1.m_linearVelocity.x = (m_body1.m_linearVelocity.x - (m_body1.m_invMass * _local9)); m_body1.m_linearVelocity.y = (m_body1.m_linearVelocity.y - (m_body1.m_invMass * _local10)); m_body1.m_angularVelocity = (m_body1.m_angularVelocity - (m_body1.m_invI * ((_local2 * _local10) - (_local3 * _local9)))); m_body2.m_linearVelocity.x = (m_body2.m_linearVelocity.x + (m_body2.m_invMass * _local9)); m_body2.m_linearVelocity.y = (m_body2.m_linearVelocity.y + (m_body2.m_invMass * _local10)); m_body2.m_angularVelocity = (m_body2.m_angularVelocity + (m_body2.m_invI * ((_local4 * _local10) - (_local5 * _local9)))); } else { m_impulse = 0; }; } override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Mat22; _local2 = m_body1.m_R; var _local3:Number = ((_local2.col1.x * m_localAnchor1.x) + (_local2.col2.x * m_localAnchor1.y)); var _local4:Number = ((_local2.col1.y * m_localAnchor1.x) + (_local2.col2.y * m_localAnchor1.y)); _local2 = m_body2.m_R; var _local5:Number = ((_local2.col1.x * m_localAnchor2.x) + (_local2.col2.x * m_localAnchor2.y)); var _local6:Number = ((_local2.col1.y * m_localAnchor2.x) + (_local2.col2.y * m_localAnchor2.y)); var _local7:Number = (m_body1.m_linearVelocity.x + (-(m_body1.m_angularVelocity) * _local4)); var _local8:Number = (m_body1.m_linearVelocity.y + (m_body1.m_angularVelocity * _local3)); var _local9:Number = (m_body2.m_linearVelocity.x + (-(m_body2.m_angularVelocity) * _local6)); var _local10:Number = (m_body2.m_linearVelocity.y + (m_body2.m_angularVelocity * _local5)); var _local11:Number = ((m_u.x * (_local9 - _local7)) + (m_u.y * (_local10 - _local8))); var _local12:Number = (-(m_mass) * _local11); m_impulse = (m_impulse + _local12); var _local13:Number = (_local12 * m_u.x); var _local14:Number = (_local12 * m_u.y); m_body1.m_linearVelocity.x = (m_body1.m_linearVelocity.x - (m_body1.m_invMass * _local13)); m_body1.m_linearVelocity.y = (m_body1.m_linearVelocity.y - (m_body1.m_invMass * _local14)); m_body1.m_angularVelocity = (m_body1.m_angularVelocity - (m_body1.m_invI * ((_local3 * _local14) - (_local4 * _local13)))); m_body2.m_linearVelocity.x = (m_body2.m_linearVelocity.x + (m_body2.m_invMass * _local13)); m_body2.m_linearVelocity.y = (m_body2.m_linearVelocity.y + (m_body2.m_invMass * _local14)); m_body2.m_angularVelocity = (m_body2.m_angularVelocity + (m_body2.m_invI * ((_local5 * _local14) - (_local6 * _local13)))); } } }//package Box2D.Dynamics.Joints
Section 41
//b2DistanceJointDef (Box2D.Dynamics.Joints.b2DistanceJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; public class b2DistanceJointDef extends b2JointDef { public var anchorPoint1:b2Vec2; public var anchorPoint2:b2Vec2; public function b2DistanceJointDef(){ anchorPoint1 = new b2Vec2(); anchorPoint2 = new b2Vec2(); super(); type = b2Joint.e_distanceJoint; } } }//package Box2D.Dynamics.Joints
Section 42
//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_ground2:b2Body; public var m_groundAnchor1:b2Vec2; public var m_groundAnchor2:b2Vec2; public var m_revolute2:b2RevoluteJoint; public var m_localAnchor1:b2Vec2; public var m_localAnchor2:b2Vec2; public var m_ratio:Number; public var m_mass:Number; public var m_impulse:Number; public var m_prismatic2:b2PrismaticJoint; public var m_ground1:b2Body; public var m_revolute1:b2RevoluteJoint; public var m_prismatic1:b2PrismaticJoint; public var m_constant:Number; public var m_J:b2Jacobian; public function b2GearJoint(_arg1:b2GearJointDef){ var _local2:Number; var _local3:Number; m_groundAnchor1 = new b2Vec2(); m_groundAnchor2 = new b2Vec2(); m_localAnchor1 = new b2Vec2(); m_localAnchor2 = new b2Vec2(); m_J = new b2Jacobian(); super(_arg1); m_revolute1 = null; m_prismatic1 = null; m_revolute2 = null; m_prismatic2 = null; m_ground1 = _arg1.joint1.m_body1; m_body1 = _arg1.joint1.m_body2; if (_arg1.joint1.m_type == b2Joint.e_revoluteJoint){ m_revolute1 = (_arg1.joint1 as b2RevoluteJoint); m_groundAnchor1.SetV(m_revolute1.m_localAnchor1); m_localAnchor1.SetV(m_revolute1.m_localAnchor2); _local2 = m_revolute1.GetJointAngle(); } else { m_prismatic1 = (_arg1.joint1 as b2PrismaticJoint); m_groundAnchor1.SetV(m_prismatic1.m_localAnchor1); m_localAnchor1.SetV(m_prismatic1.m_localAnchor2); _local2 = m_prismatic1.GetJointTranslation(); }; m_ground2 = _arg1.joint2.m_body1; m_body2 = _arg1.joint2.m_body2; if (_arg1.joint2.m_type == b2Joint.e_revoluteJoint){ m_revolute2 = (_arg1.joint2 as b2RevoluteJoint); m_groundAnchor2.SetV(m_revolute2.m_localAnchor1); m_localAnchor2.SetV(m_revolute2.m_localAnchor2); _local3 = m_revolute2.GetJointAngle(); } else { m_prismatic2 = (_arg1.joint2 as b2PrismaticJoint); m_groundAnchor2.SetV(m_prismatic2.m_localAnchor1); m_localAnchor2.SetV(m_prismatic2.m_localAnchor2); _local3 = m_prismatic2.GetJointTranslation(); }; m_ratio = _arg1.ratio; m_constant = (_local2 + (m_ratio * _local3)); m_impulse = 0; } override public function GetAnchor1():b2Vec2{ var _local1:b2Mat22 = m_body1.m_R; return (new b2Vec2((m_body1.m_position.x + ((_local1.col1.x * m_localAnchor1.x) + (_local1.col2.x * m_localAnchor1.y))), (m_body1.m_position.y + ((_local1.col1.y * m_localAnchor1.x) + (_local1.col2.y * m_localAnchor1.y))))); } override public function GetAnchor2():b2Vec2{ var _local1:b2Mat22 = m_body2.m_R; return (new b2Vec2((m_body2.m_position.x + ((_local1.col1.x * m_localAnchor2.x) + (_local1.col2.x * m_localAnchor2.y))), (m_body2.m_position.y + ((_local1.col1.y * m_localAnchor2.x) + (_local1.col2.y * m_localAnchor2.y))))); } override public function PrepareVelocitySolver():void{ var _local3:b2Body; var _local4:b2Body; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:b2Mat22; var _local10:b2Vec2; var _local11:Number; var _local1:b2Body = m_ground1; var _local2:b2Body = m_ground2; _local3 = m_body1; _local4 = m_body2; var _local12:Number = 0; m_J.SetZero(); if (m_revolute1){ m_J.angular1 = -1; _local12 = (_local12 + _local3.m_invI); } else { _local9 = _local1.m_R; _local10 = m_prismatic1.m_localXAxis1; _local5 = ((_local9.col1.x * _local10.x) + (_local9.col2.x * _local10.y)); _local6 = ((_local9.col1.y * _local10.x) + (_local9.col2.y * _local10.y)); _local9 = _local3.m_R; _local7 = ((_local9.col1.x * m_localAnchor1.x) + (_local9.col2.x * m_localAnchor1.y)); _local8 = ((_local9.col1.y * m_localAnchor1.x) + (_local9.col2.y * m_localAnchor1.y)); _local11 = ((_local7 * _local6) - (_local8 * _local5)); m_J.linear1.Set(-(_local5), -(_local6)); m_J.angular1 = -(_local11); _local12 = (_local12 + (_local3.m_invMass + ((_local3.m_invI * _local11) * _local11))); }; if (m_revolute2){ m_J.angular2 = -(m_ratio); _local12 = (_local12 + ((m_ratio * m_ratio) * _local4.m_invI)); } else { _local9 = _local2.m_R; _local10 = m_prismatic2.m_localXAxis1; _local5 = ((_local9.col1.x * _local10.x) + (_local9.col2.x * _local10.y)); _local6 = ((_local9.col1.y * _local10.x) + (_local9.col2.y * _local10.y)); _local9 = _local4.m_R; _local7 = ((_local9.col1.x * m_localAnchor2.x) + (_local9.col2.x * m_localAnchor2.y)); _local8 = ((_local9.col1.y * m_localAnchor2.x) + (_local9.col2.y * m_localAnchor2.y)); _local11 = ((_local7 * _local6) - (_local8 * _local5)); m_J.linear2.Set((-(m_ratio) * _local5), (-(m_ratio) * _local6)); m_J.angular2 = (-(m_ratio) * _local11); _local12 = (_local12 + ((m_ratio * m_ratio) * (_local4.m_invMass + ((_local4.m_invI * _local11) * _local11)))); }; m_mass = (1 / _local12); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local3.m_invMass * m_impulse) * m_J.linear1.x)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local3.m_invMass * m_impulse) * m_J.linear1.y)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local3.m_invI * m_impulse) * m_J.angular1)); _local4.m_linearVelocity.x = (_local4.m_linearVelocity.x + ((_local4.m_invMass * m_impulse) * m_J.linear2.x)); _local4.m_linearVelocity.y = (_local4.m_linearVelocity.y + ((_local4.m_invMass * m_impulse) * m_J.linear2.y)); _local4.m_angularVelocity = (_local4.m_angularVelocity + ((_local4.m_invI * m_impulse) * m_J.angular2)); } override public function GetReactionTorque(_arg1:Number):Number{ return (0); } override public function GetReactionForce(_arg1:Number):b2Vec2{ return (new b2Vec2()); } override public function SolvePositionConstraints():Boolean{ var _local4:Number; var _local5:Number; var _local1:Number = 0; var _local2:b2Body = m_body1; var _local3:b2Body = m_body2; if (m_revolute1){ _local4 = m_revolute1.GetJointAngle(); } else { _local4 = m_prismatic1.GetJointTranslation(); }; if (m_revolute2){ _local5 = m_revolute2.GetJointAngle(); } else { _local5 = m_prismatic2.GetJointTranslation(); }; var _local6:Number = (m_constant - (_local4 + (m_ratio * _local5))); var _local7:Number = (-(m_mass) * _local6); _local2.m_position.x = (_local2.m_position.x + ((_local2.m_invMass * _local7) * m_J.linear1.x)); _local2.m_position.y = (_local2.m_position.y + ((_local2.m_invMass * _local7) * m_J.linear1.y)); _local2.m_rotation = (_local2.m_rotation + ((_local2.m_invI * _local7) * m_J.angular1)); _local3.m_position.x = (_local3.m_position.x + ((_local3.m_invMass * _local7) * m_J.linear2.x)); _local3.m_position.y = (_local3.m_position.y + ((_local3.m_invMass * _local7) * m_J.linear2.y)); _local3.m_rotation = (_local3.m_rotation + ((_local3.m_invI * _local7) * m_J.angular2)); _local2.m_R.Set(_local2.m_rotation); _local3.m_R.Set(_local3.m_rotation); return ((_local1 < b2Settings.b2_linearSlop)); } public function GetRatio():Number{ return (m_ratio); } override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body = m_body1; var _local3:b2Body = m_body2; var _local4:Number = m_J.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity); var _local5:Number = (-(m_mass) * _local4); m_impulse = (m_impulse + _local5); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local2.m_invMass * _local5) * m_J.linear1.x)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local2.m_invMass * _local5) * m_J.linear1.y)); _local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local2.m_invI * _local5) * m_J.angular1)); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local3.m_invMass * _local5) * m_J.linear2.x)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local3.m_invMass * _local5) * m_J.linear2.y)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local3.m_invI * _local5) * m_J.angular2)); } } }//package Box2D.Dynamics.Joints
Section 43
//b2GearJointDef (Box2D.Dynamics.Joints.b2GearJointDef) package Box2D.Dynamics.Joints { public class b2GearJointDef extends b2JointDef { public var joint1:b2Joint; public var joint2:b2Joint; public var ratio:Number; public function b2GearJointDef(){ type = b2Joint.e_gearJoint; joint1 = null; joint2 = null; ratio = 1; } } }//package Box2D.Dynamics.Joints
Section 44
//b2Jacobian (Box2D.Dynamics.Joints.b2Jacobian) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; public class b2Jacobian { public var linear1:b2Vec2; public var linear2:b2Vec2; public var angular1:Number; public var angular2:Number; public function b2Jacobian(){ linear1 = new b2Vec2(); linear2 = new b2Vec2(); super(); } public function Set(_arg1:b2Vec2, _arg2:Number, _arg3:b2Vec2, _arg4:Number):void{ linear1.SetV(_arg1); angular1 = _arg2; linear2.SetV(_arg3); angular2 = _arg4; } public function SetZero():void{ linear1.SetZero(); angular1 = 0; linear2.SetZero(); angular2 = 0; } public function Compute(_arg1:b2Vec2, _arg2:Number, _arg3:b2Vec2, _arg4:Number):Number{ return ((((((linear1.x * _arg1.x) + (linear1.y * _arg1.y)) + (angular1 * _arg2)) + ((linear2.x * _arg3.x) + (linear2.y * _arg3.y))) + (angular2 * _arg4))); } } }//package Box2D.Dynamics.Joints
Section 45
//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_collideConnected:Boolean; public var m_prev:b2Joint; public var m_next:b2Joint; public var m_type:int; public var m_node1:b2JointNode; public var m_node2:b2JointNode; public var m_userData; public var m_body1:b2Body; public var m_body2:b2Body; public static const e_unknownJoint:int = 0; public static const e_inactiveLimit:int = 0; public static const e_atUpperLimit:int = 2; public static const e_atLowerLimit:int = 1; public static const e_gearJoint:int = 6; public static const e_revoluteJoint:int = 1; public static const e_equalLimits:int = 3; public static const e_distanceJoint:int = 3; public static const e_pulleyJoint:int = 4; public static const e_prismaticJoint:int = 2; public static const e_mouseJoint:int = 5; public function b2Joint(_arg1:b2JointDef){ m_node1 = new b2JointNode(); m_node2 = new b2JointNode(); super(); m_type = _arg1.type; m_prev = null; m_next = null; m_body1 = _arg1.body1; m_body2 = _arg1.body2; m_collideConnected = _arg1.collideConnected; m_islandFlag = false; m_userData = _arg1.userData; } public function GetAnchor1():b2Vec2{ return (null); } public function GetAnchor2():b2Vec2{ return (null); } public function GetNext():b2Joint{ return (m_next); } public function GetType():int{ return (m_type); } public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ } public function PrepareVelocitySolver():void{ } public function PreparePositionSolver():void{ } public function GetReactionTorque(_arg1:Number):Number{ return (0); } public function GetUserData(){ return (m_userData); } public function GetReactionForce(_arg1:Number):b2Vec2{ return (null); } public function SolvePositionConstraints():Boolean{ return (false); } public function GetBody1():b2Body{ return (m_body1); } public function GetBody2():b2Body{ return (m_body2); } public static function Destroy(_arg1:b2Joint, _arg2):void{ } public static function Create(_arg1:b2JointDef, _arg2):b2Joint{ var _local3:b2Joint; switch (_arg1.type){ case e_distanceJoint: _local3 = new b2DistanceJoint((_arg1 as b2DistanceJointDef)); break; case e_mouseJoint: _local3 = new b2MouseJoint((_arg1 as b2MouseJointDef)); break; case e_prismaticJoint: _local3 = new b2PrismaticJoint((_arg1 as b2PrismaticJointDef)); break; case e_revoluteJoint: _local3 = new b2RevoluteJoint((_arg1 as b2RevoluteJointDef)); break; case e_pulleyJoint: _local3 = new b2PulleyJoint((_arg1 as b2PulleyJointDef)); break; case e_gearJoint: _local3 = new b2GearJoint((_arg1 as b2GearJointDef)); break; default: break; }; return (_local3); } } }//package Box2D.Dynamics.Joints
Section 46
//b2JointDef (Box2D.Dynamics.Joints.b2JointDef) package Box2D.Dynamics.Joints { import Box2D.Dynamics.*; public class b2JointDef { public var body2:b2Body; public var type:int; public var userData; public var collideConnected:Boolean; public var body1:b2Body; public function b2JointDef(){ type = b2Joint.e_unknownJoint; userData = null; body1 = null; body2 = null; collideConnected = false; } } }//package Box2D.Dynamics.Joints
Section 47
//b2JointNode (Box2D.Dynamics.Joints.b2JointNode) package Box2D.Dynamics.Joints { import Box2D.Dynamics.*; public class b2JointNode { public var other:b2Body; public var next:b2JointNode; public var prev:b2JointNode; public var joint:b2Joint; } }//package Box2D.Dynamics.Joints
Section 48
//b2MouseJoint (Box2D.Dynamics.Joints.b2MouseJoint) package Box2D.Dynamics.Joints { import Box2D.Dynamics.*; import Box2D.Common.Math.*; import Box2D.Common.*; public class b2MouseJoint extends b2Joint { private var K1:b2Mat22; public var m_beta:Number; private var K:b2Mat22; private var K2:b2Mat22; public var m_target:b2Vec2; public var m_gamma:Number; public var m_impulse:b2Vec2; public var m_ptpMass:b2Mat22; public var m_C:b2Vec2; public var m_maxForce:Number; public var m_localAnchor:b2Vec2; public function b2MouseJoint(_arg1:b2MouseJointDef){ var _local3:Number; K = new b2Mat22(); K1 = new b2Mat22(); K2 = new b2Mat22(); m_localAnchor = new b2Vec2(); m_target = new b2Vec2(); m_impulse = new b2Vec2(); m_ptpMass = new b2Mat22(); m_C = new b2Vec2(); super(_arg1); m_target.SetV(_arg1.target); var _local2:Number = (m_target.x - m_body2.m_position.x); _local3 = (m_target.y - m_body2.m_position.y); m_localAnchor.x = ((_local2 * m_body2.m_R.col1.x) + (_local3 * m_body2.m_R.col1.y)); m_localAnchor.y = ((_local2 * m_body2.m_R.col2.x) + (_local3 * m_body2.m_R.col2.y)); m_maxForce = _arg1.maxForce; m_impulse.SetZero(); var _local4:Number = m_body2.m_mass; var _local5:Number = ((2 * b2Settings.b2_pi) * _arg1.frequencyHz); var _local6:Number = (((2 * _local4) * _arg1.dampingRatio) * _local5); var _local7:Number = ((_local4 * _local5) * _local5); m_gamma = (1 / (_local6 + (_arg1.timeStep * _local7))); m_beta = ((_arg1.timeStep * _local7) / (_local6 + (_arg1.timeStep * _local7))); } public function SetTarget(_arg1:b2Vec2):void{ m_body2.WakeUp(); m_target = _arg1; } override public function GetAnchor2():b2Vec2{ var _local1:b2Vec2 = b2Math.b2MulMV(m_body2.m_R, m_localAnchor); _local1.Add(m_body2.m_position); return (_local1); } override public function GetAnchor1():b2Vec2{ return (m_target); } override public function PrepareVelocitySolver():void{ var _local1:b2Body; var _local2:b2Mat22; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; _local1 = m_body2; _local2 = _local1.m_R; _local3 = ((_local2.col1.x * m_localAnchor.x) + (_local2.col2.x * m_localAnchor.y)); _local4 = ((_local2.col1.y * m_localAnchor.x) + (_local2.col2.y * m_localAnchor.y)); _local5 = _local1.m_invMass; _local6 = _local1.m_invI; K1.col1.x = _local5; K1.col2.x = 0; K1.col1.y = 0; K1.col2.y = _local5; K2.col1.x = ((_local6 * _local4) * _local4); K2.col2.x = ((-(_local6) * _local3) * _local4); K2.col1.y = ((-(_local6) * _local3) * _local4); K2.col2.y = ((_local6 * _local3) * _local3); K.SetM(K1); K.AddM(K2); K.col1.x = (K.col1.x + m_gamma); K.col2.y = (K.col2.y + m_gamma); K.Invert(m_ptpMass); m_C.x = ((_local1.m_position.x + _local3) - m_target.x); m_C.y = ((_local1.m_position.y + _local4) - m_target.y); _local1.m_angularVelocity = (_local1.m_angularVelocity * 0.98); var _local7:Number = m_impulse.x; var _local8:Number = m_impulse.y; _local1.m_linearVelocity.x = (_local1.m_linearVelocity.x + (_local5 * _local7)); _local1.m_linearVelocity.y = (_local1.m_linearVelocity.y + (_local5 * _local8)); _local1.m_angularVelocity = (_local1.m_angularVelocity + (_local6 * ((_local3 * _local8) - (_local4 * _local7)))); } override public function GetReactionTorque(_arg1:Number):Number{ return (0); } override public function GetReactionForce(_arg1:Number):b2Vec2{ var _local2:b2Vec2 = new b2Vec2(); _local2.SetV(m_impulse); _local2.Multiply(_arg1); return (_local2); } override public function SolvePositionConstraints():Boolean{ return (true); } override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local3:b2Mat22; var _local2:b2Body = m_body2; _local3 = _local2.m_R; var _local4:Number = ((_local3.col1.x * m_localAnchor.x) + (_local3.col2.x * m_localAnchor.y)); var _local5:Number = ((_local3.col1.y * m_localAnchor.x) + (_local3.col2.y * m_localAnchor.y)); var _local6:Number = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local5)); var _local7:Number = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local4)); _local3 = m_ptpMass; var _local8:Number = ((_local6 + ((m_beta * _arg1.inv_dt) * m_C.x)) + (m_gamma * m_impulse.x)); var _local9:Number = ((_local7 + ((m_beta * _arg1.inv_dt) * m_C.y)) + (m_gamma * m_impulse.y)); var _local10:Number = -(((_local3.col1.x * _local8) + (_local3.col2.x * _local9))); var _local11:Number = -(((_local3.col1.y * _local8) + (_local3.col2.y * _local9))); var _local12:Number = m_impulse.x; var _local13:Number = m_impulse.y; m_impulse.x = (m_impulse.x + _local10); m_impulse.y = (m_impulse.y + _local11); var _local14:Number = m_impulse.Length(); if (_local14 > (_arg1.dt * m_maxForce)){ m_impulse.Multiply(((_arg1.dt * m_maxForce) / _local14)); }; _local10 = (m_impulse.x - _local12); _local11 = (m_impulse.y - _local13); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local10)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local11)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local4 * _local11) - (_local5 * _local10)))); } } }//package Box2D.Dynamics.Joints
Section 49
//b2MouseJointDef (Box2D.Dynamics.Joints.b2MouseJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; public class b2MouseJointDef extends b2JointDef { public var timeStep:Number; public var target:b2Vec2; public var maxForce:Number; public var dampingRatio:Number; public var frequencyHz:Number; public function b2MouseJointDef(){ target = new b2Vec2(); super(); type = b2Joint.e_mouseJoint; maxForce = 0; frequencyHz = 5; dampingRatio = 0.7; timeStep = (1 / 60); } } }//package Box2D.Dynamics.Joints
Section 50
//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_initialAngle:Number; public var m_localXAxis1:b2Vec2; public var m_lowerTranslation:Number; public var m_angularMass:Number; public var m_enableLimit:Boolean; public var m_maxMotorForce:Number; public var m_limitState:int; public var m_localYAxis1:b2Vec2; public var m_motorMass:Number; public var m_linearImpulse:Number; public var m_upperTranslation:Number; public var m_localAnchor1:b2Vec2; public var m_localAnchor2:b2Vec2; public var m_angularImpulse:Number; public var m_linearMass:Number; public var m_motorImpulse:Number; public var m_limitImpulse:Number; public var m_motorJacobian:b2Jacobian; public var m_limitPositionImpulse:Number; public var m_motorSpeed:Number; public var m_enableMotor:Boolean; public var m_linearJacobian:b2Jacobian; public function b2PrismaticJoint(_arg1:b2PrismaticJointDef){ var _local2:b2Mat22; var _local3:Number; var _local4:Number; m_localAnchor1 = new b2Vec2(); m_localAnchor2 = new b2Vec2(); m_localXAxis1 = new b2Vec2(); m_localYAxis1 = new b2Vec2(); m_linearJacobian = new b2Jacobian(); m_motorJacobian = new b2Jacobian(); super(_arg1); _local2 = m_body1.m_R; _local3 = (_arg1.anchorPoint.x - m_body1.m_position.x); _local4 = (_arg1.anchorPoint.y - m_body1.m_position.y); m_localAnchor1.Set(((_local3 * _local2.col1.x) + (_local4 * _local2.col1.y)), ((_local3 * _local2.col2.x) + (_local4 * _local2.col2.y))); _local2 = m_body2.m_R; _local3 = (_arg1.anchorPoint.x - m_body2.m_position.x); _local4 = (_arg1.anchorPoint.y - m_body2.m_position.y); m_localAnchor2.Set(((_local3 * _local2.col1.x) + (_local4 * _local2.col1.y)), ((_local3 * _local2.col2.x) + (_local4 * _local2.col2.y))); _local2 = m_body1.m_R; _local3 = _arg1.axis.x; _local4 = _arg1.axis.y; m_localXAxis1.Set(((_local3 * _local2.col1.x) + (_local4 * _local2.col1.y)), ((_local3 * _local2.col2.x) + (_local4 * _local2.col2.y))); m_localYAxis1.x = -(m_localXAxis1.y); m_localYAxis1.y = m_localXAxis1.x; m_initialAngle = (m_body2.m_rotation - m_body1.m_rotation); m_linearJacobian.SetZero(); m_linearMass = 0; m_linearImpulse = 0; m_angularMass = 0; m_angularImpulse = 0; m_motorJacobian.SetZero(); m_motorMass = 0; m_motorImpulse = 0; m_limitImpulse = 0; m_limitPositionImpulse = 0; m_lowerTranslation = _arg1.lowerTranslation; m_upperTranslation = _arg1.upperTranslation; m_maxMotorForce = _arg1.motorForce; m_motorSpeed = _arg1.motorSpeed; m_enableLimit = _arg1.enableLimit; m_enableMotor = _arg1.enableMotor; } override public function GetAnchor1():b2Vec2{ var _local1:b2Body = m_body1; var _local2:b2Vec2 = new b2Vec2(); _local2.SetV(m_localAnchor1); _local2.MulM(_local1.m_R); _local2.Add(_local1.m_position); return (_local2); } override public function GetAnchor2():b2Vec2{ var _local1:b2Body = m_body2; var _local2:b2Vec2 = new b2Vec2(); _local2.SetV(m_localAnchor2); _local2.MulM(_local1.m_R); _local2.Add(_local1.m_position); return (_local2); } override public function PrepareVelocitySolver():void{ var _local3:b2Mat22; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; var _local1:b2Body = m_body1; var _local2:b2Body = m_body2; _local3 = _local1.m_R; var _local4:Number = ((_local3.col1.x * m_localAnchor1.x) + (_local3.col2.x * m_localAnchor1.y)); var _local5:Number = ((_local3.col1.y * m_localAnchor1.x) + (_local3.col2.y * m_localAnchor1.y)); _local3 = _local2.m_R; var _local6:Number = ((_local3.col1.x * m_localAnchor2.x) + (_local3.col2.x * m_localAnchor2.y)); var _local7:Number = ((_local3.col1.y * m_localAnchor2.x) + (_local3.col2.y * m_localAnchor2.y)); var _local8:Number = _local1.m_invMass; var _local9:Number = _local2.m_invMass; var _local10:Number = _local1.m_invI; var _local11:Number = _local2.m_invI; _local3 = _local1.m_R; var _local12:Number = ((_local3.col1.x * m_localYAxis1.x) + (_local3.col2.x * m_localYAxis1.y)); var _local13:Number = ((_local3.col1.y * m_localYAxis1.x) + (_local3.col2.y * m_localYAxis1.y)); var _local14:Number = ((_local2.m_position.x + _local6) - _local1.m_position.x); var _local15:Number = ((_local2.m_position.y + _local7) - _local1.m_position.y); m_linearJacobian.linear1.x = -(_local12); m_linearJacobian.linear1.y = -(_local13); m_linearJacobian.linear2.x = _local12; m_linearJacobian.linear2.y = _local13; m_linearJacobian.angular1 = -(((_local14 * _local13) - (_local15 * _local12))); m_linearJacobian.angular2 = ((_local6 * _local13) - (_local7 * _local12)); m_linearMass = (((_local8 + ((_local10 * m_linearJacobian.angular1) * m_linearJacobian.angular1)) + _local9) + ((_local11 * m_linearJacobian.angular2) * m_linearJacobian.angular2)); m_linearMass = (1 / m_linearMass); m_angularMass = (1 / (_local10 + _local11)); if (((m_enableLimit) || (m_enableMotor))){ _local3 = _local1.m_R; _local16 = ((_local3.col1.x * m_localXAxis1.x) + (_local3.col2.x * m_localXAxis1.y)); _local17 = ((_local3.col1.y * m_localXAxis1.x) + (_local3.col2.y * m_localXAxis1.y)); m_motorJacobian.linear1.x = -(_local16); m_motorJacobian.linear1.y = -(_local17); m_motorJacobian.linear2.x = _local16; m_motorJacobian.linear2.y = _local17; m_motorJacobian.angular1 = -(((_local14 * _local17) - (_local15 * _local16))); m_motorJacobian.angular2 = ((_local6 * _local17) - (_local7 * _local16)); m_motorMass = (((_local8 + ((_local10 * m_motorJacobian.angular1) * m_motorJacobian.angular1)) + _local9) + ((_local11 * m_motorJacobian.angular2) * m_motorJacobian.angular2)); m_motorMass = (1 / m_motorMass); if (m_enableLimit){ _local18 = (_local14 - _local4); _local19 = (_local15 - _local5); _local20 = ((_local16 * _local18) + (_local17 * _local19)); if (b2Math.b2Abs((m_upperTranslation - m_lowerTranslation)) < (2 * b2Settings.b2_linearSlop)){ m_limitState = e_equalLimits; } else { if (_local20 <= m_lowerTranslation){ if (m_limitState != e_atLowerLimit){ m_limitImpulse = 0; }; m_limitState = e_atLowerLimit; } else { if (_local20 >= m_upperTranslation){ if (m_limitState != e_atUpperLimit){ m_limitImpulse = 0; }; m_limitState = e_atUpperLimit; } else { m_limitState = e_inactiveLimit; m_limitImpulse = 0; }; }; }; }; }; if (m_enableMotor == false){ m_motorImpulse = 0; }; if (m_enableLimit == false){ m_limitImpulse = 0; }; if (b2World.s_enableWarmStarting){ _local21 = ((m_linearImpulse * m_linearJacobian.linear1.x) + ((m_motorImpulse + m_limitImpulse) * m_motorJacobian.linear1.x)); _local22 = ((m_linearImpulse * m_linearJacobian.linear1.y) + ((m_motorImpulse + m_limitImpulse) * m_motorJacobian.linear1.y)); _local23 = ((m_linearImpulse * m_linearJacobian.linear2.x) + ((m_motorImpulse + m_limitImpulse) * m_motorJacobian.linear2.x)); _local24 = ((m_linearImpulse * m_linearJacobian.linear2.y) + ((m_motorImpulse + m_limitImpulse) * m_motorJacobian.linear2.y)); _local25 = (((m_linearImpulse * m_linearJacobian.angular1) - m_angularImpulse) + ((m_motorImpulse + m_limitImpulse) * m_motorJacobian.angular1)); _local26 = (((m_linearImpulse * m_linearJacobian.angular2) + m_angularImpulse) + ((m_motorImpulse + m_limitImpulse) * m_motorJacobian.angular2)); _local1.m_linearVelocity.x = (_local1.m_linearVelocity.x + (_local8 * _local21)); _local1.m_linearVelocity.y = (_local1.m_linearVelocity.y + (_local8 * _local22)); _local1.m_angularVelocity = (_local1.m_angularVelocity + (_local10 * _local25)); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local9 * _local23)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local9 * _local24)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local11 * _local26)); } else { m_linearImpulse = 0; m_angularImpulse = 0; m_limitImpulse = 0; m_motorImpulse = 0; }; m_limitPositionImpulse = 0; } public function GetJointTranslation():Number{ var _local3:b2Mat22; var _local1:b2Body = m_body1; var _local2:b2Body = m_body2; _local3 = _local1.m_R; var _local4:Number = ((_local3.col1.x * m_localAnchor1.x) + (_local3.col2.x * m_localAnchor1.y)); var _local5:Number = ((_local3.col1.y * m_localAnchor1.x) + (_local3.col2.y * m_localAnchor1.y)); _local3 = _local2.m_R; var _local6:Number = ((_local3.col1.x * m_localAnchor2.x) + (_local3.col2.x * m_localAnchor2.y)); var _local7:Number = ((_local3.col1.y * m_localAnchor2.x) + (_local3.col2.y * m_localAnchor2.y)); var _local8:Number = (_local1.m_position.x + _local4); var _local9:Number = (_local1.m_position.y + _local5); var _local10:Number = (_local2.m_position.x + _local6); var _local11:Number = (_local2.m_position.y + _local7); var _local12:Number = (_local10 - _local8); var _local13:Number = (_local11 - _local9); _local3 = _local1.m_R; var _local14:Number = ((_local3.col1.x * m_localXAxis1.x) + (_local3.col2.x * m_localXAxis1.y)); var _local15:Number = ((_local3.col1.y * m_localXAxis1.x) + (_local3.col2.y * m_localXAxis1.y)); var _local16:Number = ((_local14 * _local12) + (_local15 * _local13)); return (_local16); } override public function GetReactionForce(_arg1:Number):b2Vec2{ var _local3:b2Mat22; var _local2:Number = (_arg1 * m_limitImpulse); _local3 = m_body1.m_R; var _local4:Number = (_local2 * ((_local3.col1.x * m_localXAxis1.x) + (_local3.col2.x * m_localXAxis1.y))); var _local5:Number = (_local2 * ((_local3.col1.y * m_localXAxis1.x) + (_local3.col2.y * m_localXAxis1.y))); var _local6:Number = (_local2 * ((_local3.col1.x * m_localYAxis1.x) + (_local3.col2.x * m_localYAxis1.y))); var _local7:Number = (_local2 * ((_local3.col1.y * m_localYAxis1.x) + (_local3.col2.y * m_localYAxis1.y))); return (new b2Vec2((_local4 + _local6), (_local5 + _local7))); } override public function SolvePositionConstraints():Boolean{ var _local1:Number; var _local2:Number; var _local9:b2Mat22; var _local28:Number; var _local29:Number; var _local30:Number; var _local31:Number; var _local3:b2Body = m_body1; var _local4:b2Body = m_body2; var _local5:Number = _local3.m_invMass; var _local6:Number = _local4.m_invMass; var _local7:Number = _local3.m_invI; var _local8:Number = _local4.m_invI; _local9 = _local3.m_R; var _local10:Number = ((_local9.col1.x * m_localAnchor1.x) + (_local9.col2.x * m_localAnchor1.y)); var _local11:Number = ((_local9.col1.y * m_localAnchor1.x) + (_local9.col2.y * m_localAnchor1.y)); _local9 = _local4.m_R; var _local12:Number = ((_local9.col1.x * m_localAnchor2.x) + (_local9.col2.x * m_localAnchor2.y)); var _local13:Number = ((_local9.col1.y * m_localAnchor2.x) + (_local9.col2.y * m_localAnchor2.y)); var _local14:Number = (_local3.m_position.x + _local10); var _local15:Number = (_local3.m_position.y + _local11); var _local16:Number = (_local4.m_position.x + _local12); var _local17:Number = (_local4.m_position.y + _local13); var _local18:Number = (_local16 - _local14); var _local19:Number = (_local17 - _local15); _local9 = _local3.m_R; var _local20:Number = ((_local9.col1.x * m_localYAxis1.x) + (_local9.col2.x * m_localYAxis1.y)); var _local21:Number = ((_local9.col1.y * m_localYAxis1.x) + (_local9.col2.y * m_localYAxis1.y)); var _local22:Number = ((_local20 * _local18) + (_local21 * _local19)); _local22 = b2Math.b2Clamp(_local22, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection); var _local23:Number = (-(m_linearMass) * _local22); _local3.m_position.x = (_local3.m_position.x + ((_local5 * _local23) * m_linearJacobian.linear1.x)); _local3.m_position.y = (_local3.m_position.y + ((_local5 * _local23) * m_linearJacobian.linear1.y)); _local3.m_rotation = (_local3.m_rotation + ((_local7 * _local23) * m_linearJacobian.angular1)); _local4.m_position.x = (_local4.m_position.x + ((_local6 * _local23) * m_linearJacobian.linear2.x)); _local4.m_position.y = (_local4.m_position.y + ((_local6 * _local23) * m_linearJacobian.linear2.y)); _local4.m_rotation = (_local4.m_rotation + ((_local8 * _local23) * m_linearJacobian.angular2)); var _local24:Number = b2Math.b2Abs(_local22); var _local25:Number = ((_local4.m_rotation - _local3.m_rotation) - m_initialAngle); _local25 = b2Math.b2Clamp(_local25, -(b2Settings.b2_maxAngularCorrection), b2Settings.b2_maxAngularCorrection); var _local26:Number = (-(m_angularMass) * _local25); _local3.m_rotation = (_local3.m_rotation - (_local3.m_invI * _local26)); _local3.m_R.Set(_local3.m_rotation); _local4.m_rotation = (_local4.m_rotation + (_local4.m_invI * _local26)); _local4.m_R.Set(_local4.m_rotation); var _local27:Number = b2Math.b2Abs(_local25); if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){ _local9 = _local3.m_R; _local10 = ((_local9.col1.x * m_localAnchor1.x) + (_local9.col2.x * m_localAnchor1.y)); _local11 = ((_local9.col1.y * m_localAnchor1.x) + (_local9.col2.y * m_localAnchor1.y)); _local9 = _local4.m_R; _local12 = ((_local9.col1.x * m_localAnchor2.x) + (_local9.col2.x * m_localAnchor2.y)); _local13 = ((_local9.col1.y * m_localAnchor2.x) + (_local9.col2.y * m_localAnchor2.y)); _local14 = (_local3.m_position.x + _local10); _local15 = (_local3.m_position.y + _local11); _local16 = (_local4.m_position.x + _local12); _local17 = (_local4.m_position.y + _local13); _local18 = (_local16 - _local14); _local19 = (_local17 - _local15); _local9 = _local3.m_R; _local28 = ((_local9.col1.x * m_localXAxis1.x) + (_local9.col2.x * m_localXAxis1.y)); _local29 = ((_local9.col1.y * m_localXAxis1.x) + (_local9.col2.y * m_localXAxis1.y)); _local30 = ((_local28 * _local18) + (_local29 * _local19)); _local31 = 0; if (m_limitState == e_equalLimits){ _local1 = b2Math.b2Clamp(_local30, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection); _local31 = (-(m_motorMass) * _local1); _local24 = b2Math.b2Max(_local24, b2Math.b2Abs(_local25)); } else { if (m_limitState == e_atLowerLimit){ _local1 = (_local30 - m_lowerTranslation); _local24 = b2Math.b2Max(_local24, -(_local1)); _local1 = b2Math.b2Clamp((_local1 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0); _local31 = (-(m_motorMass) * _local1); _local2 = m_limitPositionImpulse; m_limitPositionImpulse = b2Math.b2Max((m_limitPositionImpulse + _local31), 0); _local31 = (m_limitPositionImpulse - _local2); } else { if (m_limitState == e_atUpperLimit){ _local1 = (_local30 - m_upperTranslation); _local24 = b2Math.b2Max(_local24, _local1); _local1 = b2Math.b2Clamp((_local1 - b2Settings.b2_linearSlop), 0, b2Settings.b2_maxLinearCorrection); _local31 = (-(m_motorMass) * _local1); _local2 = m_limitPositionImpulse; m_limitPositionImpulse = b2Math.b2Min((m_limitPositionImpulse + _local31), 0); _local31 = (m_limitPositionImpulse - _local2); }; }; }; _local3.m_position.x = (_local3.m_position.x + ((_local5 * _local31) * m_motorJacobian.linear1.x)); _local3.m_position.y = (_local3.m_position.y + ((_local5 * _local31) * m_motorJacobian.linear1.y)); _local3.m_rotation = (_local3.m_rotation + ((_local7 * _local31) * m_motorJacobian.angular1)); _local3.m_R.Set(_local3.m_rotation); _local4.m_position.x = (_local4.m_position.x + ((_local6 * _local31) * m_motorJacobian.linear2.x)); _local4.m_position.y = (_local4.m_position.y + ((_local6 * _local31) * m_motorJacobian.linear2.y)); _local4.m_rotation = (_local4.m_rotation + ((_local8 * _local31) * m_motorJacobian.angular2)); _local4.m_R.Set(_local4.m_rotation); }; return ((((_local24 <= b2Settings.b2_linearSlop)) && ((_local27 <= b2Settings.b2_angularSlop)))); } public function SetMotorSpeed(_arg1:Number):void{ m_motorSpeed = _arg1; } public function GetJointSpeed():Number{ var _local3:b2Mat22; var _local1:b2Body = m_body1; var _local2:b2Body = m_body2; _local3 = _local1.m_R; var _local4:Number = ((_local3.col1.x * m_localAnchor1.x) + (_local3.col2.x * m_localAnchor1.y)); var _local5:Number = ((_local3.col1.y * m_localAnchor1.x) + (_local3.col2.y * m_localAnchor1.y)); _local3 = _local2.m_R; var _local6:Number = ((_local3.col1.x * m_localAnchor2.x) + (_local3.col2.x * m_localAnchor2.y)); var _local7:Number = ((_local3.col1.y * m_localAnchor2.x) + (_local3.col2.y * m_localAnchor2.y)); var _local8:Number = (_local1.m_position.x + _local4); var _local9:Number = (_local1.m_position.y + _local5); var _local10:Number = (_local2.m_position.x + _local6); var _local11:Number = (_local2.m_position.y + _local7); var _local12:Number = (_local10 - _local8); var _local13:Number = (_local11 - _local9); _local3 = _local1.m_R; var _local14:Number = ((_local3.col1.x * m_localXAxis1.x) + (_local3.col2.x * m_localXAxis1.y)); var _local15:Number = ((_local3.col1.y * m_localXAxis1.x) + (_local3.col2.y * m_localXAxis1.y)); var _local16:b2Vec2 = _local1.m_linearVelocity; var _local17:b2Vec2 = _local2.m_linearVelocity; var _local18:Number = _local1.m_angularVelocity; var _local19:Number = _local2.m_angularVelocity; var _local20:Number = (((_local12 * (-(_local18) * _local15)) + (_local13 * (_local18 * _local14))) + ((_local14 * (((_local17.x + (-(_local19) * _local7)) - _local16.x) - (-(_local18) * _local5))) + (_local15 * (((_local17.y + (_local19 * _local6)) - _local16.y) - (_local18 * _local4))))); return (_local20); } public function GetMotorForce(_arg1:Number):Number{ return ((_arg1 * m_motorImpulse)); } public function SetMotorForce(_arg1:Number):void{ m_maxMotorForce = _arg1; } override public function GetReactionTorque(_arg1:Number):Number{ return ((_arg1 * m_angularImpulse)); } override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local8:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local2:b2Body = m_body1; var _local3:b2Body = m_body2; var _local4:Number = _local2.m_invMass; var _local5:Number = _local3.m_invMass; var _local6:Number = _local2.m_invI; var _local7:Number = _local3.m_invI; var _local9:Number = m_linearJacobian.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity); var _local10:Number = (-(m_linearMass) * _local9); m_linearImpulse = (m_linearImpulse + _local10); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local4 * _local10) * m_linearJacobian.linear1.x)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local4 * _local10) * m_linearJacobian.linear1.y)); _local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local6 * _local10) * m_linearJacobian.angular1)); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local5 * _local10) * m_linearJacobian.linear2.x)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local5 * _local10) * m_linearJacobian.linear2.y)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local7 * _local10) * m_linearJacobian.angular2)); var _local11:Number = (_local3.m_angularVelocity - _local2.m_angularVelocity); var _local12:Number = (-(m_angularMass) * _local11); m_angularImpulse = (m_angularImpulse + _local12); _local2.m_angularVelocity = (_local2.m_angularVelocity - (_local6 * _local12)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local7 * _local12)); if (((m_enableMotor) && (!((m_limitState == e_equalLimits))))){ _local13 = (m_motorJacobian.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity) - m_motorSpeed); _local14 = (-(m_motorMass) * _local13); _local15 = m_motorImpulse; m_motorImpulse = b2Math.b2Clamp((m_motorImpulse + _local14), (-(_arg1.dt) * m_maxMotorForce), (_arg1.dt * m_maxMotorForce)); _local14 = (m_motorImpulse - _local15); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local4 * _local14) * m_motorJacobian.linear1.x)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local4 * _local14) * m_motorJacobian.linear1.y)); _local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local6 * _local14) * m_motorJacobian.angular1)); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local5 * _local14) * m_motorJacobian.linear2.x)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local5 * _local14) * m_motorJacobian.linear2.y)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local7 * _local14) * m_motorJacobian.angular2)); }; if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){ _local16 = m_motorJacobian.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity); _local17 = (-(m_motorMass) * _local16); if (m_limitState == e_equalLimits){ m_limitImpulse = (m_limitImpulse + _local17); } else { if (m_limitState == e_atLowerLimit){ _local8 = m_limitImpulse; m_limitImpulse = b2Math.b2Max((m_limitImpulse + _local17), 0); _local17 = (m_limitImpulse - _local8); } else { if (m_limitState == e_atUpperLimit){ _local8 = m_limitImpulse; m_limitImpulse = b2Math.b2Min((m_limitImpulse + _local17), 0); _local17 = (m_limitImpulse - _local8); }; }; }; _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local4 * _local17) * m_motorJacobian.linear1.x)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local4 * _local17) * m_motorJacobian.linear1.y)); _local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local6 * _local17) * m_motorJacobian.angular1)); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local5 * _local17) * m_motorJacobian.linear2.x)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local5 * _local17) * m_motorJacobian.linear2.y)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local7 * _local17) * m_motorJacobian.angular2)); }; } } }//package Box2D.Dynamics.Joints
Section 51
//b2PrismaticJointDef (Box2D.Dynamics.Joints.b2PrismaticJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; public class b2PrismaticJointDef extends b2JointDef { public var axis:b2Vec2; public var upperTranslation:Number; public var lowerTranslation:Number; public var motorSpeed:Number; public var enableLimit:Boolean; public var enableMotor:Boolean; public var anchorPoint:b2Vec2; public var motorForce:Number; public function b2PrismaticJointDef(){ type = b2Joint.e_prismaticJoint; anchorPoint = new b2Vec2(0, 0); axis = new b2Vec2(0, 0); lowerTranslation = 0; upperTranslation = 0; motorForce = 0; motorSpeed = 0; enableLimit = false; enableMotor = false; } } }//package Box2D.Dynamics.Joints
Section 52
//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 m_limitState1:int; public var m_limitState2:int; public var m_ground:b2Body; public var m_maxLength2:Number; public var m_maxLength1:Number; public var m_limitPositionImpulse1:Number; public var m_limitPositionImpulse2:Number; public var m_pulleyImpulse:Number; public var m_constant:Number; public var m_ratio:Number; public var m_groundAnchor1:b2Vec2; public var m_groundAnchor2:b2Vec2; public var m_localAnchor1:b2Vec2; public var m_localAnchor2:b2Vec2; public var m_limitMass1:Number; public var m_limitMass2:Number; public var m_limitImpulse1:Number; public var m_pulleyMass:Number; public var m_u1:b2Vec2; public var m_u2:b2Vec2; public var m_limitImpulse2:Number; public static var b2_minPulleyLength:Number = 30; public function b2PulleyJoint(_arg1:b2PulleyJointDef){ var _local2:b2Mat22; var _local3:Number; var _local4:Number; m_groundAnchor1 = new b2Vec2(); m_groundAnchor2 = new b2Vec2(); m_localAnchor1 = new b2Vec2(); m_localAnchor2 = new b2Vec2(); m_u1 = new b2Vec2(); m_u2 = new b2Vec2(); super(_arg1); m_ground = m_body1.m_world.m_groundBody; m_groundAnchor1.x = (_arg1.groundPoint1.x - m_ground.m_position.x); m_groundAnchor1.y = (_arg1.groundPoint1.y - m_ground.m_position.y); m_groundAnchor2.x = (_arg1.groundPoint2.x - m_ground.m_position.x); m_groundAnchor2.y = (_arg1.groundPoint2.y - m_ground.m_position.y); _local2 = m_body1.m_R; _local3 = (_arg1.anchorPoint1.x - m_body1.m_position.x); _local4 = (_arg1.anchorPoint1.y - m_body1.m_position.y); m_localAnchor1.x = ((_local3 * _local2.col1.x) + (_local4 * _local2.col1.y)); m_localAnchor1.y = ((_local3 * _local2.col2.x) + (_local4 * _local2.col2.y)); _local2 = m_body2.m_R; _local3 = (_arg1.anchorPoint2.x - m_body2.m_position.x); _local4 = (_arg1.anchorPoint2.y - m_body2.m_position.y); m_localAnchor2.x = ((_local3 * _local2.col1.x) + (_local4 * _local2.col1.y)); m_localAnchor2.y = ((_local3 * _local2.col2.x) + (_local4 * _local2.col2.y)); m_ratio = _arg1.ratio; _local3 = (_arg1.groundPoint1.x - _arg1.anchorPoint1.x); _local4 = (_arg1.groundPoint1.y - _arg1.anchorPoint1.y); var _local5:Number = Math.sqrt(((_local3 * _local3) + (_local4 * _local4))); _local3 = (_arg1.groundPoint2.x - _arg1.anchorPoint2.x); _local4 = (_arg1.groundPoint2.y - _arg1.anchorPoint2.y); var _local6:Number = Math.sqrt(((_local3 * _local3) + (_local4 * _local4))); var _local7:Number = b2Math.b2Max((0.5 * b2_minPulleyLength), _local5); var _local8:Number = b2Math.b2Max((0.5 * b2_minPulleyLength), _local6); m_constant = (_local7 + (m_ratio * _local8)); m_maxLength1 = b2Math.b2Clamp(_arg1.maxLength1, _local7, (m_constant - (m_ratio * b2_minPulleyLength))); m_maxLength2 = b2Math.b2Clamp(_arg1.maxLength2, _local8, ((m_constant - b2_minPulleyLength) / m_ratio)); m_pulleyImpulse = 0; m_limitImpulse1 = 0; m_limitImpulse2 = 0; } public function GetLength1():Number{ var _local1:b2Mat22; _local1 = m_body1.m_R; var _local2:Number = (m_body1.m_position.x + ((_local1.col1.x * m_localAnchor1.x) + (_local1.col2.x * m_localAnchor1.y))); var _local3:Number = (m_body1.m_position.y + ((_local1.col1.y * m_localAnchor1.x) + (_local1.col2.y * m_localAnchor1.y))); var _local4:Number = (_local2 - (m_ground.m_position.x + m_groundAnchor1.x)); var _local5:Number = (_local3 - (m_ground.m_position.y + m_groundAnchor1.y)); return (Math.sqrt(((_local4 * _local4) + (_local5 * _local5)))); } override public function GetAnchor1():b2Vec2{ var _local1:b2Mat22 = m_body1.m_R; return (new b2Vec2((m_body1.m_position.x + ((_local1.col1.x * m_localAnchor1.x) + (_local1.col2.x * m_localAnchor1.y))), (m_body1.m_position.y + ((_local1.col1.y * m_localAnchor1.x) + (_local1.col2.y * m_localAnchor1.y))))); } override public function GetAnchor2():b2Vec2{ var _local1:b2Mat22 = m_body2.m_R; return (new b2Vec2((m_body2.m_position.x + ((_local1.col1.x * m_localAnchor2.x) + (_local1.col2.x * m_localAnchor2.y))), (m_body2.m_position.y + ((_local1.col1.y * m_localAnchor2.x) + (_local1.col2.y * m_localAnchor2.y))))); } override public function PrepareVelocitySolver():void{ var _local3:b2Mat22; var _local23:Number; var _local1:b2Body = m_body1; var _local2:b2Body = m_body2; _local3 = _local1.m_R; var _local4:Number = ((_local3.col1.x * m_localAnchor1.x) + (_local3.col2.x * m_localAnchor1.y)); var _local5:Number = ((_local3.col1.y * m_localAnchor1.x) + (_local3.col2.y * m_localAnchor1.y)); _local3 = _local2.m_R; var _local6:Number = ((_local3.col1.x * m_localAnchor2.x) + (_local3.col2.x * m_localAnchor2.y)); var _local7:Number = ((_local3.col1.y * m_localAnchor2.x) + (_local3.col2.y * m_localAnchor2.y)); var _local8:Number = (_local1.m_position.x + _local4); var _local9:Number = (_local1.m_position.y + _local5); var _local10:Number = (_local2.m_position.x + _local6); var _local11:Number = (_local2.m_position.y + _local7); var _local12:Number = (m_ground.m_position.x + m_groundAnchor1.x); var _local13:Number = (m_ground.m_position.y + m_groundAnchor1.y); var _local14:Number = (m_ground.m_position.x + m_groundAnchor2.x); var _local15:Number = (m_ground.m_position.y + m_groundAnchor2.y); m_u1.Set((_local8 - _local12), (_local9 - _local13)); m_u2.Set((_local10 - _local14), (_local11 - _local15)); var _local16:Number = m_u1.Length(); var _local17:Number = m_u2.Length(); if (_local16 > b2Settings.b2_linearSlop){ m_u1.Multiply((1 / _local16)); } else { m_u1.SetZero(); }; if (_local17 > b2Settings.b2_linearSlop){ m_u2.Multiply((1 / _local17)); } else { m_u2.SetZero(); }; if (_local16 < m_maxLength1){ m_limitState1 = e_inactiveLimit; m_limitImpulse1 = 0; } else { m_limitState1 = e_atUpperLimit; m_limitPositionImpulse1 = 0; }; if (_local17 < m_maxLength2){ m_limitState2 = e_inactiveLimit; m_limitImpulse2 = 0; } else { m_limitState2 = e_atUpperLimit; m_limitPositionImpulse2 = 0; }; var _local18:Number = ((_local4 * m_u1.y) - (_local5 * m_u1.x)); var _local19:Number = ((_local6 * m_u2.y) - (_local7 * m_u2.x)); m_limitMass1 = (_local1.m_invMass + ((_local1.m_invI * _local18) * _local18)); m_limitMass2 = (_local2.m_invMass + ((_local2.m_invI * _local19) * _local19)); m_pulleyMass = (m_limitMass1 + ((m_ratio * m_ratio) * m_limitMass2)); m_limitMass1 = (1 / m_limitMass1); m_limitMass2 = (1 / m_limitMass2); m_pulleyMass = (1 / m_pulleyMass); var _local20:Number = ((-(m_pulleyImpulse) - m_limitImpulse1) * m_u1.x); var _local21:Number = ((-(m_pulleyImpulse) - m_limitImpulse1) * m_u1.y); var _local22:Number = (((-(m_ratio) * m_pulleyImpulse) - m_limitImpulse2) * m_u2.x); _local23 = (((-(m_ratio) * m_pulleyImpulse) - m_limitImpulse2) * m_u2.y); _local1.m_linearVelocity.x = (_local1.m_linearVelocity.x + (_local1.m_invMass * _local20)); _local1.m_linearVelocity.y = (_local1.m_linearVelocity.y + (_local1.m_invMass * _local21)); _local1.m_angularVelocity = (_local1.m_angularVelocity + (_local1.m_invI * ((_local4 * _local21) - (_local5 * _local20)))); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local22)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local23)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local6 * _local23) - (_local7 * _local22)))); } override public function GetReactionForce(_arg1:Number):b2Vec2{ return (new b2Vec2()); } override public function SolvePositionConstraints():Boolean{ var _local3:b2Mat22; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local1:b2Body = m_body1; var _local2:b2Body = m_body2; var _local4:Number = (m_ground.m_position.x + m_groundAnchor1.x); var _local5:Number = (m_ground.m_position.y + m_groundAnchor1.y); var _local6:Number = (m_ground.m_position.x + m_groundAnchor2.x); var _local7:Number = (m_ground.m_position.y + m_groundAnchor2.y); var _local21:Number = 0; _local3 = _local1.m_R; _local8 = ((_local3.col1.x * m_localAnchor1.x) + (_local3.col2.x * m_localAnchor1.y)); _local9 = ((_local3.col1.y * m_localAnchor1.x) + (_local3.col2.y * m_localAnchor1.y)); _local3 = _local2.m_R; _local10 = ((_local3.col1.x * m_localAnchor2.x) + (_local3.col2.x * m_localAnchor2.y)); _local11 = ((_local3.col1.y * m_localAnchor2.x) + (_local3.col2.y * m_localAnchor2.y)); _local12 = (_local1.m_position.x + _local8); _local13 = (_local1.m_position.y + _local9); _local14 = (_local2.m_position.x + _local10); _local15 = (_local2.m_position.y + _local11); m_u1.Set((_local12 - _local4), (_local13 - _local5)); m_u2.Set((_local14 - _local6), (_local15 - _local7)); _local16 = m_u1.Length(); _local17 = m_u2.Length(); if (_local16 > b2Settings.b2_linearSlop){ m_u1.Multiply((1 / _local16)); } else { m_u1.SetZero(); }; if (_local17 > b2Settings.b2_linearSlop){ m_u2.Multiply((1 / _local17)); } else { m_u2.SetZero(); }; _local18 = ((m_constant - _local16) - (m_ratio * _local17)); _local21 = b2Math.b2Max(_local21, Math.abs(_local18)); _local18 = b2Math.b2Clamp(_local18, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection); _local19 = (-(m_pulleyMass) * _local18); _local12 = (-(_local19) * m_u1.x); _local13 = (-(_local19) * m_u1.y); _local14 = ((-(m_ratio) * _local19) * m_u2.x); _local15 = ((-(m_ratio) * _local19) * m_u2.y); _local1.m_position.x = (_local1.m_position.x + (_local1.m_invMass * _local12)); _local1.m_position.y = (_local1.m_position.y + (_local1.m_invMass * _local13)); _local1.m_rotation = (_local1.m_rotation + (_local1.m_invI * ((_local8 * _local13) - (_local9 * _local12)))); _local2.m_position.x = (_local2.m_position.x + (_local2.m_invMass * _local14)); _local2.m_position.y = (_local2.m_position.y + (_local2.m_invMass * _local15)); _local2.m_rotation = (_local2.m_rotation + (_local2.m_invI * ((_local10 * _local15) - (_local11 * _local14)))); _local1.m_R.Set(_local1.m_rotation); _local2.m_R.Set(_local2.m_rotation); if (m_limitState1 == e_atUpperLimit){ _local3 = _local1.m_R; _local8 = ((_local3.col1.x * m_localAnchor1.x) + (_local3.col2.x * m_localAnchor1.y)); _local9 = ((_local3.col1.y * m_localAnchor1.x) + (_local3.col2.y * m_localAnchor1.y)); _local12 = (_local1.m_position.x + _local8); _local13 = (_local1.m_position.y + _local9); m_u1.Set((_local12 - _local4), (_local13 - _local5)); _local16 = m_u1.Length(); if (_local16 > b2Settings.b2_linearSlop){ m_u1.x = (m_u1.x * (1 / _local16)); m_u1.y = (m_u1.y * (1 / _local16)); } else { m_u1.SetZero(); }; _local18 = (m_maxLength1 - _local16); _local21 = b2Math.b2Max(_local21, -(_local18)); _local18 = b2Math.b2Clamp((_local18 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0); _local19 = (-(m_limitMass1) * _local18); _local20 = m_limitPositionImpulse1; m_limitPositionImpulse1 = b2Math.b2Max(0, (m_limitPositionImpulse1 + _local19)); _local19 = (m_limitPositionImpulse1 - _local20); _local12 = (-(_local19) * m_u1.x); _local13 = (-(_local19) * m_u1.y); _local1.m_position.x = (_local1.m_position.x + (_local1.m_invMass * _local12)); _local1.m_position.y = (_local1.m_position.y + (_local1.m_invMass * _local13)); _local1.m_rotation = (_local1.m_rotation + (_local1.m_invI * ((_local8 * _local13) - (_local9 * _local12)))); _local1.m_R.Set(_local1.m_rotation); }; if (m_limitState2 == e_atUpperLimit){ _local3 = _local2.m_R; _local10 = ((_local3.col1.x * m_localAnchor2.x) + (_local3.col2.x * m_localAnchor2.y)); _local11 = ((_local3.col1.y * m_localAnchor2.x) + (_local3.col2.y * m_localAnchor2.y)); _local14 = (_local2.m_position.x + _local10); _local15 = (_local2.m_position.y + _local11); m_u2.Set((_local14 - _local6), (_local15 - _local7)); _local17 = m_u2.Length(); if (_local17 > b2Settings.b2_linearSlop){ m_u2.x = (m_u2.x * (1 / _local17)); m_u2.y = (m_u2.y * (1 / _local17)); } else { m_u2.SetZero(); }; _local18 = (m_maxLength2 - _local17); _local21 = b2Math.b2Max(_local21, -(_local18)); _local18 = b2Math.b2Clamp((_local18 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0); _local19 = (-(m_limitMass2) * _local18); _local20 = m_limitPositionImpulse2; m_limitPositionImpulse2 = b2Math.b2Max(0, (m_limitPositionImpulse2 + _local19)); _local19 = (m_limitPositionImpulse2 - _local20); _local14 = (-(_local19) * m_u2.x); _local15 = (-(_local19) * m_u2.y); _local2.m_position.x = (_local2.m_position.x + (_local2.m_invMass * _local14)); _local2.m_position.y = (_local2.m_position.y + (_local2.m_invMass * _local15)); _local2.m_rotation = (_local2.m_rotation + (_local2.m_invI * ((_local10 * _local15) - (_local11 * _local14)))); _local2.m_R.Set(_local2.m_rotation); }; return ((_local21 < b2Settings.b2_linearSlop)); } public function GetGroundPoint2():b2Vec2{ return (new b2Vec2((m_ground.m_position.x + m_groundAnchor2.x), (m_ground.m_position.y + m_groundAnchor2.y))); } override public function GetReactionTorque(_arg1:Number):Number{ return (0); } public function GetGroundPoint1():b2Vec2{ return (new b2Vec2((m_ground.m_position.x + m_groundAnchor1.x), (m_ground.m_position.y + m_groundAnchor1.y))); } override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local4:b2Mat22; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local2:b2Body = m_body1; var _local3:b2Body = m_body2; _local4 = _local2.m_R; var _local5:Number = ((_local4.col1.x * m_localAnchor1.x) + (_local4.col2.x * m_localAnchor1.y)); var _local6:Number = ((_local4.col1.y * m_localAnchor1.x) + (_local4.col2.y * m_localAnchor1.y)); _local4 = _local3.m_R; var _local7:Number = ((_local4.col1.x * m_localAnchor2.x) + (_local4.col2.x * m_localAnchor2.y)); var _local8:Number = ((_local4.col1.y * m_localAnchor2.x) + (_local4.col2.y * m_localAnchor2.y)); _local9 = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local6)); _local10 = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local5)); _local11 = (_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local8)); _local12 = (_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local7)); _local17 = (-(((m_u1.x * _local9) + (m_u1.y * _local10))) - (m_ratio * ((m_u2.x * _local11) + (m_u2.y * _local12)))); _local18 = (-(m_pulleyMass) * _local17); m_pulleyImpulse = (m_pulleyImpulse + _local18); _local13 = (-(_local18) * m_u1.x); _local14 = (-(_local18) * m_u1.y); _local15 = ((-(m_ratio) * _local18) * m_u2.x); _local16 = ((-(m_ratio) * _local18) * m_u2.y); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local13)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local14)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local5 * _local14) - (_local6 * _local13)))); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local3.m_invMass * _local15)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local3.m_invMass * _local16)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * ((_local7 * _local16) - (_local8 * _local15)))); if (m_limitState1 == e_atUpperLimit){ _local9 = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local6)); _local10 = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local5)); _local17 = -(((m_u1.x * _local9) + (m_u1.y * _local10))); _local18 = (-(m_limitMass1) * _local17); _local19 = m_limitImpulse1; m_limitImpulse1 = b2Math.b2Max(0, (m_limitImpulse1 + _local18)); _local18 = (m_limitImpulse1 - _local19); _local13 = (-(_local18) * m_u1.x); _local14 = (-(_local18) * m_u1.y); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local13)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local14)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local5 * _local14) - (_local6 * _local13)))); }; if (m_limitState2 == e_atUpperLimit){ _local11 = (_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local8)); _local12 = (_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local7)); _local17 = -(((m_u2.x * _local11) + (m_u2.y * _local12))); _local18 = (-(m_limitMass2) * _local17); _local19 = m_limitImpulse2; m_limitImpulse2 = b2Math.b2Max(0, (m_limitImpulse2 + _local18)); _local18 = (m_limitImpulse2 - _local19); _local15 = (-(_local18) * m_u2.x); _local16 = (-(_local18) * m_u2.y); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local3.m_invMass * _local15)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local3.m_invMass * _local16)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * ((_local7 * _local16) - (_local8 * _local15)))); }; } public function GetRatio():Number{ return (m_ratio); } public function GetLength2():Number{ var _local1:b2Mat22; _local1 = m_body2.m_R; var _local2:Number = (m_body2.m_position.x + ((_local1.col1.x * m_localAnchor2.x) + (_local1.col2.x * m_localAnchor2.y))); var _local3:Number = (m_body2.m_position.y + ((_local1.col1.y * m_localAnchor2.x) + (_local1.col2.y * m_localAnchor2.y))); var _local4:Number = (_local2 - (m_ground.m_position.x + m_groundAnchor2.x)); var _local5:Number = (_local3 - (m_ground.m_position.y + m_groundAnchor2.y)); return (Math.sqrt(((_local4 * _local4) + (_local5 * _local5)))); } } }//package Box2D.Dynamics.Joints
Section 53
//b2PulleyJointDef (Box2D.Dynamics.Joints.b2PulleyJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; public class b2PulleyJointDef extends b2JointDef { public var maxLength1:Number; public var groundPoint1:b2Vec2; public var groundPoint2:b2Vec2; public var ratio:Number; public var maxLength2:Number; public var anchorPoint1:b2Vec2; public var anchorPoint2:b2Vec2; public function b2PulleyJointDef(){ groundPoint1 = new b2Vec2(); groundPoint2 = new b2Vec2(); anchorPoint1 = new b2Vec2(); anchorPoint2 = new b2Vec2(); super(); type = b2Joint.e_pulleyJoint; groundPoint1.Set(-1, 1); groundPoint2.Set(1, 1); anchorPoint1.Set(-1, 0); anchorPoint2.Set(1, 0); maxLength1 = (0.5 * b2PulleyJoint.b2_minPulleyLength); maxLength2 = (0.5 * b2PulleyJoint.b2_minPulleyLength); ratio = 1; collideConnected = true; } } }//package Box2D.Dynamics.Joints
Section 54
//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_enableLimit:Boolean; public var m_limitState:int; public var m_ptpMass:b2Mat22; public var m_motorMass:Number; public var m_localAnchor1:b2Vec2; public var m_localAnchor2:b2Vec2; private var K1:b2Mat22; private var K2:b2Mat22; private var K:b2Mat22; public var m_limitImpulse:Number; private var K3:b2Mat22; public var m_motorImpulse:Number; public var m_enableMotor:Boolean; public var m_limitPositionImpulse:Number; public var m_motorSpeed:Number; public var m_upperAngle:Number; public var m_lowerAngle:Number; public var m_maxMotorTorque:Number; public var m_ptpImpulse:b2Vec2; public var m_intialAngle:Number; public static var tImpulse:b2Vec2 = new b2Vec2(); public function b2RevoluteJoint(_arg1:b2RevoluteJointDef){ var _local2:b2Mat22; var _local3:Number; var _local4:Number; K = new b2Mat22(); K1 = new b2Mat22(); K2 = new b2Mat22(); K3 = new b2Mat22(); m_localAnchor1 = new b2Vec2(); m_localAnchor2 = new b2Vec2(); m_ptpImpulse = new b2Vec2(); m_ptpMass = new b2Mat22(); super(_arg1); _local2 = m_body1.m_R; _local3 = (_arg1.anchorPoint.x - m_body1.m_position.x); _local4 = (_arg1.anchorPoint.y - m_body1.m_position.y); m_localAnchor1.x = ((_local3 * _local2.col1.x) + (_local4 * _local2.col1.y)); m_localAnchor1.y = ((_local3 * _local2.col2.x) + (_local4 * _local2.col2.y)); _local2 = m_body2.m_R; _local3 = (_arg1.anchorPoint.x - m_body2.m_position.x); _local4 = (_arg1.anchorPoint.y - m_body2.m_position.y); m_localAnchor2.x = ((_local3 * _local2.col1.x) + (_local4 * _local2.col1.y)); m_localAnchor2.y = ((_local3 * _local2.col2.x) + (_local4 * _local2.col2.y)); m_intialAngle = (m_body2.m_rotation - m_body1.m_rotation); m_ptpImpulse.Set(0, 0); m_motorImpulse = 0; m_limitImpulse = 0; m_limitPositionImpulse = 0; m_lowerAngle = _arg1.lowerAngle; m_upperAngle = _arg1.upperAngle; m_maxMotorTorque = _arg1.motorTorque; m_motorSpeed = _arg1.motorSpeed; m_enableLimit = _arg1.enableLimit; m_enableMotor = _arg1.enableMotor; } override public function GetAnchor1():b2Vec2{ var _local1:b2Mat22 = m_body1.m_R; return (new b2Vec2((m_body1.m_position.x + ((_local1.col1.x * m_localAnchor1.x) + (_local1.col2.x * m_localAnchor1.y))), (m_body1.m_position.y + ((_local1.col1.y * m_localAnchor1.x) + (_local1.col2.y * m_localAnchor1.y))))); } override public function GetAnchor2():b2Vec2{ var _local1:b2Mat22 = m_body2.m_R; return (new b2Vec2((m_body2.m_position.x + ((_local1.col1.x * m_localAnchor2.x) + (_local1.col2.x * m_localAnchor2.y))), (m_body2.m_position.y + ((_local1.col1.y * m_localAnchor2.x) + (_local1.col2.y * m_localAnchor2.y))))); } override public function PrepareVelocitySolver():void{ var _local1:b2Body; var _local2:b2Body; var _local3:b2Mat22; var _local12:Number; _local1 = m_body1; _local2 = m_body2; _local3 = _local1.m_R; var _local4:Number = ((_local3.col1.x * m_localAnchor1.x) + (_local3.col2.x * m_localAnchor1.y)); var _local5:Number = ((_local3.col1.y * m_localAnchor1.x) + (_local3.col2.y * m_localAnchor1.y)); _local3 = _local2.m_R; var _local6:Number = ((_local3.col1.x * m_localAnchor2.x) + (_local3.col2.x * m_localAnchor2.y)); var _local7:Number = ((_local3.col1.y * m_localAnchor2.x) + (_local3.col2.y * m_localAnchor2.y)); var _local8:Number = _local1.m_invMass; var _local9:Number = _local2.m_invMass; var _local10:Number = _local1.m_invI; var _local11:Number = _local2.m_invI; K1.col1.x = (_local8 + _local9); K1.col2.x = 0; K1.col1.y = 0; K1.col2.y = (_local8 + _local9); K2.col1.x = ((_local10 * _local5) * _local5); K2.col2.x = ((-(_local10) * _local4) * _local5); K2.col1.y = ((-(_local10) * _local4) * _local5); K2.col2.y = ((_local10 * _local4) * _local4); K3.col1.x = ((_local11 * _local7) * _local7); K3.col2.x = ((-(_local11) * _local6) * _local7); K3.col1.y = ((-(_local11) * _local6) * _local7); K3.col2.y = ((_local11 * _local6) * _local6); K.SetM(K1); K.AddM(K2); K.AddM(K3); K.Invert(m_ptpMass); m_motorMass = (1 / (_local10 + _local11)); if (m_enableMotor == false){ m_motorImpulse = 0; }; if (m_enableLimit){ _local12 = ((_local2.m_rotation - _local1.m_rotation) - m_intialAngle); if (b2Math.b2Abs((m_upperAngle - m_lowerAngle)) < (2 * b2Settings.b2_angularSlop)){ m_limitState = e_equalLimits; } else { if (_local12 <= m_lowerAngle){ if (m_limitState != e_atLowerLimit){ m_limitImpulse = 0; }; m_limitState = e_atLowerLimit; } else { if (_local12 >= m_upperAngle){ if (m_limitState != e_atUpperLimit){ m_limitImpulse = 0; }; m_limitState = e_atUpperLimit; } else { m_limitState = e_inactiveLimit; m_limitImpulse = 0; }; }; }; } else { m_limitImpulse = 0; }; if (b2World.s_enableWarmStarting){ _local1.m_linearVelocity.x = (_local1.m_linearVelocity.x - (_local8 * m_ptpImpulse.x)); _local1.m_linearVelocity.y = (_local1.m_linearVelocity.y - (_local8 * m_ptpImpulse.y)); _local1.m_angularVelocity = (_local1.m_angularVelocity - (_local10 * ((((_local4 * m_ptpImpulse.y) - (_local5 * m_ptpImpulse.x)) + m_motorImpulse) + m_limitImpulse))); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local9 * m_ptpImpulse.x)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local9 * m_ptpImpulse.y)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local11 * ((((_local6 * m_ptpImpulse.y) - (_local7 * m_ptpImpulse.x)) + m_motorImpulse) + m_limitImpulse))); } else { m_ptpImpulse.SetZero(); m_motorImpulse = 0; m_limitImpulse = 0; }; m_limitPositionImpulse = 0; } override public function GetReactionForce(_arg1:Number):b2Vec2{ var _local2:b2Vec2 = m_ptpImpulse.Copy(); _local2.Multiply(_arg1); return (_local2); } override public function SolvePositionConstraints():Boolean{ var _local1:Number; var _local2:Number; var _local6:b2Mat22; var _local24:Number; var _local25:Number; var _local3:b2Body = m_body1; var _local4:b2Body = m_body2; var _local5:Number = 0; _local6 = _local3.m_R; var _local7:Number = ((_local6.col1.x * m_localAnchor1.x) + (_local6.col2.x * m_localAnchor1.y)); var _local8:Number = ((_local6.col1.y * m_localAnchor1.x) + (_local6.col2.y * m_localAnchor1.y)); _local6 = _local4.m_R; var _local9:Number = ((_local6.col1.x * m_localAnchor2.x) + (_local6.col2.x * m_localAnchor2.y)); var _local10:Number = ((_local6.col1.y * m_localAnchor2.x) + (_local6.col2.y * m_localAnchor2.y)); var _local11:Number = (_local3.m_position.x + _local7); var _local12:Number = (_local3.m_position.y + _local8); var _local13:Number = (_local4.m_position.x + _local9); var _local14:Number = (_local4.m_position.y + _local10); var _local15:Number = (_local13 - _local11); var _local16:Number = (_local14 - _local12); _local5 = Math.sqrt(((_local15 * _local15) + (_local16 * _local16))); var _local17:Number = _local3.m_invMass; var _local18:Number = _local4.m_invMass; var _local19:Number = _local3.m_invI; var _local20:Number = _local4.m_invI; K1.col1.x = (_local17 + _local18); K1.col2.x = 0; K1.col1.y = 0; K1.col2.y = (_local17 + _local18); K2.col1.x = ((_local19 * _local8) * _local8); K2.col2.x = ((-(_local19) * _local7) * _local8); K2.col1.y = ((-(_local19) * _local7) * _local8); K2.col2.y = ((_local19 * _local7) * _local7); K3.col1.x = ((_local20 * _local10) * _local10); K3.col2.x = ((-(_local20) * _local9) * _local10); K3.col1.y = ((-(_local20) * _local9) * _local10); K3.col2.y = ((_local20 * _local9) * _local9); K.SetM(K1); K.AddM(K2); K.AddM(K3); K.Solve(tImpulse, -(_local15), -(_local16)); var _local21:Number = tImpulse.x; var _local22:Number = tImpulse.y; _local3.m_position.x = (_local3.m_position.x - (_local3.m_invMass * _local21)); _local3.m_position.y = (_local3.m_position.y - (_local3.m_invMass * _local22)); _local3.m_rotation = (_local3.m_rotation - (_local3.m_invI * ((_local7 * _local22) - (_local8 * _local21)))); _local3.m_R.Set(_local3.m_rotation); _local4.m_position.x = (_local4.m_position.x + (_local4.m_invMass * _local21)); _local4.m_position.y = (_local4.m_position.y + (_local4.m_invMass * _local22)); _local4.m_rotation = (_local4.m_rotation + (_local4.m_invI * ((_local9 * _local22) - (_local10 * _local21)))); _local4.m_R.Set(_local4.m_rotation); var _local23:Number = 0; if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){ _local24 = ((_local4.m_rotation - _local3.m_rotation) - m_intialAngle); _local25 = 0; if (m_limitState == e_equalLimits){ _local2 = b2Math.b2Clamp(_local24, -(b2Settings.b2_maxAngularCorrection), b2Settings.b2_maxAngularCorrection); _local25 = (-(m_motorMass) * _local2); _local23 = b2Math.b2Abs(_local2); } else { if (m_limitState == e_atLowerLimit){ _local2 = (_local24 - m_lowerAngle); _local23 = b2Math.b2Max(0, -(_local2)); _local2 = b2Math.b2Clamp((_local2 + b2Settings.b2_angularSlop), -(b2Settings.b2_maxAngularCorrection), 0); _local25 = (-(m_motorMass) * _local2); _local1 = m_limitPositionImpulse; m_limitPositionImpulse = b2Math.b2Max((m_limitPositionImpulse + _local25), 0); _local25 = (m_limitPositionImpulse - _local1); } else { if (m_limitState == e_atUpperLimit){ _local2 = (_local24 - m_upperAngle); _local23 = b2Math.b2Max(0, _local2); _local2 = b2Math.b2Clamp((_local2 - b2Settings.b2_angularSlop), 0, b2Settings.b2_maxAngularCorrection); _local25 = (-(m_motorMass) * _local2); _local1 = m_limitPositionImpulse; m_limitPositionImpulse = b2Math.b2Min((m_limitPositionImpulse + _local25), 0); _local25 = (m_limitPositionImpulse - _local1); }; }; }; _local3.m_rotation = (_local3.m_rotation - (_local3.m_invI * _local25)); _local3.m_R.Set(_local3.m_rotation); _local4.m_rotation = (_local4.m_rotation + (_local4.m_invI * _local25)); _local4.m_R.Set(_local4.m_rotation); }; return ((((_local5 <= b2Settings.b2_linearSlop)) && ((_local23 <= b2Settings.b2_angularSlop)))); } public function SetMotorSpeed(_arg1:Number):void{ m_motorSpeed = _arg1; } public function GetJointSpeed():Number{ return ((m_body2.m_angularVelocity - m_body1.m_angularVelocity)); } public function SetMotorTorque(_arg1:Number):void{ m_maxMotorTorque = _arg1; } public function GetJointAngle():Number{ return ((m_body2.m_rotation - m_body1.m_rotation)); } public function GetMotorTorque(_arg1:Number):Number{ return ((_arg1 * m_motorImpulse)); } override public function GetReactionTorque(_arg1:Number):Number{ return ((_arg1 * m_limitImpulse)); } override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local4:b2Mat22; var _local9:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local2:b2Body = m_body1; var _local3:b2Body = m_body2; _local4 = _local2.m_R; var _local5:Number = ((_local4.col1.x * m_localAnchor1.x) + (_local4.col2.x * m_localAnchor1.y)); var _local6:Number = ((_local4.col1.y * m_localAnchor1.x) + (_local4.col2.y * m_localAnchor1.y)); _local4 = _local3.m_R; var _local7:Number = ((_local4.col1.x * m_localAnchor2.x) + (_local4.col2.x * m_localAnchor2.y)); var _local8:Number = ((_local4.col1.y * m_localAnchor2.x) + (_local4.col2.y * m_localAnchor2.y)); var _local10:Number = (((_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local8)) - _local2.m_linearVelocity.x) - (-(_local2.m_angularVelocity) * _local6)); var _local11:Number = (((_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local7)) - _local2.m_linearVelocity.y) - (_local2.m_angularVelocity * _local5)); var _local12:Number = -(((m_ptpMass.col1.x * _local10) + (m_ptpMass.col2.x * _local11))); var _local13:Number = -(((m_ptpMass.col1.y * _local10) + (m_ptpMass.col2.y * _local11))); m_ptpImpulse.x = (m_ptpImpulse.x + _local12); m_ptpImpulse.y = (m_ptpImpulse.y + _local13); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x - (_local2.m_invMass * _local12)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y - (_local2.m_invMass * _local13)); _local2.m_angularVelocity = (_local2.m_angularVelocity - (_local2.m_invI * ((_local5 * _local13) - (_local6 * _local12)))); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local3.m_invMass * _local12)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local3.m_invMass * _local13)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * ((_local7 * _local13) - (_local8 * _local12)))); if (((m_enableMotor) && (!((m_limitState == e_equalLimits))))){ _local14 = ((_local3.m_angularVelocity - _local2.m_angularVelocity) - m_motorSpeed); _local15 = (-(m_motorMass) * _local14); _local16 = m_motorImpulse; m_motorImpulse = b2Math.b2Clamp((m_motorImpulse + _local15), (-(_arg1.dt) * m_maxMotorTorque), (_arg1.dt * m_maxMotorTorque)); _local15 = (m_motorImpulse - _local16); _local2.m_angularVelocity = (_local2.m_angularVelocity - (_local2.m_invI * _local15)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * _local15)); }; if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){ _local17 = (_local3.m_angularVelocity - _local2.m_angularVelocity); _local18 = (-(m_motorMass) * _local17); if (m_limitState == e_equalLimits){ m_limitImpulse = (m_limitImpulse + _local18); } else { if (m_limitState == e_atLowerLimit){ _local9 = m_limitImpulse; m_limitImpulse = b2Math.b2Max((m_limitImpulse + _local18), 0); _local18 = (m_limitImpulse - _local9); } else { if (m_limitState == e_atUpperLimit){ _local9 = m_limitImpulse; m_limitImpulse = b2Math.b2Min((m_limitImpulse + _local18), 0); _local18 = (m_limitImpulse - _local9); }; }; }; _local2.m_angularVelocity = (_local2.m_angularVelocity - (_local2.m_invI * _local18)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * _local18)); }; } } }//package Box2D.Dynamics.Joints
Section 55
//b2RevoluteJointDef (Box2D.Dynamics.Joints.b2RevoluteJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; public class b2RevoluteJointDef extends b2JointDef { public var enableMotor:Boolean; public var upperAngle:Number; public var lowerAngle:Number; public var enableLimit:Boolean; public var motorSpeed:Number; public var anchorPoint:b2Vec2; public var motorTorque:Number; public function b2RevoluteJointDef(){ type = b2Joint.e_revoluteJoint; anchorPoint = new b2Vec2(0, 0); lowerAngle = 0; upperAngle = 0; motorTorque = 0; motorSpeed = 0; enableLimit = false; enableMotor = false; } } }//package Box2D.Dynamics.Joints
Section 56
//b2Body (Box2D.Dynamics.b2Body) package Box2D.Dynamics { import Box2D.Common.Math.*; import Box2D.Dynamics.Joints.*; import Box2D.Dynamics.Contacts.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2Body { public var m_next:b2Body; public var m_R:b2Mat22; public var m_contactList:b2ContactNode; public var m_angularVelocity:Number; public var m_rotation:Number; public var m_shapeList:b2Shape; public var m_force:b2Vec2; public var m_torque:Number; public var m_mass:Number; public var m_rotation0:Number; public var m_invI:Number; public var m_shapeCount:int; public var m_userData; public var m_linearVelocity:b2Vec2; public var m_flags:uint; public var m_invMass:Number; public var m_position:b2Vec2; public var m_linearDamping:Number; public var m_prev:b2Body; public var m_world:b2World; public var m_angularDamping:Number; public var m_position0:b2Vec2; private var sMat0:b2Mat22; public var m_center:b2Vec2; public var m_sleepTime:Number; public var m_I:Number; public var m_jointList:b2JointNode; public static var e_frozenFlag:uint = 2; public static var e_sleepFlag:uint = 8; public static var e_islandFlag:uint = 4; public static var e_destroyFlag:uint = 32; public static var e_allowSleepFlag:uint = 16; public static var e_staticFlag:uint = 1; public function b2Body(_arg1:b2BodyDef, _arg2:b2World){ var _local3:int; var _local4:b2ShapeDef; var _local5:b2MassData; var _local7:b2Vec2; var _local8:b2Shape; sMat0 = new b2Mat22(); m_position = new b2Vec2(); m_R = new b2Mat22(0); m_position0 = new b2Vec2(); super(); m_flags = 0; m_position.SetV(_arg1.position); m_rotation = _arg1.rotation; m_R.Set(m_rotation); m_position0.SetV(m_position); m_rotation0 = m_rotation; m_world = _arg2; m_linearDamping = b2Math.b2Clamp((1 - _arg1.linearDamping), 0, 1); m_angularDamping = b2Math.b2Clamp((1 - _arg1.angularDamping), 0, 1); m_force = new b2Vec2(0, 0); m_torque = 0; m_mass = 0; var _local6:Array = new Array(b2Settings.b2_maxShapesPerBody); _local3 = 0; while (_local3 < b2Settings.b2_maxShapesPerBody) { _local6[_local3] = new b2MassData(); _local3++; }; m_shapeCount = 0; m_center = new b2Vec2(0, 0); _local3 = 0; while (_local3 < b2Settings.b2_maxShapesPerBody) { _local4 = _arg1.shapes[_local3]; if (_local4 == null){ break; }; _local5 = _local6[_local3]; _local4.ComputeMass(_local5); m_mass = (m_mass + _local5.mass); m_center.x = (m_center.x + (_local5.mass * (_local4.localPosition.x + _local5.center.x))); m_center.y = (m_center.y + (_local5.mass * (_local4.localPosition.y + _local5.center.y))); m_shapeCount++; _local3++; }; if (m_mass > 0){ m_center.Multiply((1 / m_mass)); m_position.Add(b2Math.b2MulMV(m_R, m_center)); } else { m_flags = (m_flags | e_staticFlag); }; m_I = 0; _local3 = 0; while (_local3 < m_shapeCount) { _local4 = _arg1.shapes[_local3]; _local5 = _local6[_local3]; m_I = (m_I + _local5.I); _local7 = b2Math.SubtractVV(b2Math.AddVV(_local4.localPosition, _local5.center), m_center); m_I = (m_I + (_local5.mass * b2Math.b2Dot(_local7, _local7))); _local3++; }; if (m_mass > 0){ m_invMass = (1 / m_mass); } else { m_invMass = 0; }; if ((((m_I > 0)) && ((_arg1.preventRotation == false)))){ m_invI = (1 / m_I); } else { m_I = 0; m_invI = 0; }; m_linearVelocity = b2Math.AddVV(_arg1.linearVelocity, b2Math.b2CrossFV(_arg1.angularVelocity, m_center)); m_angularVelocity = _arg1.angularVelocity; m_jointList = null; m_contactList = null; m_prev = null; m_next = null; m_shapeList = null; _local3 = 0; while (_local3 < m_shapeCount) { _local4 = _arg1.shapes[_local3]; _local8 = b2Shape.Create(_local4, this, m_center); _local8.m_next = m_shapeList; m_shapeList = _local8; _local3++; }; m_sleepTime = 0; if (_arg1.allowSleep){ m_flags = (m_flags | e_allowSleepFlag); }; if (_arg1.isSleeping){ m_flags = (m_flags | e_sleepFlag); }; if ((((m_flags & e_sleepFlag)) || ((m_invMass == 0)))){ m_linearVelocity.Set(0, 0); m_angularVelocity = 0; }; m_userData = _arg1.userData; } public function SetCenterPosition(_arg1:b2Vec2, _arg2:Number):void{ if (IsFrozen()){ return; }; m_rotation = _arg2; m_R.Set(m_rotation); m_position.SetV(_arg1); m_position0.SetV(m_position); m_rotation0 = m_rotation; var _local3:b2Shape = m_shapeList; while (_local3 != null) { _local3.Synchronize(m_position, m_R, m_position, m_R); _local3 = _local3.m_next; }; m_world.m_broadPhase.Commit(); } public function GetWorldPoint(_arg1:b2Vec2):b2Vec2{ return (b2Math.AddVV(m_position, b2Math.b2MulMV(m_R, _arg1))); } public function SetLinearVelocity(_arg1:b2Vec2):void{ m_linearVelocity.SetV(_arg1); } public function WakeUp():void{ m_flags = (m_flags & ~(e_sleepFlag)); m_sleepTime = 0; } public function IsFrozen():Boolean{ return (((m_flags & e_frozenFlag) == e_frozenFlag)); } public function IsSleeping():Boolean{ return (((m_flags & e_sleepFlag) == e_sleepFlag)); } public function GetLocalVector(_arg1:b2Vec2):b2Vec2{ return (b2Math.b2MulTMV(m_R, _arg1)); } public function QuickSyncShapes():void{ var _local1:b2Shape = m_shapeList; while (_local1 != null) { _local1.QuickSync(m_position, m_R); _local1 = _local1.m_next; }; } public function GetInertia():Number{ return (m_I); } public function GetJointList():b2JointNode{ return (m_jointList); } public function Freeze():void{ m_flags = (m_flags | e_frozenFlag); m_linearVelocity.SetZero(); m_angularVelocity = 0; var _local1:b2Shape = m_shapeList; while (_local1 != null) { _local1.DestroyProxy(); _local1 = _local1.m_next; }; } public function GetRotationMatrix():b2Mat22{ return (m_R); } public function SetAngularVelocity(_arg1:Number):void{ m_angularVelocity = _arg1; } public function SynchronizeShapes():void{ sMat0.Set(m_rotation0); var _local1:b2Shape = m_shapeList; while (_local1 != null) { _local1.Synchronize(m_position0, sMat0, m_position, m_R); _local1 = _local1.m_next; }; } public function ApplyForce(_arg1:b2Vec2, _arg2:b2Vec2):void{ if (IsSleeping() == false){ m_force.Add(_arg1); m_torque = (m_torque + b2Math.b2CrossVV(b2Math.SubtractVV(_arg2, m_position), _arg1)); }; } public function GetOriginPosition():b2Vec2{ return (b2Math.SubtractVV(m_position, b2Math.b2MulMV(m_R, m_center))); } public function ApplyImpulse(_arg1:b2Vec2, _arg2:b2Vec2):void{ if (IsSleeping() == false){ m_linearVelocity.Add(b2Math.MulFV(m_invMass, _arg1)); m_angularVelocity = (m_angularVelocity + (m_invI * b2Math.b2CrossVV(b2Math.SubtractVV(_arg2, m_position), _arg1))); }; } public function GetContactList():b2ContactNode{ return (m_contactList); } public function GetShapeList():b2Shape{ return (m_shapeList); } public function GetMass():Number{ return (m_mass); } public function GetAngularVelocity():Number{ return (m_angularVelocity); } public function SetOriginPosition(_arg1:b2Vec2, _arg2:Number):void{ if (IsFrozen()){ return; }; m_rotation = _arg2; m_R.Set(m_rotation); m_position = b2Math.AddVV(_arg1, b2Math.b2MulMV(m_R, m_center)); m_position0.SetV(m_position); m_rotation0 = m_rotation; var _local3:b2Shape = m_shapeList; while (_local3 != null) { _local3.Synchronize(m_position, m_R, m_position, m_R); _local3 = _local3.m_next; }; m_world.m_broadPhase.Commit(); } public function GetLocalPoint(_arg1:b2Vec2):b2Vec2{ return (b2Math.b2MulTMV(m_R, b2Math.SubtractVV(_arg1, m_position))); } public function GetRotation():Number{ return (m_rotation); } public function IsStatic():Boolean{ return (((m_flags & e_staticFlag) == e_staticFlag)); } public function Destroy():void{ var _local2:b2Shape; var _local1:b2Shape = m_shapeList; while (_local1) { _local2 = _local1; _local1 = _local1.m_next; b2Shape.Destroy(_local2); }; } public function GetWorldVector(_arg1:b2Vec2):b2Vec2{ return (b2Math.b2MulMV(m_R, _arg1)); } public function GetNext():b2Body{ return (m_next); } public function IsConnected(_arg1:b2Body):Boolean{ var _local2:b2JointNode = m_jointList; while (_local2 != null) { if (_local2.other == _arg1){ return ((_local2.joint.m_collideConnected == false)); }; _local2 = _local2.next; }; return (false); } public function GetUserData(){ return (m_userData); } public function AllowSleeping(_arg1:Boolean):void{ if (_arg1){ m_flags = (m_flags | e_allowSleepFlag); } else { m_flags = (m_flags & ~(e_allowSleepFlag)); WakeUp(); }; } public function ApplyTorque(_arg1:Number):void{ if (IsSleeping() == false){ m_torque = (m_torque + _arg1); }; } public function GetCenterPosition():b2Vec2{ return (m_position); } public function GetLinearVelocity():b2Vec2{ return (m_linearVelocity); } } }//package Box2D.Dynamics
Section 57
//b2BodyDef (Box2D.Dynamics.b2BodyDef) package Box2D.Dynamics { import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Dynamics.Joints.*; import Box2D.Dynamics.Contacts.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2BodyDef { public var angularDamping:Number; public var linearVelocity:b2Vec2; public var position:b2Vec2; public var isSleeping:Boolean; public var allowSleep:Boolean; public var userData; public var preventRotation:Boolean; public var shapes:Array; public var linearDamping:Number; public var rotation:Number; public var angularVelocity:Number; public function b2BodyDef(){ shapes = new Array(); super(); userData = null; var _local1:int; while (_local1 < b2Settings.b2_maxShapesPerBody) { shapes[_local1] = null; _local1++; }; position = new b2Vec2(0, 0); rotation = 0; linearVelocity = new b2Vec2(0, 0); angularVelocity = 0; linearDamping = 0; angularDamping = 0; allowSleep = true; isSleeping = false; preventRotation = false; } public function AddShape(_arg1:b2ShapeDef):void{ var _local2:int; while (_local2 < b2Settings.b2_maxShapesPerBody) { if (shapes[_local2] == null){ shapes[_local2] = _arg1; break; }; _local2++; }; } } }//package Box2D.Dynamics
Section 58
//b2CollisionFilter (Box2D.Dynamics.b2CollisionFilter) package Box2D.Dynamics { import Box2D.Collision.Shapes.*; public class b2CollisionFilter { public static var b2_defaultFilter:b2CollisionFilter = new (b2CollisionFilter); ; public function ShouldCollide(_arg1:b2Shape, _arg2:b2Shape):Boolean{ if ((((_arg1.m_groupIndex == _arg2.m_groupIndex)) && (!((_arg1.m_groupIndex == 0))))){ return ((_arg1.m_groupIndex > 0)); }; var _local3:Boolean = ((!(((_arg1.m_maskBits & _arg2.m_categoryBits) == 0))) && (!(((_arg1.m_categoryBits & _arg2.m_maskBits) == 0)))); return (_local3); } } }//package Box2D.Dynamics
Section 59
//b2ContactManager (Box2D.Dynamics.b2ContactManager) package Box2D.Dynamics { import Box2D.Collision.*; import Box2D.Dynamics.Contacts.*; import Box2D.Collision.Shapes.*; public class b2ContactManager extends b2PairCallback { public var m_world:b2World; public var m_destroyImmediate:Boolean; public var m_nullContact:b2NullContact; public function b2ContactManager(){ m_nullContact = new b2NullContact(); super(); m_world = null; m_destroyImmediate = false; } public function Collide(_arg1:b2Body=null):void{ var _local2:b2Body; var _local3:b2Body; var _local4:b2ContactNode; var _local5:b2ContactNode; var _local7:int; var _local8:int; var _local6:b2Contact = m_world.m_contactList; while (_local6 != null) { if (((((!((_arg1 == null))) && (!((_local6.m_shape1.m_body == _arg1))))) && (!((_local6.m_shape2.m_body == _arg1))))){ } else { if (((_local6.m_shape1.m_body.IsSleeping()) && (_local6.m_shape2.m_body.IsSleeping()))){ } else { _local7 = _local6.GetManifoldCount(); _local6.Evaluate(); _local8 = _local6.GetManifoldCount(); if ((((_local7 == 0)) && ((_local8 > 0)))){ _local2 = _local6.m_shape1.m_body; _local3 = _local6.m_shape2.m_body; _local4 = _local6.m_node1; _local5 = _local6.m_node2; _local4.contact = _local6; _local4.other = _local3; _local4.prev = null; _local4.next = _local2.m_contactList; if (_local4.next != null){ _local4.next.prev = _local6.m_node1; }; _local2.m_contactList = _local6.m_node1; _local5.contact = _local6; _local5.other = _local2; _local5.prev = null; _local5.next = _local3.m_contactList; if (_local5.next != null){ _local5.next.prev = _local5; }; _local3.m_contactList = _local5; } else { if ((((_local7 > 0)) && ((_local8 == 0)))){ _local2 = _local6.m_shape1.m_body; _local3 = _local6.m_shape2.m_body; _local4 = _local6.m_node1; _local5 = _local6.m_node2; if (_local4.prev){ _local4.prev.next = _local4.next; }; if (_local4.next){ _local4.next.prev = _local4.prev; }; if (_local4 == _local2.m_contactList){ _local2.m_contactList = _local4.next; }; _local4.prev = null; _local4.next = null; if (_local5.prev){ _local5.prev.next = _local5.next; }; if (_local5.next){ _local5.next.prev = _local5.prev; }; if (_local5 == _local3.m_contactList){ _local3.m_contactList = _local5.next; }; _local5.prev = null; _local5.next = null; }; }; }; }; _local6 = _local6.m_next; }; } public function CleanContactList():void{ var _local2:b2Contact; var _local1:b2Contact = m_world.m_contactList; while (_local1 != null) { _local2 = _local1; _local1 = _local1.m_next; if ((_local2.m_flags & b2Contact.e_destroyFlag)){ DestroyContact(_local2); _local2 = null; }; }; } public function DestroyContact(_arg1:b2Contact):void{ var _local2:b2Body; var _local3:b2Body; var _local4:b2ContactNode; var _local5:b2ContactNode; if (_arg1.m_prev){ _arg1.m_prev.m_next = _arg1.m_next; }; if (_arg1.m_next){ _arg1.m_next.m_prev = _arg1.m_prev; }; if (_arg1 == m_world.m_contactList){ m_world.m_contactList = _arg1.m_next; }; if (_arg1.GetManifoldCount() > 0){ _local2 = _arg1.m_shape1.m_body; _local3 = _arg1.m_shape2.m_body; _local4 = _arg1.m_node1; _local5 = _arg1.m_node2; _local2.WakeUp(); _local3.WakeUp(); if (_local4.prev){ _local4.prev.next = _local4.next; }; if (_local4.next){ _local4.next.prev = _local4.prev; }; if (_local4 == _local2.m_contactList){ _local2.m_contactList = _local4.next; }; _local4.prev = null; _local4.next = null; if (_local5.prev){ _local5.prev.next = _local5.next; }; if (_local5.next){ _local5.next.prev = _local5.prev; }; if (_local5 == _local3.m_contactList){ _local3.m_contactList = _local5.next; }; _local5.prev = null; _local5.next = null; }; b2Contact.Destroy(_arg1, m_world.m_blockAllocator); m_world.m_contactCount--; } override public function PairRemoved(_arg1, _arg2, _arg3):void{ if (_arg3 == null){ return; }; var _local4:b2Contact = (_arg3 as b2Contact); if (_local4 != m_nullContact){ if (m_destroyImmediate == true){ DestroyContact(_local4); _local4 = null; } else { _local4.m_flags = (_local4.m_flags | b2Contact.e_destroyFlag); }; }; } override public function PairAdded(_arg1, _arg2){ var _local8:b2Shape; var _local9:b2Body; var _local3:b2Shape = (_arg1 as b2Shape); var _local4:b2Shape = (_arg2 as b2Shape); var _local5:b2Body = _local3.m_body; var _local6:b2Body = _local4.m_body; if (((_local5.IsStatic()) && (_local6.IsStatic()))){ return (m_nullContact); }; if (_local3.m_body == _local4.m_body){ return (m_nullContact); }; if (_local6.IsConnected(_local5)){ return (m_nullContact); }; if (((!((m_world.m_filter == null))) && ((m_world.m_filter.ShouldCollide(_local3, _local4) == false)))){ return (m_nullContact); }; if (_local6.m_invMass == 0){ _local8 = _local3; _local3 = _local4; _local4 = _local8; _local9 = _local5; _local5 = _local6; _local6 = _local9; }; var _local7:b2Contact = b2Contact.Create(_local3, _local4, m_world.m_blockAllocator); if (_local7 == null){ return (m_nullContact); }; _local7.m_prev = null; _local7.m_next = m_world.m_contactList; if (m_world.m_contactList != null){ m_world.m_contactList.m_prev = _local7; }; m_world.m_contactList = _local7; m_world.m_contactCount++; return (_local7); } } }//package Box2D.Dynamics
Section 60
//b2Island (Box2D.Dynamics.b2Island) package Box2D.Dynamics { import Box2D.Common.Math.*; import Box2D.Dynamics.Joints.*; import Box2D.Dynamics.Contacts.*; import Box2D.Common.*; public class b2Island { public var m_positionError:Number; public var m_bodyCapacity:int; public var m_bodies:Array; public var m_joints:Array; public var m_jointCapacity:int; public var m_contactCount:int; public var m_contacts:Array; public var m_contactCapacity:int; public var m_jointCount:int; public var m_allocator; public var m_bodyCount:int; public static var m_positionIterationCount:uint; public function b2Island(_arg1:int, _arg2:int, _arg3:int, _arg4):void{ var _local5:int; super(); m_bodyCapacity = _arg1; m_contactCapacity = _arg2; m_jointCapacity = _arg3; m_bodyCount = 0; m_contactCount = 0; m_jointCount = 0; m_bodies = new Array(_arg1); _local5 = 0; while (_local5 < _arg1) { m_bodies[_local5] = null; _local5++; }; m_contacts = new Array(_arg2); _local5 = 0; while (_local5 < _arg2) { m_contacts[_local5] = null; _local5++; }; m_joints = new Array(_arg3); _local5 = 0; while (_local5 < _arg3) { m_joints[_local5] = null; _local5++; }; m_allocator = _arg4; } public function AddBody(_arg1:b2Body):void{ var _local2 = m_bodyCount++; m_bodies[_local2] = _arg1; } public function AddJoint(_arg1:b2Joint):void{ var _local2 = m_jointCount++; m_joints[_local2] = _arg1; } public function AddContact(_arg1:b2Contact):void{ var _local2 = m_contactCount++; m_contacts[_local2] = _arg1; } public function Solve(_arg1:b2TimeStep, _arg2:b2Vec2):void{ var _local3:int; var _local4:b2Body; var _local6:int; var _local7:Boolean; var _local8:Boolean; var _local9:Boolean; _local3 = 0; while (_local3 < m_bodyCount) { _local4 = m_bodies[_local3]; if (_local4.m_invMass == 0){ } else { _local4.m_linearVelocity.Add(b2Math.MulFV(_arg1.dt, b2Math.AddVV(_arg2, b2Math.MulFV(_local4.m_invMass, _local4.m_force)))); _local4.m_angularVelocity = (_local4.m_angularVelocity + ((_arg1.dt * _local4.m_invI) * _local4.m_torque)); _local4.m_linearVelocity.Multiply(_local4.m_linearDamping); _local4.m_angularVelocity = (_local4.m_angularVelocity * _local4.m_angularDamping); _local4.m_position0.SetV(_local4.m_position); _local4.m_rotation0 = _local4.m_rotation; }; _local3++; }; var _local5:b2ContactSolver = new b2ContactSolver(m_contacts, m_contactCount, m_allocator); _local5.PreSolve(); _local3 = 0; while (_local3 < m_jointCount) { m_joints[_local3].PrepareVelocitySolver(); _local3++; }; _local3 = 0; while (_local3 < _arg1.iterations) { _local5.SolveVelocityConstraints(); _local6 = 0; while (_local6 < m_jointCount) { m_joints[_local6].SolveVelocityConstraints(_arg1); _local6++; }; _local3++; }; _local3 = 0; while (_local3 < m_bodyCount) { _local4 = m_bodies[_local3]; if (_local4.m_invMass == 0){ } else { _local4.m_position.x = (_local4.m_position.x + (_arg1.dt * _local4.m_linearVelocity.x)); _local4.m_position.y = (_local4.m_position.y + (_arg1.dt * _local4.m_linearVelocity.y)); _local4.m_rotation = (_local4.m_rotation + (_arg1.dt * _local4.m_angularVelocity)); _local4.m_R.Set(_local4.m_rotation); }; _local3++; }; _local3 = 0; while (_local3 < m_jointCount) { m_joints[_local3].PreparePositionSolver(); _local3++; }; if (b2World.s_enablePositionCorrection){ m_positionIterationCount = 0; while (m_positionIterationCount < _arg1.iterations) { _local7 = _local5.SolvePositionConstraints(b2Settings.b2_contactBaumgarte); _local8 = true; _local3 = 0; while (_local3 < m_jointCount) { _local9 = m_joints[_local3].SolvePositionConstraints(); _local8 = ((_local8) && (_local9)); _local3++; }; if (((_local7) && (_local8))){ break; }; m_positionIterationCount++; }; }; _local5.PostSolve(); _local3 = 0; while (_local3 < m_bodyCount) { _local4 = m_bodies[_local3]; if (_local4.m_invMass == 0){ } else { _local4.m_R.Set(_local4.m_rotation); _local4.SynchronizeShapes(); _local4.m_force.Set(0, 0); _local4.m_torque = 0; }; _local3++; }; } public function Clear():void{ m_bodyCount = 0; m_contactCount = 0; m_jointCount = 0; } public function UpdateSleep(_arg1:Number):void{ var _local2:int; var _local3:b2Body; var _local4:Number = Number.MAX_VALUE; var _local5:Number = (b2Settings.b2_linearSleepTolerance * b2Settings.b2_linearSleepTolerance); var _local6:Number = (b2Settings.b2_angularSleepTolerance * b2Settings.b2_angularSleepTolerance); _local2 = 0; while (_local2 < m_bodyCount) { _local3 = m_bodies[_local2]; if (_local3.m_invMass == 0){ } else { if ((_local3.m_flags & b2Body.e_allowSleepFlag) == 0){ _local3.m_sleepTime = 0; _local4 = 0; }; if (((((((_local3.m_flags & b2Body.e_allowSleepFlag) == 0)) || (((_local3.m_angularVelocity * _local3.m_angularVelocity) > _local6)))) || ((b2Math.b2Dot(_local3.m_linearVelocity, _local3.m_linearVelocity) > _local5)))){ _local3.m_sleepTime = 0; _local4 = 0; } else { _local3.m_sleepTime = (_local3.m_sleepTime + _arg1); _local4 = b2Math.b2Min(_local4, _local3.m_sleepTime); }; }; _local2++; }; if (_local4 >= b2Settings.b2_timeToSleep){ _local2 = 0; while (_local2 < m_bodyCount) { _local3 = m_bodies[_local2]; _local3.m_flags = (_local3.m_flags | b2Body.e_sleepFlag); _local2++; }; }; } } }//package Box2D.Dynamics
Section 61
//b2TimeStep (Box2D.Dynamics.b2TimeStep) package Box2D.Dynamics { public class b2TimeStep { public var dt:Number; public var iterations:int; public var inv_dt:Number; } }//package Box2D.Dynamics
Section 62
//b2World (Box2D.Dynamics.b2World) package Box2D.Dynamics { import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Dynamics.Joints.*; import Box2D.Dynamics.Contacts.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2World { public var m_bodyCount:int; public var m_gravity:b2Vec2; public var m_listener:b2WorldListener; public var m_filter:b2CollisionFilter; private var step:b2TimeStep; public var m_positionIterationCount:int; public var m_contactList:b2Contact; public var m_blockAllocator; public var m_groundBody:b2Body; public var m_contactCount:int; public var m_broadPhase:b2BroadPhase; public var m_allowSleep:Boolean; public var m_stackAllocator; public var m_jointCount:int; public var m_bodyList:b2Body; public var m_bodyDestroyList:b2Body; public var m_jointList:b2Joint; public var m_contactManager:b2ContactManager; public static var s_enableWarmStarting:int = 1; public static var s_enablePositionCorrection:int = 1; public function b2World(_arg1:b2AABB, _arg2:b2Vec2, _arg3:Boolean){ step = new b2TimeStep(); m_contactManager = new b2ContactManager(); super(); m_listener = null; m_filter = b2CollisionFilter.b2_defaultFilter; m_bodyList = null; m_contactList = null; m_jointList = null; m_bodyCount = 0; m_contactCount = 0; m_jointCount = 0; m_bodyDestroyList = null; m_allowSleep = _arg3; m_gravity = _arg2; m_contactManager.m_world = this; m_broadPhase = new b2BroadPhase(_arg1, m_contactManager); var _local4:b2BodyDef = new b2BodyDef(); m_groundBody = CreateBody(_local4); } public function GetContactList():b2Contact{ return (m_contactList); } public function CreateJoint(_arg1:b2JointDef):b2Joint{ var _local3:b2Body; var _local4:b2Shape; var _local2:b2Joint = b2Joint.Create(_arg1, m_blockAllocator); _local2.m_prev = null; _local2.m_next = m_jointList; if (m_jointList){ m_jointList.m_prev = _local2; }; m_jointList = _local2; m_jointCount++; _local2.m_node1.joint = _local2; _local2.m_node1.other = _local2.m_body2; _local2.m_node1.prev = null; _local2.m_node1.next = _local2.m_body1.m_jointList; if (_local2.m_body1.m_jointList){ _local2.m_body1.m_jointList.prev = _local2.m_node1; }; _local2.m_body1.m_jointList = _local2.m_node1; _local2.m_node2.joint = _local2; _local2.m_node2.other = _local2.m_body1; _local2.m_node2.prev = null; _local2.m_node2.next = _local2.m_body2.m_jointList; if (_local2.m_body2.m_jointList){ _local2.m_body2.m_jointList.prev = _local2.m_node2; }; _local2.m_body2.m_jointList = _local2.m_node2; if (_arg1.collideConnected == false){ _local3 = ((_arg1.body1.m_shapeCount < _arg1.body2.m_shapeCount)) ? _arg1.body1 : _arg1.body2; _local4 = _local3.m_shapeList; while (_local4) { _local4.ResetProxy(m_broadPhase); _local4 = _local4.m_next; }; }; return (_local2); } public function DestroyJoint(_arg1:b2Joint):void{ var _local5:b2Body; var _local6:b2Shape; var _local2:Boolean = _arg1.m_collideConnected; if (_arg1.m_prev){ _arg1.m_prev.m_next = _arg1.m_next; }; if (_arg1.m_next){ _arg1.m_next.m_prev = _arg1.m_prev; }; if (_arg1 == m_jointList){ m_jointList = _arg1.m_next; }; var _local3:b2Body = _arg1.m_body1; var _local4:b2Body = _arg1.m_body2; _local3.WakeUp(); _local4.WakeUp(); if (_arg1.m_node1.prev){ _arg1.m_node1.prev.next = _arg1.m_node1.next; }; if (_arg1.m_node1.next){ _arg1.m_node1.next.prev = _arg1.m_node1.prev; }; if (_arg1.m_node1 == _local3.m_jointList){ _local3.m_jointList = _arg1.m_node1.next; }; _arg1.m_node1.prev = null; _arg1.m_node1.next = null; if (_arg1.m_node2.prev){ _arg1.m_node2.prev.next = _arg1.m_node2.next; }; if (_arg1.m_node2.next){ _arg1.m_node2.next.prev = _arg1.m_node2.prev; }; if (_arg1.m_node2 == _local4.m_jointList){ _local4.m_jointList = _arg1.m_node2.next; }; _arg1.m_node2.prev = null; _arg1.m_node2.next = null; b2Joint.Destroy(_arg1, m_blockAllocator); m_jointCount--; if (_local2 == false){ _local5 = ((_local3.m_shapeCount < _local4.m_shapeCount)) ? _local3 : _local4; _local6 = _local5.m_shapeList; while (_local6) { _local6.ResetProxy(m_broadPhase); _local6 = _local6.m_next; }; }; } public function SetFilter(_arg1:b2CollisionFilter):void{ m_filter = _arg1; } public function DestroyBody(_arg1:b2Body):void{ if ((_arg1.m_flags & b2Body.e_destroyFlag)){ return; }; if (_arg1.m_prev){ _arg1.m_prev.m_next = _arg1.m_next; }; if (_arg1.m_next){ _arg1.m_next.m_prev = _arg1.m_prev; }; if (_arg1 == m_bodyList){ m_bodyList = _arg1.m_next; }; _arg1.m_flags = (_arg1.m_flags | b2Body.e_destroyFlag); m_bodyCount--; _arg1.m_prev = null; _arg1.m_next = m_bodyDestroyList; m_bodyDestroyList = _arg1; } public function SetListener(_arg1:b2WorldListener):void{ m_listener = _arg1; } public function CreateBody(_arg1:b2BodyDef):b2Body{ var _local2:b2Body = new b2Body(_arg1, this); _local2.m_prev = null; _local2.m_next = m_bodyList; if (m_bodyList){ m_bodyList.m_prev = _local2; }; m_bodyList = _local2; m_bodyCount++; return (_local2); } public function GetGroundBody():b2Body{ return (m_groundBody); } public function Query(_arg1:b2AABB, _arg2:Array, _arg3:int):int{ var _local4:Array = new Array(); var _local5:int = m_broadPhase.QueryAABB(_arg1, _local4, _arg3); var _local6:int; while (_local6 < _local5) { _arg2[_local6] = (_local4[_local6] as b2Shape); _local6++; }; return (_local5); } public function CleanBodyList():void{ var _local2:b2Body; var _local3:b2JointNode; var _local4:b2JointNode; m_contactManager.m_destroyImmediate = true; var _local1:b2Body = m_bodyDestroyList; while (_local1) { _local2 = _local1; _local1 = _local1.m_next; _local3 = _local2.m_jointList; while (_local3) { _local4 = _local3; _local3 = _local3.next; if (m_listener){ m_listener.NotifyJointDestroyed(_local4.joint); }; DestroyJoint(_local4.joint); }; _local2.Destroy(); }; m_bodyDestroyList = null; m_contactManager.m_destroyImmediate = false; } public function Step(_arg1:Number, _arg2:int):void{ var _local3:b2Body; var _local4:b2Body; var _local12:int; var _local13:int; var _local14:b2ContactNode; var _local15:b2JointNode; var _local16:uint; step.dt = _arg1; step.iterations = _arg2; if (_arg1 > 0){ step.inv_dt = (1 / _arg1); } else { step.inv_dt = 0; }; m_positionIterationCount = 0; m_contactManager.CleanContactList(); CleanBodyList(); m_contactManager.Collide(); var _local5:b2Island = new b2Island(m_bodyCount, m_contactCount, m_jointCount, m_stackAllocator); _local3 = m_bodyList; while (_local3 != null) { _local3.m_flags = (_local3.m_flags & ~(b2Body.e_islandFlag)); _local3 = _local3.m_next; }; var _local6:b2Contact = m_contactList; while (_local6 != null) { _local6.m_flags = (_local6.m_flags & ~(b2Contact.e_islandFlag)); _local6 = _local6.m_next; }; var _local7:b2Joint = m_jointList; while (_local7 != null) { _local7.m_islandFlag = false; _local7 = _local7.m_next; }; var _local8:int = m_bodyCount; var _local9:Array = new Array(m_bodyCount); var _local10:int; while (_local10 < m_bodyCount) { _local9[_local10] = null; _local10++; }; var _local11:b2Body = m_bodyList; while (_local11 != null) { if ((_local11.m_flags & (((b2Body.e_staticFlag | b2Body.e_islandFlag) | b2Body.e_sleepFlag) | b2Body.e_frozenFlag))){ } else { _local5.Clear(); _local12 = 0; var _temp1 = _local12; _local12 = (_local12 + 1); var _local17 = _temp1; _local9[_local17] = _local11; _local11.m_flags = (_local11.m_flags | b2Body.e_islandFlag); while (_local12 > 0) { --_local12; _local3 = _local9[_local12]; _local5.AddBody(_local3); _local3.m_flags = (_local3.m_flags & ~(b2Body.e_sleepFlag)); if ((_local3.m_flags & b2Body.e_staticFlag)){ } else { _local14 = _local3.m_contactList; while (_local14 != null) { if ((_local14.contact.m_flags & b2Contact.e_islandFlag)){ } else { _local5.AddContact(_local14.contact); _local14.contact.m_flags = (_local14.contact.m_flags | b2Contact.e_islandFlag); _local4 = _local14.other; if ((_local4.m_flags & b2Body.e_islandFlag)){ } else { var _temp2 = _local12; _local12 = (_local12 + 1); var _local18 = _temp2; _local9[_local18] = _local4; _local4.m_flags = (_local4.m_flags | b2Body.e_islandFlag); }; }; _local14 = _local14.next; }; _local15 = _local3.m_jointList; while (_local15 != null) { if (_local15.joint.m_islandFlag == true){ } else { _local5.AddJoint(_local15.joint); _local15.joint.m_islandFlag = true; _local4 = _local15.other; if ((_local4.m_flags & b2Body.e_islandFlag)){ } else { var _temp3 = _local12; _local12 = (_local12 + 1); _local18 = _temp3; _local9[_local18] = _local4; _local4.m_flags = (_local4.m_flags | b2Body.e_islandFlag); }; }; _local15 = _local15.next; }; }; }; _local5.Solve(step, m_gravity); m_positionIterationCount = b2Math.b2Max(m_positionIterationCount, b2Island.m_positionIterationCount); if (m_allowSleep){ _local5.UpdateSleep(_arg1); }; _local13 = 0; while (_local13 < _local5.m_bodyCount) { _local3 = _local5.m_bodies[_local13]; if ((_local3.m_flags & b2Body.e_staticFlag)){ _local3.m_flags = (_local3.m_flags & ~(b2Body.e_islandFlag)); }; if (((_local3.IsFrozen()) && (m_listener))){ _local16 = m_listener.NotifyBoundaryViolated(_local3); if (_local16 == b2WorldListener.b2_destroyBody){ DestroyBody(_local3); _local3 = null; _local5.m_bodies[_local13] = null; }; }; _local13++; }; }; _local11 = _local11.m_next; }; m_broadPhase.Commit(); } public function GetJointList():b2Joint{ return (m_jointList); } public function GetBodyList():b2Body{ return (m_bodyList); } } }//package Box2D.Dynamics
Section 63
//b2WorldListener (Box2D.Dynamics.b2WorldListener) package Box2D.Dynamics { import Box2D.Dynamics.Joints.*; public class b2WorldListener { public static var b2_freezeBody:uint = 0; public static var b2_destroyBody:uint = 1; public function NotifyJointDestroyed(_arg1:b2Joint):void{ } public function NotifyBoundaryViolated(_arg1:b2Body):uint{ return (b2_freezeBody); } } }//package Box2D.Dynamics
Section 64
//MD5 (com.adobe.crypto.MD5) package com.adobe.crypto { import flash.utils.*; import com.adobe.utils.*; public class MD5 { public static var digest:ByteArray; private static function ff(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{ return (transform(f, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7)); } private static function f(_arg1:int, _arg2:int, _arg3:int):int{ return (((_arg1 & _arg2) | (~(_arg1) & _arg3))); } private static function g(_arg1:int, _arg2:int, _arg3:int):int{ return (((_arg1 & _arg3) | (_arg2 & ~(_arg3)))); } private static function h(_arg1:int, _arg2:int, _arg3:int):int{ return (((_arg1 ^ _arg2) ^ _arg3)); } private static function i(_arg1:int, _arg2:int, _arg3:int):int{ return ((_arg2 ^ (_arg1 | ~(_arg3)))); } private static function transform(_arg1:Function, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int, _arg8:int):int{ var _local9:int = (((_arg2 + int(_arg1(_arg3, _arg4, _arg5))) + _arg6) + _arg8); return ((IntUtil.rol(_local9, _arg7) + _arg3)); } private static function hh(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{ return (transform(h, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7)); } public static function hash(_arg1:String):String{ var _local2:ByteArray = new ByteArray(); _local2.writeUTFBytes(_arg1); return (hashBinary(_local2)); } private static function createBlocks(_arg1:ByteArray):Array{ var _local2:Array = new Array(); var _local3:int = (_arg1.length * 8); var _local4 = 0xFF; var _local5:int; while (_local5 < _local3) { _local2[int((_local5 >> 5))] = (_local2[int((_local5 >> 5))] | ((_arg1[(_local5 / 8)] & _local4) << (_local5 % 32))); _local5 = (_local5 + 8); }; _local2[int((_local3 >> 5))] = (_local2[int((_local3 >> 5))] | (128 << (_local3 % 32))); _local2[int(((((_local3 + 64) >>> 9) << 4) + 14))] = _local3; return (_local2); } public static function hashBinary(_arg1:ByteArray):String{ var _local6:int; var _local7:int; var _local8:int; var _local9:int; var _local2 = 1732584193; var _local3 = -271733879; var _local4 = -1732584194; var _local5 = 271733878; var _local10:Array = createBlocks(_arg1); var _local11:int = _local10.length; var _local12:int; while (_local12 < _local11) { _local6 = _local2; _local7 = _local3; _local8 = _local4; _local9 = _local5; _local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 0))], 7, -680876936); _local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 1))], 12, -389564586); _local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 2))], 17, 606105819); _local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 3))], 22, -1044525330); _local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 4))], 7, -176418897); _local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 5))], 12, 1200080426); _local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 6))], 17, -1473231341); _local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 7))], 22, -45705983); _local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 8))], 7, 1770035416); _local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 9))], 12, -1958414417); _local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 10))], 17, -42063); _local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 11))], 22, -1990404162); _local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 12))], 7, 1804603682); _local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 13))], 12, -40341101); _local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 14))], 17, -1502002290); _local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 15))], 22, 1236535329); _local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 1))], 5, -165796510); _local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 6))], 9, -1069501632); _local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 11))], 14, 643717713); _local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 0))], 20, -373897302); _local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 5))], 5, -701558691); _local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 10))], 9, 38016083); _local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 15))], 14, -660478335); _local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 4))], 20, -405537848); _local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 9))], 5, 568446438); _local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 14))], 9, -1019803690); _local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 3))], 14, -187363961); _local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 8))], 20, 1163531501); _local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 13))], 5, -1444681467); _local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 2))], 9, -51403784); _local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 7))], 14, 1735328473); _local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 12))], 20, -1926607734); _local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 5))], 4, -378558); _local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 8))], 11, -2022574463); _local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 11))], 16, 1839030562); _local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 14))], 23, -35309556); _local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 1))], 4, -1530992060); _local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 4))], 11, 1272893353); _local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 7))], 16, -155497632); _local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 10))], 23, -1094730640); _local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 13))], 4, 681279174); _local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 0))], 11, -358537222); _local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 3))], 16, -722521979); _local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 6))], 23, 76029189); _local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 9))], 4, -640364487); _local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 12))], 11, -421815835); _local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 15))], 16, 530742520); _local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 2))], 23, -995338651); _local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 0))], 6, -198630844); _local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 7))], 10, 1126891415); _local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 14))], 15, -1416354905); _local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 5))], 21, -57434055); _local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 12))], 6, 1700485571); _local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 3))], 10, -1894986606); _local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 10))], 15, -1051523); _local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 1))], 21, -2054922799); _local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 8))], 6, 1873313359); _local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 15))], 10, -30611744); _local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 6))], 15, -1560198380); _local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 13))], 21, 1309151649); _local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 4))], 6, -145523070); _local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 11))], 10, -1120210379); _local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 2))], 15, 718787259); _local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 9))], 21, -343485551); _local2 = (_local2 + _local6); _local3 = (_local3 + _local7); _local4 = (_local4 + _local8); _local5 = (_local5 + _local9); _local12 = (_local12 + 16); }; digest = new ByteArray(); digest.writeInt(_local2); digest.writeInt(_local3); digest.writeInt(_local4); digest.writeInt(_local5); digest.position = 0; return ((((IntUtil.toHex(_local2) + IntUtil.toHex(_local3)) + IntUtil.toHex(_local4)) + IntUtil.toHex(_local5))); } private static function gg(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{ return (transform(g, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7)); } private static function ii(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{ return (transform(i, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7)); } public static function hashBytes(_arg1:ByteArray):String{ return (hashBinary(_arg1)); } } }//package com.adobe.crypto
Section 65
//BitString (com.adobe.images.BitString) package com.adobe.images { public class BitString { public var val:int;// = 0 public var len:int;// = 0 } }//package com.adobe.images
Section 66
//JPGEncoder (com.adobe.images.JPGEncoder) package com.adobe.images { import flash.display.*; import flash.geom.*; import flash.utils.*; public class JPGEncoder { private var fdtbl_UV:Array; private var std_ac_chrominance_values:Array; private var std_dc_chrominance_values:Array; private var ZigZag:Array; private var YDC_HT:Array; private var YAC_HT:Array; private var bytenew:int;// = 0 private var fdtbl_Y:Array; private var std_ac_chrominance_nrcodes:Array; private var DU:Array; private var std_ac_luminance_values:Array; private var std_dc_chrominance_nrcodes:Array; private var UVTable:Array; private var YDU:Array; private var UDU:Array; private var byteout:ByteArray; private var UVAC_HT:Array; private var UVDC_HT:Array; private var bytepos:int;// = 7 private var VDU:Array; private var std_ac_luminance_nrcodes:Array; private var std_dc_luminance_values:Array; private var YTable:Array; private var std_dc_luminance_nrcodes:Array; private var bitcode:Array; private var category:Array; public function JPGEncoder(_arg1:Number=50){ this.ZigZag = [0, 1, 5, 6, 14, 15, 27, 28, 2, 4, 7, 13, 16, 26, 29, 42, 3, 8, 12, 17, 25, 30, 41, 43, 9, 11, 18, 24, 31, 40, 44, 53, 10, 19, 23, 32, 39, 45, 52, 54, 20, 22, 33, 38, 46, 51, 55, 60, 21, 34, 37, 47, 50, 56, 59, 61, 35, 36, 48, 49, 57, 58, 62, 63]; this.YTable = new Array(64); this.UVTable = new Array(64); this.fdtbl_Y = new Array(64); this.fdtbl_UV = new Array(64); this.std_dc_luminance_nrcodes = [0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0]; this.std_dc_luminance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]; this.std_ac_luminance_nrcodes = [0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 125]; this.std_ac_luminance_values = [1, 2, 3, 0, 4, 17, 5, 18, 33, 49, 65, 6, 19, 81, 97, 7, 34, 113, 20, 50, 129, 145, 161, 8, 35, 66, 177, 193, 21, 82, 209, 240, 36, 51, 98, 114, 130, 9, 10, 22, 23, 24, 25, 26, 37, 38, 39, 40, 41, 42, 52, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, 131, 132, 133, 134, 135, 136, 137, 138, 146, 147, 148, 149, 150, 151, 152, 153, 154, 162, 163, 164, 165, 166, 167, 168, 169, 170, 178, 179, 180, 181, 182, 183, 184, 185, 186, 194, 195, 196, 197, 198, 199, 200, 201, 202, 210, 211, 212, 213, 214, 215, 216, 217, 218, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250]; this.std_dc_chrominance_nrcodes = [0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0]; this.std_dc_chrominance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]; this.std_ac_chrominance_nrcodes = [0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 119]; this.std_ac_chrominance_values = [0, 1, 2, 3, 17, 4, 5, 33, 49, 6, 18, 65, 81, 7, 97, 113, 19, 34, 50, 129, 8, 20, 66, 145, 161, 177, 193, 9, 35, 51, 82, 240, 21, 98, 114, 209, 10, 22, 36, 52, 225, 37, 241, 23, 24, 25, 26, 38, 39, 40, 41, 42, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, 130, 131, 132, 133, 134, 135, 136, 137, 138, 146, 147, 148, 149, 150, 151, 152, 153, 154, 162, 163, 164, 165, 166, 167, 168, 169, 170, 178, 179, 180, 181, 182, 183, 184, 185, 186, 194, 195, 196, 197, 198, 199, 200, 201, 202, 210, 211, 212, 213, 214, 215, 216, 217, 218, 226, 227, 228, 229, 230, 231, 232, 233, 234, 242, 243, 244, 245, 246, 247, 248, 249, 250]; this.bitcode = new Array(0xFFFF); this.category = new Array(0xFFFF); this.DU = new Array(64); this.YDU = new Array(64); this.UDU = new Array(64); this.VDU = new Array(64); super(); if (_arg1 <= 0){ _arg1 = 1; }; if (_arg1 > 100){ _arg1 = 100; }; var _local2:int; if (_arg1 < 50){ _local2 = int((5000 / _arg1)); } else { _local2 = int((200 - (_arg1 * 2))); }; this.initHuffmanTbl(); this.initCategoryNumber(); this.initQuantTables(_local2); } private function initHuffmanTbl():void{ this.YDC_HT = this.computeHuffmanTbl(this.std_dc_luminance_nrcodes, this.std_dc_luminance_values); this.UVDC_HT = this.computeHuffmanTbl(this.std_dc_chrominance_nrcodes, this.std_dc_chrominance_values); this.YAC_HT = this.computeHuffmanTbl(this.std_ac_luminance_nrcodes, this.std_ac_luminance_values); this.UVAC_HT = this.computeHuffmanTbl(this.std_ac_chrominance_nrcodes, this.std_ac_chrominance_values); } private function RGB2YUV(_arg1:BitmapData, _arg2:int, _arg3:int):void{ var _local6:int; var _local7:uint; var _local8:Number; var _local9:Number; var _local10:Number; var _local4:int; var _local5:int; while (_local5 < 8) { _local6 = 0; while (_local6 < 8) { _local7 = _arg1.getPixel32((_arg2 + _local6), (_arg3 + _local5)); _local8 = Number(((_local7 >> 16) & 0xFF)); _local9 = Number(((_local7 >> 8) & 0xFF)); _local10 = Number((_local7 & 0xFF)); this.YDU[_local4] = ((((0.299 * _local8) + (0.587 * _local9)) + (0.114 * _local10)) - 128); this.UDU[_local4] = (((-0.16874 * _local8) + (-0.33126 * _local9)) + (0.5 * _local10)); this.VDU[_local4] = (((0.5 * _local8) + (-0.41869 * _local9)) + (-0.08131 * _local10)); _local4++; _local6++; }; _local5++; }; } private function writeBits(_arg1:BitString):void{ var _local2:int = _arg1.val; var _local3:int = (_arg1.len - 1); while (_local3 >= 0) { if ((_local2 & uint((1 << _local3)))){ this.bytenew = (this.bytenew | uint((1 << this.bytepos))); }; _local3--; this.bytepos--; if (this.bytepos < 0){ if (this.bytenew == 0xFF){ this.writeByte(0xFF); this.writeByte(0); } else { this.writeByte(this.bytenew); }; this.bytepos = 7; this.bytenew = 0; }; }; } private function writeWord(_arg1:int):void{ this.writeByte(((_arg1 >> 8) & 0xFF)); this.writeByte((_arg1 & 0xFF)); } private function writeByte(_arg1:int):void{ this.byteout.writeByte(_arg1); } private function writeDHT():void{ var _local1:int; this.writeWord(65476); this.writeWord(418); this.writeByte(0); _local1 = 0; while (_local1 < 16) { this.writeByte(this.std_dc_luminance_nrcodes[(_local1 + 1)]); _local1++; }; _local1 = 0; while (_local1 <= 11) { this.writeByte(this.std_dc_luminance_values[_local1]); _local1++; }; this.writeByte(16); _local1 = 0; while (_local1 < 16) { this.writeByte(this.std_ac_luminance_nrcodes[(_local1 + 1)]); _local1++; }; _local1 = 0; while (_local1 <= 161) { this.writeByte(this.std_ac_luminance_values[_local1]); _local1++; }; this.writeByte(1); _local1 = 0; while (_local1 < 16) { this.writeByte(this.std_dc_chrominance_nrcodes[(_local1 + 1)]); _local1++; }; _local1 = 0; while (_local1 <= 11) { this.writeByte(this.std_dc_chrominance_values[_local1]); _local1++; }; this.writeByte(17); _local1 = 0; while (_local1 < 16) { this.writeByte(this.std_ac_chrominance_nrcodes[(_local1 + 1)]); _local1++; }; _local1 = 0; while (_local1 <= 161) { this.writeByte(this.std_ac_chrominance_values[_local1]); _local1++; }; } public function encode(_arg1:BitmapData):ByteArray{ var _local6:int; var _local7:BitString; this.byteout = new ByteArray(); this.bytenew = 0; this.bytepos = 7; this.writeWord(65496); this.writeAPP0(); this.writeDQT(); this.writeSOF0(_arg1.width, _arg1.height); this.writeDHT(); this.writeSOS(); var _local2:Number = 0; var _local3:Number = 0; var _local4:Number = 0; this.bytenew = 0; this.bytepos = 7; var _local5:int; while (_local5 < _arg1.height) { _local6 = 0; while (_local6 < _arg1.width) { this.RGB2YUV(_arg1, _local6, _local5); _local2 = this.processDU(this.YDU, this.fdtbl_Y, _local2, this.YDC_HT, this.YAC_HT); _local3 = this.processDU(this.UDU, this.fdtbl_UV, _local3, this.UVDC_HT, this.UVAC_HT); _local4 = this.processDU(this.VDU, this.fdtbl_UV, _local4, this.UVDC_HT, this.UVAC_HT); _local6 = (_local6 + 8); }; _local5 = (_local5 + 8); }; if (this.bytepos >= 0){ _local7 = new BitString(); _local7.len = (this.bytepos + 1); _local7.val = ((1 << (this.bytepos + 1)) - 1); this.writeBits(_local7); }; this.writeWord(65497); return (this.byteout); } private function initCategoryNumber():void{ var _local3:int; var _local1 = 1; var _local2 = 2; var _local4 = 1; while (_local4 <= 15) { _local3 = _local1; while (_local3 < _local2) { this.category[(32767 + _local3)] = _local4; this.bitcode[(32767 + _local3)] = new BitString(); this.bitcode[(32767 + _local3)].len = _local4; this.bitcode[(32767 + _local3)].val = _local3; _local3++; }; _local3 = -((_local2 - 1)); while (_local3 <= -(_local1)) { this.category[(32767 + _local3)] = _local4; this.bitcode[(32767 + _local3)] = new BitString(); this.bitcode[(32767 + _local3)].len = _local4; this.bitcode[(32767 + _local3)].val = ((_local2 - 1) + _local3); _local3++; }; _local1 = (_local1 << 1); _local2 = (_local2 << 1); _local4++; }; } private function writeDQT():void{ var _local1:int; this.writeWord(65499); this.writeWord(132); this.writeByte(0); _local1 = 0; while (_local1 < 64) { this.writeByte(this.YTable[_local1]); _local1++; }; this.writeByte(1); _local1 = 0; while (_local1 < 64) { this.writeByte(this.UVTable[_local1]); _local1++; }; } private function writeAPP0():void{ this.writeWord(65504); this.writeWord(16); this.writeByte(74); this.writeByte(70); this.writeByte(73); this.writeByte(70); this.writeByte(0); this.writeByte(1); this.writeByte(1); this.writeByte(0); this.writeWord(1); this.writeWord(1); this.writeByte(0); this.writeByte(0); } private function writeSOS():void{ this.writeWord(65498); this.writeWord(12); this.writeByte(3); this.writeByte(1); this.writeByte(0); this.writeByte(2); this.writeByte(17); this.writeByte(3); this.writeByte(17); this.writeByte(0); this.writeByte(63); this.writeByte(0); } private function processDU(_arg1:Array, _arg2:Array, _arg3:Number, _arg4:Array, _arg5:Array):Number{ var _local8:int; var _local12:int; var _local13:int; var _local14:int; var _local6:BitString = _arg5[0]; var _local7:BitString = _arg5[240]; var _local9:Array = this.fDCTQuant(_arg1, _arg2); _local8 = 0; while (_local8 < 64) { this.DU[this.ZigZag[_local8]] = _local9[_local8]; _local8++; }; var _local10:int = (this.DU[0] - _arg3); _arg3 = this.DU[0]; if (_local10 == 0){ this.writeBits(_arg4[0]); } else { this.writeBits(_arg4[this.category[(32767 + _local10)]]); this.writeBits(this.bitcode[(32767 + _local10)]); }; var _local11 = 63; while ((((_local11 > 0)) && ((this.DU[_local11] == 0)))) { _local11--; }; if (_local11 == 0){ this.writeBits(_local6); return (_arg3); }; _local8 = 1; while (_local8 <= _local11) { _local12 = _local8; while ((((this.DU[_local8] == 0)) && ((_local8 <= _local11)))) { _local8++; }; _local13 = (_local8 - _local12); if (_local13 >= 16){ _local14 = 1; while (_local14 <= (_local13 / 16)) { this.writeBits(_local7); _local14++; }; _local13 = int((_local13 & 15)); }; this.writeBits(_arg5[((_local13 * 16) + this.category[(32767 + this.DU[_local8])])]); this.writeBits(this.bitcode[(32767 + this.DU[_local8])]); _local8++; }; if (_local11 != 63){ this.writeBits(_local6); }; return (_arg3); } private function initQuantTables(_arg1:int):void{ var _local2:int; var _local3:Number; var _local8:int; var _local4:Array = [16, 11, 10, 16, 24, 40, 51, 61, 12, 12, 14, 19, 26, 58, 60, 55, 14, 13, 16, 24, 40, 57, 69, 56, 14, 17, 22, 29, 51, 87, 80, 62, 18, 22, 37, 56, 68, 109, 103, 77, 24, 35, 55, 64, 81, 104, 113, 92, 49, 64, 78, 87, 103, 121, 120, 101, 72, 92, 95, 98, 112, 100, 103, 99]; _local2 = 0; while (_local2 < 64) { _local3 = Math.floor((((_local4[_local2] * _arg1) + 50) / 100)); if (_local3 < 1){ _local3 = 1; } else { if (_local3 > 0xFF){ _local3 = 0xFF; }; }; this.YTable[this.ZigZag[_local2]] = _local3; _local2++; }; var _local5:Array = [17, 18, 24, 47, 99, 99, 99, 99, 18, 21, 26, 66, 99, 99, 99, 99, 24, 26, 56, 99, 99, 99, 99, 99, 47, 66, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99]; _local2 = 0; while (_local2 < 64) { _local3 = Math.floor((((_local5[_local2] * _arg1) + 50) / 100)); if (_local3 < 1){ _local3 = 1; } else { if (_local3 > 0xFF){ _local3 = 0xFF; }; }; this.UVTable[this.ZigZag[_local2]] = _local3; _local2++; }; var _local6:Array = [1, 1.387039845, 1.306562965, 1.175875602, 1, 0.785694958, 0.5411961, 0.275899379]; _local2 = 0; var _local7:int; while (_local7 < 8) { _local8 = 0; while (_local8 < 8) { this.fdtbl_Y[_local2] = (1 / (((this.YTable[this.ZigZag[_local2]] * _local6[_local7]) * _local6[_local8]) * 8)); this.fdtbl_UV[_local2] = (1 / (((this.UVTable[this.ZigZag[_local2]] * _local6[_local7]) * _local6[_local8]) * 8)); _local2++; _local8++; }; _local7++; }; } private function writeSOF0(_arg1:int, _arg2:int):void{ this.writeWord(65472); this.writeWord(17); this.writeByte(8); this.writeWord(_arg2); this.writeWord(_arg1); this.writeByte(3); this.writeByte(1); this.writeByte(17); this.writeByte(0); this.writeByte(2); this.writeByte(17); this.writeByte(1); this.writeByte(3); this.writeByte(17); this.writeByte(1); } private function computeHuffmanTbl(_arg1:Array, _arg2:Array):Array{ var _local7:int; var _local3:int; var _local4:int; var _local5:Array = new Array(); var _local6 = 1; while (_local6 <= 16) { _local7 = 1; while (_local7 <= _arg1[_local6]) { _local5[_arg2[_local4]] = new BitString(); _local5[_arg2[_local4]].val = _local3; _local5[_arg2[_local4]].len = _local6; _local4++; _local3++; _local7++; }; _local3 = (_local3 * 2); _local6++; }; return (_local5); } private function fDCTQuant(_arg1:Array, _arg2:Array):Array{ 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:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:int; var _local23:int; _local22 = 0; while (_local22 < 8) { _local3 = (_arg1[(_local23 + 0)] + _arg1[(_local23 + 7)]); _local10 = (_arg1[(_local23 + 0)] - _arg1[(_local23 + 7)]); _local4 = (_arg1[(_local23 + 1)] + _arg1[(_local23 + 6)]); _local9 = (_arg1[(_local23 + 1)] - _arg1[(_local23 + 6)]); _local5 = (_arg1[(_local23 + 2)] + _arg1[(_local23 + 5)]); _local8 = (_arg1[(_local23 + 2)] - _arg1[(_local23 + 5)]); _local6 = (_arg1[(_local23 + 3)] + _arg1[(_local23 + 4)]); _local7 = (_arg1[(_local23 + 3)] - _arg1[(_local23 + 4)]); _local11 = (_local3 + _local6); _local14 = (_local3 - _local6); _local12 = (_local4 + _local5); _local13 = (_local4 - _local5); _arg1[(_local23 + 0)] = (_local11 + _local12); _arg1[(_local23 + 4)] = (_local11 - _local12); _local15 = ((_local13 + _local14) * 0.707106781); _arg1[(_local23 + 2)] = (_local14 + _local15); _arg1[(_local23 + 6)] = (_local14 - _local15); _local11 = (_local7 + _local8); _local12 = (_local8 + _local9); _local13 = (_local9 + _local10); _local19 = ((_local11 - _local13) * 0.382683433); _local16 = ((0.5411961 * _local11) + _local19); _local18 = ((1.306562965 * _local13) + _local19); _local17 = (_local12 * 0.707106781); _local20 = (_local10 + _local17); _local21 = (_local10 - _local17); _arg1[(_local23 + 5)] = (_local21 + _local16); _arg1[(_local23 + 3)] = (_local21 - _local16); _arg1[(_local23 + 1)] = (_local20 + _local18); _arg1[(_local23 + 7)] = (_local20 - _local18); _local23 = (_local23 + 8); _local22++; }; _local23 = 0; _local22 = 0; while (_local22 < 8) { _local3 = (_arg1[(_local23 + 0)] + _arg1[(_local23 + 56)]); _local10 = (_arg1[(_local23 + 0)] - _arg1[(_local23 + 56)]); _local4 = (_arg1[(_local23 + 8)] + _arg1[(_local23 + 48)]); _local9 = (_arg1[(_local23 + 8)] - _arg1[(_local23 + 48)]); _local5 = (_arg1[(_local23 + 16)] + _arg1[(_local23 + 40)]); _local8 = (_arg1[(_local23 + 16)] - _arg1[(_local23 + 40)]); _local6 = (_arg1[(_local23 + 24)] + _arg1[(_local23 + 32)]); _local7 = (_arg1[(_local23 + 24)] - _arg1[(_local23 + 32)]); _local11 = (_local3 + _local6); _local14 = (_local3 - _local6); _local12 = (_local4 + _local5); _local13 = (_local4 - _local5); _arg1[(_local23 + 0)] = (_local11 + _local12); _arg1[(_local23 + 32)] = (_local11 - _local12); _local15 = ((_local13 + _local14) * 0.707106781); _arg1[(_local23 + 16)] = (_local14 + _local15); _arg1[(_local23 + 48)] = (_local14 - _local15); _local11 = (_local7 + _local8); _local12 = (_local8 + _local9); _local13 = (_local9 + _local10); _local19 = ((_local11 - _local13) * 0.382683433); _local16 = ((0.5411961 * _local11) + _local19); _local18 = ((1.306562965 * _local13) + _local19); _local17 = (_local12 * 0.707106781); _local20 = (_local10 + _local17); _local21 = (_local10 - _local17); _arg1[(_local23 + 40)] = (_local21 + _local16); _arg1[(_local23 + 24)] = (_local21 - _local16); _arg1[(_local23 + 8)] = (_local20 + _local18); _arg1[(_local23 + 56)] = (_local20 - _local18); _local23++; _local22++; }; _local22 = 0; while (_local22 < 64) { _arg1[_local22] = Math.round((_arg1[_local22] * _arg2[_local22])); _local22++; }; return (_arg1); } } }//package com.adobe.images
Section 67
//PNGEncoder (com.adobe.images.PNGEncoder) package com.adobe.images { import flash.display.*; import flash.geom.*; import flash.utils.*; public class PNGEncoder { private static var crcTableComputed:Boolean = false; private static var crcTable:Array; private static function writeChunk(_arg1:ByteArray, _arg2:uint, _arg3:ByteArray):void{ var _local8:uint; var _local9:uint; var _local10:uint; if (!crcTableComputed){ crcTableComputed = true; crcTable = []; _local9 = 0; while (_local9 < 0x0100) { _local8 = _local9; _local10 = 0; while (_local10 < 8) { if ((_local8 & 1)){ _local8 = uint((uint(3988292384) ^ uint((_local8 >>> 1)))); } else { _local8 = uint((_local8 >>> 1)); }; _local10++; }; crcTable[_local9] = _local8; _local9++; }; }; var _local4:uint; if (_arg3 != null){ _local4 = _arg3.length; }; _arg1.writeUnsignedInt(_local4); var _local5:uint = _arg1.position; _arg1.writeUnsignedInt(_arg2); if (_arg3 != null){ _arg1.writeBytes(_arg3); }; var _local6:uint = _arg1.position; _arg1.position = _local5; _local8 = 4294967295; var _local7:int; while (_local7 < (_local6 - _local5)) { _local8 = uint((crcTable[((_local8 ^ _arg1.readUnsignedByte()) & uint(0xFF))] ^ uint((_local8 >>> 8)))); _local7++; }; _local8 = uint((_local8 ^ uint(4294967295))); _arg1.position = _local6; _arg1.writeUnsignedInt(_local8); } public static function encode(_arg1:BitmapData):ByteArray{ var _local6:uint; var _local7:int; var _local2:ByteArray = new ByteArray(); _local2.writeUnsignedInt(2303741511); _local2.writeUnsignedInt(218765834); var _local3:ByteArray = new ByteArray(); _local3.writeInt(_arg1.width); _local3.writeInt(_arg1.height); _local3.writeUnsignedInt(134610944); _local3.writeByte(0); writeChunk(_local2, 1229472850, _local3); var _local4:ByteArray = new ByteArray(); var _local5:int; while (_local5 < _arg1.height) { _local4.writeByte(0); if (!_arg1.transparent){ _local7 = 0; while (_local7 < _arg1.width) { _local6 = _arg1.getPixel(_local7, _local5); _local4.writeUnsignedInt(uint((((_local6 & 0xFFFFFF) << 8) | 0xFF))); _local7++; }; } else { _local7 = 0; while (_local7 < _arg1.width) { _local6 = _arg1.getPixel32(_local7, _local5); _local4.writeUnsignedInt(uint((((_local6 & 0xFFFFFF) << 8) | (_local6 >>> 24)))); _local7++; }; }; _local5++; }; _local4.compress(); writeChunk(_local2, 1229209940, _local4); writeChunk(_local2, 1229278788, null); return (_local2); } } }//package com.adobe.images
Section 68
//JSON (com.adobe.serialization.json.JSON) package com.adobe.serialization.json { public class JSON { public static function decode(_arg1:String){ var _local2:JSONDecoder = new JSONDecoder(_arg1); return (_local2.getValue()); } public static function encode(_arg1:Object):String{ var _local2:JSONEncoder = new JSONEncoder(_arg1); return (_local2.getString()); } } }//package com.adobe.serialization.json
Section 69
//JSONDecoder (com.adobe.serialization.json.JSONDecoder) package com.adobe.serialization.json { public class JSONDecoder { private var value; private var tokenizer:JSONTokenizer; private var token:JSONToken; public function JSONDecoder(_arg1:String){ this.tokenizer = new JSONTokenizer(_arg1); this.nextToken(); this.value = this.parseValue(); } private function parseObject():Object{ var _local2:String; var _local1:Object = new Object(); this.nextToken(); if (this.token.type == JSONTokenType.RIGHT_BRACE){ return (_local1); }; while (true) { if (this.token.type == JSONTokenType.STRING){ _local2 = String(this.token.value); this.nextToken(); if (this.token.type == JSONTokenType.COLON){ this.nextToken(); _local1[_local2] = this.parseValue(); this.nextToken(); if (this.token.type == JSONTokenType.RIGHT_BRACE){ return (_local1); }; if (this.token.type == JSONTokenType.COMMA){ this.nextToken(); } else { this.tokenizer.parseError(("Expecting } or , but found " + this.token.value)); }; } else { this.tokenizer.parseError(("Expecting : but found " + this.token.value)); }; } else { this.tokenizer.parseError(("Expecting string but found " + this.token.value)); }; }; return (null); } private function parseValue():Object{ if (this.token == null){ this.tokenizer.parseError("Unexpected end of input"); }; switch (this.token.type){ case JSONTokenType.LEFT_BRACE: return (this.parseObject()); case JSONTokenType.LEFT_BRACKET: return (this.parseArray()); case JSONTokenType.STRING: case JSONTokenType.NUMBER: case JSONTokenType.TRUE: case JSONTokenType.FALSE: case JSONTokenType.NULL: return (this.token.value); default: this.tokenizer.parseError(("Unexpected " + this.token.value)); }; return (null); } private function nextToken():JSONToken{ return ((this.token = this.tokenizer.getNextToken())); } public function getValue(){ return (this.value); } private function parseArray():Array{ var _local1:Array = new Array(); this.nextToken(); if (this.token.type == JSONTokenType.RIGHT_BRACKET){ return (_local1); }; while (true) { _local1.push(this.parseValue()); this.nextToken(); if (this.token.type == JSONTokenType.RIGHT_BRACKET){ return (_local1); }; if (this.token.type == JSONTokenType.COMMA){ this.nextToken(); } else { this.tokenizer.parseError(("Expecting ] or , but found " + this.token.value)); }; }; return (null); } } }//package com.adobe.serialization.json
Section 70
//JSONEncoder (com.adobe.serialization.json.JSONEncoder) package com.adobe.serialization.json { import flash.utils.*; public class JSONEncoder { private var jsonString:String; public function JSONEncoder(_arg1){ this.jsonString = this.convertToString(_arg1); } private function escapeString(_arg1:String):String{ var _local3:String; var _local6:String; var _local7:String; var _local2 = ""; var _local4:Number = _arg1.length; var _local5:int; while (_local5 < _local4) { _local3 = _arg1.charAt(_local5); switch (_local3){ case "\"": _local2 = (_local2 + "\\\""); break; case "\\": _local2 = (_local2 + "\\\\"); break; case "\b": _local2 = (_local2 + "\\b"); break; case "\f": _local2 = (_local2 + "\\f"); break; case "\n": _local2 = (_local2 + "\\n"); break; case "\r": _local2 = (_local2 + "\\r"); break; case "\t": _local2 = (_local2 + "\\t"); break; default: if (_local3 < " "){ _local6 = _local3.charCodeAt(0).toString(16); _local7 = ((_local6.length == 2)) ? "00" : "000"; _local2 = (_local2 + (("\\u" + _local7) + _local6)); } else { _local2 = (_local2 + _local3); }; }; _local5++; }; return ((("\"" + _local2) + "\"")); } private function arrayToString(_arg1:Array):String{ var _local2 = ""; var _local3:int; while (_local3 < _arg1.length) { if (_local2.length > 0){ _local2 = (_local2 + ","); }; _local2 = (_local2 + this.convertToString(_arg1[_local3])); _local3++; }; return ((("[" + _local2) + "]")); } public function getString():String{ return (this.jsonString); } private function objectToString(_arg1:Object):String{ var value:Object; var key:String; var v:XML; var o = _arg1; var s = ""; var classInfo:XML = describeType(o); if (classInfo.@name.toString() == "Object"){ for (key in o) { value = o[key]; if ((value is Function)){ } else { if (s.length > 0){ s = (s + ","); }; s = (s + ((this.escapeString(key) + ":") + this.convertToString(value))); }; }; } else { for each (v in classInfo..*.(((name() == "variable")) || ((name() == "accessor")))) { if (s.length > 0){ s = (s + ","); }; s = (s + ((this.escapeString(v.@name.toString()) + ":") + this.convertToString(o[v.@name]))); }; }; return ((("{" + s) + "}")); } private function convertToString(_arg1):String{ if ((_arg1 is String)){ return (this.escapeString((_arg1 as String))); }; if ((_arg1 is Number)){ return ((isFinite((_arg1 as Number))) ? _arg1.toString() : "null"); } else { if ((_arg1 is Boolean)){ return ((_arg1) ? "true" : "false"); } else { if ((_arg1 is Array)){ return (this.arrayToString((_arg1 as Array))); }; if ((((_arg1 is Object)) && (!((_arg1 == null))))){ return (this.objectToString(_arg1)); }; }; }; return ("null"); } } }//package com.adobe.serialization.json
Section 71
//JSONParseError (com.adobe.serialization.json.JSONParseError) package com.adobe.serialization.json { public class JSONParseError extends Error { private var _location:int; private var _text:String; public function JSONParseError(_arg1:String="", _arg2:int=0, _arg3:String=""){ super(_arg1); name = "JSONParseError"; this._location = _arg2; this._text = _arg3; } public function get location():int{ return (this._location); } public function get text():String{ return (this._text); } } }//package com.adobe.serialization.json
Section 72
//JSONToken (com.adobe.serialization.json.JSONToken) package com.adobe.serialization.json { public class JSONToken { private var _value:Object; private var _type:int; public function JSONToken(_arg1:int=-1, _arg2:Object=null){ this._type = _arg1; this._value = _arg2; } public function get value():Object{ return (this._value); } public function get type():int{ return (this._type); } public function set type(_arg1:int):void{ this._type = _arg1; } public function set value(_arg1:Object):void{ this._value = _arg1; } } }//package com.adobe.serialization.json
Section 73
//JSONTokenizer (com.adobe.serialization.json.JSONTokenizer) package com.adobe.serialization.json { public class JSONTokenizer { private var loc:int; private var ch:String; private var obj:Object; private var jsonString:String; public function JSONTokenizer(_arg1:String){ this.jsonString = _arg1; this.loc = 0; this.nextChar(); } private function skipComments():void{ if (this.ch == "/"){ this.nextChar(); switch (this.ch){ case "/": do { this.nextChar(); } while (((!((this.ch == "\n"))) && (!((this.ch == ""))))); this.nextChar(); break; case "*": this.nextChar(); while (true) { if (this.ch == "*"){ this.nextChar(); if (this.ch == "/"){ this.nextChar(); break; }; } else { this.nextChar(); }; if (this.ch == ""){ this.parseError("Multi-line comment not closed"); }; }; break; default: this.parseError((("Unexpected " + this.ch) + " encountered (expecting '/' or '*' )")); }; }; } private function isDigit(_arg1:String):Boolean{ return ((((_arg1 >= "0")) && ((_arg1 <= "9")))); } private function readString():JSONToken{ var _local3:String; var _local4:int; var _local1:JSONToken = new JSONToken(); _local1.type = JSONTokenType.STRING; var _local2 = ""; this.nextChar(); while (((!((this.ch == "\""))) && (!((this.ch == ""))))) { if (this.ch == "\\"){ this.nextChar(); switch (this.ch){ case "\"": _local2 = (_local2 + "\""); break; case "/": _local2 = (_local2 + "/"); break; case "\\": _local2 = (_local2 + "\\"); break; case "b": _local2 = (_local2 + "\b"); break; case "f": _local2 = (_local2 + "\f"); break; case "n": _local2 = (_local2 + "\n"); break; case "r": _local2 = (_local2 + "\r"); break; case "t": _local2 = (_local2 + "\t"); break; case "u": _local3 = ""; _local4 = 0; while (_local4 < 4) { if (!this.isHexDigit(this.nextChar())){ this.parseError((" Excepted a hex digit, but found: " + this.ch)); }; _local3 = (_local3 + this.ch); _local4++; }; _local2 = (_local2 + String.fromCharCode(parseInt(_local3, 16))); break; default: _local2 = (_local2 + ("\\" + this.ch)); }; } else { _local2 = (_local2 + this.ch); }; this.nextChar(); }; if (this.ch == ""){ this.parseError("Unterminated string literal"); }; this.nextChar(); _local1.value = _local2; return (_local1); } private function nextChar():String{ return ((this.ch = this.jsonString.charAt(this.loc++))); } public function getNextToken():JSONToken{ var _local2:String; var _local3:String; var _local4:String; var _local1:JSONToken = new JSONToken(); this.skipIgnored(); switch (this.ch){ case "{": _local1.type = JSONTokenType.LEFT_BRACE; _local1.value = "{"; this.nextChar(); break; case "}": _local1.type = JSONTokenType.RIGHT_BRACE; _local1.value = "}"; this.nextChar(); break; case "[": _local1.type = JSONTokenType.LEFT_BRACKET; _local1.value = "["; this.nextChar(); break; case "]": _local1.type = JSONTokenType.RIGHT_BRACKET; _local1.value = "]"; this.nextChar(); break; case ",": _local1.type = JSONTokenType.COMMA; _local1.value = ","; this.nextChar(); break; case ":": _local1.type = JSONTokenType.COLON; _local1.value = ":"; this.nextChar(); break; case "t": _local2 = ((("t" + this.nextChar()) + this.nextChar()) + this.nextChar()); if (_local2 == "true"){ _local1.type = JSONTokenType.TRUE; _local1.value = true; this.nextChar(); } else { this.parseError(("Expecting 'true' but found " + _local2)); }; break; case "f": _local3 = (((("f" + this.nextChar()) + this.nextChar()) + this.nextChar()) + this.nextChar()); if (_local3 == "false"){ _local1.type = JSONTokenType.FALSE; _local1.value = false; this.nextChar(); } else { this.parseError(("Expecting 'false' but found " + _local3)); }; break; case "n": _local4 = ((("n" + this.nextChar()) + this.nextChar()) + this.nextChar()); if (_local4 == "null"){ _local1.type = JSONTokenType.NULL; _local1.value = null; this.nextChar(); } else { this.parseError(("Expecting 'null' but found " + _local4)); }; break; case "\"": _local1 = this.readString(); break; default: if (((this.isDigit(this.ch)) || ((this.ch == "-")))){ _local1 = this.readNumber(); } else { if (this.ch == ""){ return (null); }; this.parseError((("Unexpected " + this.ch) + " encountered")); }; }; return (_local1); } private function skipWhite():void{ while (this.isWhiteSpace(this.ch)) { this.nextChar(); }; } public function parseError(_arg1:String):void{ throw (new JSONParseError(_arg1, this.loc, this.jsonString)); } private function isWhiteSpace(_arg1:String):Boolean{ return ((((((((_arg1 == " ")) || ((_arg1 == "\t")))) || ((_arg1 == "\n")))) || ((_arg1 == "\r")))); } private function skipIgnored():void{ var _local1:int; do { _local1 = this.loc; this.skipWhite(); this.skipComments(); } while (_local1 != this.loc); } private function isHexDigit(_arg1:String):Boolean{ var _local2:String = _arg1.toUpperCase(); return (((this.isDigit(_arg1)) || ((((_local2 >= "A")) && ((_local2 <= "F")))))); } private function readNumber():JSONToken{ var _local1:JSONToken = new JSONToken(); _local1.type = JSONTokenType.NUMBER; var _local2 = ""; if (this.ch == "-"){ _local2 = (_local2 + "-"); this.nextChar(); }; if (!this.isDigit(this.ch)){ this.parseError("Expecting a digit"); }; if (this.ch == "0"){ _local2 = (_local2 + this.ch); this.nextChar(); if (this.isDigit(this.ch)){ this.parseError("A digit cannot immediately follow 0"); }; } else { while (this.isDigit(this.ch)) { _local2 = (_local2 + this.ch); this.nextChar(); }; }; if (this.ch == "."){ _local2 = (_local2 + "."); this.nextChar(); if (!this.isDigit(this.ch)){ this.parseError("Expecting a digit"); }; while (this.isDigit(this.ch)) { _local2 = (_local2 + this.ch); this.nextChar(); }; }; if ((((this.ch == "e")) || ((this.ch == "E")))){ _local2 = (_local2 + "e"); this.nextChar(); if ((((this.ch == "+")) || ((this.ch == "-")))){ _local2 = (_local2 + this.ch); this.nextChar(); }; if (!this.isDigit(this.ch)){ this.parseError("Scientific notation number needs exponent value"); }; while (this.isDigit(this.ch)) { _local2 = (_local2 + this.ch); this.nextChar(); }; }; var _local3:Number = Number(_local2); if (((isFinite(_local3)) && (!(isNaN(_local3))))){ _local1.value = _local3; return (_local1); }; this.parseError((("Number " + _local3) + " is not valid!")); return (null); } } }//package com.adobe.serialization.json
Section 74
//JSONTokenType (com.adobe.serialization.json.JSONTokenType) package com.adobe.serialization.json { public class JSONTokenType { public static const NUMBER:int = 11; public static const FALSE:int = 8; public static const RIGHT_BRACKET:int = 4; public static const NULL:int = 9; public static const TRUE:int = 7; public static const RIGHT_BRACE:int = 2; public static const UNKNOWN:int = -1; public static const COMMA:int = 0; public static const LEFT_BRACKET:int = 3; public static const STRING:int = 10; public static const LEFT_BRACE:int = 1; public static const COLON:int = 6; } }//package com.adobe.serialization.json
Section 75
//IntUtil (com.adobe.utils.IntUtil) package com.adobe.utils { public class IntUtil { private static var hexChars:String = "0123456789abcdef"; public static function toHex(_arg1:int, _arg2:Boolean=false):String{ var _local4:int; var _local5:int; var _local3 = ""; if (_arg2){ _local4 = 0; while (_local4 < 4) { _local3 = (_local3 + (hexChars.charAt(((_arg1 >> (((3 - _local4) * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> ((3 - _local4) * 8)) & 15)))); _local4++; }; } else { _local5 = 0; while (_local5 < 4) { _local3 = (_local3 + (hexChars.charAt(((_arg1 >> ((_local5 * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> (_local5 * 8)) & 15)))); _local5++; }; }; return (_local3); } public static function ror(_arg1:int, _arg2:int):uint{ var _local3:int = (32 - _arg2); return (((_arg1 << _local3) | (_arg1 >>> (32 - _local3)))); } public static function rol(_arg1:int, _arg2:int):int{ return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2)))); } } }//package com.adobe.utils
Section 76
//CreateToken (com.facebook.commands.auth.CreateToken) package com.facebook.commands.auth { import com.facebook.net.*; public class CreateToken extends FacebookCall { public static const SCHEMA:Array = []; public static const METHOD_NAME:String = "auth.createToken"; public function CreateToken(){ super(METHOD_NAME); } } }//package com.facebook.commands.auth
Section 77
//ExpireSession (com.facebook.commands.auth.ExpireSession) package com.facebook.commands.auth { import com.facebook.net.*; public class ExpireSession extends FacebookCall { public static const SCHEMA:Array = []; public static const METHOD_NAME:String = "auth.expireSession"; public function ExpireSession(){ super(METHOD_NAME); } } }//package com.facebook.commands.auth
Section 78
//GetSession (com.facebook.commands.auth.GetSession) package com.facebook.commands.auth { import com.facebook.net.*; import com.facebook.*; public class GetSession extends FacebookCall { public var auth_token:String; public static const SCHEMA:Array = ["auth_token"]; public static const METHOD_NAME:String = "auth.getSession"; public function GetSession(_arg1:String){ super(METHOD_NAME); this.auth_token = _arg1; } override facebook_internal function initialize():void{ applySchema(SCHEMA, this.auth_token); super.initialize(); } } }//package com.facebook.commands.auth
Section 79
//GetCookiesData (com.facebook.commands.data.GetCookiesData) package com.facebook.commands.data { import com.facebook.data.*; public class GetCookiesData extends FacebookData { public var uid:String; public var value:String; public var expires:Number; public var path:String; public var name:String; } }//package com.facebook.commands.data
Section 80
//UploadPhoto (com.facebook.commands.photos.UploadPhoto) package com.facebook.commands.photos { import com.facebook.net.*; import com.facebook.*; import com.facebook.data.photos.*; public class UploadPhoto extends FacebookCall implements IUploadPhoto { public var aid:String; protected var _data:Object; public var uid:String; public var caption:String; public var uploadedPhoto:FacebookPhoto; protected var _uploadType:String;// = "png" protected var _uploadQuality:uint;// = 80 public static const SCHEMA:Array = ["data", "aid", "caption", "uid"]; public static const METHOD_NAME:String = "photos.upload"; public function UploadPhoto(_arg1:Object=null, _arg2:String=null, _arg3:String=null, _arg4:String=null){ super(METHOD_NAME); this.data = _arg1; this.aid = _arg2; this.caption = _arg3; this.uid = _arg4; } override facebook_internal function initialize():void{ applySchema(SCHEMA, this.data, this.aid, this.caption, this.uid); super.initialize(); } public function get uploadType():String{ return (this._uploadType); } public function set data(_arg1:Object):void{ this._data = _arg1; } public function get data():Object{ return (this._data); } public function set uploadType(_arg1:String):void{ this._uploadType = _arg1; } public function set uploadQuality(_arg1:uint):void{ this._uploadQuality = _arg1; } public function get uploadQuality():uint{ return (this._uploadQuality); } } }//package com.facebook.commands.photos
Section 81
//UploadPhotoTypes (com.facebook.commands.photos.UploadPhotoTypes) package com.facebook.commands.photos { public class UploadPhotoTypes { public static const JPEG:String = "jpeg"; public static const PNG:String = "png"; } }//package com.facebook.commands.photos
Section 82
//PublishPost (com.facebook.commands.stream.PublishPost) package com.facebook.commands.stream { import com.facebook.net.*; import com.facebook.*; import com.adobe.serialization.json.*; public class PublishPost extends FacebookCall { public var action_links:Array; public var attachment:Object; public var target_id:String; public var message:String; public static const SCHEMA:Array = ["message", "attachment", "action_links", "target_id"]; public static const METHOD_NAME:String = "stream.publish"; public function PublishPost(_arg1:String=null, _arg2:Object=null, _arg3:Array=null, _arg4:String=null){ super(METHOD_NAME); this.message = _arg1; this.attachment = _arg2; this.action_links = _arg3; this.target_id = _arg4; } override facebook_internal function initialize():void{ applySchema(SCHEMA, this.message, JSON.encode(this.attachment), JSON.encode(this.action_links), this.target_id); super.initialize(); } } }//package com.facebook.commands.stream
Section 83
//GetLoggedInUser (com.facebook.commands.users.GetLoggedInUser) package com.facebook.commands.users { import com.facebook.net.*; public class GetLoggedInUser extends FacebookCall { public static const SCHEMA:Array = []; public static const METHOD_NAME:String = "users.getLoggedInUser"; public function GetLoggedInUser(){ super(METHOD_NAME); } } }//package com.facebook.commands.users
Section 84
//UploadVideo (com.facebook.commands.video.UploadVideo) package com.facebook.commands.video { import com.facebook.net.*; import com.facebook.*; public class UploadVideo extends FacebookCall implements IUploadVideo { protected var _title:String; protected var _ext:String; protected var _data:Object; protected var _description:String; public static const SCHEMA:Array = ["data", "title", "description"]; public static const TIMEOUT:Number = 300000; public static const METHOD_NAME:String = "video.upload"; public function UploadVideo(_arg1:String, _arg2:Object, _arg3:String=null, _arg4:String=null){ super(METHOD_NAME); connectTimeout = TIMEOUT; this.ext = _arg1; this.data = _arg2; this.title = _arg3; this.description = _arg4; } public function get ext():String{ return (this._ext); } public function set description(_arg1:String):void{ this._description = _arg1; } public function get data():Object{ return (this._data); } public function set title(_arg1:String):void{ this._title = _arg1; } public function set ext(_arg1:String):void{ this._ext = _arg1; } public function set data(_arg1:Object):void{ this._data = _arg1; } override facebook_internal function initialize():void{ applySchema(SCHEMA, this.data, this.title, this.description); super.initialize(); } public function get title():String{ return (this._title); } public function get description():String{ return (this._description); } } }//package com.facebook.commands.video
Section 85
//GetAllocationData (com.facebook.data.admin.GetAllocationData) package com.facebook.data.admin { import com.facebook.data.*; public class GetAllocationData extends FacebookData { public var allocationLimit:Number; } }//package com.facebook.data.admin
Section 86
//GetAppPropertiesData (com.facebook.data.admin.GetAppPropertiesData) package com.facebook.data.admin { import com.facebook.data.*; public class GetAppPropertiesData extends FacebookData { public var appProperties:Array; } }//package com.facebook.data.admin
Section 87
//GetMetricsData (com.facebook.data.admin.GetMetricsData) package com.facebook.data.admin { import com.facebook.data.*; public class GetMetricsData extends FacebookData { public var metricsCollection:MetricsDataCollection; } }//package com.facebook.data.admin
Section 88
//MetricsData (com.facebook.data.admin.MetricsData) package com.facebook.data.admin { public class MetricsData { public var end_time:Date; public var canvas_page_views:Number; public var active_users:Number; } }//package com.facebook.data.admin
Section 89
//MetricsDataCollection (com.facebook.data.admin.MetricsDataCollection) package com.facebook.data.admin { import com.facebook.utils.*; public class MetricsDataCollection extends FacebookArrayCollection { public function MetricsDataCollection(){ super(null, MetricsData); } } }//package com.facebook.data.admin
Section 90
//GetPublicInfoData (com.facebook.data.application.GetPublicInfoData) package com.facebook.data.application { import com.facebook.data.*; public class GetPublicInfoData extends FacebookData { public var monthly_active_users:Number; public var weekly_active_users:Number; public var company_name:String; public var logo_url:String; public var canvas_name:String; public var display_name:String; public var icon_url:String; public var developers:String; public var daily_active_users:Number; public var app_id:String; public var api_key:String; public var description:String; } }//package com.facebook.data.application
Section 91
//GetSessionData (com.facebook.data.auth.GetSessionData) package com.facebook.data.auth { import com.facebook.data.*; public class GetSessionData extends FacebookData { public var uid:String; public var expires:Date; public var session_key:String; public var secret:String; } }//package com.facebook.data.auth
Section 92
//BatchResult (com.facebook.data.batch.BatchResult) package com.facebook.data.batch { import com.facebook.data.*; public class BatchResult extends FacebookData { public var results:Array; } }//package com.facebook.data.batch
Section 93
//GetObjectTypeData (com.facebook.data.data.GetObjectTypeData) package com.facebook.data.data { import com.facebook.data.*; public class GetObjectTypeData extends FacebookData { public var index_type:Number; public var name:String; public var data_type:Number; } }//package com.facebook.data.data
Section 94
//GetObjectTypesData (com.facebook.data.data.GetObjectTypesData) package com.facebook.data.data { import com.facebook.data.*; public class GetObjectTypesData extends FacebookData { public var objectTypeCollection:ObjectTypesCollection; } }//package com.facebook.data.data
Section 95
//GetUserPreferencesData (com.facebook.data.data.GetUserPreferencesData) package com.facebook.data.data { import com.facebook.data.*; public class GetUserPreferencesData extends FacebookData { public var perferenceCollection:PreferenceCollection; } }//package com.facebook.data.data
Section 96
//ObjectTypesCollection (com.facebook.data.data.ObjectTypesCollection) package com.facebook.data.data { import com.facebook.utils.*; public class ObjectTypesCollection extends FacebookArrayCollection { public function ObjectTypesCollection(){ super(null, ObjectTypesData); } } }//package com.facebook.data.data
Section 97
//ObjectTypesData (com.facebook.data.data.ObjectTypesData) package com.facebook.data.data { public class ObjectTypesData { public var object_class:String; public var name:String; } }//package com.facebook.data.data
Section 98
//PreferenceCollection (com.facebook.data.data.PreferenceCollection) package com.facebook.data.data { import com.facebook.utils.*; public class PreferenceCollection extends FacebookArrayCollection { public function PreferenceCollection(){ super(null, PreferenceData); } } }//package com.facebook.data.data
Section 99
//PreferenceData (com.facebook.data.data.PreferenceData) package com.facebook.data.data { public class PreferenceData { public var value:String; public var pref_id:Number; } }//package com.facebook.data.data
Section 100
//EventCollection (com.facebook.data.events.EventCollection) package com.facebook.data.events { import com.facebook.utils.*; public class EventCollection extends FacebookArrayCollection { public function EventCollection(){ super(null, EventData); } } }//package com.facebook.data.events
Section 101
//EventData (com.facebook.data.events.EventData) package com.facebook.data.events { import com.facebook.data.*; public class EventData { public var eid:String; public var update_time:Date; public var nid:Number; public var pic:String; public var name:String; public var tagline:String; public var start_time:Date; public var end_time:Date; public var event_subtype:String; public var pic_small:String; public var pic_big:String; public var host:String; public var creator:Number; public var venue:FacebookLocation; public var location:String; public var description:String; public var event_type:String; } }//package com.facebook.data.events
Section 102
//GetEventsData (com.facebook.data.events.GetEventsData) package com.facebook.data.events { import com.facebook.data.*; public class GetEventsData extends FacebookData { public var eventCollection:EventCollection; } }//package com.facebook.data.events
Section 103
//GetMembersData (com.facebook.data.events.GetMembersData) package com.facebook.data.events { import com.facebook.data.*; public class GetMembersData extends FacebookData { public var unsure:Array; public var attending:Array; public var not_replied:Array; public var declined:Array; } }//package com.facebook.data.events
Section 104
//AbstractTagData (com.facebook.data.fbml.AbstractTagData) package com.facebook.data.fbml { public class AbstractTagData { public var type:String; public var description:String; public var name:String; public var header_fbml:String; public var attributes:AttributeCollection; public var is_public:String; public var footer_fbml:String; public function AbstractTagData(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:String="", _arg6:String="", _arg7:AttributeCollection=null){ this.name = _arg1; this.type = _arg4; this.description = _arg5; this.is_public = _arg6; this.header_fbml = _arg2; this.footer_fbml = _arg3; this.attributes = _arg7; } } }//package com.facebook.data.fbml
Section 105
//AttributeCollection (com.facebook.data.fbml.AttributeCollection) package com.facebook.data.fbml { import com.facebook.utils.*; public class AttributeCollection extends FacebookArrayCollection { public function AttributeCollection(){ super(null, AttributeData); } } }//package com.facebook.data.fbml
Section 106
//AttributeData (com.facebook.data.fbml.AttributeData) package com.facebook.data.fbml { public class AttributeData { public var default_value:String; public var name:String; public var description:String; } }//package com.facebook.data.fbml
Section 107
//ContainerTagData (com.facebook.data.fbml.ContainerTagData) package com.facebook.data.fbml { public class ContainerTagData extends AbstractTagData { public var open_tag_fbml:String; public var close_tag_fbml:String; public function ContainerTagData(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:String, _arg6:String, _arg7:String="", _arg8:String="", _arg9:AttributeCollection=null){ this.open_tag_fbml = _arg5; this.close_tag_fbml = _arg6; super(_arg1, _arg2, _arg3, _arg4, _arg7, _arg8, _arg9); } } }//package com.facebook.data.fbml
Section 108
//GetCustomTagsData (com.facebook.data.fbml.GetCustomTagsData) package com.facebook.data.fbml { import com.facebook.data.*; public class GetCustomTagsData extends FacebookData { public var tagCollection:TagCollection; } }//package com.facebook.data.fbml
Section 109
//LeafTagData (com.facebook.data.fbml.LeafTagData) package com.facebook.data.fbml { public class LeafTagData extends AbstractTagData { public var fbml:String; public function LeafTagData(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:String, _arg6:String="", _arg7:String="", _arg8:AttributeCollection=null){ this.fbml = _arg2; super(_arg1, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8); } } }//package com.facebook.data.fbml
Section 110
//TagCollection (com.facebook.data.fbml.TagCollection) package com.facebook.data.fbml { import com.facebook.utils.*; public class TagCollection extends FacebookArrayCollection { public function TagCollection(){ super(null, AbstractTagData); } } }//package com.facebook.data.fbml
Section 111
//ActionLinkData (com.facebook.data.feed.ActionLinkData) package com.facebook.data.feed { public class ActionLinkData { public var href:String; public var text:String; } }//package com.facebook.data.feed
Section 112
//GetRegisteredTemplateBundleByIDData (com.facebook.data.feed.GetRegisteredTemplateBundleByIDData) package com.facebook.data.feed { import com.facebook.data.*; public class GetRegisteredTemplateBundleByIDData extends FacebookData { public var templateCollection:TemplateCollection; } }//package com.facebook.data.feed
Section 113
//GetRegisteredTemplateBundleData (com.facebook.data.feed.GetRegisteredTemplateBundleData) package com.facebook.data.feed { import com.facebook.data.*; public class GetRegisteredTemplateBundleData extends FacebookData { public var bundleCollection:TemplateCollection; } }//package com.facebook.data.feed
Section 114
//TemplateBundleCollection (com.facebook.data.feed.TemplateBundleCollection) package com.facebook.data.feed { import com.facebook.utils.*; public class TemplateBundleCollection extends FacebookArrayCollection { public function TemplateBundleCollection(){ super(null, TemplateData); } } }//package com.facebook.data.feed
Section 115
//TemplateCollection (com.facebook.data.feed.TemplateCollection) package com.facebook.data.feed { import com.facebook.utils.*; public class TemplateCollection extends FacebookArrayCollection { public var template_bundle_id:Number; public var time_created:Date; public function TemplateCollection(){ super(null, TemplateData); } public function addTemplateData(_arg1:TemplateData):void{ this.addItem(_arg1); } } }//package com.facebook.data.feed
Section 116
//TemplateData (com.facebook.data.feed.TemplateData) package com.facebook.data.feed { public class TemplateData { public var template_title:String; public var template_body:String; public var type:String; } }//package com.facebook.data.feed
Section 117
//AreFriendsData (com.facebook.data.friends.AreFriendsData) package com.facebook.data.friends { import com.facebook.data.*; public class AreFriendsData extends FacebookData { public var friendsCollection:FriendsCollection; } }//package com.facebook.data.friends
Section 118
//FriendsCollection (com.facebook.data.friends.FriendsCollection) package com.facebook.data.friends { import com.facebook.utils.*; public class FriendsCollection extends FacebookArrayCollection { public function FriendsCollection(){ super(null, FriendsData); } } }//package com.facebook.data.friends
Section 119
//FriendsData (com.facebook.data.friends.FriendsData) package com.facebook.data.friends { public class FriendsData { public var uid1:Number; public var uid2:Number; public var are_friends:Boolean; } }//package com.facebook.data.friends
Section 120
//GetAppUserData (com.facebook.data.friends.GetAppUserData) package com.facebook.data.friends { import com.facebook.data.*; public class GetAppUserData extends FacebookData { public var uids:Array; } }//package com.facebook.data.friends
Section 121
//GetFriendsData (com.facebook.data.friends.GetFriendsData) package com.facebook.data.friends { import com.facebook.data.*; import com.facebook.data.users.*; public class GetFriendsData extends FacebookData { public var friends:FacebookUserCollection; } }//package com.facebook.data.friends
Section 122
//GetListsData (com.facebook.data.friends.GetListsData) package com.facebook.data.friends { import com.facebook.data.*; public class GetListsData extends FacebookData { public var lists:Array; } }//package com.facebook.data.friends
Section 123
//ListsData (com.facebook.data.friends.ListsData) package com.facebook.data.friends { public class ListsData { public var flid:Number; public var name:String; } }//package com.facebook.data.friends
Section 124
//GetGroupData (com.facebook.data.groups.GetGroupData) package com.facebook.data.groups { import com.facebook.data.*; public class GetGroupData extends FacebookData { public var groups:GroupCollection; } }//package com.facebook.data.groups
Section 125
//GetMemberData (com.facebook.data.groups.GetMemberData) package com.facebook.data.groups { import com.facebook.data.*; public class GetMemberData extends FacebookData { public var admins:Array; public var notReplied:Array; public var members:Array; public var officers:Array; } }//package com.facebook.data.groups
Section 126
//GroupCollection (com.facebook.data.groups.GroupCollection) package com.facebook.data.groups { import com.facebook.utils.*; public class GroupCollection extends FacebookArrayCollection { public function GroupCollection(){ super(null, GroupData); } public function addGroup(_arg1:GroupData):void{ this.addItem(_arg1); } } }//package com.facebook.data.groups
Section 127
//GroupData (com.facebook.data.groups.GroupData) package com.facebook.data.groups { import com.facebook.data.*; public class GroupData { public var group_subtype:String; public var gid:String; public var update_time:Date; public var privacy:String; public var nid:Number; public var pic:String; public var name:String; public var pic_big:String; public var website:String; public var office:String; public var pic_small:String; public var creator:String; public var venue:FacebookLocation; public var recent_news:String; public var group_type:String; public var description:String; } }//package com.facebook.data.groups
Section 128
//GetNotesData (com.facebook.data.notes.GetNotesData) package com.facebook.data.notes { import com.facebook.data.*; public class GetNotesData extends FacebookData { public var notesCollection:NotesCollection; } }//package com.facebook.data.notes
Section 129
//NoteData (com.facebook.data.notes.NoteData) package com.facebook.data.notes { public class NoteData { public var created_time:Date; public var note_id:String; public var updated_time:Date; public var title:String; public var content:String; public var uid:String; } }//package com.facebook.data.notes
Section 130
//NotesCollection (com.facebook.data.notes.NotesCollection) package com.facebook.data.notes { import com.facebook.utils.*; public class NotesCollection extends FacebookArrayCollection { public function NotesCollection(){ super(null, NoteData); } } }//package com.facebook.data.notes
Section 131
//GetNotificationData (com.facebook.data.notifications.GetNotificationData) package com.facebook.data.notifications { import com.facebook.data.*; public class GetNotificationData extends FacebookData { public var notificationCollection:NotificationCollection; public var event_invites:Array; public var friendsRequests:Array; public var group_invites:Array; } }//package com.facebook.data.notifications
Section 132
//NotificationCollection (com.facebook.data.notifications.NotificationCollection) package com.facebook.data.notifications { import com.facebook.utils.*; public class NotificationCollection extends FacebookArrayCollection { public function NotificationCollection(){ super(null, null); } } }//package com.facebook.data.notifications
Section 133
//NotificationMessageData (com.facebook.data.notifications.NotificationMessageData) package com.facebook.data.notifications { public class NotificationMessageData { public var most_recent:Number; public var unread:Number; } }//package com.facebook.data.notifications
Section 134
//NotificationPokeData (com.facebook.data.notifications.NotificationPokeData) package com.facebook.data.notifications { public class NotificationPokeData { public var most_recent:Number; public var unread:Number; } }//package com.facebook.data.notifications
Section 135
//NotificationShareData (com.facebook.data.notifications.NotificationShareData) package com.facebook.data.notifications { public class NotificationShareData { public var most_recent:Number; public var unread:Number; } }//package com.facebook.data.notifications
Section 136
//GetPageInfoData (com.facebook.data.pages.GetPageInfoData) package com.facebook.data.pages { import com.facebook.data.*; public class GetPageInfoData extends FacebookData { public var pageInfoCollection:PageInfoCollection; } }//package com.facebook.data.pages
Section 137
//PageInfoCollection (com.facebook.data.pages.PageInfoCollection) package com.facebook.data.pages { import com.facebook.utils.*; public class PageInfoCollection extends FacebookArrayCollection { public function PageInfoCollection(){ super(null, PageInfoData); } public function addPageInfo(_arg1:PageInfoData):void{ this.addItem(_arg1); } } }//package com.facebook.data.pages
Section 138
//PageInfoData (com.facebook.data.pages.PageInfoData) package com.facebook.data.pages { import flash.events.*; import com.facebook.data.*; public class PageInfoData extends EventDispatcher { public var starring:String; public var genre:String; public var season:String; public var bio:String; public var name:String; public var record_label:String; public var band_members:String; public var pic_small:String; public var schedule:String; public var website:String; public var influences:String; public var founded:String; public var hours:String; public var directed_by:String; public var location:FacebookLocation; public var mission:String; public var type:String; public var awards:String; public var pic_large:String; public var pic_big:String; public var network:String; public var page_id:Number; public var studio:String; public var release_date:String; public var products:String; public var hometown:String; public var produced_by:String; public var pic_square:String; public var company_overview:String; public var plot_outline:String; public var has_added_app:Boolean; public var written_by:String; } }//package com.facebook.data.pages
Section 139
//AlbumCollection (com.facebook.data.photos.AlbumCollection) package com.facebook.data.photos { import com.facebook.utils.*; public class AlbumCollection extends FacebookArrayCollection { public function AlbumCollection(){ super(null, AlbumData); } public function addAlbum(_arg1:AlbumData):void{ this.addItem(_arg1); } } }//package com.facebook.data.photos
Section 140
//AlbumData (com.facebook.data.photos.AlbumData) package com.facebook.data.photos { public class AlbumData { public var size:Number; public var cover_pid:String; public var created:Date; public var modified:Date; public var name:String; public var owner:String; public var description:String; public var location:String; public var visible:String; public var link:String; public var aid:String; } }//package com.facebook.data.photos
Section 141
//FacebookPhoto (com.facebook.data.photos.FacebookPhoto) package com.facebook.data.photos { import com.facebook.data.*; public class FacebookPhoto extends FacebookData { public var src:String; public var src_big:String; public var pid:String; public var src_small:String; public var caption:String; public var created:Date; public var owner:Number; public var tags:Array; public var link:String; public var aid:String; public function FacebookPhoto(){ this.tags = []; super(); } } }//package com.facebook.data.photos
Section 142
//GetAlbumsData (com.facebook.data.photos.GetAlbumsData) package com.facebook.data.photos { import com.facebook.data.*; public class GetAlbumsData extends FacebookData { public var albumCollection:AlbumCollection; } }//package com.facebook.data.photos
Section 143
//GetCreateAlbumData (com.facebook.data.photos.GetCreateAlbumData) package com.facebook.data.photos { import com.facebook.data.*; public class GetCreateAlbumData extends FacebookData { public var albumData:AlbumData; } }//package com.facebook.data.photos
Section 144
//GetPhotosData (com.facebook.data.photos.GetPhotosData) package com.facebook.data.photos { import com.facebook.data.*; public class GetPhotosData extends FacebookData { public var photoCollection:PhotoCollection; } }//package com.facebook.data.photos
Section 145
//GetTagsData (com.facebook.data.photos.GetTagsData) package com.facebook.data.photos { import com.facebook.data.*; public class GetTagsData extends FacebookData { public var photoTagsCollection:PhotoTagCollection; } }//package com.facebook.data.photos
Section 146
//PhotoCollection (com.facebook.data.photos.PhotoCollection) package com.facebook.data.photos { import com.facebook.utils.*; public class PhotoCollection extends FacebookArrayCollection { public function PhotoCollection(){ super(null, PhotoData); } public function addPhoto(_arg1:PhotoData):void{ this.addItem(_arg1); } } }//package com.facebook.data.photos
Section 147
//PhotoData (com.facebook.data.photos.PhotoData) package com.facebook.data.photos { public class PhotoData { public var src:String; public var src_big:String; public var pid:String; public var src_small:String; public var caption:String; public var created:Date; public var owner:String; public var link:String; public var aid:String; } }//package com.facebook.data.photos
Section 148
//PhotoTagCollection (com.facebook.data.photos.PhotoTagCollection) package com.facebook.data.photos { import com.facebook.utils.*; public class PhotoTagCollection extends FacebookArrayCollection { public function PhotoTagCollection(_arg1:Array=null){ super(null, TagData); } public function addPhotoTag(_arg1:TagData):void{ this.addItem(_arg1); } } }//package com.facebook.data.photos
Section 149
//TagData (com.facebook.data.photos.TagData) package com.facebook.data.photos { public class TagData { protected var _actualText:String; protected var _actualX:Number; protected var _actualY:Number; public var pid:String; public var created:Date; public var tag_uid:String; public var subject:String; public function set y(_arg1:Number):void{ this._actualY = _arg1; } public function set text(_arg1:String):void{ this._actualText = _arg1; } public function get ycoord():Number{ return (this._actualY); } public function set tag_text(_arg1:String):void{ this._actualText = _arg1; } public function get text():String{ return (this._actualText); } public function set x(_arg1:Number):void{ this._actualX = _arg1; } public function get tag_text():String{ return (this._actualText); } public function set ycoord(_arg1:Number):void{ this._actualY = _arg1; } public function get y():Number{ return (this._actualY); } public function set xcoord(_arg1:Number):void{ this._actualX = _arg1; } public function get xcoord():Number{ return (this._actualX); } public function get x():Number{ return (this._actualX); } } }//package com.facebook.data.photos
Section 150
//GetStatusData (com.facebook.data.status.GetStatusData) package com.facebook.data.status { import com.facebook.data.*; public class GetStatusData extends FacebookData { public var status:Array; } }//package com.facebook.data.status
Section 151
//Status (com.facebook.data.status.Status) package com.facebook.data.status { public class Status { public var uid:String; public var status_id:String; public var source:String; public var time:Date; public var message:String; } }//package com.facebook.data.status
Section 152
//AttachmentData (com.facebook.data.stream.AttachmentData) package com.facebook.data.stream { public class AttachmentData { public var body:String; public var href:String; public var caption:String; public var name:String; public var text:String; public var media:Array; public var label:String; public var properties:Array; public var title:String; public var icon:String; public var description:String; } }//package com.facebook.data.stream
Section 153
//CommentsData (com.facebook.data.stream.CommentsData) package com.facebook.data.stream { public class CommentsData { public var can_remove:Boolean; public var can_post:Boolean; public var posts:Array; public var count:uint; } }//package com.facebook.data.stream
Section 154
//GetCommentsData (com.facebook.data.stream.GetCommentsData) package com.facebook.data.stream { import com.facebook.data.*; public class GetCommentsData extends FacebookData { public var comments:Array; } }//package com.facebook.data.stream
Section 155
//GetFiltersData (com.facebook.data.stream.GetFiltersData) package com.facebook.data.stream { import com.facebook.data.*; public class GetFiltersData extends FacebookData { public var filters:StreamFilterCollection; } }//package com.facebook.data.stream
Section 156
//GetStreamData (com.facebook.data.stream.GetStreamData) package com.facebook.data.stream { import com.facebook.data.*; import com.facebook.data.photos.*; public class GetStreamData extends FacebookData { public var stories:StreamStoryCollection; public var albums:AlbumCollection; public var profiles:ProfileCollection; } }//package com.facebook.data.stream
Section 157
//LikesData (com.facebook.data.stream.LikesData) package com.facebook.data.stream { public class LikesData { public var can_like:Boolean; public var user_likes:Boolean; public var sample:Array; public var href:String; public var count:uint; public var friends:Array; } }//package com.facebook.data.stream
Section 158
//PhotoMedia (com.facebook.data.stream.PhotoMedia) package com.facebook.data.stream { public class PhotoMedia { public var index:uint; public var owner:String; public var pid:String; public var aid:String; } }//package com.facebook.data.stream
Section 159
//PostCommentData (com.facebook.data.stream.PostCommentData) package com.facebook.data.stream { public class PostCommentData { public var text:String; public var fromid:String; public var id:String; public var time:Date; } }//package com.facebook.data.stream
Section 160
//ProfileCollection (com.facebook.data.stream.ProfileCollection) package com.facebook.data.stream { import com.facebook.utils.*; public class ProfileCollection extends FacebookArrayCollection { public function ProfileCollection(){ super(null, ProfileData); } } }//package com.facebook.data.stream
Section 161
//ProfileData (com.facebook.data.stream.ProfileData) package com.facebook.data.stream { public class ProfileData { public var id:String; public var pic_square:String; public var name:String; public var url:String; } }//package com.facebook.data.stream
Section 162
//StreamFilterCollection (com.facebook.data.stream.StreamFilterCollection) package com.facebook.data.stream { import com.facebook.utils.*; public class StreamFilterCollection extends FacebookArrayCollection { public function StreamFilterCollection(){ super(null, StreamFilterData); } } }//package com.facebook.data.stream
Section 163
//StreamFilterData (com.facebook.data.stream.StreamFilterData) package com.facebook.data.stream { public class StreamFilterData { public var type:String; public var icon_url:String; public var name:String; public var rank:uint; public var uid:String; public var value:String; public var filter_key:String; public var is_visible:Boolean; } }//package com.facebook.data.stream
Section 164
//StreamMediaData (com.facebook.data.stream.StreamMediaData) package com.facebook.data.stream { public class StreamMediaData { public var src:String; public var alt:String; public var href:String; public var photo:PhotoMedia; public var type:String; public var video:VideoMedia; public function toString():String{ return ([("type: " + this.type), ("href: " + this.href), ("src: " + this.src), ("alt: " + this.alt), ("photo: " + this.photo), ("video: " + this.video)].join(": ")); } } }//package com.facebook.data.stream
Section 165
//StreamStoryCollection (com.facebook.data.stream.StreamStoryCollection) package com.facebook.data.stream { import com.facebook.utils.*; public class StreamStoryCollection extends FacebookArrayCollection { public function StreamStoryCollection(){ super(null, StreamStoryData); } } }//package com.facebook.data.stream
Section 166
//StreamStoryData (com.facebook.data.stream.StreamStoryData) package com.facebook.data.stream { public class StreamStoryData { public var comments:CommentsData; public var created_time:Date; public var message:String; public var target_id:String; public var sourceXML:XML; public var privacy:String; public var updated_time:Date; public var source_id:String; public var filter_key:String; public var post_id:String; public var attachment:AttachmentData; public var actor_id:String; public var viewer_id:String; public var metadata:Object; public var app_id:String; public var type:uint; public var likes:LikesData; public var attribution:String; } }//package com.facebook.data.stream
Section 167
//VideoMedia (com.facebook.data.stream.VideoMedia) package com.facebook.data.stream { public class VideoMedia { public var display_url:String; public var owner:String; public var permalink:String; public var source_url:String; public var preview_img:String; } }//package com.facebook.data.stream
Section 168
//AffiliationCollection (com.facebook.data.users.AffiliationCollection) package com.facebook.data.users { import com.facebook.utils.*; public class AffiliationCollection extends FacebookArrayCollection { public function AffiliationCollection(){ super(null, AffiliationData); } public function addAffiliation(_arg1:AffiliationData):void{ this.addItem(_arg1); } } }//package com.facebook.data.users
Section 169
//AffiliationData (com.facebook.data.users.AffiliationData) package com.facebook.data.users { public class AffiliationData { public var status:String; public var nid:Number; public var type:String; public var name:String; public var year:String; } }//package com.facebook.data.users
Section 170
//FacebookUser (com.facebook.data.users.FacebookUser) package com.facebook.data.users { import com.facebook.data.*; public class FacebookUser extends FacebookData { public var status:StatusData; public var has_added_app:Boolean; public var pic_with_logo:String; public var pic_big_with_logo:String; public var notes_count:int; public var pic_small:String; public var political:String; public var music:String; public var religion:String; public var significant_other_id:int; public var email_hashes:Array; public var movies:String; public var uid:String; public var hometown_location:FacebookLocation; public var wall_count:int; public var hs2_name:String; public var proxied_email:String; public var sex:String; public var hs_info:String; public var work_history:Array; public var meeting_sex:Array; public var pic_square:String; public var quotes:String; public var hs1_id:int; public var locale:String; public var birthday:String; public var tv:String; public var affiliations:Array; public var interests:String; public var pic:String; public var name:String;// = "" public var grad_year:String; public var about_me:String; public var last_name:String;// = "" public var pic_small_with_logo:String; public var is_app_user:Boolean; public var hs1_name:String; public var books:String; public var first_name:String;// = "" public var current_location:FacebookLocation; public var meeting_for:Array; public var birthdayDate:Date; public var networkAffiliations:Array; public var pic_big:String; public var relationship_status:String; public var hs2_id:int; public var profile_url:String; public var profile_update_time:Date; public var activities:String; public var pic_square_with_logo:String; public var timezone:int; public var isLoggedInUser:Boolean; public var education_history:Array; public function FacebookUser():void{ } } }//package com.facebook.data.users
Section 171
//FacebookUserCollection (com.facebook.data.users.FacebookUserCollection) package com.facebook.data.users { import com.facebook.utils.*; public class FacebookUserCollection extends FacebookArrayCollection { public function FacebookUserCollection(){ super(null, FacebookUser); } public function getUserById(_arg1:int):FacebookUser{ return ((findItemByProperty("uid", _arg1) as FacebookUser)); } public function addUser(_arg1:FacebookUser):void{ addItem(_arg1); } } }//package com.facebook.data.users
Section 172
//GetInfoData (com.facebook.data.users.GetInfoData) package com.facebook.data.users { import com.facebook.data.*; public class GetInfoData extends FacebookData { public var userCollection:FacebookUserCollection; } }//package com.facebook.data.users
Section 173
//GetStandardInfoData (com.facebook.data.users.GetStandardInfoData) package com.facebook.data.users { import com.facebook.data.*; public class GetStandardInfoData extends FacebookData { public var userCollection:UserCollection; } }//package com.facebook.data.users
Section 174
//StatusData (com.facebook.data.users.StatusData) package com.facebook.data.users { public class StatusData { public var time:Date; public var message:String; } }//package com.facebook.data.users
Section 175
//UserCollection (com.facebook.data.users.UserCollection) package com.facebook.data.users { import com.facebook.utils.*; public class UserCollection extends FacebookArrayCollection { public function UserCollection(_arg1:Array=null){ super(null, UserData); } } }//package com.facebook.data.users
Section 176
//UserData (com.facebook.data.users.UserData) package com.facebook.data.users { public class UserData { public var affiations:AffiliationCollection; public var name:String; public var uid:String; public var timezone:Number; public var first_name:String; public var last_name:String; public function toString():String{ return ((((((((((((("[ UserData uid: " + this.uid) + " affiation:") + this.affiations) + " first_name:") + this.first_name) + " last_name:") + this.last_name) + " name:") + this.name) + " timezone: ") + this.timezone) + "]")); } } }//package com.facebook.data.users
Section 177
//ArrayResultData (com.facebook.data.ArrayResultData) package com.facebook.data { public class ArrayResultData extends FacebookData { public var arrayResult:Array; } }//package com.facebook.data
Section 178
//BooleanResultData (com.facebook.data.BooleanResultData) package com.facebook.data { public class BooleanResultData extends FacebookData { public var value:Boolean; } }//package com.facebook.data
Section 179
//FacebookData (com.facebook.data.FacebookData) package com.facebook.data { import flash.events.*; public class FacebookData extends EventDispatcher { public var rawResult:String; } }//package com.facebook.data
Section 180
//FacebookEducationInfo (com.facebook.data.FacebookEducationInfo) package com.facebook.data { public class FacebookEducationInfo { public var concentrations:Array; public var name:String; public var degree:String; public var year:String; public function FacebookEducationInfo(){ this.concentrations = []; } } }//package com.facebook.data
Section 181
//FacebookErrorCodes (com.facebook.data.FacebookErrorCodes) package com.facebook.data { public class FacebookErrorCodes { public static const API_EC_VERSION:Number = 12; public static const API_EC_PERMISSION_DENIED:Number = 10; public static const API_EC_HOST_UP:Number = 7; public static const API_EC_SERVICE:Number = 2; public static const API_EC_RATE:Number = 9; public static const API_EC_METHOD:Number = 3; public static const API_EC_HOST_API:Number = 6; public static const API_EC_SUCCESS:Number = 0; public static const SERVER_ERROR:Number = -1; public static const API_EC_UNKNOWN:Number = 1; public static const API_EC_DEPRECATED:Number = 11; public static const API_EC_SECURE:Number = 8; public static const API_EC_TOO_MANY_CALLS:Number = 4; public static const API_EC_BAD_IP:Number = 5; } }//package com.facebook.data
Section 182
//FacebookErrorReason (com.facebook.data.FacebookErrorReason) package com.facebook.data { public class FacebookErrorReason { public static const CONNECT_TIMEOUT:String = "connectTimeout"; public static const LOAD_TIMEOUT:String = "loadTimeout"; } }//package com.facebook.data
Section 183
//FacebookLocation (com.facebook.data.FacebookLocation) package com.facebook.data { public class FacebookLocation extends FacebookData { public var state:String; public var street:String; public var country:String; public var zip:String; public var city:String; } }//package com.facebook.data
Section 184
//FacebookNetwork (com.facebook.data.FacebookNetwork) package com.facebook.data { public class FacebookNetwork { public var status:String; public var nid:int; public var type:String; public var name:String; public var year:String; } }//package com.facebook.data
Section 185
//FacebookWorkInfo (com.facebook.data.FacebookWorkInfo) package com.facebook.data { public class FacebookWorkInfo { public var position:String; public var start_date:Date; public var company_name:String; public var location:FacebookLocation; public var end_date:Date; public var description:String; } }//package com.facebook.data
Section 186
//JSONResultData (com.facebook.data.JSONResultData) package com.facebook.data { public class JSONResultData extends FacebookData { public var result:Object; } }//package com.facebook.data
Section 187
//NumberResultData (com.facebook.data.NumberResultData) package com.facebook.data { public class NumberResultData extends FacebookData { public var value:Number; } }//package com.facebook.data
Section 188
//StringResultData (com.facebook.data.StringResultData) package com.facebook.data { public class StringResultData extends FacebookData { public var value:String; } }//package com.facebook.data
Section 189
//XMLDataParser (com.facebook.data.XMLDataParser) package com.facebook.data { import flash.events.*; import com.facebook.errors.*; import com.adobe.serialization.json.*; import com.facebook.data.status.*; import com.facebook.data.users.*; import com.facebook.data.fbml.*; import com.facebook.data.data.*; import com.facebook.data.notes.*; import com.facebook.commands.data.*; import com.facebook.data.application.*; import com.facebook.data.feed.*; import com.facebook.data.admin.*; import com.facebook.data.events.*; import com.facebook.data.friends.*; import com.facebook.data.photos.*; import com.facebook.data.pages.*; import com.facebook.data.notifications.*; import com.facebook.data.groups.*; import com.facebook.utils.*; import com.facebook.data.auth.*; import com.facebook.data.batch.*; public class XMLDataParser implements IFacebookResultParser { protected var fb_namespace:Namespace; public function XMLDataParser(){ this.fb_namespace = new Namespace("http://api.facebook.com/1.0/"); } protected function parseSendEmail(_arg1:XML):ArrayResultData{ var _local2:ArrayResultData = new ArrayResultData(); _local2.arrayResult = FacebookXMLParserUtils.toArray(_arg1); return (_local2); } protected function parseGetPhotos(_arg1:XML):GetPhotosData{ var _local4:*; var _local5:PhotoData; var _local2:GetPhotosData = new GetPhotosData(); var _local3:PhotoCollection = new PhotoCollection(); for each (_local4 in _arg1..this.fb_namespace::photo) { _local5 = new PhotoData(); _local5.pid = _local4.this.fb_namespace::pid; _local5.aid = _local4.this.fb_namespace::aid; _local5.owner = _local4.this.fb_namespace::owner; _local5.src = _local4.this.fb_namespace::src; _local5.src_big = _local4.this.fb_namespace::src_big; _local5.src_small = _local4.this.fb_namespace::src_small; _local5.caption = _local4.this.fb_namespace::caption; _local5.created = FacebookXMLParserUtils.toDate(_local4.this.fb_namespace::created); _local3.addPhoto(_local5); }; _local2.photoCollection = _local3; return (_local2); } protected function parseGetNotifications(_arg1:XML):GetNotificationData{ var _local4:*; var _local5:*; var _local6:*; var _local7:NotificationMessageData; var _local8:NotificationPokeData; var _local9:NotificationShareData; var _local2:GetNotificationData = new GetNotificationData(); var _local3:NotificationCollection = new NotificationCollection(); for each (_local4 in _arg1.this.fb_namespace::messages) { _local7 = new NotificationMessageData(); _local7.unread = _local4.this.fb_namespace::unread; _local7.most_recent = _local4.this.fb_namespace::most_recent; _local3.addItem(_local7); }; for each (_local5 in _arg1.this.fb_namespace::pokes) { _local8 = new NotificationPokeData(); _local8.unread = _local5.this.fb_namespace::unread; _local8.most_recent = _local5.this.fb_namespace::most_recent; _local3.addItem(_local8); }; for each (_local6 in _arg1.this.fb_namespace::shares) { _local9 = new NotificationShareData(); _local9.unread = _local6.this.fb_namespace::unread; _local9.most_recent = _local6.this.fb_namespace::most_recent; _local3.addItem(_local9); }; _local2.friendsRequests = FacebookXMLParserUtils.toUIDArray(_arg1.this.fb_namespace::friend_requests[0]); _local2.group_invites = FacebookXMLParserUtils.toUIDArray(_arg1.this.fb_namespace::group_invites[0]); _local2.event_invites = FacebookXMLParserUtils.toUIDArray(_arg1.this.fb_namespace::event_invites[0]); _local2.notificationCollection = _local3; return (_local2); } public function createFacebookError(_arg1:Object, _arg2:String):FacebookError{ var _local3:FacebookError = new FacebookError(); _local3.rawResult = _arg2; _local3.errorCode = FacebookErrorCodes.SERVER_ERROR; if ((_arg1 is Error)){ _local3.error = (_arg1 as Error); } else { _local3.errorEvent = (_arg1 as ErrorEvent); }; return (_local3); } protected function getAffiliation(_arg1:XML):AffiliationCollection{ var _local3:*; var _local4:AffiliationData; var _local2:AffiliationCollection = new AffiliationCollection(); for each (_local3 in _arg1..this.fb_namespace::afflication) { _local4 = new AffiliationData(); _local4.nid = _local3.this.fb_namespace::nid; _local4.name = _local3.this.fb_namespace::name; _local4.type = _local3.this.fb_namespace::type; _local4.status = _local3.this.fb_namespace::status; _local4.year = _local3.this.fb_namespace::year; _local2.addAffiliation(_local4); }; return (_local2); } protected function parseGetUserPreferences(_arg1:XML):GetUserPreferencesData{ var _local4:*; var _local5:PreferenceData; var _local2:GetUserPreferencesData = new GetUserPreferencesData(); var _local3:PreferenceCollection = new PreferenceCollection(); for each (_local4 in _arg1..this.fb_namespace::preference) { _local5 = new PreferenceData(); _local5.pref_id = _local4.this.fb_namespace::pref_id; _local5.value = _local4.this.fb_namespace::value; _local3.addItem(_local5); }; _local2.perferenceCollection = _local3; return (_local2); } public function parse(_arg1:String, _arg2:String):FacebookData{ var _local3:FacebookData; var _local4:XML = new XML(_arg1); switch (_arg2){ case "application.getPublicInfo": _local3 = this.parseGetPublicInfo(_local4); break; case "data.getCookies": _local3 = this.parseGetCookies(_local4); break; case "admin.getAllocation": _local3 = this.parseGetAllocation(_local4); break; case "admin.getAppProperties": _local3 = this.parseGetAppProperties(_local4); break; case "admin.getMetrics": _local3 = this.parseGetMetrics(_local4); break; case "auth.getSession": _local3 = new GetSessionData(); (_local3 as GetSessionData).expires = FacebookXMLParserUtils.toDate(_local4.this.fb_namespace::expires); (_local3 as GetSessionData).uid = FacebookXMLParserUtils.toStringValue(_local4.this.fb_namespace::uid[0]); (_local3 as GetSessionData).session_key = _local4.this.fb_namespace::session_key.toString(); (_local3 as GetSessionData).secret = String(_local4.this.fb_namespace::secret); break; case "feed.getRegisteredTemplateBundles": _local3 = this.parseGetRegisteredTemplateBundles(_local4); break; case "friends.areFriends": _local3 = this.parseAreFriends(_local4); break; case "notes.get": _local3 = this.parseGetNotes(_local4); break; case "friends.get": _local3 = this.parseGetFriends(_local4); break; case "friends.getAppUsers": _local3 = this.parseGetAppUsersData(_local4); break; case "friends.getLists": _local3 = this.parseGetLists(_local4); break; case "groups.get": _local3 = this.parseGetGroups(_local4); break; case "data.getAssociationDefinitions": _local3 = new FacebookData(); break; case "data.getAssociationDefinition": _local3 = new FacebookData(); break; case "data.getObject": case "data.getObjects": _local3 = new FacebookData(); break; case "groups.getMembers": _local3 = this.parseGetGroupMembers(_local4); break; case "users.getInfo": _local3 = this.parseGetInfo(_local4); break; case "data.createObject": case "data.setHashValue": case "connect.getUnconnectedFriendsCount": case "feed.registerTemplateBundle": _local3 = new NumberResultData(); (_local3 as NumberResultData).value = FacebookXMLParserUtils.toNumber(_local4); break; case "notifications.get": _local3 = this.parseGetNotifications(_local4); break; case "feed.getRegisteredTemplateBundleByID": _local3 = this.parseGetRegisteredTemplateBundleByID(_local4); break; case "users.getStandardInfo": _local3 = this.parseGetStandardInfo(_local4); break; case "feed.getRegisteredTemplateBundles": _local3 = this.parseGetRegisteredTemplateBundles(_local4); break; case "data.getUserPreferences": _local3 = this.parseGetUserPreferences(_local4); break; case "users.isAppUser": case "users.hasAppPermission": case "users.setStatus": case "pages.isFan": case "pages.isAppAdded": case "pages.isAdmin": case "admin.setAppProperties": case "auth.expireSession": case "auth.revokeAuthorization": case "events.cancel": case "events.edit": case "events.rsvp": case "liveMessage.send": case "data.undefineAssociation": case "data.defineAssociation": case "data.removeHashKeys": case "data.removeHashKey": case "data.incHashValue": case "data.updateObject": case "data.deleteObject": case "data.deleteObjects": case "data.renameAssociation": case "data.setObjectProperty": case "profile.setInfo": case "profile.setInfoOptions": case "feed.deactivateTemplateBundleByID": case "feed.publishTemplatizedAction": case "admin.setRestrictionInfo": case "data.setCookie": case "data.createObjectType": case "notes.delete": case "notes.edit": case "data.setUserPreference": case "data.dropObjectType": case "data.renameObjectType": case "fbml.registerCustomTags": case "fbml.deleteCustomTags": case "fbml.refreshRefUrl": case "fbml.refreshImgSrc": case "fbml.setRefHandle": case "data.setUserPreferences": case "data.defineObjectProperty": case "photos.addTag": case "stream.addLike": case "stream.removeLike": case "stream.removeComment": case "sms.canSend": _local3 = new BooleanResultData(); (_local3 as BooleanResultData).value = FacebookXMLParserUtils.toBoolean(_local4); break; case "feed.publishUserAction": _local3 = new BooleanResultData(); (_local3 as BooleanResultData).value = FacebookXMLParserUtils.toBoolean(_local4.children()[0]); break; case "notifications.sendEmail": _local3 = this.parseSendEmail(_local4); break; case "data.getObjectTypes": _local3 = this.parseGetObjectTypes(_local4); break; case "users.getStandardInfo": _local3 = this.parseGetStandardInfo(_local4); break; case "data.getObjectType": _local3 = this.parseGetObjectType(_local4); break; case "events.get": _local3 = this.parseGetEvent(_local4); break; case "events.getMembers": _local3 = this.parseGetMembers(_local4); break; case "fql.query": _local3 = new FacebookData(); break; case "photos.createAlbum": _local3 = this.parseCreateAlbum(_local4); break; case "photos.get": _local3 = this.parseGetPhotos(_local4); break; case "photos.getTags": _local3 = this.parseGetTags(_local4); break; case "photos.getAlbums": _local3 = this.parseGetAlbums(_local4); break; case "photos.upload": _local3 = this.parseFacebookPhoto(_local4); break; case "pages.getInfo": _local3 = this.parsePageGetInfo(_local4); break; case "batch.run": _local3 = this.parseBatchRun(_local4); break; case "fbml.getCustomTags": _local3 = this.parseGetCustomTags(_local4); break; case "connect.unregisterUsers": case "connect.registerUsers": _local3 = new ArrayResultData(); (_local3 as ArrayResultData).arrayResult = FacebookXMLParserUtils.toArray(_local4); break; case "status.get": _local3 = this.parseGetStatus(_local4); break; case "stream.get": _local3 = FacebookStreamXMLParser.createStream(_local4, this.fb_namespace); break; case "stream.getComments": _local3 = FacebookStreamXMLParser.createGetCommentsData(_local4, this.fb_namespace); break; case "stream.getFilters": _local3 = FacebookStreamXMLParser.createStreamFilterCollection(_local4, this.fb_namespace); break; case "auth.createToken": case "events.create": case "links.post": case "auth.promoteSession": case "admin.getRestrictionInfo": case "data.getObjectProperty": case "notifications.send": case "notes.create": case "data.getUserPreference": case "profile.setFBML": case "users.getLoggedInUser": case "stream.addComment": default: _local3 = new StringResultData(); (_local3 as StringResultData).value = FacebookXMLParserUtils.toStringValue(_local4); break; }; _local3.rawResult = _arg1; return (_local3); } protected function parseGetStandardInfo(_arg1:XML):GetStandardInfoData{ var _local4:*; var _local5:UserData; var _local2:GetStandardInfoData = new GetStandardInfoData(); var _local3:UserCollection = new UserCollection(); for each (_local4 in _arg1..this.fb_namespace::user) { _local5 = new UserData(); _local5.uid = _local4.this.fb_namespace::uid; _local5.affiations = this.getAffiliation(_local4.this.fb_namespace::affiliations); _local5.first_name = _local4.this.fb_namespace::first_name; _local5.last_name = _local4.this.fb_namespace::last_name; _local5.name = _local4.this.fb_namespace::name; _local5.timezone = _local4.this.fb_namespace::timezone; _local3.addItem(_local5); }; _local2.userCollection = _local3; return (_local2); } protected function parseGetAppProperties(_arg1:XML):GetAppPropertiesData{ var _local2:GetAppPropertiesData = new GetAppPropertiesData(); _local2.appProperties = JSON.decode(_arg1.toString()); return (_local2); } protected function parseGetRegisteredTemplateBundles(_arg1:XML):GetRegisteredTemplateBundleData{ var _local5:*; var _local2:GetRegisteredTemplateBundleData = new GetRegisteredTemplateBundleData(); var _local3:TemplateBundleCollection = new TemplateBundleCollection(); var _local4:TemplateCollection = new TemplateCollection(); for each (_local5 in _arg1..this.fb_namespace::template_bundle) { this.getTemplate(_local5.this.fb_namespace::one_line_story_template, _local4); this.getTemplate(_local5.this.fb_namespace::short_story_templates, _local4); this.getTemplate(_local5.this.fb_namespace::full_story_template, _local4); _local4.template_bundle_id = _local5.this.fb_namespace::template_bundle_id; _local4.time_created = FacebookXMLParserUtils.toDate(_local5.this.fb_namespace::time_created); }; _local2.bundleCollection = _local4; return (_local2); } protected function parseGetRegisteredTemplateBundleByID(_arg1:XML):GetRegisteredTemplateBundleByIDData{ var _local2:GetRegisteredTemplateBundleByIDData = new GetRegisteredTemplateBundleByIDData(); var _local3:TemplateCollection = new TemplateCollection(); this.getTemplate(_arg1.this.fb_namespace::one_line_story_template, _local3); this.getTemplate(_arg1.this.fb_namespace::short_story_templates, _local3); this.getTemplate(_arg1.this.fb_namespace::full_story_template, _local3); _local3.template_bundle_id = _arg1.this.fb_namespace::template_bundle_id; _local3.time_created = FacebookXMLParserUtils.toDate(_arg1.this.fb_namespace::time_created); _local2.templateCollection = _local3; return (_local2); } protected function responseNodeNameToMethodName(_arg1:String):String{ var _local2:Array = _arg1.split("_"); _local2.pop(); return (_local2.join(".")); } protected function parseGetObjectTypes(_arg1:XML):GetObjectTypesData{ var _local4:*; var _local5:ObjectTypesData; var _local2:GetObjectTypesData = new GetObjectTypesData(); var _local3:ObjectTypesCollection = new ObjectTypesCollection(); for each (_local4 in _arg1..this.fb_namespace::object_type_info) { _local5 = new ObjectTypesData(); _local5.name = _local4.this.fb_namespace::name; _local5.object_class = _local4.this.fb_namespace::object_class; _local3.addItem(_local5); }; _local2.objectTypeCollection = _local3; return (_local2); } protected function parseFacebookPhoto(_arg1:XML):FacebookPhoto{ var _local2:FacebookPhoto = new FacebookPhoto(); _local2.pid = FacebookXMLParserUtils.toStringValue(_arg1.this.fb_namespace::pid[0]); _local2.aid = FacebookXMLParserUtils.toStringValue(_arg1.this.fb_namespace::aid[0]); _local2.owner = FacebookXMLParserUtils.toNumber(_arg1.this.fb_namespace::owner[0]); _local2.src = FacebookXMLParserUtils.toStringValue(_arg1.this.fb_namespace::src[0]); _local2.src_big = FacebookXMLParserUtils.toStringValue(_arg1.this.fb_namespace::src_big[0]); _local2.src_small = FacebookXMLParserUtils.toStringValue(_arg1.this.fb_namespace::src_small[0]); _local2.link = FacebookXMLParserUtils.toStringValue(_arg1.this.fb_namespace::link[0]); _local2.caption = FacebookXMLParserUtils.toStringValue(_arg1.this.fb_namespace::caption[0]); return (_local2); } protected function parseGetObjectType(_arg1:XML):GetObjectTypeData{ var _local2:GetObjectTypeData = new GetObjectTypeData(); _local2.name = _arg1.this.fb_namespace::name; _local2.data_type = _arg1.this.fb_namespace::data_type; _local2.index_type = _arg1.this.fb_namespace::index_type; return (_local2); } protected function createTagObject(_arg1:XML, _arg2:Array){ var _local5:AbstractTagData; var _local7:Object; var _local3:Number = _arg1.children().length(); var _local4:String = _arg1.children()[0].toLowerCase(); if (_local4 == "leaf"){ _local5 = new LeafTagData(null, null, null, null, null); (_local5 as LeafTagData).fbml = _arg1.children()[9]; } else { _local5 = new ContainerTagData(null, null, null, null, null, null, null); (_local5 as ContainerTagData).open_tag_fbml = _arg1.children()[2]; (_local5 as ContainerTagData).close_tag_fbml = _arg1.children()[4]; }; var _local6:Number = 0; while (_local6 < _local3) { _local7 = _arg1.children()[_local6]; switch (_arg2[_local6]){ case "name": case "type": case "description": case "is_public": case "header_fbml": case "footer_fbml": _local5[_arg2[_local6]] = _local7.text(); break; case "attributes": if ((_local7.children() is XMLList)){ if (_local7.children().length() == 0){ _local5[_arg2[_local6]] = null; }; }; break; }; _local6++; }; return (_local5); } protected function parseGetNotes(_arg1:XML):GetNotesData{ var _local4:*; var _local5:NoteData; var _local2:GetNotesData = new GetNotesData(); var _local3:NotesCollection = new NotesCollection(); for each (_local4 in _arg1..this.fb_namespace::note) { _local5 = new NoteData(); _local5.note_id = _local4.this.fb_namespace::note_id; _local5.title = _local4.this.fb_namespace::title; _local5.content = _local4.this.fb_namespace::content; _local5.created_time = FacebookXMLParserUtils.toDate(_local4.this.fb_namespace::created_time); _local5.updated_time = FacebookXMLParserUtils.toDate(_local4.this.fb_namespace::updated_time); _local5.uid = _local4.this.fb_namespace::uid; _local3.addItem(_local5); }; _local2.notesCollection = _local3; return (_local2); } protected function parseGetMetrics(_arg1:XML):GetMetricsData{ var _local4:*; var _local5:MetricsData; var _local2:GetMetricsData = new GetMetricsData(); var _local3:MetricsDataCollection = new MetricsDataCollection(); for each (_local4 in _arg1..this.fb_namespace::metrics) { _local5 = new MetricsData(); _local5.end_time = FacebookXMLParserUtils.toDate(_local4.this.fb_namespace::end_time); _local5.active_users = _local4.this.fb_namespace::active_users; _local5.canvas_page_views = _local4.this.fb_namespace::canvas_page_views; _local3.addItem(_local5); }; _local2.metricsCollection = _local3; return (_local2); } protected function parsePageGetInfo(_arg1:XML):GetPageInfoData{ var _local5:Object; var _local6:PageInfoData; var _local2:GetPageInfoData = new GetPageInfoData(); var _local3:PageInfoCollection = new PageInfoCollection(); var _local4:XMLList = _arg1.this.fb_namespace::page; for each (_local5 in _local4) { _local6 = new PageInfoData(); _local6.page_id = _local5.this.fb_namespace::page_id; _local6.name = _local5.this.fb_namespace::name; _local6.pic_small = _local5.this.fb_namespace::pic_small; _local6.pic_big = _local5.this.fb_namespace::pic_big; _local6.pic_square = _local5.this.fb_namespace::pic_square; _local6.pic_large = _local5.this.fb_namespace::pic_large; _local6.type = _local5.this.fb_namespace::type; _local6.website = _local5.this.fb_namespace::website; _local6.location = FacebookXMLParserUtils.createLocation(_local5.this.fb_namespace::location[0], this.fb_namespace); _local6.hours = _local5.this.fb_namespace::hours; _local6.band_members = _local5.this.fb_namespace::band_members; _local6.bio = _local5.this.fb_namespace::bio; _local6.hometown = _local5.this.fb_namespace::hometown; _local6.genre = FacebookXMLParserUtils.toStringValue(_local5.this.fb_namespace::genre[0]); _local6.record_label = _local5.this.fb_namespace::record_label; _local6.influences = _local5.this.fb_namespace::influences; _local6.has_added_app = FacebookXMLParserUtils.toBoolean(_local5.this.fb_namespace::has_added_app[0]); _local6.founded = _local5.this.fb_namespace::founded; _local6.company_overview = _local5.this.fb_namespace::company_overview; _local6.mission = _local5.this.fb_namespace::mission; _local6.products = _local5.this.fb_namespace::products; _local6.release_date = _local5.this.fb_namespace::release_date; _local6.starring = _local5.this.fb_namespace::starring; _local6.written_by = _local5.this.fb_namespace::written_by; _local6.directed_by = _local5.this.fb_namespace::directed_by; _local6.produced_by = _local5.this.fb_namespace::produced_by; _local6.studio = _local5.this.fb_namespace::studio; _local6.awards = _local5.this.fb_namespace::awards; _local6.plot_outline = _local5.this.fb_namespace::plot_outline; _local6.network = _local5.this.fb_namespace::network; _local6.season = _local5.this.fb_namespace::season; _local6.schedule = _local5.this.fb_namespace::schedule; _local3.addPageInfo(_local6); }; _local2.pageInfoCollection = _local3; return (_local2); } protected function parseGetTags(_arg1:XML):GetTagsData{ var _local4:*; var _local5:TagData; var _local2:GetTagsData = new GetTagsData(); var _local3:PhotoTagCollection = new PhotoTagCollection(); for each (_local4 in _arg1..this.fb_namespace::photo_tag) { _local5 = new TagData(); _local5.text = _local4.this.fb_namespace::text; _local5.pid = _local4.this.fb_namespace::pid; _local5.subject = _local4.this.fb_namespace::subject; _local5.xcoord = _local4.this.fb_namespace::xcoord; _local5.ycoord = _local4.this.fb_namespace::ycoord; _local5.created = FacebookXMLParserUtils.toDate(_local4.this.fb_namespace::created); _local3.addPhotoTag(_local5); }; _local2.photoTagsCollection = _local3; return (_local2); } protected function parseGetGroupMembers(_arg1:XML):GetMemberData{ var _local2:GetMemberData = new GetMemberData(); _local2.members = FacebookXMLParserUtils.toUIDArray(_arg1.this.fb_namespace::members[0]); _local2.admins = FacebookXMLParserUtils.toUIDArray(_arg1.this.fb_namespace::admins[0]); _local2.officers = FacebookXMLParserUtils.toUIDArray(_arg1.this.fb_namespace::officers[0]); _local2.notReplied = FacebookXMLParserUtils.toUIDArray(_arg1.this.fb_namespace::not_replied[0]); return (_local2); } protected function parseGetGroups(_arg1:XML):GetGroupData{ var _local4:*; var _local5:GroupData; var _local2:GetGroupData = new GetGroupData(); var _local3:GroupCollection = new GroupCollection(); for each (_local4 in _arg1..this.fb_namespace::group) { _local5 = new GroupData(); _local5.gid = _local4.this.fb_namespace::gid; _local5.name = _local4.this.fb_namespace::name; _local5.nid = _local4.this.fb_namespace::nid; _local5.description = _local4.this.fb_namespace::description; _local5.group_type = _local4.this.fb_namespace::group_type; _local5.group_subtype = _local4.this.fb_namespace::group_subtype; _local5.recent_news = _local4.this.fb_namespace::recent_news; _local5.pic = _local4.this.fb_namespace::pic; _local5.pic_big = _local4.this.fb_namespace::pic_big; _local5.pic_small = _local4.this.fb_namespace::pic_small; _local5.creator = _local4.this.fb_namespace::creator; _local5.update_time = FacebookXMLParserUtils.toDate(_local4.this.fb_namespace::update_time); _local5.office = _local4.this.fb_namespace::office; _local5.website = _local4.this.fb_namespace::website; _local5.venue = FacebookXMLParserUtils.createLocation(_local4.this.fb_namespace::venue[0], this.fb_namespace); _local5.privacy = _local4.this.fb_namespace::privacy; _local3.addGroup(_local5); }; _local2.groups = _local3; return (_local2); } protected function parseCreateAlbum(_arg1:XML):GetCreateAlbumData{ var _local2:GetCreateAlbumData = new GetCreateAlbumData(); var _local3:AlbumData = new AlbumData(); _local3.aid = _arg1.this.fb_namespace::aid; _local3.cover_pid = _arg1.this.fb_namespace::cover_pid; _local3.owner = _arg1.this.fb_namespace::owner; _local3.name = _arg1.this.fb_namespace::name; _local3.created = FacebookXMLParserUtils.toDate(_arg1.this.fb_namespace::created); _local3.modified = FacebookXMLParserUtils.toDate(_arg1.this.fb_namespace::modified); _local3.description = _arg1.this.fb_namespace::description; _local3.location = _arg1.this.fb_namespace::location; _local3.link = _arg1.this.fb_namespace::link; _local3.size = _arg1.this.fb_namespace::size; _local3.visible = _arg1.this.fb_namespace::visible; _local2.albumData = _local3; return (_local2); } protected function parseGetAllocation(_arg1:XML):GetAllocationData{ var _local2:GetAllocationData = new GetAllocationData(); _local2.allocationLimit = Number(_arg1.toString()); return (_local2); } protected function parseGetCookies(_arg1:XML):GetCookiesData{ var _local2:GetCookiesData = new GetCookiesData(); _local2.uid = _arg1.this.fb_namespace::uid; _local2.name = _arg1.this.fb_namespace::name; _local2.value = _arg1.this.fb_namespace::value; _local2.expires = _arg1.this.fb_namespace::expires; _local2.path = _arg1.this.fb_namespace::path; return (_local2); } protected function parseGetCustomTags(_arg1:XML):GetCustomTagsData{ var _local5:*; var _local2:Array = ["type", "name", "open_tag_fbml", "description", "close_tag_fbml", "is_public", "attributes", "header_fbml", "footer_fbml", "fbml"]; var _local3:GetCustomTagsData = new GetCustomTagsData(); var _local4:TagCollection = new TagCollection(); for each (_local5 in _arg1..this.fb_namespace::custom_tag) { _local4.addItem(this.createTagObject(_local5, _local2)); }; _local3.tagCollection = _local4; return (_local3); } protected function parseGetAlbums(_arg1:XML):GetAlbumsData{ var _local2:GetAlbumsData = new GetAlbumsData(); _local2.albumCollection = FacebookXMLParserUtils.createAlbumCollection(_arg1, this.fb_namespace); return (_local2); } protected function parseGetInfo(_arg1:XML):GetInfoData{ var _local7:FacebookUser; var _local2:FacebookUserCollection = new FacebookUserCollection(); var _local3:XMLList = _arg1..this.fb_namespace::user; var _local4:uint = _local3.length(); var _local5:uint; while (_local5 < _local4) { _local7 = FacebookUserXMLParser.createFacebookUser(_local3[_local5], this.fb_namespace); _local2.addItem(_local7); _local5++; }; var _local6:GetInfoData = new GetInfoData(); _local6.userCollection = _local2; return (_local6); } protected function parseGetLists(_arg1:XML):GetListsData{ var _local4:*; var _local5:ListsData; var _local2:GetListsData = new GetListsData(); var _local3:Array = []; for each (_local4 in _arg1..this.fb_namespace::friendlist) { _local5 = new ListsData(); _local5.flid = _local4.this.fb_namespace::flid; _local5.name = _local4.this.fb_namespace::name; _local3.push(_local5); }; _local2.lists = _local3; return (_local2); } protected function parseGetAppUsersData(_arg1:XML):GetAppUserData{ var _local2:Array = FacebookXMLParserUtils.toUIDArray(_arg1); var _local3:GetAppUserData = new GetAppUserData(); _local3.uids = _local2; return (_local3); } protected function parseGetStatus(_arg1:XML):GetStatusData{ var _local7:XMLList; var _local8:Status; var _local2:GetStatusData = new GetStatusData(); var _local3:Array = []; var _local4:XMLList = _arg1.children(); var _local5:uint = _local4.length(); var _local6:uint; while (_local6 < _local5) { _local7 = _local4[_local6].children(); _local8 = new Status(); _local8.uid = FacebookXMLParserUtils.toStringValue(_local7[0]); _local8.status_id = FacebookXMLParserUtils.toStringValue(_local7[1]); _local8.time = FacebookXMLParserUtils.toDate(_local7[2]); _local8.source = FacebookXMLParserUtils.toStringValue(_local7[3]); _local8.message = FacebookXMLParserUtils.toStringValue(_local7[4]); _local3.push(_local8); _local6++; }; _local2.status = _local3; return (_local2); } protected function parseGetMembers(_arg1:XML):GetMembersData{ var _local2:GetMembersData = new GetMembersData(); _local2.attending = FacebookXMLParserUtils.toUIDArray(_arg1..this.fb_namespace::attending[0]); _local2.unsure = FacebookXMLParserUtils.toUIDArray(_arg1..this.fb_namespace::unsure[0]); _local2.declined = FacebookXMLParserUtils.toUIDArray(_arg1..this.fb_namespace::declined[0]); _local2.not_replied = FacebookXMLParserUtils.toUIDArray(_arg1..this.fb_namespace::not_replied[0]); return (_local2); } protected function parseGetEvent(_arg1:XML):GetEventsData{ var _local4:*; var _local5:EventData; var _local2:GetEventsData = new GetEventsData(); var _local3:EventCollection = new EventCollection(); for each (_local4 in _arg1..this.fb_namespace::event) { _local5 = new EventData(); _local5.eid = _local4.this.fb_namespace::eid; _local5.name = _local4.this.fb_namespace::name; _local5.tagline = _local4.this.fb_namespace::tagline; _local5.nid = _local4.this.fb_namespace::nid; _local5.pic = _local4.this.fb_namespace::pic; _local5.pic_big = _local4.this.fb_namespace::pic_big; _local5.pic_small = _local4.this.fb_namespace::pic_small; _local5.host = _local4.this.fb_namespace::host; _local5.description = _local4.this.fb_namespace::description; _local5.event_type = _local4.this.fb_namespace::event_type; _local5.event_subtype = _local4.this.fb_namespace::event_subtype; _local5.start_time = FacebookXMLParserUtils.toDate(_local4.this.fb_namespace::start_time); _local5.end_time = FacebookXMLParserUtils.toDate(_local4.this.fb_namespace::end_time); _local5.creator = _local4.this.fb_namespace::end_time; _local5.update_time = FacebookXMLParserUtils.toDate(_local4.this.fb_namespace::update_time); _local5.location = _local4.this.fb_namespace::location; _local5.venue = FacebookXMLParserUtils.createLocation(_local4.this.fb_namespace::venue[0], this.fb_namespace); _local3.addItem(_local5); }; _local2.eventCollection = _local3; return (_local2); } protected function parseGetFriends(_arg1:XML):GetFriendsData{ var _local4:*; var _local5:FacebookUser; var _local2:GetFriendsData = new GetFriendsData(); var _local3:FacebookUserCollection = new FacebookUserCollection(); for each (_local4 in _arg1..this.fb_namespace::uid) { _local5 = new FacebookUser(); _local5.uid = _local4; _local3.addItem(_local5); }; _local2.friends = _local3; return (_local2); } protected function parseGetPublicInfo(_arg1:XML):GetPublicInfoData{ var _local2:GetPublicInfoData = new GetPublicInfoData(); _local2.app_id = _arg1.this.fb_namespace::app_id; _local2.api_key = _arg1.this.fb_namespace::api_key; _local2.canvas_name = _arg1.this.fb_namespace::canvas_name; _local2.display_name = _arg1.this.fb_namespace::display_name; _local2.icon_url = _arg1.this.fb_namespace::icon_url; _local2.logo_url = _arg1.this.fb_namespace::logo_url; _local2.developers = _arg1.this.fb_namespace::developers; _local2.company_name = _arg1.this.fb_namespace::company_name; _local2.developers = _arg1.this.fb_namespace::developers; _local2.daily_active_users = _arg1.this.fb_namespace::daily_active_users; _local2.weekly_active_users = _arg1.this.fb_namespace::weekly_active_users; _local2.monthly_active_users = _arg1.this.fb_namespace::monthly_active_users; return (_local2); } protected function parseAreFriends(_arg1:XML):AreFriendsData{ var _local4:*; var _local5:FriendsData; var _local2:AreFriendsData = new AreFriendsData(); var _local3:FriendsCollection = new FriendsCollection(); for each (_local4 in _arg1..this.fb_namespace::friend_info) { _local5 = new FriendsData(); _local5.uid1 = _local4.this.fb_namespace::uid1; _local5.uid2 = _local4.this.fb_namespace::uid2; _local5.are_friends = FacebookXMLParserUtils.toBoolean(_local4.this.fb_namespace::are_friends); _local3.addItem(_local5); }; _local2.friendsCollection = _local3; return (_local2); } public function validateFacebookResponce(_arg1:String):FacebookError{ var xml:XML; var xmlError:Error; var result = _arg1; var error:FacebookError; var hasXMLError:Boolean; try { xml = new XML(result); } catch(e) { xmlError = e; hasXMLError = true; }; if (hasXMLError == false){ if (xml.localName() == "error_response"){ error = new FacebookError(); error.rawResult = result; error.errorCode = Number(xml.this.fb_namespace::error_code); error.errorMsg = xml.this.fb_namespace::error_msg; error.requestArgs = FacebookXMLParserUtils.xmlToUrlVariables(xml..arg); }; return (error); }; if (hasXMLError == true){ error = new FacebookError(); error.error = xmlError; error.errorCode = -1; }; return (error); } protected function parseBatchRun(_arg1:XML):FacebookData{ var _local7:String; var _local8:XML; var _local9:FacebookError; var _local10:String; var _local11:FacebookData; var _local2:XMLList = _arg1..this.fb_namespace::batch_run_response_elt; var _local3:uint = _local2.length(); var _local4:Array = []; var _local5:uint; while (_local5 < _local3) { _local7 = _local2[_local5].toString(); _local8 = new XML(_local7); _local9 = this.validateFacebookResponce(_local7); if (_local9 === null){ _local10 = this.responseNodeNameToMethodName(_local8.localName().toString()); _local11 = this.parse(_local7, _local10); _local4.push(_local11); } else { _local4.push(_local9); }; _local5++; }; var _local6:BatchResult = new BatchResult(); _local6.results = _local4; return (_local6); } protected function getTemplate(_arg1:XMLList, _arg2:TemplateCollection):void{ var _local3:*; var _local4:TemplateData; for each (_local3 in _arg1) { _local4 = new TemplateData(); _local4.type = _local3.localName(); _local4.template_body = _local3.this.fb_namespace::template_body; _local4.template_title = _local3.this.fb_namespace::template_title; _arg2.addTemplateData(_local4); }; } } }//package com.facebook.data
Section 190
//AbstractFileUploadDelegate (com.facebook.delegates.AbstractFileUploadDelegate) package com.facebook.delegates { import flash.events.*; import flash.net.*; import flash.utils.*; import com.facebook.session.*; import com.facebook.net.*; import com.facebook.errors.*; import com.facebook.utils.*; public class AbstractFileUploadDelegate extends WebDelegate { protected var ba:ByteArray; public function AbstractFileUploadDelegate(_arg1:FacebookCall, _arg2:WebSession){ super(_arg1, _arg2); this.ba = new ByteArray(); } protected function uploadByteArray(_arg1:ByteArray):void{ var _local3:String; var _local4:URLRequest; var _local2:PostRequest = new PostRequest(); for (_local3 in call.args) { if (_local3 != "data"){ _local2.writePostData(_local3, call.args[_local3]); }; }; _local2.writeFileData(((("fn" + call.args["call_id"]) + ".") + this.getExt()), _arg1, this.getContentType()); _local2.close(); _local4 = new URLRequest(); _local4.method = URLRequestMethod.POST; _local4.contentType = ("multipart/form-data; boundary=" + _local2.boundary); _local4.data = _local2.getPostData(); _local4.url = _session.rest_url; createURLLoader(); loader.dataFormat = URLLoaderDataFormat.BINARY; loader.load(_local4); connectTimer.start(); } protected function onFileRefComplete(_arg1:Event):void{ fileRef = (call.args.data as FileReference); this.uploadByteArray(fileRef["data"]); } override protected function onDataComplete(_arg1:Event):void{ var _local3:FacebookError; var _local4:String; var _local2:ByteArray = (_arg1.target.data as ByteArray); if (_local2 == null){ _local3 = new FacebookError(); call.handleError(_local3); clean(); } else { _local4 = _local2.readUTFBytes(_local2.length); _local2.length = 0; _local2 = null; handleResult(_local4); }; } protected function getExt():String{ return (null); } protected function getContentType():String{ return (null); } } }//package com.facebook.delegates
Section 191
//DesktopDelegate (com.facebook.delegates.DesktopDelegate) package com.facebook.delegates { import com.facebook.session.*; import com.facebook.net.*; public class DesktopDelegate extends WebDelegate { public function DesktopDelegate(_arg1:FacebookCall, _arg2:DesktopSession){ super(_arg1, _arg2); } override protected function addOptionalArguments():void{ } } }//package com.facebook.delegates
Section 192
//IFacebookCallDelegate (com.facebook.delegates.IFacebookCallDelegate) package com.facebook.delegates { import flash.events.*; import com.facebook.session.*; import com.facebook.net.*; public interface IFacebookCallDelegate extends IEventDispatcher { function get session():IFacebookSession; function close():void; function set call(_arg1:FacebookCall):void; function set session(_arg1:IFacebookSession):void; function get call():FacebookCall; } }//package com.facebook.delegates
Section 193
//JSDelegate (com.facebook.delegates.JSDelegate) package com.facebook.delegates { import flash.events.*; import com.facebook.session.*; import com.facebook.net.*; import com.facebook.*; import com.facebook.data.*; import com.facebook.errors.*; import com.adobe.serialization.json.*; import com.facebook.utils.*; import flash.external.*; public class JSDelegate extends EventDispatcher implements IFacebookCallDelegate { protected var _call:FacebookCall; protected var _session:JSSession; protected static var externalInterfaceCalls:Object = {}; protected static var externalInterfaceCallId:Number = 0; public function JSDelegate(_arg1:FacebookCall, _arg2:JSSession){ this.call = _arg1; this.session = _arg2; this.execute(); } public function set call(_arg1:FacebookCall):void{ this._call = _arg1; } protected function onReceiveError(_arg1:ErrorEvent):void{ var _local2:FacebookError = new FacebookError(); _local2.errorEvent = _arg1; var _local3 = this.call; _local3.facebook_internal::handleError(_local2); } public function get call():FacebookCall{ return (this._call); } protected function postBridgeAsyncReply(_arg1:Object, _arg2:Object, _arg3:uint):void{ var _local5:JSONResultData; var _local6:FacebookError; var _local4:FacebookCall = externalInterfaceCalls[_arg3]; if (_arg1){ _local5 = new JSONResultData(); _local5.result = _arg1; var _local7 = _local4; _local7.facebook_internal::handleResult(_local5); } else { _local6 = new FacebookError(); _local6.rawResult = JSON.encode(_arg2); _local7 = _local4; _local7.facebook_internal::handleError(_local6); }; delete externalInterfaceCalls[_arg3]; } protected function buildCall():String{ var _local3:String; var _local4:String; var _local1:String = ("bridgeFacebookCall_" + externalInterfaceCallId); RequestHelper.formatRequest(this.call); var _local2:Object = {}; for (_local3 in this.call.args) { _local2[_local3] = this.call.args[_local3]; }; _local4 = (((((((((((((((("function " + _local1) + "() { ") + "FB.Facebook.apiClient.callMethod(\"") + this.call.method) + "\", ") + JavascriptRequestHelper.formatURLVariables(this.call.args)) + ", ") + "function(result, exception) {") + "document.") + (this._session as JSSession).as_swf_name) + ".bridgeFacebookReply(result, exception, ") + externalInterfaceCallId) + ")") + "}") + ");") + "}"); return (_local4); } protected function execute():void{ var _local2:Object; var _local3:String; var _local1:Array = []; for each (_local2 in this.call.args) { _local1.push(_local2); }; var _local4 = ++externalInterfaceCallId; externalInterfaceCalls[_local4] = this.call; _local3 = this.buildCall(); ExternalInterface.addCallback("bridgeFacebookReply", this.postBridgeAsyncReply); ExternalInterface.call(_local3); } protected function onReceiveStatus(_arg1:StatusEvent):void{ var _local2:FacebookError; switch ((_arg1.level == "error")){ case "error": _local2 = new FacebookError(); _local2.rawResult = _arg1.level; var _local3 = this.call; _local3.facebook_internal::handleError(_local2); break; case "warning": case "status": break; }; } public function set session(_arg1:IFacebookSession):void{ this._session = (_arg1 as JSSession); } public function get session():IFacebookSession{ return (this._session); } public function close():void{ } } }//package com.facebook.delegates
Section 194
//RequestHelper (com.facebook.delegates.RequestHelper) package com.facebook.delegates { import flash.display.*; import flash.net.*; import flash.utils.*; import com.facebook.session.*; import com.facebook.net.*; import com.adobe.crypto.*; public class RequestHelper { protected static var callID:int = 0; public static function formatRequest(_arg1:FacebookCall):void{ var _local2:IFacebookSession = _arg1.session; _arg1.setRequestArgument("v", _local2.api_version); if (_local2.api_key != null){ _arg1.setRequestArgument("api_key", _local2.api_key); }; if (((!((_local2.session_key == null))) && (_arg1.useSession))){ _arg1.setRequestArgument("session_key", _local2.session_key); }; var _local3:String = (new Date().time.toString() + callID++.toString()); _arg1.setRequestArgument("call_id", _local3); _arg1.setRequestArgument("method", _arg1.method); _arg1.setRequestArgument("sig", formatSig(_arg1)); } public static function formatSig(_arg1:FacebookCall):String{ var _local4:String; var _local5:String; var _local6:*; var _local2:IFacebookSession = _arg1.session; var _local3:Array = []; for (_local4 in _arg1.args) { _local6 = _arg1.args[_local4]; if (((((((((!((_local4 === "sig"))) && (!((_local6 is ByteArray))))) && (!((_local6 is FileReference))))) && (!((_local6 is BitmapData))))) && (!((_local6 is Bitmap))))){ _local3.push(((_local4 + "=") + _local6.toString())); }; }; _local3.sort(); _local5 = _local3.join(""); if (_local2.secret != null){ _local5 = (_local5 + _local2.secret); }; return (MD5.hash(_local5)); } } }//package com.facebook.delegates
Section 195
//WebDelegate (com.facebook.delegates.WebDelegate) package com.facebook.delegates { import flash.events.*; import flash.net.*; import com.facebook.events.*; import flash.utils.*; import com.facebook.session.*; import com.facebook.net.*; import com.facebook.data.*; import com.facebook.errors.*; public class WebDelegate extends EventDispatcher implements IFacebookCallDelegate { protected var connectTimer:Timer; protected var loader:URLLoader; protected var _session:WebSession; protected var parser:XMLDataParser; protected var fileRef:FileReference; protected var _call:FacebookCall; protected var loadTimer:Timer; public function WebDelegate(_arg1:FacebookCall, _arg2:WebSession){ this.call = _arg1; this.session = _arg2; this.parser = new XMLDataParser(); this.connectTimer = new Timer(_arg1.connectTimeout, 1); this.connectTimer.addEventListener(TimerEvent.TIMER_COMPLETE, this.onConnectTimeout, false, 0, true); this.loadTimer = new Timer(_arg1.loadTimeout, 1); this.loadTimer.addEventListener(TimerEvent.TIMER_COMPLETE, this.onLoadTimeOut, false, 0, true); this.execute(); } public function set call(_arg1:FacebookCall):void{ this._call = _arg1; } protected function execute():void{ if (this.call == null){ throw (new Error("No call defined.")); }; this.post(); } protected function createURLLoader():void{ this.loader = new URLLoader(); this.loader.addEventListener(Event.COMPLETE, this.onDataComplete); this.loader.addEventListener(HTTPStatusEvent.HTTP_STATUS, this.onHTTPStatus); this.loader.addEventListener(IOErrorEvent.IO_ERROR, this.onError); this.loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.onError); this.loader.addEventListener(Event.OPEN, this.onOpen); } protected function onOpen(_arg1:Event):void{ this.connectTimer.stop(); this.loadTimer.start(); } protected function addOptionalArguments():void{ this.call.setRequestArgument("ss", true); } protected function onConnectTimeout(_arg1:TimerEvent):void{ var _local2:FacebookError = new FacebookError(); _local2.errorCode = FacebookErrorCodes.SERVER_ERROR; _local2.reason = FacebookErrorReason.CONNECT_TIMEOUT; this._call.handleError(_local2); dispatchEvent(new FacebookEvent(FacebookEvent.COMPLETE, false, false, false, null, _local2)); this.loadTimer.stop(); this.close(); } protected function clean():void{ this.connectTimer.stop(); this.loadTimer.stop(); if (this.loader == null){ return; }; this.loader.removeEventListener(Event.COMPLETE, this.onDataComplete); this.loader.removeEventListener(IOErrorEvent.IO_ERROR, this.onError); this.loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, this.onError); this.loader.removeEventListener(Event.OPEN, this.onOpen); } protected function onDataComplete(_arg1:Event):void{ this.handleResult((_arg1.target.data as String)); } protected function onLoadTimeOut(_arg1:TimerEvent):void{ this.connectTimer.stop(); this.close(); var _local2:FacebookError = new FacebookError(); _local2.errorCode = FacebookErrorCodes.SERVER_ERROR; _local2.reason = FacebookErrorReason.LOAD_TIMEOUT; this._call.handleError(_local2); dispatchEvent(new FacebookEvent(FacebookEvent.COMPLETE, false, false, false, null, _local2)); } public function get session():IFacebookSession{ return (this._session); } protected function post():void{ this.addOptionalArguments(); RequestHelper.formatRequest(this.call); this.sendRequest(); this.connectTimer.start(); } public function get call():FacebookCall{ return (this._call); } protected function sendRequest():void{ this.createURLLoader(); var _local1:URLRequest = new URLRequest(this._session.rest_url); _local1.contentType = "application/x-www-form-urlencoded"; _local1.method = URLRequestMethod.POST; _local1.data = this.call.args; trace(((_local1.url + "?") + unescape(this.call.args.toString()))); this.loader.dataFormat = URLLoaderDataFormat.TEXT; this.loader.load(_local1); } protected function onError(_arg1:ErrorEvent):void{ this.clean(); var _local2:FacebookError = this.parser.createFacebookError(_arg1, this.loader.data); this.call.handleError(_local2); dispatchEvent(new FacebookEvent(FacebookEvent.COMPLETE, false, false, false, null, _local2)); } protected function handleResult(_arg1:String):void{ var _local3:FacebookData; this.clean(); var _local2:FacebookError = this.parser.validateFacebookResponce(_arg1); if (_local2 == null){ _local3 = this.parser.parse(_arg1, this.call.method); this.call.handleResult(_local3); } else { this.call.handleError(_local2); }; } public function close():void{ try { this.loader.close(); } catch(e) { }; this.connectTimer.stop(); this.loadTimer.stop(); } protected function onHTTPStatus(_arg1:HTTPStatusEvent):void{ } public function set session(_arg1:IFacebookSession):void{ this._session = (_arg1 as WebSession); } } }//package com.facebook.delegates
Section 196
//WebImageUploadDelegate (com.facebook.delegates.WebImageUploadDelegate) package com.facebook.delegates { import flash.events.*; import flash.display.*; import flash.net.*; import flash.utils.*; import com.facebook.session.*; import com.facebook.net.*; import com.adobe.images.*; import com.facebook.utils.*; import com.facebook.commands.photos.*; public class WebImageUploadDelegate extends AbstractFileUploadDelegate { public function WebImageUploadDelegate(_arg1:FacebookCall, _arg2:WebSession){ super(_arg1, _arg2); } override protected function getExt():String{ return ((((call as IUploadPhoto).uploadType == UploadPhotoTypes.JPEG)) ? "jpeg" : "png"); } override protected function getContentType():String{ return ("Content-Type: image/jpg"); } override protected function sendRequest():void{ var _local1:ByteArray; var _local4:JPGEncoder; var _local2:URLRequest = new URLRequest(_session.rest_url); var _local3:Object = call.args.data; if ((((PlayerUtils.majorVersion == 9)) && ((_local3 is FileReference)))){ throw (new TypeError("Uploading FileReference with Player 9 is unsupported. Use either an BitmapData or ByteArray.")); }; if ((_local3 is Bitmap)){ _local3 = (_local3 as Bitmap).bitmapData; }; if ((((PlayerUtils.majorVersion == 10)) && ((_local3 is FileReference)))){ _local1 = (_local3 as FileReference)["load"](); fileRef = (_local3 as FileReference); fileRef.addEventListener(Event.COMPLETE, onFileRefComplete); } else { if ((_local3 is ByteArray)){ uploadByteArray((_local3 as ByteArray)); } else { if ((_local3 is BitmapData)){ switch ((call as UploadPhoto).uploadType){ case UploadPhotoTypes.JPEG: _local4 = new JPGEncoder((call as UploadPhoto).uploadQuality); ba = _local4.encode((_local3 as BitmapData)); break; case UploadPhotoTypes.PNG: ba = PNGEncoder.encode((_local3 as BitmapData)); break; }; uploadByteArray(ba); } else { throw (new Error((("Error data type " + call.args.data) + " is not supported. Please use one of the following types: FileReference, ByteArray, BitmapData or Bitmap."))); }; }; }; } } }//package com.facebook.delegates
Section 197
//VideoUploadDelegate (com.facebook.delegates.VideoUploadDelegate) package com.facebook.delegates { import flash.events.*; import flash.net.*; import flash.utils.*; import com.facebook.session.*; import com.facebook.net.*; import com.facebook.utils.*; import com.facebook.commands.video.*; public class VideoUploadDelegate extends AbstractFileUploadDelegate { public function VideoUploadDelegate(_arg1:FacebookCall, _arg2:WebSession){ super(_arg1, _arg2); } override protected function onOpen(_arg1:Event):void{ super.onOpen(_arg1); loadTimer.stop(); } override protected function getExt():String{ return ((call as UploadVideo).ext); } override protected function getContentType():String{ return (("Content-Type: video/" + (call as UploadVideo).ext)); } override protected function sendRequest():void{ var _local1:ByteArray; var _local2:URLRequest = new URLRequest(_session.rest_url); var _local3:Object = call.args.data; if ((((PlayerUtils.majorVersion == 9)) && ((_local3 is FileReference)))){ throw (new TypeError("Uploading FileReference with Player 9 is unsupported. Use ByteArray.")); }; if ((((PlayerUtils.majorVersion == 10)) && ((_local3 is FileReference)))){ _local1 = (_local3 as FileReference)["load"](); fileRef = (_local3 as FileReference); fileRef.addEventListener(Event.COMPLETE, onFileRefComplete); } else { if ((_local3 is ByteArray)){ uploadByteArray((_local3 as ByteArray)); } else { throw (new Error((("Error data type " + call.args.data) + " is not supported. Please use one of the following types: FileReference or ByteArray."))); }; }; } } }//package com.facebook.delegates
Section 198
//FacebookError (com.facebook.errors.FacebookError) package com.facebook.errors { import flash.events.*; import flash.net.*; import com.facebook.data.*; public class FacebookError extends FacebookData { public var errorMsg:String; public var reason:String; public var error:Error; public var requestArgs:URLVariables; public var errorCode:Number; public var errorEvent:ErrorEvent; } }//package com.facebook.errors
Section 199
//FacebookEvent (com.facebook.events.FacebookEvent) package com.facebook.events { import flash.events.*; import com.facebook.data.*; import com.facebook.errors.*; public class FacebookEvent extends Event { public var success:Boolean; public var error:FacebookError; public var hasPermission:Boolean; public var data:FacebookData; public var permission:String; public static const PERMISSIONS_LOADED:String = "permissionsLoaded"; public static const LOGOUT:String = "logout"; public static const CONNECT:String = "connect"; public static const VERIFYING_SESSION:String = "verifyingSession"; public static const WAITING_FOR_LOGIN:String = "waitingForLogin"; public static const PERMISSION_CHANGE:String = "permissionChanged"; public static const PERMISSION_STATUS:String = "permissionStatus"; public static const LOGIN_SUCCESS:String = "loginSuccess"; public static const ERROR:String = "facebookEventError"; public static const PERMISSIONS_WINDOW_SHOW:String = "permissionsWindowShow"; public static const LOGIN_FAILURE:String = "loginFailure"; public static const LOGIN_WINDOW_SHOW:String = "loginWindoShow"; public static const COMPLETE:String = "complete"; public function FacebookEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Boolean=false, _arg5:FacebookData=null, _arg6:FacebookError=null, _arg7:String="", _arg8:Boolean=false){ this.success = _arg4; this.data = _arg5; this.error = _arg6; this.permission = _arg7; this.hasPermission = _arg8; super(_arg1, _arg2, _arg3); } override public function toString():String{ return (formatToString("FacebookEvent", "type", "success", "data", "error")); } override public function clone():Event{ return (new FacebookEvent(type, bubbles, cancelable, this.success, this.data, this.error)); } } }//package com.facebook.events
Section 200
//FacebookCall (com.facebook.net.FacebookCall) package com.facebook.net { import flash.events.*; import flash.net.*; import com.facebook.events.*; import com.facebook.session.*; import com.facebook.*; import com.facebook.data.*; import com.facebook.errors.*; import com.facebook.delegates.*; public class FacebookCall extends EventDispatcher { public var success:Boolean;// = false public var delegate:IFacebookCallDelegate; public var error:FacebookError; public var useSession:Boolean;// = true public var session:IFacebookSession; public var connectTimeout:uint;// = 8000 public var loadTimeout:uint;// = 30000 public var args:URLVariables; public var method:String; public var result:FacebookData; public function FacebookCall(_arg1:String="no_method_required", _arg2:URLVariables=null){ this.method = _arg1; this.args = ((_arg2)!=null) ? _arg2 : new URLVariables(); } facebook_internal function handleError(_arg1:FacebookError):void{ this.error = _arg1; this.success = false; dispatchEvent(new FacebookEvent(FacebookEvent.COMPLETE, false, false, false, null, _arg1)); } facebook_internal function initialize():void{ } facebook_internal function handleResult(_arg1:FacebookData):void{ this.result = _arg1; this.success = true; dispatchEvent(new FacebookEvent(FacebookEvent.COMPLETE, false, false, true, _arg1)); } facebook_internal function setRequestArgument(_arg1:String, _arg2:Object):void{ if ((((_arg2 is Number)) && (isNaN((_arg2 as Number))))){ return; }; if (((((_arg1) && (!((_arg2 == null))))) && ((String(_arg2).length > 0)))){ this.args[_arg1] = _arg2; }; } protected function applySchema(_arg1:Array, ... _args):void{ var _local3:uint = _arg1.length; var _local4:uint; while (_local4 < _local3) { this.setRequestArgument(_arg1[_local4], _args[_local4]); _local4++; }; } facebook_internal function clearRequestArguments():void{ this.args = new URLVariables(); } } }//package com.facebook.net
Section 201
//IUploadPhoto (com.facebook.net.IUploadPhoto) package com.facebook.net { public interface IUploadPhoto { function set data(_arg1:Object):void; function set uploadType(_arg1:String):void; function get data():Object; function get uploadType():String; function set uploadQuality(_arg1:uint):void; function get uploadQuality():uint; } }//package com.facebook.net
Section 202
//IUploadVideo (com.facebook.net.IUploadVideo) package com.facebook.net { public interface IUploadVideo { function set title(_arg1:String):void; function get ext():String; function set ext(_arg1:String):void; function set description(_arg1:String):void; function get description():String; function get title():String; } }//package com.facebook.net
Section 203
//DesktopSession (com.facebook.session.DesktopSession) package com.facebook.session { import flash.net.*; import com.facebook.events.*; import com.facebook.net.*; import com.facebook.*; import com.facebook.data.*; import com.facebook.errors.*; import com.facebook.delegates.*; import com.facebook.commands.auth.*; import com.facebook.commands.users.*; import com.facebook.data.auth.*; public class DesktopSession extends WebSession implements IFacebookSession { protected var _auth_token:String; protected var loginRequest:IFacebookCallDelegate; protected var _waiting_for_login:Boolean;// = false protected var _offline_access:Boolean;// = false public function DesktopSession(_arg1:String, _arg2:String=null, _arg3:String=null){ super(_arg1, null); this._is_connected = false; this._secret = _arg2; if (_arg3){ this._session_key = _arg3; }; } override public function post(_arg1:FacebookCall):IFacebookCallDelegate{ rest_url = REST_URL; if ((_arg1 is IUploadPhoto)){ return (new WebImageUploadDelegate(_arg1, this)); }; if ((_arg1 is IUploadVideo)){ rest_url = VIDEO_URL; return (new VideoUploadDelegate(_arg1, this)); }; return (new DesktopDelegate(_arg1, this)); } override public function get waiting_for_login():Boolean{ return (this._waiting_for_login); } protected function onLogin(_arg1:FacebookEvent):void{ var _local2:URLRequest; var _local3:String; _arg1.target.removeEventListener(FacebookEvent.COMPLETE, this.onLogin); if (_arg1.success){ this._auth_token = (_arg1.data as StringResultData).value; _local2 = new URLRequest(); _local3 = "?"; if (this._offline_access){ _local3 = (_local3 + "ext_perm=offline_access&"); }; _local2.url = (((((((login_url + _local3) + "api_key=") + api_key) + "&v=") + api_version) + "&auth_token=") + this._auth_token); navigateToURL(_local2, "_blank"); this._waiting_for_login = true; dispatchEvent(new FacebookEvent(FacebookEvent.WAITING_FOR_LOGIN)); } else { this.onConnectionError(_arg1.error); }; } protected function onConnectionError(_arg1:FacebookError):void{ _is_connected = false; dispatchEvent(new FacebookEvent(FacebookEvent.CONNECT, false, false, false, null, _arg1)); } protected function tokenCreated():void{ navigateToURL(new URLRequest(login_url)); } override public function login(_arg1:Boolean):void{ this._offline_access = _arg1; _session_key = null; var _local2:FacebookCall = new CreateToken(); _local2.session = this; var _local3 = _local2; _local3.facebook_internal::initialize(); _local2.addEventListener(FacebookEvent.COMPLETE, this.onLogin); this.post(_local2); } protected function onVerifyLogin(_arg1:FacebookEvent):void{ var _local2:FacebookEvent = new FacebookEvent(FacebookEvent.CONNECT); _local2.success = _arg1.success; if (_arg1.success){ facebook_internal::_uid = (_arg1.data as StringResultData).value; _local2.data = _arg1.data; _is_connected = true; } else { _local2.error = _arg1.error; _is_connected = false; }; dispatchEvent(_local2); } override public function verifySession():void{ var _local1:FacebookCall; if (_session_key){ _local1 = new GetLoggedInUser(); _local1.session = this; var _local2 = _local1; _local2.facebook_internal::initialize(); _local1.addEventListener(FacebookEvent.COMPLETE, this.onVerifyLogin, false, 0, true); this.post(_local1); dispatchEvent(new FacebookEvent(FacebookEvent.VERIFYING_SESSION)); } else { _is_connected = false; dispatchEvent(new FacebookEvent(FacebookEvent.CONNECT)); }; } protected function validateSessionReply(_arg1:FacebookEvent):void{ var _local2:GetSessionData; if (_arg1.success){ _local2 = (_arg1.data as GetSessionData); facebook_internal::_uid = _local2.uid; this._session_key = _local2.session_key; this._expires = _local2.expires; this._secret = ((((_local2.secret == null)) || ((_local2.secret == "")))) ? this._secret : _local2.secret; _is_connected = true; dispatchEvent(new FacebookEvent(FacebookEvent.CONNECT, false, false, true, _local2)); } else { this.onConnectionError(_arg1.error); }; } override public function refreshSession():void{ this._waiting_for_login = false; var _local1:GetSession = new GetSession(this._auth_token); _local1.session = this; var _local2 = _local1; _local2.facebook_internal::initialize(); _local1.addEventListener(FacebookEvent.COMPLETE, this.validateSessionReply); this.post(_local1); } } }//package com.facebook.session
Section 204
//IFacebookSession (com.facebook.session.IFacebookSession) package com.facebook.session { import flash.events.*; import com.facebook.net.*; import com.facebook.delegates.*; public interface IFacebookSession extends IEventDispatcher { function set secret(_arg1:String):void; function get waiting_for_login():Boolean; function refreshSession():void; function get rest_url():String; function post(_arg1:FacebookCall):IFacebookCallDelegate; function set rest_url(_arg1:String):void; function login(_arg1:Boolean):void; function set session_key(_arg1:String):void; function get secret():String; function get api_version():String; function get expires():Date; function get session_key():String; function get uid():String; function get api_key():String; function get is_connected():Boolean; function verifySession():void; } }//package com.facebook.session
Section 205
//JSSession (com.facebook.session.JSSession) package com.facebook.session { import flash.events.*; import com.facebook.events.*; import com.facebook.net.*; import com.facebook.*; import com.facebook.delegates.*; import com.facebook.commands.users.*; public class JSSession extends EventDispatcher implements IFacebookSession { public var _api_key:String; public var as_swf_name:String; protected var _session_key:String; public function JSSession(_arg1:String, _arg2:String){ this._api_key = _arg1; this.as_swf_name = _arg2; } public function get waiting_for_login():Boolean{ return (true); } public function get expires():Date{ return (null); } public function get rest_url():String{ return (null); } public function get session_key():String{ return (this._session_key); } public function set rest_url(_arg1:String):void{ } public function refreshSession():void{ } protected function onVerifyLogin(_arg1:FacebookEvent):void{ if (_arg1.success){ dispatchEvent(new FacebookEvent(FacebookEvent.CONNECT, false, false, true)); } else { dispatchEvent(new FacebookEvent(FacebookEvent.CONNECT, false, false, false)); }; } public function get uid():String{ return (null); } public function get is_sessionless():Boolean{ return (true); } public function verifySession():void{ var _local1:FacebookCall = new GetLoggedInUser(); _local1.addEventListener(FacebookEvent.COMPLETE, this.onVerifyLogin); _local1.session = this; var _local2 = _local1; _local2.facebook_internal::initialize(); this.post(_local1); } public function set secret(_arg1:String):void{ } public function login(_arg1:Boolean):void{ } public function set session_key(_arg1:String):void{ this._session_key = _arg1; } public function post(_arg1:FacebookCall):IFacebookCallDelegate{ return (new JSDelegate(_arg1, this)); } public function get secret():String{ return (null); } public function get api_version():String{ return ("1.0"); } public function get api_key():String{ return (this._api_key); } public function get is_connected():Boolean{ return (true); } } }//package com.facebook.session
Section 206
//WebSession (com.facebook.session.WebSession) package com.facebook.session { import flash.events.*; import com.facebook.events.*; import com.facebook.net.*; import com.facebook.*; import com.facebook.delegates.*; public class WebSession extends EventDispatcher implements IFacebookSession { facebook_internal var _uid:String; protected var _is_connected:Boolean;// = false public var login_url:String;// = "http://www.facebook.com/login.php" protected var _secret:String; protected var _rest_url:String;// = "http://api.facebook.com/restserver.php" protected var _api_version:String;// = "1.0" protected var _expires:Date; protected var _session_key:String; protected var _api_key:String; public static const VIDEO_URL:String = "http://api-video.facebook.com/restserver.php"; public static const REST_URL:String = "http://api.facebook.com/restserver.php"; public function WebSession(_arg1:String, _arg2:String, _arg3:String=null){ this._api_key = _arg1; this._session_key = _arg3; this.secret = _arg2; } public function get waiting_for_login():Boolean{ return (false); } public function get rest_url():String{ return (this._rest_url); } public function set rest_url(_arg1:String):void{ this._rest_url = _arg1; } public function post(_arg1:FacebookCall):IFacebookCallDelegate{ this.rest_url = REST_URL; if ((_arg1 is IUploadPhoto)){ return (new WebImageUploadDelegate(_arg1, this)); }; if ((_arg1 is IUploadVideo)){ this.rest_url = VIDEO_URL; return (new VideoUploadDelegate(_arg1, this)); }; return (new WebDelegate(_arg1, this)); } public function get secret():String{ return (this._secret); } public function get expires():Date{ return (this._expires); } public function get api_key():String{ return (this._api_key); } public function refreshSession():void{ } public function get session_key():String{ return (this._session_key); } public function get uid():String{ return (facebook_internal::_uid); } public function get api_version():String{ return (this._api_version); } public function get is_connected():Boolean{ return (this._is_connected); } public function set secret(_arg1:String):void{ this._secret = _arg1; } public function verifySession():void{ if (this._session_key){ this._is_connected = true; dispatchEvent(new FacebookEvent(FacebookEvent.CONNECT, false, false, true)); } else { this._is_connected = false; dispatchEvent(new FacebookEvent(FacebookEvent.CONNECT, false, false, false)); }; } public function set api_version(_arg1:String):void{ this._api_version = _arg1; } public function login(_arg1:Boolean):void{ } public function set session_key(_arg1:String):void{ this._session_key = _arg1; } } }//package com.facebook.session
Section 207
//FacebookArrayCollection (com.facebook.utils.FacebookArrayCollection) package com.facebook.utils { import flash.events.*; import flash.utils.*; public class FacebookArrayCollection extends EventDispatcher { protected var _source:Array; protected var hash:Dictionary; protected var _type:Class; public function FacebookArrayCollection(_arg1:Array=null, _arg2:Class=null){ this.reset(); this._type = _arg2; this.initilizeSource(_arg1); } protected function verifyIndex(_arg1:uint):void{ if (this._source.length < _arg1){ throw (new RangeError((("Index: " + _arg1) + ", is out of range."))); }; } public function addItem(_arg1:Object):void{ this.addItemAt(_arg1, this.length); } public function get length():int{ return (this._source.length); } public function addItemAt(_arg1:Object, _arg2:uint):void{ if (this.hash[_arg1] != null){ throw (new Error("Item already exists.")); }; if (((!((this._type === null))) && (!((_arg1 is this._type))))){ throw (new TypeError((("This collection requires " + this._type) + " as the type."))); }; this.hash[_arg1] = true; this._source.splice(_arg2, 0, _arg1); } public function indexOf(_arg1:Object):int{ return (this._source.indexOf(_arg1)); } public function removeItemAt(_arg1:uint):void{ this.verifyIndex(_arg1); var _local2:Object = this._source[_arg1]; delete this.hash[_local2]; this._source.splice(_arg1, 1); } public function getItemAt(_arg1:uint):Object{ this.verifyIndex(_arg1); return (this._source[_arg1]); } override public function toString():String{ return (this._source.join(", ")); } public function reset():void{ this.hash = new Dictionary(true); this._source = []; } protected function initilizeSource(_arg1:Array):void{ this._source = []; if (_arg1 == null){ return; }; var _local2:uint = _arg1.length; var _local3:uint; while (_local3 < _local2) { this.addItem(_arg1[_local3]); _local3++; }; } public function findItemByProperty(_arg1:String, _arg2:Object, _arg3:Boolean=false):Object{ var _local4:Object; for (_local4 in this.hash) { if (((((_arg3) && ((_arg1 in _local4)))) && ((_local4[_arg1] === _arg2)))){ return (_local4); }; if (((((!(_arg3)) && ((_arg1 in _local4)))) && ((_local4[_arg1] == _arg2)))){ return (_local4); }; }; return (null); } public function get type():Class{ return (this._type); } public function get source():Array{ return (this._source); } public function toArray():Array{ var _local1:Array = []; var _local2:uint = this.length; var _local3:uint; while (_local3 < _local2) { _local1.push(this.getItemAt(_local3)); _local3++; }; return (_local1); } public function contains(_arg1:Object):Boolean{ return ((this.hash[_arg1] === true)); } } }//package com.facebook.utils
Section 208
//FacebookConnectUtil (com.facebook.utils.FacebookConnectUtil) package com.facebook.utils { import flash.events.*; import flash.display.*; import com.facebook.net.*; import com.facebook.*; import com.facebook.data.*; import com.facebook.errors.*; import flash.external.*; public class FacebookConnectUtil extends EventDispatcher { protected var _loaderInfo:LoaderInfo; protected static var externalInterfaceCallId:Number = 0; protected static var externalInterfaceCalls:Object = {}; protected static var hasCallback:Boolean = false; public function FacebookConnectUtil(_arg1:LoaderInfo){ if (hasCallback == false){ ExternalInterface.addCallback("handleConnectCallback", handleConnectCallback); hasCallback = true; }; this._loaderInfo = _arg1; } public function getLoggedInUser():String{ return (ExternalInterface.call("FB.Connect.get_loggedInUser")); } public function callMethod(_arg1:String, ... _args):FacebookCall{ var _local3:String = ("bridgeFacebookCall_" + externalInterfaceCallId); var _local4 = (((((((((((((((("function " + _local3) + "() { ") + "FB.Connect.") + _arg1) + "(") + JavascriptRequestHelper.formatParams(_args)) + ", ") + "function(result, exception) {") + "document.") + this._loaderInfo.parameters.as_swf_name) + ".handleConnectCallback(result, exception, ") + externalInterfaceCallId) + ")") + "}") + ");") + "}"); ExternalInterface.call(_local4); var _local5:FacebookCall = new FacebookCall(_arg1); externalInterfaceCalls[externalInterfaceCallId] = _local5; return (_local5); } protected static function handleConnectCallback(_arg1:Object, _arg2:Object, _arg3:String):void{ var _local5:FacebookData; var _local6:FacebookError; var _local4:FacebookCall = externalInterfaceCalls[_arg3]; if (_arg1){ _local5 = new FacebookData(); _local5.rawResult = (_arg1 as String); var _local7 = _local4; _local7.facebook_internal::handelResult(_local5); } else { _local6 = new FacebookError(); _local6.rawResult = (_arg2 as String); _local7 = _local4; _local7.facebook_internal::handleError(_local6); }; delete externalInterfaceCalls[_arg3]; } } }//package com.facebook.utils
Section 209
//FacebookDataUtils (com.facebook.utils.FacebookDataUtils) package com.facebook.utils { import com.adobe.serialization.json.*; public class FacebookDataUtils { public static function toJSONValuesArray(_arg1:Array):String{ if (_arg1 == null){ return (null); }; var _local2:Array = []; var _local3:Number = _arg1.length; var _local4:Number = 0; while (_local4 < _local3) { _local2.push(JSON.encode(_arg1[_local4])); _local4++; }; return (_local2.join(",")); } public static function formatDate(_arg1:String):Date{ var _local4:Array; var _local5:Array; if ((((_arg1 == "")) || ((_arg1 == null)))){ return (null); }; var _local2:Date = new Date(); var _local3:Array = _arg1.split(" "); if (_local3.length == 2){ _local4 = _local3[0].split("-"); _local5 = _local3[1].split(":"); _local2.setFullYear(_local4[0]); _local2.setMonth((_local4[1] - 1)); _local2.setDate(_local4[2]); _local2.setHours(_local5[0]); _local2.setMinutes(_local5[1]); _local2.setSeconds(_local5[2]); } else { _local2.setTime((parseInt(_arg1) * 1000)); }; return (_local2); } public static function facebookCollectionToJSONArray(_arg1:FacebookArrayCollection):String{ if (_arg1 == null){ return (null); }; return (JSON.encode(_arg1.toArray())); } public static function toDateString(_arg1:Date):String{ if (_arg1 == null){ return (null); }; _arg1.setDate((_arg1.date + 1)); return (((_arg1 == null)) ? null : _arg1.getTime().toString().slice(0, 10)); } public static function supplantString(_arg1:String, _arg2:Object):String{ var _local4:String; var _local3:String = _arg1; for (_local4 in _arg2) { _local3 = _local3.replace(new RegExp((("\\{" + _local4) + "\\}"), "g"), _arg2[_local4]); }; return (_local3); } public static function toArrayString(_arg1:Array):String{ return (((_arg1 == null)) ? null : _arg1.join(",")); } } }//package com.facebook.utils
Section 210
//FacebookSessionUtil (com.facebook.utils.FacebookSessionUtil) package com.facebook.utils { import flash.events.*; import flash.display.*; import flash.net.*; import com.facebook.events.*; import com.facebook.session.*; import com.facebook.*; import flash.system.*; public class FacebookSessionUtil extends EventDispatcher { protected var loaderInfo:LoaderInfo; public var facebook:Facebook; protected var secret:String; protected var _activeSession:IFacebookSession; protected var session_key:String; protected var api_key:String; public function FacebookSessionUtil(_arg1:String, _arg2:String, _arg3:LoaderInfo){ this.secret = ((_arg2 == null)) ? _arg3.parameters.fb_sig_ss : _arg2; this.api_key = _arg1; this.loaderInfo = _arg3; var _local4:SharedObject = this.getStoredSession(); if (_local4.data.session_key){ this.session_key = _local4.data.session_key; }; var _local5:Object = ((_arg3)!=null) ? _arg3.parameters : {}; if (_local5.fb_sig_session_key != null){ this.session_key = _local5.fb_sig_session_key; }; if ((((_arg3.url.slice(0, 5) == "file:")) || ((Capabilities.playerType == "Desktop")))){ this._activeSession = new DesktopSession(_arg1, this.secret); } else { if (((((_local5.fb_sig_ss) && (_local5.fb_sig_api_key))) && (_local5.fb_sig_session_key))){ this._activeSession = new WebSession(_local5.fb_sig_api_key, _local5.fb_sig_ss, _local5.fb_sig_session_key); (this._activeSession as WebSession).facebook_internal::_uid = _local5.fb_sig_user; } else { if (_local5.as_app_name){ this._activeSession = new JSSession(_arg1, _local5.as_app_name); } else { this._activeSession = new DesktopSession(_arg1, _arg2); }; }; }; this._activeSession.session_key = this.session_key; this._activeSession.addEventListener(FacebookEvent.VERIFYING_SESSION, this.onVerifyingSession); this.facebook = new Facebook(); this.facebook.addEventListener(FacebookEvent.WAITING_FOR_LOGIN, this.handleWaitingForLogin); this.facebook.addEventListener(FacebookEvent.CONNECT, this.onFacebookReady); this.facebook.startSession(this._activeSession); } protected function getStoredSession():SharedObject{ return (SharedObject.getLocal((this.api_key + "_stored_session"))); } protected function handleWaitingForLogin(_arg1:FacebookEvent):void{ dispatchEvent(_arg1); } public function logout():void{ this.getStoredSession().clear(); this.getStoredSession().flush(); this.facebook.logout(); } protected function onFacebookReady(_arg1:FacebookEvent):void{ var _local2:SharedObject; if (this.facebook.session_key){ _local2 = this.getStoredSession(); _local2.data.session_key = this.facebook.session_key; _local2.data.stored_secret = this.facebook.secret; _local2.flush(3000); }; if (_arg1){ dispatchEvent(_arg1); }; } protected function onWaitingForLogin(_arg1:FacebookEvent):void{ dispatchEvent(_arg1); } public function validateLogin():void{ this.facebook.refreshSession(); } public function get activeSession():IFacebookSession{ return (this._activeSession); } public function login(_arg1:Boolean=true):void{ this.facebook.login(_arg1); } public function onVerifyingSession(_arg1:FacebookEvent):void{ dispatchEvent(_arg1); } public function verifySession():void{ this._activeSession.verifySession(); } protected function onVerifyLogin(_arg1:FacebookEvent):void{ this._activeSession.removeEventListener(FacebookEvent.CONNECT, this.onVerifyLogin); if (_arg1.success){ this.onFacebookReady(null); dispatchEvent(new FacebookEvent(FacebookEvent.CONNECT, false, false, true)); } else { dispatchEvent(new FacebookEvent(FacebookEvent.CONNECT, false, false, false)); }; } } }//package com.facebook.utils
Section 211
//FacebookStreamXMLParser (com.facebook.utils.FacebookStreamXMLParser) package com.facebook.utils { import com.facebook.data.stream.*; public class FacebookStreamXMLParser { public static function createCommentsArray(_arg1:XMLList, _arg2:Namespace):Array{ var _local6:XML; var _local7:PostCommentData; var _local3:Array = []; var _local4:uint = _arg1.length(); var _local5:uint; while (_local5 < _local4) { _local6 = _arg1[_local5]; _local7 = new PostCommentData(); _local7.fromid = FacebookXMLParserUtils.toStringValue(_local6._arg2::fromid[0]); _local7.id = FacebookXMLParserUtils.toStringValue(_local6._arg2::id[0]); _local7.text = FacebookXMLParserUtils.toStringValue(_local6._arg2::text[0]); _local7.time = FacebookXMLParserUtils.toDate(_local6._arg2::time[0]); _local3.push(_local7); _local5++; }; return (_local3); } protected static function createMediaArray(_arg1:XML, _arg2:Namespace):Array{ var _local7:XML; var _local8:StreamMediaData; if (_arg1 == null){ return (null); }; var _local3:Array = []; var _local4:XMLList = _arg1.children(); var _local5:uint = _local4.length(); var _local6:uint; while (_local6 < _local5) { _local7 = _local4[_local6]; _local8 = new StreamMediaData(); _local8.type = FacebookXMLParserUtils.toStringValue(_local7._arg2::type[0]); _local8.alt = FacebookXMLParserUtils.toStringValue(_local7._arg2::alt[0]); _local8.href = FacebookXMLParserUtils.toStringValue(_local7._arg2::href[0]); _local8.src = FacebookXMLParserUtils.toStringValue(_local7._arg2::src[0]); _local8.video = createVideoMedia(_local7._arg2::video[0], _arg2); _local8.photo = createPhotoMedia(_local7._arg2::photo[0], _arg2); _local3.push(_local8); _local6++; }; return (_local3); } public static function createStreamFilterCollection(_arg1:XML, _arg2:Namespace):GetFiltersData{ var _local8:XML; var _local9:StreamFilterData; var _local3:GetFiltersData = new GetFiltersData(); var _local4:StreamFilterCollection = new StreamFilterCollection(); var _local5:XMLList = _arg1.._arg2::stream_filter; var _local6:uint = _local5.length(); var _local7:uint; while (_local7 < _local6) { _local8 = _local5[_local7]; _local9 = new StreamFilterData(); _local9.filter_key = FacebookXMLParserUtils.toStringValue(_local8._arg2::filter_key[0]); _local9.icon_url = FacebookXMLParserUtils.toStringValue(_local8._arg2::icon_url[0]); _local9.is_visible = FacebookXMLParserUtils.toBoolean(_local8._arg2::is_visible[0]); _local9.name = FacebookXMLParserUtils.toStringValue(_local8._arg2::name[0]); _local9.rank = FacebookXMLParserUtils.toNumber(_local8._arg2::rank[0]); _local9.type = FacebookXMLParserUtils.toStringValue(_local8._arg2::type[0]); _local9.uid = FacebookXMLParserUtils.toStringValue(_local8._arg2::uid[0]); _local9.value = FacebookXMLParserUtils.toStringValue(_local8._arg2::value[0]); _local4.addItem(_local9); _local7++; }; _local3.filters = _local4; return (_local3); } protected static function createVideoMedia(_arg1:XML, _arg2:Namespace):VideoMedia{ if (_arg1 == null){ return (null); }; var _local3:VideoMedia = new VideoMedia(); _local3.display_url = FacebookXMLParserUtils.toStringValue(_arg1._arg2::display_url[0]); _local3.owner = FacebookXMLParserUtils.toStringValue(_arg1._arg2::owner[0]); _local3.permalink = FacebookXMLParserUtils.toStringValue(_arg1._arg2::permalink[0]); _local3.source_url = FacebookXMLParserUtils.toStringValue(_arg1._arg2::source_url[0]); _local3.preview_img = FacebookXMLParserUtils.toStringValue(_arg1._arg2::preview_img[0]); return (_local3); } protected static function createComments(_arg1:XML, _arg2:Namespace):CommentsData{ var _local3:CommentsData = new CommentsData(); _local3.can_remove = FacebookXMLParserUtils.toBoolean(_arg1._arg2::can_remove[0]); _local3.can_post = FacebookXMLParserUtils.toBoolean(_arg1._arg2::can_post[0]); _local3.count = FacebookXMLParserUtils.toNumber(_arg1._arg2::count[0]); var _local4:XMLList = _arg1._arg2::posts.children(); _local3.posts = createCommentsArray(_local4, _arg2); return (_local3); } public static function createGetCommentsData(_arg1:XML, _arg2:Namespace):GetCommentsData{ var _local3:XMLList = _arg1.._arg2::comment; var _local4:GetCommentsData = new GetCommentsData(); _local4.comments = createCommentsArray(_local3, _arg2); return (_local4); } public static function createStream(_arg1:XML, _arg2:Namespace):GetStreamData{ var _local6:uint; var _local7:uint; var _local10:XML; var _local11:StreamStoryData; var _local12:XML; var _local13:AttachmentData; var _local14:LikesData; var _local15:XML; var _local16:XML; var _local17:ProfileData; var _local18:XML; var _local3:GetStreamData = new GetStreamData(); var _local4:StreamStoryCollection = new StreamStoryCollection(); var _local5:ProfileCollection = new ProfileCollection(); _local3.stories = _local4; _local3.profiles = _local5; var _local8:XMLList = _arg1._arg2::posts.children(); _local6 = _local8.length(); _local7 = 0; while (_local7 < _local6) { _local10 = _local8[_local7]; _local11 = new StreamStoryData(); _local11.sourceXML = _local10; _local12 = _local10._arg2::attachment[0]; _local13 = new AttachmentData(); _local13.name = FacebookXMLParserUtils.toStringValue(_local12._arg2::name[0]); _local13.text = FacebookXMLParserUtils.toStringValue(_local12._arg2::text[0]); _local13.body = FacebookXMLParserUtils.toStringValue(_local12._arg2::body[0]); _local13.icon = FacebookXMLParserUtils.toStringValue(_local12._arg2::icon[0]); _local13.label = FacebookXMLParserUtils.toStringValue(_local12._arg2::label[0]); _local13.media = createMediaArray(_local12._arg2::media[0], _arg2); _local13.title = FacebookXMLParserUtils.toStringValue(_local12._arg2::title[0]); _local13.href = FacebookXMLParserUtils.toStringValue(_local12._arg2::href[0]); _local13.caption = FacebookXMLParserUtils.toStringValue(_local12._arg2::caption[0]); _local13.description = FacebookXMLParserUtils.toStringValue(_local12._arg2::description[0]); _local13.properties = FacebookXMLParserUtils.xmlListToObjectArray(_local12.._arg2::stream_property); _local11.attachment = _local13; _local11.actor_id = FacebookXMLParserUtils.toStringValue(_local10._arg2::actor_id[0]); _local11.comments = createComments(_local10._arg2::comments[0], _arg2); _local14 = new LikesData(); _local15 = _local10._arg2::likes[0]; _local14.can_like = FacebookXMLParserUtils.toBoolean(_local15._arg2::can_like[0]); _local14.user_likes = FacebookXMLParserUtils.toBoolean(_local15._arg2::user_likes[0]); _local14.count = FacebookXMLParserUtils.toNumber(_local15._arg2::count[0]); _local14.friends = FacebookXMLParserUtils.toUIDArray(_local15._arg2::friends[0]); _local14.sample = FacebookXMLParserUtils.toUIDArray(_local15._arg2::sample[0]); _local14.href = FacebookXMLParserUtils.toStringValue(_local15._arg2::href[0]); _local11.likes = _local14; _local11.attribution = FacebookXMLParserUtils.toStringValue(_local10._arg2::attribution[0]); _local11.app_id = FacebookXMLParserUtils.toStringValue(_local10._arg2::app_id[0]); _local11.metadata = FacebookXMLParserUtils.nodeToObject(_local10._arg2::metadata); _local11.message = FacebookXMLParserUtils.toStringValue(_local10._arg2::message[0]); _local11.source_id = FacebookXMLParserUtils.toStringValue(_local10._arg2::source_id[0]); _local11.target_id = FacebookXMLParserUtils.toStringValue(_local10._arg2::target_id[0]); _local11.post_id = FacebookXMLParserUtils.toStringValue(_local10._arg2::post_id[0]); _local11.updated_time = FacebookXMLParserUtils.toDate(_local10._arg2::updated_time[0]); _local11.created_time = FacebookXMLParserUtils.toDate(_local10._arg2::created_time[0]); _local11.type = FacebookXMLParserUtils.toNumber(_local10._arg2::type[0]); _local11.viewer_id = FacebookXMLParserUtils.toStringValue(_local10._arg2::viewer_id[0]); _local16 = _local10._arg2::privacy[0]; _local11.privacy = FacebookXMLParserUtils.toStringValue(_local16._arg2::value[0]); _local11.filter_key = FacebookXMLParserUtils.toStringValue(_local10._arg2::filter_key[0]); _local4.addItem(_local11); _local7++; }; var _local9:XMLList = _arg1._arg2::profiles.children(); _local6 = _local9.length(); _local7 = 0; while (_local7 < _local6) { _local17 = new ProfileData(); _local18 = _local9[_local7]; _local17.id = FacebookXMLParserUtils.toStringValue(_local18._arg2::id[0]); _local17.name = FacebookXMLParserUtils.toStringValue(_local18._arg2::name[0]); _local17.pic_square = FacebookXMLParserUtils.toStringValue(_local18._arg2::pic_square[0]); _local17.url = FacebookXMLParserUtils.toStringValue(_local18._arg2::url[0]); _local5.addItem(_local17); _local7++; }; _local3.albums = FacebookXMLParserUtils.createAlbumCollection(_arg1._arg2::albums[0], _arg2); return (_local3); } protected static function createPhotoMedia(_arg1:XML, _arg2:Namespace):PhotoMedia{ if (_arg1 == null){ return (null); }; var _local3:PhotoMedia = new PhotoMedia(); _local3.aid = FacebookXMLParserUtils.toStringValue(_arg1._arg2::aid[0]); _local3.index = FacebookXMLParserUtils.toNumber(_arg1._arg2::index[0]); _local3.owner = FacebookXMLParserUtils.toStringValue(_arg1._arg2::owner[0]); _local3.pid = FacebookXMLParserUtils.toStringValue(_arg1._arg2::pid[0]); return (_local3); } } }//package com.facebook.utils
Section 212
//FacebookUserXMLParser (com.facebook.utils.FacebookUserXMLParser) package com.facebook.utils { import com.facebook.data.*; import com.facebook.data.users.*; public class FacebookUserXMLParser { protected static function parseWorkHistory(_arg1:XML, _arg2:Namespace):Array{ var _local5:Object; var _local6:FacebookWorkInfo; var _local3:Array = []; var _local4:XMLList = _arg1.children(); for each (_local5 in _local4) { _local6 = new FacebookWorkInfo(); _local6.location = FacebookXMLParserUtils.createLocation(_local5._arg2::location[0], _arg2); _local6.company_name = String(_local5._arg2::company_name); _local6.description = String(_local5._arg2::description); _local6.position = String(_local5._arg2::position); _local6.start_date = FacebookDataUtils.formatDate(_local5._arg2::start_date); _local6.end_date = FacebookDataUtils.formatDate(_local5._arg2::end_date); _local3.push(_local6); }; return (_local3); } protected static function createStatus(_arg1:XML, _arg2:Namespace):StatusData{ var _local3:StatusData = new StatusData(); _local3.message = String(_arg1._arg2::message); _local3.time = FacebookDataUtils.formatDate(String(_arg1._arg2::time)); return (_local3); } protected static function parseEducationHistory(_arg1:XML, _arg2:Namespace):Array{ var _local5:Object; var _local6:FacebookEducationInfo; var _local7:XML; var _local3:Array = []; var _local4:XMLList = _arg1.children(); for each (_local5 in _local4) { _local6 = new FacebookEducationInfo(); _local6.name = String(_local5._arg2::name); _local6.year = String(_local5._arg2::year); _local6.degree = String(_local5._arg2::degree); _local6.concentrations = []; for each (_local7 in _local5.concentration) { _local6.concentrations.push(_local7); }; _local3.push(_local6); }; return (_local3); } public static function createFacebookUser(_arg1:XML, _arg2:Namespace):FacebookUser{ var _local6:XML; var _local7:String; var _local3:FacebookUser = new FacebookUser(); var _local4:XMLList = _arg1.children(); var _local5:uint = _local4.length(); var _local8:uint; while (_local8 < _local5) { _local6 = _local4[_local8]; _local7 = _local6.localName().toString(); switch (_local7){ case "status": _local3[_local7] = createStatus(_local6, _arg2); break; case "affiliations": _local3[_local7] = createAffiliations(_local6.children(), _arg2); break; case "hometown_location": case "current_location": _local3[_local7] = FacebookXMLParserUtils.createLocation(_local6, _arg2); break; case "profile_update_time": _local3[_local7] = FacebookDataUtils.formatDate(_local6.toString()); break; case "hs_info": _local3.hs1_id = parseInt(_local6._arg2::hs1_id); _local3.hs1_name = String(_local6._arg2::hs1_name); _local3.hs2_id = parseInt(_local6._arg2::hs2_id); _local3.hs2_name = String(_local6._arg2::hs2_name); _local3.grad_year = String(_local6._arg2::grad_year); break; case "education_history": _local3[_local7] = parseEducationHistory(_local6, _arg2); break; case "work_history": _local3[_local7] = parseWorkHistory(_local6, _arg2); break; case "timezone": case "notes_count": case "wall_count": _local3[_local7] = Number(_local6.toString()); break; case "has_added_app": case "is_app_user": _local3[_local7] = FacebookXMLParserUtils.toBoolean(_local6); break; case "meeting_sex": case "meeting_for": case "email_hashes": _local3[_local7] = toArray(_local6, _arg2); break; default: if ((_local7 in _local3)){ _local3[_local7] = String(_local6); }; }; _local8++; }; return (_local3); } protected static function toArray(_arg1:XML, _arg2:Namespace):Array{ var _local3:Array = []; var _local4:XMLList = _arg1.children(); var _local5:uint = _local4.length(); var _local6:uint; while (_local6 < _local5) { _local3.push(_local4[_local6].toString()); _local6++; }; return (_local3); } protected static function createAffiliations(_arg1:XMLList, _arg2:Namespace):Array{ var _local4:*; var _local5:FacebookNetwork; var _local3:Array = []; for each (_local4 in _arg1) { _local5 = new FacebookNetwork(); _local5.nid = parseInt(_local4._arg2::nid); _local5.name = String(_local4._arg2::name); _local5.type = String(_local4._arg2::type); _local5.status = String(_local4._arg2::status); _local5.year = String(_local4._arg2::year); _local3.push(_local5); }; return (_local3); } } }//package com.facebook.utils
Section 213
//FacebookXMLParserUtils (com.facebook.utils.FacebookXMLParserUtils) package com.facebook.utils { import flash.net.*; import com.facebook.data.*; import com.facebook.data.photos.*; public class FacebookXMLParserUtils { public static function createAlbumCollection(_arg1:XML, _arg2:Namespace):AlbumCollection{ var _local4:*; var _local5:AlbumData; var _local3:AlbumCollection = new AlbumCollection(); for each (_local4 in _arg1.._arg2::album) { _local5 = new AlbumData(); _local5.aid = FacebookXMLParserUtils.toStringValue(_local4._arg2::aid[0]); _local5.cover_pid = FacebookXMLParserUtils.toStringValue(_local4._arg2::cover_pid[0]); _local5.owner = _local4._arg2::owner; _local5.name = _local4._arg2::name; _local5.created = FacebookXMLParserUtils.toDate(_local4._arg2::created); _local5.modified = FacebookXMLParserUtils.toDate(_local4._arg2::modified); _local5.description = _local4._arg2::description; _local5.location = _local4._arg2::location; _local5.link = _local4._arg2::link; _local5.size = _local4._arg2::size; _local5.visible = _local4._arg2::visible; _local3.addAlbum(_local5); }; return (_local3); } public static function toNumber(_arg1:XML):Number{ if (_arg1 == null){ return (NaN); }; return (Number(_arg1.toString())); } public static function toStringValue(_arg1:XML):String{ if (_arg1 == null){ return (null); }; return (_arg1.toString()); } public static function toDate(_arg1:String):Date{ if (_arg1 == null){ return (null); }; var _local2:String = _arg1; while (_local2.length < 13) { _local2 = (_local2 + "0"); }; var _local3:Date = new Date(Number(_local2)); return (_local3); } public static function xmlListToObjectArray(_arg1:XMLList):Array{ var _local2:Array = []; if (_arg1 == null){ return (_local2); }; var _local3:uint = _arg1.length(); var _local4:uint; while (_local4 < _local3) { _local2.push(xmlToObject(_arg1[_local4])); _local4++; }; return (_local2); } public static function toUIDArray(_arg1:XML):Array{ var _local2:Array = []; if (_arg1 == null){ return (_local2); }; var _local3:XMLList = _arg1.children(); var _local4:uint = _local3.length(); var _local5:uint; while (_local5 < _local4) { _local2.push(toNumber(_local3[_local5])); _local5++; }; return (_local2); } public static function toBoolean(_arg1:XML):Boolean{ if (_arg1 == null){ return (false); }; return ((_arg1.toString() == "1")); } public static function createLocation(_arg1:XML, _arg2:Namespace):FacebookLocation{ var _local3:FacebookLocation = new FacebookLocation(); if (_arg1 == null){ return (_local3); }; _local3.city = String(_arg1._arg2::city); _local3.state = String(_arg1._arg2::state); _local3.country = String(_arg1._arg2::country); _local3.zip = String(_arg1._arg2::zip); _local3.street = String(_arg1._arg2::street); return (_local3); } public static function xmlToObject(_arg1:XML):Object{ var _local6:XML; var _local2:Object = {}; var _local3:XMLList = _arg1.children(); var _local4:uint = _local3.length(); var _local5:uint; while (_local5 < _local4) { _local6 = _local3[_local5]; _local2[_local6.localName()] = _local6.toString(); _local5++; }; return (_local2); } public static function xmlToUrlVariables(_arg1:XMLList):URLVariables{ var _local3:XML; var _local2:URLVariables = new URLVariables(); for each (_local3 in _arg1) { _local2[_local3.key.valueOf()] = _local3.value.valueOf(); }; return (_local2); } public static function nodeToObject(_arg1:XMLList):Object{ var _local3:XML; var _local2:Object = {}; for each (_local3 in _arg1) { _local2[_local3.key.valueOf()] = _local3.value.valueOf(); }; return (_local2); } public static function toArray(_arg1:XML):Array{ if (_arg1 == null){ return (null); }; return (_arg1.toString().split(",")); } } }//package com.facebook.utils
Section 214
//IFacebookResultParser (com.facebook.utils.IFacebookResultParser) package com.facebook.utils { import com.facebook.data.*; import com.facebook.errors.*; public interface IFacebookResultParser { function parse(_arg1:String, _arg2:String):FacebookData; function validateFacebookResponce(_arg1:String):FacebookError; } }//package com.facebook.utils
Section 215
//JavascriptRequestHelper (com.facebook.utils.JavascriptRequestHelper) package com.facebook.utils { import flash.net.*; import flash.utils.*; public class JavascriptRequestHelper { public static function objectToString(_arg1:Object):String{ var _local3:String; var _local2:Array = []; for (_local3 in _arg1) { _local2.push((((_local3 + ": ") + quote(_arg1[_local3])) + "")); }; return ((("{" + _local2.join(", ")) + " }")); } public static function quote(_arg1:String):String{ var _local2:RegExp = /[\\"\r\n]/g; return ((("\"" + _arg1.replace(_local2, _quote)) + "\"")); } public static function formatParams(_arg1:Array):String{ var _local5:Object; var _local6:String; var _local2:Array = []; var _local3:uint = _arg1.length; var _local4:uint; while (_local4 < _local3) { _local5 = _arg1[_local4]; _local6 = getQualifiedClassName(_local5); switch (_local6){ case "Array": _local5 = (("[" + _local5.join(", ")) + "]"); break; case "Object": _local5 = objectToString(_local5); break; case "String": default: _local5 = (("\"" + _local5) + "\""); break; }; _local2.push(_local5); _local4++; }; return (_local2.join(", ")); } protected static function _quote(_arg1:String, ... _args):String{ switch (_arg1){ case "\\": return ("\\\\"); case "\r": return ("\\r"); case "\n": return ("\\n"); case "\"": return ("\\\""); }; return (null); } public static function formatURLVariables(_arg1:URLVariables):String{ var _local5:String; var _local2:Object = {method:true, sig:true, api_key:true, call_id:true}; var _local3:Boolean; var _local4:Object = {}; for (_local5 in _arg1) { if (_local2[_local5]){ } else { _local3 = true; _local4[_local5] = _arg1[_local5]; }; }; return ((_local3) ? objectToString(_local4) : "null"); } } }//package com.facebook.utils
Section 216
//PlayerUtils (com.facebook.utils.PlayerUtils) package com.facebook.utils { import flash.system.*; public class PlayerUtils { protected static var versionObj:Object; public static function get internalBuildNumber():Number{ return (parseVersionString().internalBuildNumber); } public static function get platform():String{ return (parseVersionString().platform); } public static function get buildNumber():Number{ return (parseVersionString().buildNumber); } public static function get minorVersion():Number{ return (parseVersionString().minorVersion); } public static function parseVersionString():Object{ if (versionObj != null){ return (versionObj); }; var _local1:String = Capabilities.version; versionObj = {}; var _local2:Array = _local1.split(" "); versionObj.platform = _local2[0]; _local2.shift(); _local2 = _local2[0].split(","); versionObj.majorVersion = Number(_local2[0]); versionObj.minorVersion = Number(_local2[1]); versionObj.buildNumber = Number(_local2[2]); versionObj.internalBuildNumber = Number(_local2[3]); return (versionObj); } public static function get majorVersion():Number{ return (parseVersionString().majorVersion); } } }//package com.facebook.utils
Section 217
//PostRequest (com.facebook.utils.PostRequest) package com.facebook.utils { import flash.utils.*; public class PostRequest { protected var _boundary:String;// = "-----" protected var postData:ByteArray; public function PostRequest(){ this.createPostData(); } public function getPostData():ByteArray{ this.postData.position = 0; return (this.postData); } protected function writeBoundary():void{ this.writeDoubleDash(); var _local1:Number = 0; while (_local1 < this.boundary.length) { this.postData.writeByte(this.boundary.charCodeAt(_local1)); _local1++; }; } protected function writeDoubleDash():void{ this.postData.writeShort(0x2D2D); } public function writeFileData(_arg1:String, _arg2:ByteArray, _arg3:String):void{ var _local4:String; this.writeBoundary(); this.writeLineBreak(); _local4 = "Content-Disposition: form-data; filename=\""; var _local5:Number = 0; while (_local5 < _local4.length) { this.postData.writeByte(_local4.charCodeAt(_local5)); _local5++; }; this.postData.writeUTFBytes(_arg1); this.writeQuotationMark(); this.writeLineBreak(); _local4 = _arg3; _local5 = 0; while (_local5 < _local4.length) { this.postData.writeByte(_local4.charCodeAt(_local5)); _local5++; }; this.writeLineBreak(); this.writeLineBreak(); _arg2.position = 0; this.postData.writeBytes(_arg2, 0, _arg2.length); this.writeLineBreak(); } public function createPostData():void{ this.postData = new ByteArray(); this.postData.endian = Endian.BIG_ENDIAN; } public function writePostData(_arg1:String, _arg2:String):void{ var _local3:String; this.writeBoundary(); this.writeLineBreak(); _local3 = (("Content-Disposition: form-data; name=\"" + _arg1) + "\""); var _local4:uint = _local3.length; var _local5:Number = 0; while (_local5 < _local4) { this.postData.writeByte(_local3.charCodeAt(_local5)); _local5++; }; this.writeLineBreak(); this.writeLineBreak(); this.postData.writeUTFBytes(_arg2); this.writeLineBreak(); } public function get boundary():String{ return (this._boundary); } protected function writeLineBreak():void{ this.postData.writeShort(3338); } public function close():void{ this.writeBoundary(); this.writeDoubleDash(); } protected function writeQuotationMark():void{ this.postData.writeByte(34); } public function set boundary(_arg1:String):void{ this._boundary = _arg1; } } }//package com.facebook.utils
Section 218
//Facebook (com.facebook.Facebook) package com.facebook { import flash.events.*; import flash.net.*; import com.facebook.events.*; import com.facebook.session.*; import com.facebook.net.*; import com.facebook.delegates.*; import com.facebook.commands.auth.*; public class Facebook extends EventDispatcher { public var waiting_for_login:Boolean; protected var _currentSession:IFacebookSession; public var connectionErrorMessage:String; public function Facebook():void{ } public function post(_arg1:FacebookCall):FacebookCall{ var _local2:IFacebookCallDelegate; if (this._currentSession){ _arg1.session = this._currentSession; _arg1.initialize(); _local2 = this._currentSession.post(_arg1); _arg1.delegate = _local2; } else { throw (new Error("Cannot post a call; no session has been set.")); }; return (_arg1); } public function startSession(_arg1:IFacebookSession):void{ this._currentSession = _arg1; if (this._currentSession.is_connected){ dispatchEvent(new FacebookEvent(FacebookEvent.CONNECT, false, false, true)); } else { this._currentSession.addEventListener(FacebookEvent.CONNECT, this.onSessionConnected); this._currentSession.addEventListener(FacebookEvent.WAITING_FOR_LOGIN, this.onWaitingForLogin); }; } public function grantExtendedPermission(_arg1:String):void{ navigateToURL(new URLRequest(((((("http://www.facebook.com/authorize.php?api_key=" + this.api_key) + "&v=") + this.api_version) + "&ext_perm=") + _arg1)), "_blank"); } public function refreshSession():void{ this._currentSession.refreshSession(); } public function logout():void{ var _local1:ExpireSession = new ExpireSession(); _local1.addEventListener(FacebookEvent.COMPLETE, this.onLoggedOut, false, 0, true); this.post(_local1); } public function get api_version():String{ return ((this._currentSession) ? this._currentSession.api_version : null); } protected function onLoggedOut(_arg1:FacebookEvent):void{ if (_arg1.success == true){ this._currentSession.session_key = null; }; dispatchEvent(new FacebookEvent(FacebookEvent.LOGOUT, false, false, _arg1.success, _arg1.data, _arg1.error)); } protected function onWaitingForLogin(_arg1:FacebookEvent):void{ this.waiting_for_login = true; dispatchEvent(new FacebookEvent(FacebookEvent.WAITING_FOR_LOGIN)); } public function login(_arg1:Boolean):void{ this._currentSession.login(_arg1); } public function get secret():String{ return ((this._currentSession) ? this._currentSession.secret : null); } public function grantPermission(_arg1:Boolean):void{ var _local2:String = ((("http://www.facebook.com/login.php?return_session=" + (_arg1) ? 1 : 0) + "&api_key=") + this.api_key); navigateToURL(new URLRequest(_local2), "_blank"); } public function get is_connected():Boolean{ return ((this._currentSession) ? this._currentSession.is_connected : false); } public function get session_key():String{ return ((this._currentSession) ? this._currentSession.session_key : null); } public function get uid():String{ return ((this._currentSession) ? this._currentSession.uid : null); } protected function onSessionConnected(_arg1:FacebookEvent):void{ var _local2:IFacebookSession = (_arg1.target as IFacebookSession); dispatchEvent(_arg1); } public function get api_key():String{ return ((this._currentSession) ? this._currentSession.api_key : null); } public function get expires():Date{ return ((this._currentSession) ? this._currentSession.expires : new Date()); } } }//package com.facebook
Section 219
//facebook_internal (com.facebook.facebook_internal) package com.facebook { public namespace facebook_internal = "http://api.facebook.com/1.0/"; }//package com.facebook
Section 220
//CursorData (com.swfjunkie.tweetr.data.objects.CursorData) package com.swfjunkie.tweetr.data.objects { public class CursorData { public var nextCursor:Number; public var previousCursor:Number; public function CursorData(_arg1:Number, _arg2:Number){ this.nextCursor = _arg1; this.previousCursor = _arg2; } } }//package com.swfjunkie.tweetr.data.objects
Section 221
//DirectMessageData (com.swfjunkie.tweetr.data.objects.DirectMessageData) package com.swfjunkie.tweetr.data.objects { public class DirectMessageData { public var id:Number; public var senderScreenName:String; public var text:String; public var senderId:Number; public var recipientId:Number; public var sender:UserData; public var recipientScreenName:String; public var recipient:UserData; public var createdAt:String; public function DirectMessageData(_arg1:Number=0, _arg2:Number=0, _arg3:String=null, _arg4:Number=0, _arg5:String=null, _arg6:String=null, _arg7:String=null, _arg8:UserData=null, _arg9:UserData=null){ this.id = _arg1; this.senderId = _arg2; this.text = _arg3; this.recipientId = _arg4; this.createdAt = _arg5; this.senderScreenName = _arg6; this.recipientScreenName = _arg7; this.sender = _arg8; this.recipient = _arg9; } } }//package com.swfjunkie.tweetr.data.objects
Section 222
//ExtendedUserData (com.swfjunkie.tweetr.data.objects.ExtendedUserData) package com.swfjunkie.tweetr.data.objects { public class ExtendedUserData { public var favouritesCount:Number; public var profileBackgroundTile:Boolean; public var profileTextColor:Number; public var statusesCount:Number; public var utcOffset:Number; public var timeZone:String; public var profileLinkColor:Number; public var profileSidebarBorderColor:Number; public var notifications:Boolean; public var following:Boolean; public var profileBackgroundImageUrl:String; public var profileBackgroundColor:Number; public var profileSidebarFillColor:Number; public var friendsCount:Number; public var createdAt:String; public function ExtendedUserData(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0, _arg6:Number=0, _arg7:String=null, _arg8:Number=0, _arg9:Number=0, _arg10:String=null, _arg11:String=null, _arg12:Boolean=false, _arg13:Boolean=false, _arg14:Boolean=false, _arg15:Number=0){ this.profileBackgroundColor = _arg1; this.profileTextColor = _arg2; this.profileLinkColor = _arg3; this.profileSidebarFillColor = _arg4; this.profileSidebarBorderColor = _arg5; this.friendsCount = _arg6; this.createdAt = _arg7; this.favouritesCount = _arg8; this.utcOffset = _arg9; this.timeZone = _arg10; this.profileBackgroundImageUrl = _arg11; this.profileBackgroundTile = _arg12; this.following = _arg13; this.notifications = _arg14; this.statusesCount = _arg15; } } }//package com.swfjunkie.tweetr.data.objects
Section 223
//HashData (com.swfjunkie.tweetr.data.objects.HashData) package com.swfjunkie.tweetr.data.objects { public class HashData { public var remainingHits:Number; public var error:String; public var hourlyLimit:Number; public var resetTimeInSeconds:Number; public var request:String; } }//package com.swfjunkie.tweetr.data.objects
Section 224
//ListData (com.swfjunkie.tweetr.data.objects.ListData) package com.swfjunkie.tweetr.data.objects { public class ListData { public var isPublic:Boolean; public var user:UserData; public var subscriberCount:Number; public var name:String; public var uri:String; public var slug:String; public var memberCount:Number; public var fullName:String; public var id:Number; } }//package com.swfjunkie.tweetr.data.objects
Section 225
//RelationData (com.swfjunkie.tweetr.data.objects.RelationData) package com.swfjunkie.tweetr.data.objects { public class RelationData { public var followedBy:Boolean; public var following:Boolean; public var screenName:String; public var notificationsEnabled:Boolean; public var type:String; public var id:Number; public static const RELATION_TYPE_TARGET:String = "target"; public static const RELATION_TYPE_SOURCE:String = "source"; } }//package com.swfjunkie.tweetr.data.objects
Section 226
//SavedSearchData (com.swfjunkie.tweetr.data.objects.SavedSearchData) package com.swfjunkie.tweetr.data.objects { public class SavedSearchData { public var name:String; public var query:String; public var position:String; public var createdAt:String; public var id:Number; public function SavedSearchData(_arg1:Number=0, _arg2:String=null, _arg3:String=null, _arg4:String=null, _arg5:String=null){ this.id = _arg1; this.name = _arg2; this.query = _arg3; this.position = _arg4; this.createdAt = _arg5; } } }//package com.swfjunkie.tweetr.data.objects
Section 227
//SearchResultData (com.swfjunkie.tweetr.data.objects.SearchResultData) package com.swfjunkie.tweetr.data.objects { public class SearchResultData { public var id:Number; public var userProfileImage:String; public var link:String; public var user:String; public var userLink:String; public var text:String; public var createdAt:String; public function SearchResultData(_arg1:Number=0, _arg2:String=null, _arg3:String=null, _arg4:String=null, _arg5:String=null, _arg6:String=null, _arg7:String=null){ this.id = _arg1; this.link = _arg2; this.text = _arg3; this.createdAt = _arg4; this.userProfileImage = _arg5; this.user = _arg6; this.userLink = _arg7; } } }//package com.swfjunkie.tweetr.data.objects
Section 228
//StatusData (com.swfjunkie.tweetr.data.objects.StatusData) package com.swfjunkie.tweetr.data.objects { public class StatusData { public var source:String; public var inReplyToUserId:Number; public var favorited:Boolean; public var createdAt:String; public var user:UserData; public var inReplyToStatusId:Number; public var text:String; public var inReplyToScreenName:String; public var id:Number; public var truncated:Boolean; public function StatusData(_arg1:String=null, _arg2:Number=0, _arg3:String=null, _arg4:String=null, _arg5:Boolean=false, _arg6:Number=0, _arg7:Number=0, _arg8:Boolean=false, _arg9:String=null, _arg10:UserData=null){ this.createdAt = _arg1; this.id = _arg2; this.text = _arg3; this.source = _arg4; this.truncated = _arg5; this.inReplyToStatusId = _arg6; this.inReplyToUserId = _arg7; this.favorited = _arg8; this.inReplyToScreenName = _arg9; this.user = _arg10; } } }//package com.swfjunkie.tweetr.data.objects
Section 229
//TrendData (com.swfjunkie.tweetr.data.objects.TrendData) package com.swfjunkie.tweetr.data.objects { public class TrendData { public var name:String; public var url:String; public function TrendData(_arg1:String=null, _arg2:String=null){ this.name = _arg1; this.url = _arg2; } } }//package com.swfjunkie.tweetr.data.objects
Section 230
//UserData (com.swfjunkie.tweetr.data.objects.UserData) package com.swfjunkie.tweetr.data.objects { public class UserData { public var followersCount:Number; public var lastStatus:StatusData; public var name:String; public var profileProtected:Boolean; public var url:String; public var location:String; public var screenName:String; public var extended:ExtendedUserData; public var id:Number; public var description:String; public var profileImageUrl:String; public function UserData(_arg1:Number=0, _arg2:String=null, _arg3:String=null, _arg4:String=null, _arg5:String=null, _arg6:String=null, _arg7:String=null, _arg8:Boolean=false, _arg9:Number=0, _arg10:ExtendedUserData=null, _arg11:StatusData=null){ this.id = _arg1; this.name = _arg2; this.screenName = _arg3; this.location = _arg4; this.description = _arg5; this.profileImageUrl = _arg6; this.url = _arg7; this.profileProtected = _arg8; this.followersCount = _arg9; this.extended = _arg10; this.lastStatus = _arg11; } } }//package com.swfjunkie.tweetr.data.objects
Section 231
//DataParser (com.swfjunkie.tweetr.data.DataParser) package com.swfjunkie.tweetr.data { import com.swfjunkie.tweetr.data.objects.*; import com.swfjunkie.tweetr.utils.*; public class DataParser { public static function parseHash(_arg1:XML):Array{ var _local2:Array = []; var _local3:HashData = new HashData(); _local3.hourlyLimit = _arg1["hourly-limit"]; _local3.remainingHits = _arg1["remaining-hits"]; _local3.resetTimeInSeconds = _arg1["reset-time-in-seconds"]; _local3.request = _arg1["request"]; _local3.error = _arg1["error"]; _local2.push(_local3); return (_local2); } public static function parseIds(_arg1:XML):Array{ var _local6:XML; var _local2:Array = []; var _local3:XMLList = _arg1..id; var _local4:Number = ((_local3.length())==0) ? 1 : _local3.length(); var _local5:Number = 0; while (_local5 < _local4) { _local6 = ((_local4)>1) ? (_local3[_local5] as XML) : _arg1; _local2.push(Number(_local6)); _local5++; }; return (_local2); } public static function parseUserInfos(_arg1:XML, _arg2:Boolean=true):Array{ var _local3:StatusData; var _local4:UserData; var _local5:ExtendedUserData; var _local10:XML; var _local6:Array = []; var _local7:XMLList = _arg1..user; var _local8:Number = ((_local7.length())==0) ? 1 : _local7.length(); var _local9:Number = 0; while (_local9 < _local8) { _local10 = ((_local8)>1) ? (_local7[_local9] as XML) : _arg1; if (_local10.id.toString() == ""){ _local10 = (_local7[_local9] as XML); }; if (_local10){ _local3 = new StatusData(_local10.status.created_at, _local10.status.id, TweetUtil.tidyTweet(_local10.status.text), _local10.status.source, TweetUtil.stringToBool(_local10.status.truncated), _local10.status.in_reply_to_status_id, _local10.status.in_reply_to_user_id, TweetUtil.stringToBool(_local10.status.favorited), _local10.status.in_reply_to_screen_name); _local4 = new UserData(_local10.id, _local10.name, _local10.screen_name, _local10.location, _local10.description, _local10.profile_image_url, _local10.url, TweetUtil.stringToBool(_local10["protected"]), _local10.followers_count); _local4.lastStatus = _local3; if (_arg2){ _local5 = new ExtendedUserData(parseInt(("0x" + _local10.profile_background_color)), parseInt(("0x" + _local10.profile_text_color)), parseInt(("0x" + _local10.profile_link_color)), parseInt(("0x" + _local10.profile_sidebar_fill_color)), parseInt(("0x" + _local10.profile_sidebar_border_color)), _local10.friends_count, _local10.created_at, _local10.favourites_count, _local10.utc_offset, _local10.time_zone, _local10.profile_background_image_url, TweetUtil.stringToBool(_local10.profile_background_tile), TweetUtil.stringToBool(_local10.following), TweetUtil.stringToBool(_local10.notificactions), _local10.statuses_count); _local4.extended = _local5; }; _local6.push(_local4); }; _local9++; }; return (_local6); } public static function parseDirectMessages(_arg1:XML):Array{ var _local2:UserData; var _local3:UserData; var _local4:DirectMessageData; var _local9:XML; var _local5:Array = []; var _local6:XMLList = _arg1..direct_message; var _local7:Number = ((_local6.length())==0) ? 1 : _local6.length(); var _local8:Number = 0; while (_local8 < _local7) { _local9 = ((_local7)>1) ? (_local6[_local8] as XML) : _arg1; _local4 = new DirectMessageData(_local9.id, _local9.sender_id, _local9.text, _local9.recipient_id, _local9.created_at, _local9.sender_screen_name, _local9.recipient_screen_name); _local2 = new UserData(_local9.sender.id, _local9.sender.name, _local9.sender.screen_name, _local9.sender.location, _local9.sender.description, _local9.sender.profile_image_url, _local9.sender.url, TweetUtil.stringToBool(_local9.sender["protected"]), _local9.sender.followers_count); _local3 = new UserData(_local9.recipient.id, _local9.recipient.name, _local9.recipient.screen_name, _local9.recipient.location, _local9.recipient.description, _local9.recipient.profile_image_url, _local9.recipient.url, TweetUtil.stringToBool(_local9.recipient["protected"]), _local9.recipient.followers_count); _local4.sender = _local2; _local4.recipient = _local3; _local5.push(_local4); _local8++; }; return (_local5); } public static function parseCursor(_arg1:XML):CursorData{ if (((!((_arg1..next_cursor.toString() == ""))) && (!((_arg1.previous_cursor.toString() == ""))))){ return (new CursorData(parseFloat(_arg1..next_cursor.toString()), parseFloat(_arg1.previous_cursor.toString()))); }; return (null); } public static function parseSavedSearches(_arg1:XML):Array{ var _local2:SavedSearchData; var _local7:XML; var _local3:Array = []; var _local4:XMLList = _arg1..saved_search; var _local5:Number = ((_local4.length())==0) ? 1 : _local4.length(); var _local6:Number = 0; while (_local6 < _local5) { _local7 = (_local4[_local6] as XML); _local2 = new SavedSearchData(); _local2.id = _local7.id; _local2.name = _local7["name"]; _local2.query = _local7.query; _local2.position = _local7.position; _local2.createdAt = _local7.created_at; _local3.push(_local2); _local6++; }; return (_local3); } public static function parseRelationship(_arg1:XML):Array{ var _local2:Array = []; var _local3:RelationData = new RelationData(); _local3.type = RelationData.RELATION_TYPE_TARGET; _local3.id = parseFloat(_arg1.target.id); _local3.screenName = _arg1.target.screen_name; _local3.following = TweetUtil.stringToBool(_arg1.target.following); _local3.followedBy = TweetUtil.stringToBool(_arg1.target.followed_by); _local3.notificationsEnabled = TweetUtil.stringToBool(_arg1.target.notifications_enabled); var _local4:RelationData = new RelationData(); _local4.type = RelationData.RELATION_TYPE_SOURCE; _local4.id = parseFloat(_arg1.source.id); _local4.screenName = _arg1.source.screen_name; _local4.following = TweetUtil.stringToBool(_arg1.source.following); _local4.followedBy = TweetUtil.stringToBool(_arg1.source.followed_by); _local4.notificationsEnabled = TweetUtil.stringToBool(_arg1.source.notifications_enabled); _local2.push(_local3); _local2.push(_local4); return (_local2); } public static function parseTrendsResults(_arg1:String):Array{ var _local3:TrendData; var _local12:Array; var _local13:String; var _local14:String; var _local2:Array = []; var _local4:Number = String(_arg1).indexOf("["); var _local5:Number = String(_arg1).indexOf("]"); var _local6:Array = []; var _local7:Array = []; var _local8:String = String(_arg1).substring((_local4 + 2), (_local5 - 1)); var _local9:Array = _local8.split("},{"); var _local10:Number = 0; var _local11:Number = _local9.length; _local10 = 0; while (_local10 < _local11) { _local12 = String(_local9[_local10]).split(","); _local13 = _local12[0].split("\"")[3]; _local14 = _local12[1].split("\"")[3]; _local6.push(_local13); _local7.push(TweetUtil.replace(_local14, "\\/", "/")); _local10++; }; _local11 = _local6.length; _local10 = 0; while (_local10 < _local11) { _local3 = new TrendData(_local6[_local10], _local7[_local10]); _local2.push(_local3); _local10++; }; return (_local2); } public static function parseLists(_arg1:XML):Array{ var _local2:ListData; var _local3:UserData; var _local4:ExtendedUserData; var _local9:XML; var _local5:Array = []; var _local6:XMLList = _arg1..list; var _local7:Number = ((_local6.length())==0) ? 1 : _local6.length(); var _local8:Number = 0; while (_local8 < _local7) { _local9 = ((_local7)>1) ? (_local6[_local8] as XML) : _arg1; if (_local9.id.toString() == ""){ _local9 = (_local6[_local8] as XML); }; if (_local9){ _local2 = new ListData(); _local2.id = parseFloat(_local9.id); _local2.name = _local9.name; _local2.fullName = _local9.full_name; _local2.slug = _local9.slug; _local2.subscriberCount = parseFloat(_local9.subscriber_count); _local2.memberCount = parseFloat(_local9.member_count); _local2.uri = _local9.uri; _local2.isPublic = ((_local9.mode)=="public") ? true : false; _local3 = new UserData(_local9.user.id, _local9.user.name, _local9.user.screen_name, _local9.user.location, _local9.user.description, _local9.user..profile_image_url, _local9.user.url, TweetUtil.stringToBool(_local9.user["protected"]), _local9.user.followers_count); _local2.user = _local3; _local4 = new ExtendedUserData(parseInt(("0x" + _local9.user.profile_background_color)), parseInt(("0x" + _local9.user.profile_text_color)), parseInt(("0x" + _local9.user.profile_link_color)), parseInt(("0x" + _local9.user.profile_sidebar_fill_color)), parseInt(("0x" + _local9.user.profile_sidebar_border_color)), _local9.user.friends_count, _local9.user.created_at, _local9.user.favourites_count, _local9.user.utc_offset, _local9.user.time_zone, _local9.user.profile_background_image_url, TweetUtil.stringToBool(_local9.user.profile_background_tile), TweetUtil.stringToBool(_local9.user.following), TweetUtil.stringToBool(_local9.user.notificactions), _local9.user.statuses_count); _local3.extended = _local4; _local5.push(_local2); }; _local8++; }; return (_local5); } public static function parseStatuses(_arg1:XML):Array{ var _local2:StatusData; var _local3:UserData; var _local8:XML; var _local4:Array = []; var _local5:XMLList = _arg1..status; var _local6:Number = ((_local5.length())==0) ? 1 : _local5.length(); var _local7:int; while (_local7 < _local6) { _local8 = ((_local6)>1) ? (_local5[_local7] as XML) : _arg1; _local2 = new StatusData(_local8.created_at, _local8.id, TweetUtil.tidyTweet(_local8.text), _local8.source, TweetUtil.stringToBool(_local8.truncated), _local8.in_reply_to_status_id, _local8.in_reply_to_user_id, TweetUtil.stringToBool(_local8.favorited), _local8.in_reply_to_screen_name); _local3 = new UserData(_local8.user.id, _local8.user.name, _local8.user.screen_name, _local8.user.location, _local8.user.description, _local8.user.profile_image_url, _local8.user.url, TweetUtil.stringToBool(_local8.user["protected"]), _local8.user.followers_count); _local2.user = _local3; _local4.push(_local2); _local7++; }; return (_local4); } public static function parseBoolean(_arg1:XML):Array{ var _local2:Array = []; _local2.push(TweetUtil.stringToBool(_arg1.toString())); return (_local2); } public static function parseSearchResults(_arg1:XML):Array{ var _local3:SearchResultData; var _local5:XML; var _local6:String; var _local7:Number; var _local2:Namespace = new Namespace("http://www.w3.org/2005/Atom"); var _local4:Array = []; for each (_local5 in _arg1._local2::entry) { _local3 = new SearchResultData(); _local6 = _local5._local2::id; _local7 = _local6.lastIndexOf(":"); _local3.id = parseInt(_local6.substring((_local7 + 1), (_local6.length - 1))); _local3.text = _local5._local2::title; _local3.createdAt = _local5._local2::updated; _local3.userProfileImage = _local5._local2::link[1].@href; _local3.link = _local5._local2::link[0].@href; _local3.userLink = _local5._local2::author._local2::uri; _local3.user = _local5._local2::author._local2::name; _local4.push(_local3); }; return (_local4); } } }//package com.swfjunkie.tweetr.data
Section 232
//TweetEvent (com.swfjunkie.tweetr.events.TweetEvent) package com.swfjunkie.tweetr.events { import flash.events.*; import com.swfjunkie.tweetr.data.objects.*; public class TweetEvent extends Event { public var cursor:CursorData; public var responseArray:Array; public var data:Object; public var info:String; public static const STATUS:String = "status"; public static const COMPLETE:String = "complete"; public static const FAILED:String = "failed"; public function TweetEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Array=null, _arg5:String=null, _arg6:Object=null, _arg7:CursorData=null){ super(_arg1, _arg2, _arg3); this.responseArray = _arg4; this.info = _arg5; this.data = _arg6; this.cursor = _arg7; } override public function toString():String{ return ((("[Event type=\"" + type) + "\"]")); } } }//package com.swfjunkie.tweetr.events
Section 233
//Base64Encoder (com.swfjunkie.tweetr.utils.Base64Encoder) package com.swfjunkie.tweetr.utils { import flash.utils.*; public class Base64Encoder { private var _line:uint; private var _count:uint; private var _buffers:Array; public var insertNewLines:Boolean;// = true private var _work:Array; public static const MAX_BUFFER_SIZE:uint = 32767; private static const ALPHABET_CHAR_CODES:Array = [65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 43, 47]; public static const CHARSET_UTF_8:String = "UTF-8"; private static const ESCAPE_CHAR_CODE:Number = 61; public static var newLine:Number = 10; public function Base64Encoder(){ _work = [0, 0, 0]; super(); reset(); } public function flush():String{ if (_count > 0){ encodeBlock(); }; var _local1:String = drain(); reset(); return (_local1); } public function toString():String{ return (flush()); } public function reset():void{ _buffers = []; _buffers.push([]); _count = 0; _line = 0; _work[0] = 0; _work[1] = 0; _work[2] = 0; } public function encodeBytes(_arg1:ByteArray, _arg2:uint=0, _arg3:uint=0):void{ if (_arg3 == 0){ _arg3 = _arg1.length; }; var _local4:uint = _arg1.position; _arg1.position = _arg2; var _local5:uint = _arg2; while (_local5 < _arg3) { _work[_count] = _arg1[_local5]; _count++; if ((((_count == _work.length)) || ((((_arg2 + _arg3) - _local5) == 1)))){ encodeBlock(); _count = 0; _work[0] = 0; _work[1] = 0; _work[2] = 0; }; _local5++; }; _arg1.position = _local4; } public function encode(_arg1:String, _arg2:uint=0, _arg3:uint=0):void{ if (_arg3 == 0){ _arg3 = _arg1.length; }; var _local4:uint = _arg2; while (_local4 < (_arg2 + _arg3)) { _work[_count] = _arg1.charCodeAt(_local4); _count++; if ((((_count == _work.length)) || ((((_arg2 + _arg3) - _local4) == 1)))){ encodeBlock(); _count = 0; _work[0] = 0; _work[1] = 0; _work[2] = 0; }; _local4++; }; } private function encodeBlock():void{ var _local1:Array = (_buffers[(_buffers.length - 1)] as Array); if (_local1.length >= MAX_BUFFER_SIZE){ _local1 = []; _buffers.push(_local1); }; _local1.push(ALPHABET_CHAR_CODES[((_work[0] & 0xFF) >> 2)]); _local1.push(ALPHABET_CHAR_CODES[(((_work[0] & 3) << 4) | ((_work[1] & 240) >> 4))]); if (_count > 1){ _local1.push(ALPHABET_CHAR_CODES[(((_work[1] & 15) << 2) | ((_work[2] & 192) >> 6))]); } else { _local1.push(ESCAPE_CHAR_CODE); }; if (_count > 2){ _local1.push(ALPHABET_CHAR_CODES[(_work[2] & 63)]); } else { _local1.push(ESCAPE_CHAR_CODE); }; if (insertNewLines){ if ((_line = (_line + 4)) == 76){ _local1.push(newLine); _line = 0; }; }; } public function encodeUTFBytes(_arg1:String):void{ var _local2:ByteArray = new ByteArray(); _local2.writeUTFBytes(_arg1); _local2.position = 0; encodeBytes(_local2); } public function drain():String{ var _local3:Array; var _local1 = ""; var _local2:uint; while (_local2 < _buffers.length) { _local3 = (_buffers[_local2] as Array); _local1 = (_local1 + String.fromCharCode.apply(null, _local3)); _local2++; }; _buffers = []; _buffers.push([]); return (_local1); } } }//package com.swfjunkie.tweetr.utils
Section 234
//TweetUtil (com.swfjunkie.tweetr.utils.TweetUtil) package com.swfjunkie.tweetr.utils { public class TweetUtil { public static function replace(_arg1:String, _arg2:String, _arg3:String):String{ var _local9:Number; var _local4:String = new String(); var _local5:Boolean; var _local6:Number = _arg1.length; var _local7:Number = _arg2.length; var _local8:Number = 0; while (_local8 < _local6) { if (_arg1.charAt(_local8) == _arg2.charAt(0)){ _local5 = true; _local9 = 0; while (_local9 < _local7) { if (_arg1.charAt((_local8 + _local9)) != _arg2.charAt(_local9)){ _local5 = false; break; }; _local9++; }; //unresolved if _local4 = (_local4 + _arg3); _local8 = (_local8 + (_local7 - 1)); } else { _local4 = (_local4 + _arg1.charAt(_local8)); }; _local8++; }; return (_local4); } public static function remove(_arg1:String, _arg2:String):String{ return (replace(_arg1, _arg2, "")); } public static function stringToBool(_arg1:String):Boolean{ if (_arg1 == "true"){ return (true); }; return (false); } public static function returnTweetAge(_arg1:String):String{ var _local3:Array; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local17:String; var _local2:Date = new Date(); if (_arg1.match(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z/g).length == 1){ _local3 = _arg1.split(/[-T:Z]/g); _local4 = _local3[0]; _local5 = _local3[1]; _local6 = _local3[2]; _local7 = _local3[3]; _local8 = _local3[4]; _local9 = _local3[5]; _local5--; } else { if (_arg1.match(/[a-zA-z]{3} [a-zA-Z]{3} \d{2} \d{2}:\d{2}:\d{2} \+\d{4} \d{4}/g).length == 1){ _local3 = _arg1.split(/[ :]/g); if (_local3[1] == "Jan"){ _local5 = 0; } else { if (_local3[1] == "Feb"){ _local5 = 1; } else { if (_local3[1] == "Mar"){ _local5 = 2; } else { if (_local3[1] == "Apr"){ _local5 = 3; } else { if (_local3[1] == "May"){ _local5 = 4; } else { if (_local3[1] == "Jun"){ _local5 = 5; } else { if (_local3[1] == "Jul"){ _local5 = 6; } else { if (_local3[1] == "Aug"){ _local5 = 7; } else { if (_local3[1] == "Sep"){ _local5 = 8; } else { if (_local3[1] == "Oct"){ _local5 = 9; } else { if (_local3[1] == "Nov"){ _local5 = 10; } else { if (_local3[1] == "Dec"){ _local5 = 11; }; }; }; }; }; }; }; }; }; }; }; }; _local6 = _local3[2]; _local7 = _local3[3]; _local8 = _local3[4]; _local9 = _local3[5]; _local10 = _local3[6]; _local4 = _local3[7]; }; }; _local2.setUTCFullYear(_local4, _local5, _local6); _local2.setUTCHours(_local7, _local8, _local9); var _local11:Date = new Date(); var _local12:int = (_local11.getTime() - _local2.getTime()); var _local13:int = (((_local11.getTime() - _local2.getTime()) - (_local12 % 86400000)) / 86400000); var _temp1 = (_local12 - (_local13 * 86400000)); _local12 = (_local12 - (_local13 * 86400000)); var _local14:int = ((_temp1 - (_local12 % 3600000)) / 3600000); var _temp2 = (_local12 - (_local14 * 3600000)); _local12 = (_local12 - (_local14 * 3600000)); var _local15:int = ((_temp2 - (_local12 % 60000)) / 60000); var _temp3 = (_local12 - (_local15 * 60000)); _local12 = (_local12 - (_local15 * 60000)); var _local16:int = ((_temp3 - (_local12 % 1000)) / 1000); if (_local13 > 0){ _local17 = (_local13 + " days "); }; if (_local14 > 0){ _local17 = ((_local17 + _local14) + " hours "); }; if (_local15 > 0){ _local17 = ((_local17 + _local15) + " minutes "); }; if (_local16 > 0){ _local17 = ((_local17 + _local16) + " seconds "); }; if (_local17 != null){ _local17 = (_local17 + " ago"); } else { _local17 = ""; }; return (_local17); } public static function tidyTweet(_arg1:String):String{ _arg1 = remove(_arg1, "\n"); _arg1 = remove(_arg1, "\t"); return (_arg1); } } }//package com.swfjunkie.tweetr.utils
Section 235
//URLShortener (com.swfjunkie.tweetr.utils.URLShortener) package com.swfjunkie.tweetr.utils { import flash.events.*; import flash.net.*; public class URLShortener extends EventDispatcher { private var urlLoader:URLLoader; private var _url:String; private var urlRequest:URLRequest; private static const IS_GD_URL:String = "http://is.gd/api.php?longurl="; public function URLShortener(){ init(); } private function handleComplete(_arg1:Event):void{ _url = urlLoader.data; dispatchEvent(new Event(Event.COMPLETE)); } public function shorten(_arg1:String):void{ _url = null; urlRequest.url = (IS_GD_URL + _arg1); urlLoader.load(urlRequest); } private function handleError(_arg1:IOErrorEvent):void{ dispatchEvent(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, "Shortening failed")); } public function get url():String{ return (_url); } private function init():void{ urlLoader = new URLLoader(); urlRequest = new URLRequest(); urlLoader.addEventListener(Event.COMPLETE, handleComplete); urlLoader.addEventListener(IOErrorEvent.IO_ERROR, handleError); } public function destroy():void{ _url = null; urlLoader = null; urlRequest = null; urlLoader.removeEventListener(Event.COMPLETE, handleComplete); urlLoader.removeEventListener(IOErrorEvent.IO_ERROR, handleError); } } }//package com.swfjunkie.tweetr.utils
Section 236
//Tweetr (com.swfjunkie.tweetr.Tweetr) package com.swfjunkie.tweetr { import flash.events.*; import flash.net.*; import com.swfjunkie.tweetr.events.*; import com.swfjunkie.tweetr.data.objects.*; import com.swfjunkie.tweetr.utils.*; import com.swfjunkie.tweetr.data.*; public class Tweetr extends EventDispatcher { private var _password:String; private var urlRequest:URLRequest; private var _returnType:String; private var _username:String; private var urlLoader:URLLoader; private var request:String; public var useAuthHeaders:Boolean;// = false public var serviceHost:String;// = "twitter.com" private static const URL_END_SESSION:String = "/account/end_session.xml"; private static const URL_UPDATE_PROFILE:String = "/account/update_profile.xml"; private static const URL_FOLLOWERS:String = "/statuses/followers"; private static const URL_VERIFY_CREDENTIALS:String = "/account/verify_credentials.xml"; private static const URL_TWITTER_SEARCH:String = "http://search.twitter.com/search.atom"; private static const URL_CREATE_FRIENDSHIP:String = "/friendships/create/"; public static const RETURN_TYPE_STATUS:String = "status"; public static const RETURN_TYPE_TRENDS_RESULTS:String = "trends"; private static const URL_SAVED_SEARCHES:String = "/saved_searches.xml"; private static const URL_SENT_DIRECT_MESSAGES:String = "/direct_messages/sent.xml"; private static const URL_UPDATE_PROFILE_COLORS:String = "/account/update_profile_colors.xml"; private static const DATA_FORMAT:String = "xml"; public static const RETURN_TYPE_LIST:String = "list"; public static const RETURN_TYPE_IDS:String = "ids"; public static const RETURN_TYPE_SAVED_SEARCHES:String = "saved_searches"; private static const URL_USER_TIMELINE:String = "/statuses/user_timeline"; private static const URL_BLOCK_USER:String = "/blocks/create/"; private static const URL_DESTROY_FRIENDSHIP:String = "/friendships/destroy/"; private static const URL_DESTROY_FAVORITE:String = "/favorites/destroy/"; private static const URL_FRIENDSHIP_SHOW:String = "/friendships/show.xml"; private static const URL_TWITTER_TRENDS_DAILY:String = "http://search.twitter.com/trends/daily.json"; public static const RETURN_TYPE_SEARCH_RESULTS:String = "search"; private static const URL_SEND_NEW_DIRECT_MESSAGE:String = "/direct_messages/new.xml"; private static const URL_BLOCK_EXISTS:String = "/blocks/exists/"; private static const URL_PUBLIC_TIMELINE:String = "/statuses/public_timeline.xml"; private static const URL_UNFOLLOW_USER:String = "/notifications/leave/"; private static const URL_FRIENDSHIP_EXISTS:String = "/friendships/exists.xml"; private static const URL_RECEIVED_DIRECT_MESSAGES:String = "/direct_messages.xml"; private static const URL_BLOCKS:String = "/blocks/blocking.xml"; private static const URL_SEND_UPDATE:String = "/statuses/update.xml"; private static const URL_SINGLE_DIRECT_MESSAGE:String = "/direct_messages/show/"; private static const URL_REPORT_SPAM:String = "/report_spam.xml"; private static const URL_FRIENDS:String = "/statuses/friends"; private static const URL_DESTROY_DIRECT_MESSAGE:String = "/direct_messages/destroy"; private static const URL_SINGLE_TWEET:String = "/statuses/show/"; private static const URL_UPDATE_PROFILE_BG_IMAGE:String = "/account/update_profile_background_image.xml"; private static const URL_TWITTER_TRENDS_WEEKLY:String = "http://search.twitter.com/trends/weekly.json"; private static const URL_CREATE_FAVORITE:String = "/favorites/create/"; private static const URL_SOCIAL_GRAPH_FOLLOWER_IDS:String = "/followers/ids"; private static const URL_USER_DETAILS:String = "/users/show/"; private static const URL_UNBLOCK_USER:String = "/blocks/destroy/"; public static const RETURN_TYPE_DIRECT_MESSAGE:String = "direct_message"; private static const URL_FOLLOW_USER:String = "/notifications/follow/"; public static const RETURN_TYPE_BOOLEAN:String = "bool"; private static const URL_RETRIEVE_SAVED_SEARCH:String = "/saved_searches/show/"; private static const URL_DESTROY_SAVED_SEARCH:String = "/saved_searches/destroy/"; private static const URL_MENTIONS:String = "/statuses/mentions.xml"; private static const URL_FRIENDS_TIMELINE:String = "/statuses/friends_timeline.xml"; private static const URL_DESTROY_TWEET:String = "/statuses/destroy/"; public static const RETURN_TYPE_HASH:String = "hash"; private static const URL_SOCIAL_GRAPH_FRIEND_IDS:String = "/friends/ids"; private static const URL_TWITTER_TRENDS:String = "http://search.twitter.com/trends.json"; public static const RETURN_TYPE_USER_INFO:String = "users"; public static const RETURN_TYPE_RELATIONSHIP:String = "relationship"; private static const URL_BLOCK_IDS:String = "/blocks/blocking/ids.xml"; public static const version:String = "0.95"; private static const URL_RETRIEVE_FAVORITES:String = "/favorites"; private static const URL_RATELIMIT_STATUS:String = "/account/rate_limit_status.xml"; private static const URL_CREATE_SAVED_SEARCH:String = "/saved_searches/create.xml"; private static const URL_TWITTER_TRENDS_CURRENT:String = "http://search.twitter.com/trends/current.json"; private static const URL_UPDATE_PROFILE_IMAGE:String = "/account/update_profile_image.xml"; public function Tweetr(_arg1:String=null, _arg2:String=null){ _username = _arg1; _password = _arg2; init(); } public function destroy():void{ urlLoader.removeEventListener(Event.COMPLETE, handleTweetsLoaded); urlLoader.removeEventListener(IOErrorEvent.IO_ERROR, handleTweetsLoadingFailed); urlLoader.removeEventListener(HTTPStatusEvent.HTTP_STATUS, handleHTTPStatus); urlLoader = null; urlRequest = null; request = null; _username = null; _password = null; _returnType = null; } public function getSentDirectMessages(_arg1:String=null, _arg2:String=null, _arg3:Number=0, _arg4:Number=0):void{ var _local5:Array = []; checkCredentials(); setGETRequest(); _returnType = RETURN_TYPE_DIRECT_MESSAGE; if (_arg1){ _local5.push(("since_id=" + _arg1)); }; if (_arg2){ _local5.push(("since=" + _arg2)); }; if (_arg3 > 0){ _local5.push(("max_id=" + _arg3)); }; if (_arg4 > 0){ _local5.push(("page=" + _arg4)); }; request = (URL_SENT_DIRECT_MESSAGES + returnArgumentsString(_local5)); urlLoader.load(url); } public function destroyDirectMessage(_arg1:Number):void{ var _local2:URLVariables = new URLVariables(); checkCredentials(); _returnType = RETURN_TYPE_DIRECT_MESSAGE; _local2.id = _arg1; _local2.format = DATA_FORMAT; setPOSTRequest(_local2); request = URL_DESTROY_DIRECT_MESSAGE; urlLoader.load(url); } public function updateList(_arg1:String, _arg2:String=null, _arg3:Boolean=true):void{ var _local4:URLVariables = new URLVariables(); checkCredentials(); _returnType = RETURN_TYPE_LIST; if (_arg2){ _local4.name = _arg2; }; if (_arg3){ _local4.mode = "public"; } else { _local4.mode = "private"; }; setPOSTRequest(_local4); request = ((((("/" + _username) + "/lists/") + _arg1) + ".") + DATA_FORMAT); urlLoader.load(url); } public function updateProfileBackgroundImage(_arg1:FileReference, _arg2:Boolean=false):void{ var _local3:URLVariables = new URLVariables(); checkCredentials(); _returnType = RETURN_TYPE_USER_INFO; _arg1.addEventListener(DataEvent.UPLOAD_COMPLETE_DATA, handleFileReferenceUploadComplete); if (_arg2){ _local3.tile = "true"; }; setPOSTRequest(_local3); request = URL_UPDATE_PROFILE_BG_IMAGE; _arg1.upload(url, "image"); } private function handleTweetsLoaded(_arg1:Event):void{ evalRawResponse(urlLoader.data); } private function init():void{ urlRequest = new URLRequest(); urlLoader = new URLLoader(); urlLoader.addEventListener(Event.COMPLETE, handleTweetsLoaded); urlLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, handleSecurityError); urlLoader.addEventListener(IOErrorEvent.IO_ERROR, handleTweetsLoadingFailed); urlLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS, handleHTTPStatus); } public function hasListMember(_arg1:String, _arg2:Number):void{ var _local3:Array = []; checkCredentials(); setGETRequest(); _returnType = RETURN_TYPE_USER_INFO; request = ((((((("/" + _username) + "/") + _arg1) + "/members/") + _arg2) + ".") + DATA_FORMAT); urlLoader.load(url); } public function getList(_arg1:String, _arg2:String=null):void{ var _local3:Array = []; checkCredentials(); setGETRequest(); _returnType = RETURN_TYPE_LIST; request = ((((("/" + (_arg2) ? _arg2 : _username) + "/lists/") + _arg1) + ".") + DATA_FORMAT); urlLoader.load(url); } public function showFriendshipByName(_arg1:String, _arg2:String=null):void{ var _local3:Array = []; _returnType = RETURN_TYPE_RELATIONSHIP; setGETRequest(); _local3.push(("target_screen_name=" + _arg1)); if (!_arg2){ checkCredentials(); } else { _local3.push(("source_screen_name=" + _arg2)); }; request = (URL_FRIENDSHIP_SHOW + returnArgumentsString(_local3)); urlLoader.load(url); } public function updateStatus(_arg1:String, _arg2:Number=0):void{ var _local3:URLVariables = new URLVariables(); checkCredentials(); _returnType = RETURN_TYPE_STATUS; _local3.status = _arg1.substr(0, 140); if (_arg2 != 0){ _local3.in_reply_to_status_id = _arg2; }; setPOSTRequest(_local3); request = URL_SEND_UPDATE; urlLoader.load(url); } public function followUser(_arg1:String):void{ var _local2:URLVariables = new URLVariables(); checkCredentials(); _returnType = RETURN_TYPE_USER_INFO; _local2.id = _arg1; _local2.format = DATA_FORMAT; setPOSTRequest(_local2); request = URL_FOLLOW_USER; urlLoader.load(url); } public function reportSpammer(_arg1:String):void{ var _local2:URLVariables = new URLVariables(); checkCredentials(); _returnType = RETURN_TYPE_USER_INFO; _local2.id = _arg1; setPOSTRequest(_local2); request = URL_REPORT_SPAM; urlLoader.load(url); } private function handleFileReferenceUploadComplete(_arg1:DataEvent):void{ var _local2:FileReference = FileReference(_arg1.target); _local2.removeEventListener(DataEvent.UPLOAD_COMPLETE_DATA, handleFileReferenceUploadComplete); _local2 = null; evalRawResponse(_arg1.data); } public function hasFriendship(_arg1:String, _arg2:String):void{ _returnType = RETURN_TYPE_BOOLEAN; setGETRequest(); request = ((((URL_FRIENDSHIP_EXISTS + "?user_a=") + _arg1) + "&user_b=") + _arg2); urlLoader.load(url); } public function getDirectMessage(_arg1:Number):void{ checkCredentials(); setGETRequest(); _returnType = RETURN_TYPE_DIRECT_MESSAGE; request = (((URL_SINGLE_DIRECT_MESSAGE + String(_arg1)) + ".") + DATA_FORMAT); urlLoader.load(url); } private function setPOSTRequest(_arg1:URLVariables=null):void{ urlRequest.method = URLRequestMethod.POST; urlRequest.data = _arg1; } public function showFriendshipById(_arg1:String, _arg2:String=null):void{ var _local3:Array = []; _returnType = RETURN_TYPE_RELATIONSHIP; setGETRequest(); _local3.push(("target_id=" + _arg1)); if (!_arg2){ checkCredentials(); } else { _local3.push(("source_id=" + _arg2)); }; request = (URL_FRIENDSHIP_SHOW + returnArgumentsString(_local3)); urlLoader.load(url); } public function set password(_arg1:String):void{ _password = _arg1; } public function updateProfileColors(_arg1:String=null, _arg2:String=null, _arg3:String=null, _arg4:String=null, _arg5:String=null):void{ var _local6:URLVariables = new URLVariables(); checkCredentials(); _returnType = RETURN_TYPE_USER_INFO; if (_arg1){ _local6.profile_background_color = _arg1; }; if (_arg2){ _local6.profile_text_color = _arg2; }; if (_arg3){ _local6.profile_link_color = _arg3; }; if (_arg4){ _local6.profile_sidebar_fill_color = _arg4; }; if (_arg5){ _local6.profile_sidebar_border_color = _arg5; }; setPOSTRequest(_local6); request = URL_UPDATE_PROFILE_COLORS; urlLoader.load(url); } public function endSession():void{ checkCredentials(); _returnType = RETURN_TYPE_HASH; setPOSTRequest(); request = URL_END_SESSION; urlLoader.load(url); } public function sendDirectMessage(_arg1:String, _arg2:String):void{ var _local3:URLVariables = new URLVariables(); checkCredentials(); _returnType = RETURN_TYPE_DIRECT_MESSAGE; _local3.user = _arg2; _local3.text = _arg1.substr(0, 140); setPOSTRequest(_local3); request = URL_SEND_NEW_DIRECT_MESSAGE; urlLoader.load(url); } public function getMentions(_arg1:String=null, _arg2:String=null, _arg3:Number=0, _arg4:Number=0):void{ var _local5:Array = []; checkCredentials(); setGETRequest(); _returnType = RETURN_TYPE_STATUS; if (_arg1){ _local5.push(("since_id=" + _arg1)); }; if (_arg2){ _local5.push(("since=" + _arg2)); }; if (_arg3 > 0){ _local5.push(("max_id=" + _arg3)); }; if (_arg4 > 0){ _local5.push(("page=" + _arg4)); }; request = (URL_MENTIONS + returnArgumentsString(_local5)); urlLoader.load(url); } public function getListSubscriptions(_arg1:String=null, _arg2:Number=0):void{ var _local3:Array = []; checkCredentials(); setGETRequest(); _returnType = RETURN_TYPE_LIST; if (_arg2 != 0){ _local3.push(("cursor=" + _arg2)); }; request = (((("/" + (_arg1) ? _arg1 : _username) + "/lists/subscriptions.") + DATA_FORMAT) + returnArgumentsString(_local3)); urlLoader.load(url); } public function getSavedSearches():void{ checkCredentials(); setGETRequest(); _returnType = RETURN_TYPE_SAVED_SEARCHES; request = URL_SAVED_SEARCHES; urlLoader.load(url); } public function blockExists(_arg1:String):void{ checkCredentials(); setGETRequest(); _returnType = RETURN_TYPE_USER_INFO; request = ((URL_BLOCK_EXISTS + _arg1) + ".xml"); urlLoader.load(url); } private function broadcastTweetEvent(_arg1:String, _arg2:Array=null, _arg3:String=null, _arg4:Object=null, _arg5:CursorData=null):void{ dispatchEvent(new TweetEvent(_arg1, false, false, _arg2, _arg3, _arg4, _arg5)); } private function evalRawResponse(_arg1:Object):void{ var _local2:Array = responseParser(_arg1); var _local3:XML = XML(_arg1); var _local4:CursorData = DataParser.parseCursor(_local3); if ((((((_local3.localName() == RETURN_TYPE_HASH)) && ((_local3.child("error").length() > 0)))) && (!((_local3.child("error")[0] == "Logged out."))))){ _returnType = RETURN_TYPE_HASH; broadcastTweetEvent(TweetEvent.FAILED, null, _local3.error, DataParser.parseHash(_local3)[0]); } else { broadcastTweetEvent(TweetEvent.COMPLETE, _local2, null, _arg1, _local4); }; } public function currentTrends():void{ _returnType = RETURN_TYPE_TRENDS_RESULTS; setGETRequest(); urlLoader.load(new URLRequest(URL_TWITTER_TRENDS_CURRENT)); } public function getListStatuses(_arg1:String, _arg2:String=null, _arg3:String=null, _arg4:Number=0, _arg5:Number=0, _arg6:Number=0):void{ var _local7:Array = []; setGETRequest(); _returnType = RETURN_TYPE_STATUS; if (_arg3){ _local7.push(("since_id=" + _arg3)); }; if (_arg4 > 0){ _local7.push(("max_id=" + _arg4)); }; if (_arg6 > 0){ _local7.push(("count=" + _arg5)); }; if (_arg6 > 0){ _local7.push(("page=" + _arg6)); }; if (((!(_arg2)) && (!(_username)))){ throw (new Error("No authenticated user or user parameter has been given .. method can't be called!")); }; request = (((((("/" + (_arg2) ? _arg2 : _username) + "/lists/") + _arg1) + "/statuses.") + DATA_FORMAT) + returnArgumentsString(_local7)); urlLoader.load(url); } private function handleTweetsLoadingFailed(_arg1:IOErrorEvent):void{ broadcastTweetEvent(TweetEvent.FAILED, null, _arg1.text); } public function getListSubscribers(_arg1:String, _arg2:String=null, _arg3:Number=0):void{ var _local4:Array = []; checkCredentials(); setGETRequest(); _returnType = RETURN_TYPE_USER_INFO; if (_arg3 != 0){ _local4.push(("cursor=" + _arg3)); }; request = (((((("/" + (_arg2) ? _arg2 : _username) + "/") + _arg1) + "/subscribers.") + DATA_FORMAT) + returnArgumentsString(_local4)); urlLoader.load(url); } public function addListMember(_arg1:String, _arg2:Number):void{ var _local3:URLVariables = new URLVariables(); checkCredentials(); _returnType = RETURN_TYPE_LIST; _local3.id = _arg2; setPOSTRequest(_local3); request = ((((("/" + _username) + "/") + _arg1) + "/members.") + DATA_FORMAT); urlLoader.load(url); } private function setGETRequest():void{ urlRequest.method = URLRequestMethod.GET; urlRequest.data = null; } public function getRateLimitStatus():void{ _returnType = RETURN_TYPE_HASH; setGETRequest(); request = URL_RATELIMIT_STATUS; urlLoader.load(url); } public function getFriends(_arg1:String=null, _arg2:Number=0):void{ var _local3:Array = []; if (!_arg1){ checkCredentials(); }; setGETRequest(); _returnType = RETURN_TYPE_USER_INFO; if (_arg2 != 0){ _local3.push(("cursor=" + _arg2)); }; request = ((URL_FRIENDS + (_arg1) ? ((("/" + _arg1) + ".") + DATA_FORMAT) : ("." + DATA_FORMAT)) + returnArgumentsString(_local3)); urlLoader.load(url); } private function handleSecurityError(_arg1:SecurityErrorEvent):void{ broadcastTweetEvent(TweetEvent.FAILED, null, _arg1.text); } public function getBlockIds():void{ checkCredentials(); setGETRequest(); _returnType = RETURN_TYPE_IDS; request = URL_BLOCK_IDS; urlLoader.load(url); } public function getListMembers(_arg1:String, _arg2:String=null, _arg3:Number=0):void{ var _local4:Array = []; checkCredentials(); setGETRequest(); _returnType = RETURN_TYPE_USER_INFO; if (_arg3 != 0){ _local4.push(("cursor=" + _arg3)); }; request = (((((("/" + (_arg2) ? _arg2 : _username) + "/") + _arg1) + "/members.") + DATA_FORMAT) + returnArgumentsString(_local4)); urlLoader.load(url); } public function getFollowers(_arg1:String=null, _arg2:Number=0):void{ var _local3:Array = []; if (!_arg1){ checkCredentials(); }; setGETRequest(); _returnType = RETURN_TYPE_USER_INFO; if (_arg2 != 0){ _local3.push(("cursor=" + _arg2)); }; request = ((URL_FOLLOWERS + (_arg1) ? ((("/" + _arg1) + ".") + DATA_FORMAT) : ("." + DATA_FORMAT)) + returnArgumentsString(_local3)); urlLoader.load(url); } private function get url():URLRequest{ var _local1:Base64Encoder; if (((!(_username)) && (!(_password)))){ urlRequest.url = (("http://" + serviceHost) + request); } else { _local1 = new Base64Encoder(); _local1.encode(((_username + ":") + _password)); if (useAuthHeaders){ urlRequest.requestHeaders = [new URLRequestHeader("Authorization", ("Basic " + _local1.toString()))]; urlRequest.url = (("http://" + serviceHost) + request); } else { if (urlRequest.method == URLRequestMethod.GET){ request = ((request.indexOf("?"))!=-1) ? ((request + "&hash=") + _local1.toString()) : ((request + "?hash=") + _local1.toString()); } else { if (urlRequest.data){ urlRequest.data.hash = _local1.toString(); } else { urlRequest.data = new URLVariables(("hash=" + _local1.toString())); }; }; urlRequest.url = (("http://" + serviceHost) + request); }; }; return (urlRequest); } public function createSavedSearch(_arg1:String):void{ var _local2:URLVariables = new URLVariables(); checkCredentials(); _returnType = RETURN_TYPE_SAVED_SEARCHES; _local2.query = _arg1; setPOSTRequest(_local2); request = URL_CREATE_SAVED_SEARCH; urlLoader.load(url); } public function destroyFriendship(_arg1:String):void{ var _local2:URLVariables = new URLVariables(); checkCredentials(); _returnType = RETURN_TYPE_USER_INFO; _local2.id = _arg1; _local2.format = DATA_FORMAT; setPOSTRequest(_local2); request = URL_DESTROY_FRIENDSHIP; urlLoader.load(url); } public function unfollowUser(_arg1:String):void{ var _local2:URLVariables = new URLVariables(); checkCredentials(); _returnType = RETURN_TYPE_USER_INFO; _local2.id = _arg1; _local2.format = DATA_FORMAT; setPOSTRequest(_local2); request = URL_UNFOLLOW_USER; urlLoader.load(url); } public function trends():void{ _returnType = RETURN_TYPE_TRENDS_RESULTS; setGETRequest(); urlLoader.load(new URLRequest(URL_TWITTER_TRENDS)); } public function weeklyTrends():void{ _returnType = RETURN_TYPE_TRENDS_RESULTS; setGETRequest(); urlLoader.load(new URLRequest(URL_TWITTER_TRENDS_WEEKLY)); } public function getBlocks():void{ checkCredentials(); setGETRequest(); _returnType = RETURN_TYPE_USER_INFO; request = URL_BLOCKS; urlLoader.load(url); } public function unblockUser(_arg1:String):void{ var _local2:URLVariables = new URLVariables(); checkCredentials(); _returnType = RETURN_TYPE_USER_INFO; _local2.id = _arg1; _local2.format = DATA_FORMAT; setPOSTRequest(_local2); request = URL_UNBLOCK_USER; urlLoader.load(url); } public function removeListMember(_arg1:String, _arg2:Number):void{ var _local3:URLVariables = new URLVariables(); checkCredentials(); _returnType = RETURN_TYPE_LIST; _local3.id = _arg2; _local3._method = "DELETE"; setPOSTRequest(_local3); request = ((((("/" + _username) + "/") + _arg1) + "/members.") + DATA_FORMAT); urlLoader.load(url); } public function getFriendIds(_arg1:String=null, _arg2:Number=0):void{ var _local3:Array = []; if (!_arg1){ checkCredentials(); }; setGETRequest(); _returnType = RETURN_TYPE_IDS; if (_arg2 != 0){ _local3.push(("cursor=" + _arg2)); }; request = ((URL_SOCIAL_GRAPH_FRIEND_IDS + (_arg1) ? ((("/" + _arg1) + ".") + DATA_FORMAT) : ("." + DATA_FORMAT)) + returnArgumentsString(_local3)); urlLoader.load(url); } public function removeListSubscription(_arg1:String, _arg2:String):void{ var _local3:URLVariables = new URLVariables(); checkCredentials(); _returnType = RETURN_TYPE_LIST; _local3._method = "DELETE"; setPOSTRequest(_local3); request = ((((("/" + _arg2) + "/") + _arg1) + "/subscribers.") + DATA_FORMAT); urlLoader.load(url); } public function get returnType():String{ return (_returnType); } public function getFollowerIds(_arg1:String=null, _arg2:Number=0):void{ var _local3:Array = []; if (!_arg1){ checkCredentials(); }; setGETRequest(); _returnType = RETURN_TYPE_IDS; if (_arg2 != 0){ _local3.push(("cursor=" + _arg2)); }; request = ((URL_SOCIAL_GRAPH_FOLLOWER_IDS + (_arg1) ? ((("/" + _arg1) + ".") + DATA_FORMAT) : ("." + DATA_FORMAT)) + returnArgumentsString(_local3)); urlLoader.load(url); } public function destroyStatus(_arg1:Number):void{ var _local2:URLVariables = new URLVariables(); checkCredentials(); _returnType = RETURN_TYPE_STATUS; _local2.id = _arg1; _local2.format = DATA_FORMAT; setPOSTRequest(_local2); request = (((URL_DESTROY_TWEET + _arg1) + ".") + DATA_FORMAT); urlLoader.load(url); } public function getReceivedDirectMessages(_arg1:String=null, _arg2:String=null, _arg3:Number=0, _arg4:Number=0):void{ var _local5:Array = []; checkCredentials(); setGETRequest(); _returnType = RETURN_TYPE_DIRECT_MESSAGE; if (_arg1){ _local5.push(("since_id=" + _arg1)); }; if (_arg2){ _local5.push(("since=" + _arg2)); }; if (_arg3 > 0){ _local5.push(("max_id=" + _arg3)); }; if (_arg4 > 0){ _local5.push(("page=" + _arg4)); }; request = (URL_RECEIVED_DIRECT_MESSAGES + returnArgumentsString(_local5)); urlLoader.load(url); } public function hasListSubscription(_arg1:String, _arg2:String, _arg3:Number):void{ var _local4:Array = []; checkCredentials(); setGETRequest(); _returnType = RETURN_TYPE_USER_INFO; request = ((((((("/" + _arg2) + "/") + _arg1) + "/subscribers/") + _arg3) + ".") + DATA_FORMAT); urlLoader.load(url); } public function destroyTweet(_arg1:Number):void{ destroyStatus(_arg1); } public function updateProfileImage(_arg1:FileReference):void{ checkCredentials(); _returnType = RETURN_TYPE_USER_INFO; _arg1.addEventListener(DataEvent.UPLOAD_COMPLETE_DATA, handleFileReferenceUploadComplete); request = URL_UPDATE_PROFILE_IMAGE; _arg1.upload(url, "image"); } public function addListSubscription(_arg1:String, _arg2:String):void{ checkCredentials(); _returnType = RETURN_TYPE_LIST; setPOSTRequest(); request = ((((("/" + _arg2) + "/") + _arg1) + "/subscribers.") + DATA_FORMAT); urlLoader.load(url); } public function updateProfile(_arg1:String=null, _arg2:String=null, _arg3:String=null, _arg4:String=null):void{ var _local5:URLVariables = new URLVariables(); checkCredentials(); _returnType = RETURN_TYPE_USER_INFO; if (_arg1){ _local5.name = _arg1.substr(0, 40); }; if (_arg2){ _local5.url = _arg2.substr(0, 100); }; if (_arg3){ _local5.location = _arg3.substr(0, 30); }; if (_arg4){ _local5.description = _arg4.substr(0, 160); }; setPOSTRequest(_local5); request = URL_UPDATE_PROFILE; urlLoader.load(this.url); } public function getFavorites(_arg1:String=null, _arg2:Number=0):void{ var _local3:Array = []; checkCredentials(); setGETRequest(); _returnType = RETURN_TYPE_STATUS; if (_arg2 > 0){ _local3.push(("page=" + _arg2)); }; request = ((URL_RETRIEVE_FAVORITES + (_arg1) ? ((("/" + _arg1) + ".") + DATA_FORMAT) : ("." + DATA_FORMAT)) + returnArgumentsString(_local3)); urlLoader.load(url); } public function search(_arg1:String, _arg2:String=null, _arg3:Number=15, _arg4:Number=1, _arg5:Number=0, _arg6:String=null):void{ var _local7:Array = []; _returnType = RETURN_TYPE_SEARCH_RESULTS; setGETRequest(); if (_arg1.indexOf(" ") != -1){ _local7.push(("phrase=" + _arg1)); } else { _local7.push(("q=" + _arg1)); }; if (_arg2){ _local7.push(("lang=" + _arg2)); }; if (_arg3 != 15){ _local7.push(("rpp=" + _arg3)); }; if (_arg4 != 1){ _local7.push(("page=" + _arg4)); }; if (_arg5 != 0){ _local7.push(("since_id=" + _arg5)); }; if (_arg6){ _local7.push(("geocode=" + _arg6)); }; urlLoader.load(new URLRequest((URL_TWITTER_SEARCH + returnArgumentsString(_local7)))); } public function getListMemberships(_arg1:String=null, _arg2:Number=0):void{ var _local3:Array = []; checkCredentials(); setGETRequest(); _returnType = RETURN_TYPE_LIST; if (_arg2 != 0){ _local3.push(("cursor=" + _arg2)); }; request = (((("/" + (_arg1) ? _arg1 : _username) + "/lists/memberships.") + DATA_FORMAT) + returnArgumentsString(_local3)); urlLoader.load(url); } public function set username(_arg1:String):void{ _username = _arg1; } public function destroySavedSearch(_arg1:Number):void{ checkCredentials(); _returnType = RETURN_TYPE_SAVED_SEARCHES; setPOSTRequest(); request = (((URL_DESTROY_SAVED_SEARCH + _arg1) + ".") + DATA_FORMAT); urlLoader.load(url); } public function destroyFavorite(_arg1:Number):void{ var _local2:URLVariables = new URLVariables(); checkCredentials(); _returnType = RETURN_TYPE_STATUS; _local2.id = _arg1; _local2.format = DATA_FORMAT; setPOSTRequest(_local2); request = URL_DESTROY_FAVORITE; urlLoader.load(url); } public function createFavorite(_arg1:Number):void{ var _local2:URLVariables = new URLVariables(); checkCredentials(); _returnType = RETURN_TYPE_STATUS; _local2.id = _arg1; _local2.format = DATA_FORMAT; setPOSTRequest(_local2); request = URL_CREATE_FAVORITE; urlLoader.load(url); } public function createList(_arg1:String, _arg2:Boolean=true):void{ var _local3:URLVariables = new URLVariables(); checkCredentials(); _returnType = RETURN_TYPE_LIST; _local3.name = _arg1; if (_arg2){ _local3.mode = "public"; } else { _local3.mode = "private"; }; setPOSTRequest(_local3); request = ((("/" + _username) + "/lists.") + DATA_FORMAT); urlLoader.load(url); } private function returnArgumentsString(_arg1:Array=null):String{ var _local3:int; var _local4:int; var _local2 = ""; if (_arg1){ _local3 = _arg1.length; _local4 = 0; while (_local4 < _local3) { if (_local4 == 0){ _local2 = "?"; }; _local2 = (_local2 + _arg1[_local4]); if (_local4 != (_local3 - 1)){ _local2 = (_local2 + "&"); }; _local4++; }; }; return (_local2); } private function responseParser(_arg1:Object):Array{ var _local2:XML; if (_returnType != RETURN_TYPE_TRENDS_RESULTS){ _local2 = new XML(_arg1); }; switch (_returnType){ case RETURN_TYPE_STATUS: return (DataParser.parseStatuses(_local2)); case RETURN_TYPE_LIST: return (DataParser.parseLists(_local2)); case RETURN_TYPE_DIRECT_MESSAGE: return (DataParser.parseDirectMessages(_local2)); case RETURN_TYPE_USER_INFO: return (DataParser.parseUserInfos(_local2)); case RETURN_TYPE_RELATIONSHIP: return (DataParser.parseRelationship(_local2)); case RETURN_TYPE_HASH: return (DataParser.parseHash(_local2)); case RETURN_TYPE_BOOLEAN: return (DataParser.parseBoolean(_local2)); case RETURN_TYPE_SEARCH_RESULTS: return (DataParser.parseSearchResults(_local2)); case RETURN_TYPE_TRENDS_RESULTS: return (DataParser.parseTrendsResults(String(_arg1))); case RETURN_TYPE_IDS: return (DataParser.parseIds(_local2)); case RETURN_TYPE_SAVED_SEARCHES: return (DataParser.parseSavedSearches(_local2)); }; return (null); } public function getUserDetails(_arg1:String):void{ var _local2:Array = []; setGETRequest(); _returnType = RETURN_TYPE_USER_INFO; request = (((URL_USER_DETAILS + _arg1) + ".") + DATA_FORMAT); urlLoader.load(url); } public function getUserTimeLine(_arg1:String=null, _arg2:String=null, _arg3:String=null, _arg4:Number=0, _arg5:Number=0):void{ var _local6:Array = []; if (!_arg1){ checkCredentials(); }; setGETRequest(); _returnType = RETURN_TYPE_STATUS; if (_arg2){ _local6.push(("since_id=" + _arg2)); }; if (_arg3){ _local6.push(("since=" + _arg3)); }; if (_arg4 > 0){ _local6.push(("max_id=" + _arg4)); }; if (_arg5 > 0){ _local6.push(("page=" + _arg5)); }; request = ((URL_USER_TIMELINE + (_arg1) ? ((("/" + _arg1) + ".") + DATA_FORMAT) : ("." + DATA_FORMAT)) + returnArgumentsString(_local6)); urlLoader.load(url); } public function verifyCredentials():void{ checkCredentials(); _returnType = RETURN_TYPE_USER_INFO; setGETRequest(); request = URL_VERIFY_CREDENTIALS; urlLoader.load(url); } public function sendTweet(_arg1:String, _arg2:Number=0):void{ updateStatus(_arg1, _arg2); } private function handleHTTPStatus(_arg1:HTTPStatusEvent):void{ broadcastTweetEvent(TweetEvent.STATUS, null, String(_arg1.status)); } public function getReplies(_arg1:String=null, _arg2:String=null, _arg3:Number=0, _arg4:Number=0):void{ getMentions(_arg1, _arg2, _arg3, _arg4); } public function getSingleTweet(_arg1:Number):void{ getStatus(_arg1); } private function checkCredentials():void{ if (((!(_username)) && (!(_password)))){ throw (new Error("Username and Password are required for this method call!")); }; } public function getSavedSearch(_arg1:Number):void{ checkCredentials(); setGETRequest(); _returnType = RETURN_TYPE_SAVED_SEARCHES; request = (((URL_RETRIEVE_SAVED_SEARCH + _arg1) + ".") + DATA_FORMAT); urlLoader.load(url); } public function getLists(_arg1:String=null, _arg2:Number=0):void{ var _local3:Array = []; checkCredentials(); setGETRequest(); _returnType = RETURN_TYPE_LIST; if (_arg2 != 0){ _local3.push(("cursor=" + _arg2)); }; request = (((("/" + (_arg1) ? _arg1 : _username) + "/lists.") + DATA_FORMAT) + returnArgumentsString(_local3)); urlLoader.load(url); } public function getFriendsTimeLine(_arg1:String=null, _arg2:String=null, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0):void{ var _local6:Array = []; checkCredentials(); setGETRequest(); _returnType = RETURN_TYPE_STATUS; if (_arg1){ _local6.push(("since_id=" + _arg1)); }; if (_arg2){ _local6.push(("since=" + _arg2)); }; if (_arg3 > 0){ _local6.push(("max_id=" + _arg3)); }; if (_arg4 > 0){ if (_arg4 > 200){ _arg4 = 200; }; _local6.push(("count=" + _arg4)); }; if (_arg5 > 0){ _local6.push(("page=" + _arg5)); }; request = (URL_FRIENDS_TIMELINE + returnArgumentsString(_local6)); urlLoader.load(url); } public function getPublicTimeLine():void{ setGETRequest(); _returnType = RETURN_TYPE_STATUS; request = URL_PUBLIC_TIMELINE; urlLoader.load(url); } public function getStatus(_arg1:Number):void{ setGETRequest(); _returnType = RETURN_TYPE_STATUS; request = (((URL_SINGLE_TWEET + String(_arg1)) + ".") + DATA_FORMAT); urlLoader.load(url); } public function deleteList(_arg1:String):void{ var _local2:URLVariables = new URLVariables(); checkCredentials(); _returnType = RETURN_TYPE_LIST; _local2._method = "DELETE"; _local2.id = _arg1; setPOSTRequest(_local2); request = ((((("/" + _username) + "/lists/") + _arg1) + ".") + DATA_FORMAT); urlLoader.load(url); } public function dailyTrends():void{ _returnType = RETURN_TYPE_TRENDS_RESULTS; setGETRequest(); urlLoader.load(new URLRequest(URL_TWITTER_TRENDS_DAILY)); } public function createFriendship(_arg1:String, _arg2:Boolean=true):void{ var _local3:URLVariables = new URLVariables(); checkCredentials(); _returnType = RETURN_TYPE_USER_INFO; _local3.id = _arg1; _local3.follow = _arg2; _local3.format = DATA_FORMAT; setPOSTRequest(_local3); request = URL_CREATE_FRIENDSHIP; urlLoader.load(url); } public function blockUser(_arg1:String):void{ var _local2:URLVariables = new URLVariables(); checkCredentials(); _returnType = RETURN_TYPE_USER_INFO; _local2.id = _arg1; _local2.format = DATA_FORMAT; setPOSTRequest(_local2); request = URL_BLOCK_USER; urlLoader.load(url); } } }//package com.swfjunkie.tweetr
Section 237
//BeginEditingEvent (contraption.blocks.BeginEditingEvent) package contraption.blocks { import flash.events.*; public class BeginEditingEvent extends Event { public var block:EditableBlock; public static const BEGIN_EDITING:String = "beginEditing"; public function BeginEditingEvent(_arg1:EditableBlock){ super(BEGIN_EDITING); this.block = _arg1; } override public function clone():Event{ return (new BeginEditingEvent(block)); } } }//package contraption.blocks
Section 238
//Block (contraption.blocks.Block) package contraption.blocks { import contraption.*; import de.polygonal.ds.*; import flash.display.*; import flash.geom.*; import Box2D.Dynamics.*; import flash.utils.*; import flash.errors.*; public class Block extends ActionContainerImpl { protected var physicsBody:b2Body; public var jointedBlocks:Dictionary; protected var blockHeight:Number;// = 50 protected var blockBackground:Sprite; protected var blockForegroundCanvas:ActionContainerImpl; protected var blockRotation:Number;// = 0 protected var blockForeground:Sprite; protected var joints:SLinkedList; protected var blockWidth:Number;// = 50 public var isGoalBlock:Boolean; protected var physicsBodyDef:b2BodyDef; public var saveIndex:Number; protected var blockPosition:Point; protected var blockBackgroundCanvas:ActionContainerImpl; public static const CLOCKWISE:int = 0; public static const COUNTER_CLOCKWISE:int = -1; public function Block(_arg1:Boolean=false){ blockPosition = new Point(100, 100); blockForeground = new Sprite(); addChild(blockForeground); blockBackground = new Sprite(); this.isGoalBlock = _arg1; joints = new SLinkedList(); super(); } public function setRotation(_arg1:Number):void{ blockRotation = _arg1; rotation = (_arg1 * (180 / Math.PI)); if (blockBackground != null){ blockBackground.rotation = rotation; }; updatePhysicsBody(); } public function isJointedTo(_arg1:Block):Boolean{ var _local3:Iterator; var _local4:JointCollection; var _local2:SListIterator = joints.getListIterator(); while (_local2.hasNext()) { _local4 = (_local2.next() as JointCollection); if (_local4.isJointedTo(_arg1)){ return (true); }; }; return (false); } protected function setBlockCanvas():void{ reDrawBlock(); x = getPosition().x; y = getPosition().y; rotation = (getRotation() * (180 / Math.PI)); blockBackground.x = getPosition().x; blockBackground.y = getPosition().y; blockBackground.rotation = (getRotation() * (180 / Math.PI)); } public function setWidth(_arg1:Number):void{ blockWidth = _arg1; } public function updatePhysicsBody():void{ var _local1:b2World; if (physicsBody != null){ _local1 = physicsBody.m_world; _local1.DestroyBody(physicsBody); _local1.CleanBodyList(); generatePhysicsBody(_local1); }; } override protected function initAllowableActions():void{ allowableActions = new Actions(); allowableActions.move = true; allowableActions.delete_ = true; allowableActions.build = true; } public function collidesWithJointedBlocks():Boolean{ return (true); } public function getWidth():Number{ return (blockWidth); } protected function generatePhysicsBodyDef():b2BodyDef{ throw (new IllegalOperationError("You must extend Block and implement \"generatePhysicsBodyDef\"")); } public function moveWithJoint(_arg1:JointCollection, _arg2:Point):void{ setPosition(getPosition().add(_arg2)); setBlockCanvas(); } public function drawAnchor(_arg1:Point, _arg2:Sprite=null):void{ drawTypedAnchor(_arg1, JointType.PIN, _arg2); } public function getHeight():Number{ return (blockHeight); } public function getPosition():Point{ return (blockPosition); } public function setCollisionMaskBits(_arg1:int):void{ physicsBodyDef.shapes[0].maskBits = _arg1; } protected function getJointXml():XML{ var _local3:JointCollection; var _local4:Block; var _local1:XML = <joints/> ; var _local2:Iterator = joints.getIterator(); while (_local2.hasNext()) { _local3 = (_local2.next() as JointCollection); _local4 = _local3.getBlockJointedBeneath(this); if (_local4 != null){ _local1.appendChild((("<jointedTo>" + _local4.saveIndex) + "</jointedTo>")); }; }; return (_local1); } public function getClosestJointCollection(_arg1:Point):JointCollection{ var _local3:Iterator; var _local4:JointCollection; var _local7:Number; var _local2:Iterator = joints.getIterator(); var _local5:JointCollection; var _local6:Number = 1000000; while (_local2.hasNext()) { _local4 = (_local2.next() as JointCollection); _local7 = Point.distance(_local4.getPosition(), _arg1); if (_local7 < _local6){ _local6 = _local7; _local5 = _local4; }; }; return (_local5); } public function setHeight(_arg1:Number):void{ blockHeight = _arg1; } public function setPosition(_arg1:Point):void{ blockPosition = _arg1; x = _arg1.x; y = _arg1.y; if (blockBackground != null){ blockBackground.x = _arg1.x; blockBackground.y = _arg1.y; }; updatePhysicsBody(); } public function drawMotorAnchor(_arg1:Point, _arg2:Sprite=null):void{ drawTypedAnchor(_arg1, JointType.MOTOR_CLOCKWISE, _arg2); } public function getCollisionMaskBits():int{ return (physicsBodyDef.shapes[0].maskBits); } protected function drawBlock(_arg1:Sprite, _arg2:Sprite):void{ throw (new IllegalOperationError("You must extend Block and implement \"drawBlock\"")); } public function addJoints(_arg1:Dictionary):void{ var _local3:Iterator; var _local4:JointCollection; var _local2:SListIterator = joints.getListIterator(); while (_local2.hasNext()) { _local4 = (_local2.next() as JointCollection); _arg1[_local4] = _local4; }; } public function setCollisionCategoryBits(_arg1:int):void{ physicsBodyDef.shapes[0].categoryBits = _arg1; } public function getJointType():JointType{ return (JointType.PIN); } public function reDrawBlock():void{ if (blockForegroundCanvas != null){ blockForeground.removeChild(blockForegroundCanvas); }; if (blockBackgroundCanvas != null){ blockBackground.removeChild(blockBackgroundCanvas); }; blockForegroundCanvas = new ActionContainerImpl(); blockForegroundCanvas.setAllowableActions(getAllowableActions()); blockForeground.addChild(blockForegroundCanvas); blockBackgroundCanvas = new ActionContainerImpl(); blockBackgroundCanvas.setAllowableActions(getAllowableActions()); blockBackground.addChild(blockBackgroundCanvas); drawBlock(blockForegroundCanvas, blockBackgroundCanvas); } public function startJoints(_arg1:b2World):void{ var _local3:JointCollection; var _local2:Iterator = joints.getIterator(); while (_local2.hasNext()) { _local3 = (_local2.next() as JointCollection); _local3.startJoints(_arg1); }; } public function getClosestJointDistance(_arg1:Point):Number{ var _local3:Iterator; var _local4:JointCollection; var _local6:Number; var _local2:Iterator = joints.getIterator(); var _local5:Number = NaN; while (_local2.hasNext()) { _local4 = (_local2.next() as JointCollection); _local6 = Point.distance(_local4.getPosition(), _arg1); if ((((_local6 < _local5)) || (isNaN(_local5)))){ _local5 = _local6; }; }; return (_local5); } public function getCollisionCategoryBits():int{ return (physicsBodyDef.shapes[0].categoryBits); } public function destroyBlock(_arg1:b2World):void{ unjointBlock(); if (physicsBody != null){ _arg1.DestroyBody(physicsBody); }; physicsBody = null; } public function stopJoints(_arg1:b2World):void{ var _local3:Iterator; var _local4:JointCollection; var _local2:Iterator = joints.getIterator(); while (_local2.hasNext()) { _local4 = (_local2.next() as JointCollection); _local3 = _local4.getIterator(); while (_local3.hasNext()) { (_local3.next() as Joint).destroyPhysicsJoint(_arg1); }; }; } public function setJointedBlocks():void{ jointedBlocks = new Dictionary(); addJointedBlocks(jointedBlocks); } public function getPhysicsBody():b2Body{ return (physicsBody); } public function generatePhysicsBody(_arg1:b2World):b2Body{ var _local2:b2BodyDef = generatePhysicsBodyDef(); physicsBody = _arg1.CreateBody(_local2); return (physicsBody); } public function drawTypedAnchor(_arg1:Point, _arg2:JointType, _arg3:Sprite=null):void{ if (_arg3 == null){ _arg3 = blockForegroundCanvas; }; var _local4 = 12381585; var _local5 = 0x838383; if (_arg2 != JointType.PIN){ _local4 = 16724787; _local5 = 0xFFFFFF; }; _arg3.graphics.endFill(); _arg3.graphics.lineStyle(2, _local5); _arg3.graphics.drawCircle(_arg1.x, _arg1.y, 3); _arg3.graphics.lineStyle(0, 0, 0); } public function getXml():XML{ var _local1:XML = new XML(getXmlRoot()); if (!isNaN(saveIndex)){ _local1.@id = saveIndex; }; _local1.appendChild((("<rotation>" + getRotation()) + "</rotation>")); var _local2:XML = new XML(<position></position> ); _local2.appendChild((("<x>" + getPosition().x) + "</x>")); _local2.appendChild((("<y>" + getPosition().y) + "</y>")); _local1.appendChild(_local2); _local1.appendChild((("<width>" + getWidth()) + "</width>")); _local1.appendChild((("<height>" + getHeight()) + "</height>")); _local1.appendChild((("<goalBlock>" + isGoalBlock) + "</goalBlock>")); _local1.appendChild(getJointXml()); return (_local1); } protected function getXmlRoot():XML{ throw (new IllegalOperationError("You must extend EditableBlock and implement \"getXmlRoot\"")); } public function getBlockBackground():Sprite{ return (blockBackground); } protected function addJoint(_arg1:JointCollection):void{ joints.append(_arg1); } public function getDistance(_arg1:Point):Number{ throw (new IllegalOperationError("You must extend Block and implement \"getDistance\"")); } public function setFromXML(_arg1:XML):void{ setRotation(new Number(_arg1.rotation)); setWidth(new Number(_arg1.width)); setHeight(new Number(_arg1.height)); var _local2:Point = new Point(); _local2.x = new Number(_arg1.position.x); _local2.y = new Number(_arg1.position.y); setPosition(_local2); setBlockCanvas(); } public function addJointedBlocks(_arg1:Dictionary):void{ var _local3:JointCollection; var _local2:SListIterator = joints.getListIterator(); while (_local2.hasNext()) { _local3 = (_local2.next() as JointCollection); _local3.addJointedBlocks(_arg1); }; } public function getRotation():Number{ return (blockRotation); } public function updateFromPhysicsBody():void{ x = physicsBody.m_position.x; y = physicsBody.m_position.y; rotation = (physicsBody.m_rotation * (180 / Math.PI)); blockBackground.x = physicsBody.m_position.x; blockBackground.y = physicsBody.m_position.y; blockBackground.rotation = rotation; } public function getBlockForeground():MovieClip{ return (this); } public function replaceJointCollection(_arg1:JointCollection, _arg2:JointCollection):void{ var _local4:Iterator; var _local5:JointCollection; var _local3:SListIterator = joints.getListIterator(); while (_local3.hasNext()) { _local5 = (_local3.next() as JointCollection); if (_local5 == _arg1){ joints.insertAfter(_local3, _arg2); joints.remove(joints.nodeOf(_local5)); return; }; }; } protected function unjointBlock():void{ var _local2:JointCollection; var _local1:Iterator = joints.getIterator(); while (_local1.hasNext()) { _local2 = (_local1.next() as JointCollection); _local2.unjointBlock(this); }; } public function resetBlock(_arg1:b2World):void{ _arg1.DestroyBody(physicsBody); physicsBody = null; setBlockCanvas(); } } }//package contraption.blocks
Section 239
//BlockCollection (contraption.blocks.BlockCollection) package contraption.blocks { import de.polygonal.ds.*; import flash.geom.*; import Box2D.Dynamics.*; public class BlockCollection extends SLinkedList { public function deleteBlock(_arg1:b2World, _arg2:Block):void{ _arg2.destroyBlock(_arg1); remove(nodeOf(_arg2)); } protected function joinToJointCollection(_arg1:JointCollection, _arg2:Block):Joint{ var _local3:Joint; var _local4:JointType = _arg2.getJointType(); if ((((((((_arg1.getTopBlock() as Wheel)) && ((_arg1.getTopBlock() == _arg1.getBottomBlock())))) && ((_arg1.getTopBlock().getPosition().x == _arg1.position.x)))) && ((_arg1.getTopBlock().getPosition().y == _arg1.position.y)))){ _local4 = _arg1.getTopBlock().getJointType(); }; if ((((_arg2 as Wheel)) && (((!((_arg2.getPosition().x == _arg1.position.x))) || (!((_arg2.getPosition().y == _arg1.position.y))))))){ _local4 = JointType.PIN; }; if (((!((_local4 == JointType.PIN))) && ((_arg2 as Wheel)))){ if (_local4 == JointType.MOTOR_CLOCKWISE){ _local4 = JointType.MOTOR_COUNTER_CLOCKWISE; } else { if (_local4 == JointType.MOTOR_COUNTER_CLOCKWISE){ _local4 = JointType.MOTOR_CLOCKWISE; }; }; _local3 = new Joint(_arg1.getTopBlock(), _arg2, _arg1.position, _local4); _arg1.append(_local3); } else { _local3 = new Joint(_arg1.getTopBlock(), _arg2, _arg1.position, _local4); _arg1.append(_local3); }; _arg2.replaceJointCollection(_arg2.getClosestJointCollection(_arg1.position), _arg1); return (_local3); } public function getClosestJointCollection(_arg1:Point, _arg2:XML=null):JointCollection{ var _local3:Block; var _local7:Boolean; var _local8:Number; var _local9:int; var _local4:JointCollection; var _local5:Number = 10000000; var _local6:Iterator = getIterator(); while (_local6.hasNext()) { _local3 = (_local6.next() as Block); _local8 = _local3.getClosestJointDistance(_arg1); if (_local8 < _local5){ if (_arg2 != null){ _local7 = false; _local9 = 0; while (_local9 < _arg2.jointedTo.length()) { if (_arg2.jointedTo[_local9] == _local3.saveIndex){ _local7 = true; break; }; _local9++; }; } else { _local7 = true; }; if (_local7){ _local5 = _local8; _local4 = _local3.getClosestJointCollection(_arg1); }; }; }; return (_local4); } public function createWheel(_arg1:Point, _arg2:Number, _arg3:int, _arg4:Number=0, _arg5:Number=NaN, _arg6:Boolean=false, _arg7:Boolean=false, _arg8:XML=null):Wheel{ var _local11:Number; var _local9:Boolean; var _local10:JointCollection; _local10 = getClosestJointCollection(_arg1, _arg8); if (_local10 != null){ _local11 = Point.distance(_arg1, _local10.position); }; if (((((!((_local10 == null))) && (((_local11 * _arg2) < 10)))) && (!(_local10.containsWheel())))){ _local9 = true; }; if (_local9){ _arg1.x = _local10.position.x; _arg1.y = _local10.position.y; }; var _local12:Wheel = new Wheel(_arg1, _arg3, _arg4, _arg5, _arg6, _arg7); if (_local9){ joinToJointCollection(_local10, _local12); }; append(_local12); return (_local12); } public function getClosestBlock(_arg1:Point, _arg2:Boolean=true):Block{ var _local6:Block; var _local7:Number; var _local3:Number = 1000000; var _local4:Block; var _local5:Iterator = getIterator(); while (_local5.hasNext()) { _local6 = (_local5.next() as Block); _local7 = _local6.getDistance(_arg1); if ((((_local7 < _local3)) && (((_arg2) || (!(_local6.isGoalBlock)))))){ _local3 = _local7; _local4 = _local6; }; }; return (_local4); } public function createRod(_arg1:Point, _arg2:Point, _arg3:Number, _arg4:Function, _arg5:XML=null, _arg6:Boolean=false):Rod{ var _local10:Number; var _local12:Number; var _local7:Boolean; var _local8:Boolean; var _local9:JointCollection; var _local11:JointCollection; var _local13:Number = Math.atan2((_arg2.y - _arg1.y), (_arg2.x - _arg1.x)); var _local14:Number = Point.distance(_arg1, _arg2); if ((((_local14 < 20)) && (_arg6))){ _local14 = 20; _arg2.x = (_arg1.x + (Math.cos(_local13) * _local14)); _arg2.y = (_arg1.y + (Math.sin(_local13) * _local14)); }; _local9 = getClosestJointCollection(_arg1, _arg5); _local11 = getClosestJointCollection(_arg2, _arg5); if (_local9 != null){ _local10 = Point.distance(_arg1, _local9.position); }; if (_local11 != null){ _local12 = Point.distance(_arg2, _local11.position); }; if (((!((_local9 == null))) && (((_local10 * _arg3) < 10)))){ _local7 = true; }; if (((((!((_local11 == null))) && (((_local12 * _arg3) < 10)))) && (((!(_local7)) || (!((_local11 == _local9))))))){ _local8 = true; }; if (((((_local7) && (_local8))) && (_local11.sharesBlockWith(_local9)))){ _local8 = false; }; if (_local7){ _arg1.x = _local9.position.x; _arg1.y = _local9.position.y; }; if (_local8){ _arg2.x = _local11.position.x; _arg2.y = _local11.position.y; }; var _local15:Rod = _arg4(_arg1, _arg2); if (_local7){ joinToJointCollection(_local9, _local15); }; if (_local8){ joinToJointCollection(_local11, _local15); }; append(_local15); return (_local15); } protected function newSolidRod(_arg1:Point, _arg2:Point):Rod{ return (new SolidRod(_arg1, _arg2)); } protected function newHollowRod(_arg1:Point, _arg2:Point):Rod{ return (new Rod(_arg1, _arg2)); } public function createHollowRod(_arg1:Point, _arg2:Point, _arg3:Number, _arg4:XML=null, _arg5:Boolean=false):Rod{ return (createRod(_arg1, _arg2, _arg3, newHollowRod, _arg4, _arg5)); } public function createPlayerBlockFromXml(_arg1:XML, _arg2:Boolean):Block{ var _local3:Block; var _local7:Number; var _local8:Number; var _local4:Point = new Point(); var _local5:Point = new Point(); var _local6:Point = new Point(); var _local9:Boolean; _local6.x = new Number(_arg1.position.x); _local6.y = new Number(_arg1.position.y); _local8 = new Number(_arg1.rotation); _local7 = new Number(_arg1.width); _local9 = false; if (((!((_arg1.goalBlock == null))) && ((_arg1.goalBlock == "true")))){ _local9 = true; }; _local4.x = (_local6.x - ((Math.cos(_local8) * _local7) / 2)); _local4.y = (_local6.y - ((Math.sin(_local8) * _local7) / 2)); _local5.x = (_local6.x + ((Math.cos(_local8) * _local7) / 2)); _local5.y = (_local6.y + ((Math.sin(_local8) * _local7) / 2)); switch (_arg1.localName()){ case "HollowRod": _local3 = createHollowRod(_local4, _local5, 1, _arg1.joints[0]); break; case "SolidRod": _local3 = createSolidRod(_local4, _local5, 1, _arg1.joints[0]); break; case "ClockwiseWheel": _local3 = createWheel(_local6, 1, Wheel.CLOCKWISE, _local8, (_local7 / 2), _arg2, _local9, _arg1.joints[0]); break; case "CounterClockwiseWheel": _local3 = createWheel(_local6, 1, Wheel.COUNTER_CLOCKWISE, _local8, (_local7 / 2), _arg2, _local9, _arg1.joints[0]); break; case "NoSpinWheel": _local3 = createWheel(_local6, 1, Wheel.NO_SPIN, _local8, (_local7 / 2), _arg2, _local9, _arg1.joints[0]); break; case "JointedDynamicRectangle": _local3 = new JointedDynamicRectangle(_arg2, true); _local3.setFromXML(_arg1); append(_local3); break; default: throw (new ArgumentError("xml contains an unrecognized player block type")); }; _local3.saveIndex = _arg1.@id; return (_local3); } public function createSolidRod(_arg1:Point, _arg2:Point, _arg3:Number, _arg4:XML=null, _arg5:Boolean=false):Rod{ return (createRod(_arg1, _arg2, _arg3, newSolidRod, _arg4, _arg5)); } public static function createLevelBlockFromXml(_arg1:XML, _arg2:b2World, _arg3:Boolean):EditableBlock{ var _local4:EditableBlock; switch (_arg1.localName()){ case "DynamicRectangle": _local4 = new DynamicRectangle(_arg3); break; case "DynamicCircle": _local4 = new DynamicCircle(_arg3); break; case "StaticRectangle": _local4 = new StaticRectangle(_arg3); break; case "StaticCircle": _local4 = new StaticCircle(_arg3); break; default: throw (new ArgumentError("xml contains an unrecognized level block type")); }; _local4.setFromXML(_arg1); return (_local4); } } }//package contraption.blocks
Section 240
//BlockType (contraption.blocks.BlockType) package contraption.blocks { public class BlockType { public static const STATIC_CIRCLE:BlockType = new (BlockType); ; public static const WHEEL_NO_SPIN:BlockType = new (BlockType); ; public static const ROD_HOLLOW:BlockType = new (BlockType); ; public static const WHEEL_COUNTER_CLOCKWISE:BlockType = new (BlockType); ; public static const WHEEL_CLOCKWISE:BlockType = new (BlockType); ; public static const DYNAMIC_RECTANGLE:BlockType = new (BlockType); ; public static const DYNAMIC_CIRCLE:BlockType = new (BlockType); ; public static const ROD_SOLID:BlockType = new (BlockType); ; public static const STATIC_RECTANGLE:BlockType = new (BlockType); ; } }//package contraption.blocks
Section 241
//DeleteBlockEvent (contraption.blocks.DeleteBlockEvent) package contraption.blocks { import flash.events.*; public class DeleteBlockEvent extends Event { public var block:EditableBlock; public static const DELETE_BLOCK:String = "deleteBlock"; public function DeleteBlockEvent(_arg1:EditableBlock){ super(DELETE_BLOCK); this.block = _arg1; } override public function clone():Event{ return (new DeleteBlockEvent(block)); } } }//package contraption.blocks
Section 242
//DynamicCircle (contraption.blocks.DynamicCircle) package contraption.blocks { import flash.display.*; import flash.geom.*; import Box2D.Dynamics.*; import Box2D.Collision.Shapes.*; public class DynamicCircle extends EditableBlock { public function DynamicCircle(_arg1:Boolean, _arg2:Point=null){ super(_arg1, false, _arg2); generatePhysicsBodyDef(); } override protected function generatePhysicsBodyDef():b2BodyDef{ var _local1:b2BodyDef; var _local2:b2CircleDef; var _local3:b2Body; _local1 = new b2BodyDef(); _local2 = new b2CircleDef(); _local2.radius = getWidth(); _local2.density = 1; _local2.friction = 0.7; _local2.restitution = 0.2; _local2.categoryBits = ~(0); _local2.maskBits = ~(0); _local1.AddShape(_local2); _local1.position.x = getPosition().x; _local1.position.y = getPosition().y; _local1.userData = this; return (_local1); } override protected function drawBlock(_arg1:Sprite, _arg2:Sprite):void{ _arg1.graphics.beginFill(16353583); _arg1.graphics.drawCircle(0, 0, (getWidth() - 4)); _arg1.graphics.endFill(); _arg2.graphics.lineStyle(6, 12998156, 100); _arg2.graphics.drawCircle(0, 0, (getWidth() - 3)); } override protected function getXmlRoot():XML{ return (<DynamicCircle/> ); } override public function getHeight():Number{ return (getWidth()); } } }//package contraption.blocks
Section 243
//DynamicRectangle (contraption.blocks.DynamicRectangle) package contraption.blocks { import flash.display.*; import flash.geom.*; import Box2D.Dynamics.*; import Box2D.Collision.Shapes.*; public class DynamicRectangle extends UnstretchableBlock { public function DynamicRectangle(_arg1:Boolean, _arg2:Boolean=false, _arg3:Point=null){ super(_arg1, _arg2, _arg3); generatePhysicsBodyDef(); } override protected function generatePhysicsBodyDef():b2BodyDef{ var _local1:b2BoxDef; var _local2:b2BodyDef; var _local3:b2Body; _local1 = new b2BoxDef(); _local2 = new b2BodyDef(); _local1.extents.Set((getWidth() / 2), (getHeight() / 2)); _local1.density = 1; _local1.friction = 0.7; _local1.restitution = 0.2; _local1.categoryBits = getCategoryBits(); _local1.maskBits = getMaskBits(); _local1.userData = this; _local2.AddShape(_local1); _local2.userData = this; _local2.position.x = getPosition().x; _local2.position.y = getPosition().y; _local2.rotation = getRotation(); return (_local2); } protected function getCategoryBits():int{ return (~(0)); } override protected function getXmlRoot():XML{ return (<DynamicRectangle/> ); } protected function getMaskBits():int{ return (~(0)); } override protected function drawBlock(_arg1:Sprite, _arg2:Sprite):void{ _arg1.graphics.beginFill(16374319); if (isGoalBlock){ _arg1.graphics.beginFill(16737894); }; _arg1.graphics.drawRect(((-(getWidth()) / 2) + 4), ((-(getHeight()) / 2) + 4), (getWidth() - 8), (getHeight() - 8)); _arg1.graphics.endFill(); _arg2.graphics.lineStyle(6, 12998156, 100); _arg2.graphics.drawRect(((-(getWidth()) / 2) + 3), ((-(getHeight()) / 2) + 3), (getWidth() - 6), (getHeight() - 6)); } override public function getDistance(_arg1:Point):Number{ return (Point.distance(getPosition(), _arg1)); } } }//package contraption.blocks
Section 244
//EditableBlock (contraption.blocks.EditableBlock) package contraption.blocks { import flash.events.*; import contraption.*; import flash.display.*; import flash.geom.*; public class EditableBlock extends Block { protected var my0:Number; protected var moving:Boolean;// = false protected var rotateCorner:MovieClip; protected var rotating:Boolean;// = false protected var editing:Boolean; protected var deleteCorner:MovieClip; protected var mx0:Number; protected var resizing:Boolean;// = false protected var resizeCorner:MovieClip; public static var MIN_BLOCK_WIDTH:Number = 12; public function EditableBlock(_arg1:Boolean, _arg2:Boolean=false, _arg3:Point=null){ super(_arg2); if (_arg3 != null){ setPosition(_arg3); }; this.editing = _arg1; if (_arg1){ addEventListener(MouseEvent.MOUSE_DOWN, mouseDownM); }; setBlockCanvas(); } override protected function setBlockCanvas():void{ super.setBlockCanvas(); if (editing){ resizeCorner = newResizeCorner(); blockForegroundCanvas.addChild(resizeCorner); resizeCorner.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownR); resizeCorner.x = (getWidth() / 2); resizeCorner.y = (getHeight() / 2); rotateCorner = newRotateCorner(); blockForegroundCanvas.addChild(rotateCorner); rotateCorner.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownO); rotateCorner.x = (getWidth() / 2); rotateCorner.y = (-(getHeight()) / 2); deleteCorner = newDeleteCorner(); blockForegroundCanvas.addChild(deleteCorner); deleteCorner.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownD); deleteCorner.x = (-(getWidth()) / 2); deleteCorner.y = (getHeight() / 2); }; } protected function mouseDownM(_arg1:MouseEvent):void{ stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveM, false, 0, true); stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpM, false, 0, true); _arg1.stopPropagation(); mx0 = (parent.mouseX - getPosition().x); my0 = (parent.mouseY - getPosition().y); moving = true; this.dispatchEvent(new BeginEditingEvent(this)); } protected function mouseDownO(_arg1:MouseEvent):void{ stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveO, false, 0, true); stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpO, false, 0, true); _arg1.stopPropagation(); rotating = true; this.dispatchEvent(new BeginEditingEvent(this)); var _local2:ModeEvent = new ModeEvent(ModeEvent.START_ACTION, true, true); _local2.actionType = ModeEvent.ACTION_BUTTON; dispatchEvent(_local2); } protected function mouseDownR(_arg1:MouseEvent):void{ stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveR, false, 0, true); stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpR, false, 0, true); _arg1.stopPropagation(); resizing = true; this.dispatchEvent(new BeginEditingEvent(this)); var _local2:ModeEvent = new ModeEvent(ModeEvent.START_ACTION, true, true); _local2.actionType = ModeEvent.ACTION_BUTTON; dispatchEvent(_local2); } override protected function initAllowableActions():void{ allowableActions = new Actions(); if (editing){ allowableActions.move = true; } else { allowableActions.alwaysDrag = true; }; } protected function newRotateCorner():MovieClip{ var _local1:MovieClip = newCornerButton(); _local1.graphics.lineStyle(2, 0xFFFF); _local1.graphics.beginFill(0xFFFF, 0.5); _local1.graphics.drawRect(-6, -6, 12, 12); return (_local1); } protected function newDeleteCorner():MovieClip{ var _local1:MovieClip = newCornerButton(); _local1.graphics.lineStyle(2, 16733525); _local1.graphics.beginFill(0xFFFF, 0.5); _local1.graphics.drawRect(-6, -6, 12, 12); return (_local1); } protected function newResizeCorner():MovieClip{ var _local1:MovieClip = newCornerButton(); _local1.graphics.lineStyle(2, 0xFFFF00); _local1.graphics.beginFill(0xFFFF, 0.5); _local1.graphics.drawRect(-6, -6, 12, 12); return (_local1); } protected function mouseUpM(_arg1:MouseEvent):void{ moving = false; } protected function newCornerButton():ActionContainerImpl{ var _local1:ActionContainerImpl = new ActionContainerImpl(); var _local2:Actions = new Actions(); _local2.button = true; _local1.setAllowableActions(_local2); return (_local1); } protected function mouseUpR(_arg1:MouseEvent):void{ resizing = false; } protected function mouseUpO(_arg1:MouseEvent):void{ rotating = false; } protected function mouseMoveO(_arg1:MouseEvent):void{ if (!rotating){ return; }; var _local2:Number = Math.atan2((-1 * getHeight()), getWidth()); setRotation((Math.atan2((parent.mouseY - this.y), (parent.mouseX - this.x)) - _local2)); } protected function mouseMoveR(_arg1:MouseEvent):void{ if (!resizing){ return; }; var _local2:Number = (blockForeground.mouseX * 2); var _local3:Number = (blockForeground.mouseY * 2); if (_local2 < MIN_BLOCK_WIDTH){ _local2 = MIN_BLOCK_WIDTH; }; if (_local3 < MIN_BLOCK_WIDTH){ _local3 = MIN_BLOCK_WIDTH; }; setWidth(_local2); setHeight(_local3); setBlockCanvas(); } protected function mouseDownD(_arg1:MouseEvent):void{ _arg1.stopPropagation(); this.dispatchEvent(new DeleteBlockEvent(this)); } protected function mouseMoveM(_arg1:MouseEvent):void{ if (!moving){ return; }; setPosition(new Point((parent.mouseX - mx0), (parent.mouseY - my0))); } } }//package contraption.blocks
Section 245
//Joint (contraption.blocks.Joint) package contraption.blocks { import flash.geom.*; import Box2D.Dynamics.*; import Box2D.Dynamics.Joints.*; public class Joint { protected var physicsJoint:b2Joint;// = null public var jointType:JointType; public var block2:Block; public var position:Point; public var block1:Block; public function Joint(_arg1:Block, _arg2:Block, _arg3:Point, _arg4:JointType){ this.block1 = _arg1; this.block2 = _arg2; this.position = _arg3; this.jointType = _arg4; } public function connectsWheelMiddle():Boolean{ if ((((((block1 as Wheel)) && ((block1.getPosition().x == position.x)))) && ((block1.getPosition().y == position.y)))){ return (true); }; if ((((((block2 as Wheel)) && ((block2.getPosition().x == position.x)))) && ((block2.getPosition().y == position.y)))){ return (true); }; return (false); } protected function generatePhysicsJointDef():b2JointDef{ var _local1:b2RevoluteJointDef = new b2RevoluteJointDef(); _local1.body1 = block1.getPhysicsBody(); _local1.body2 = block2.getPhysicsBody(); _local1.anchorPoint.Set(position.x, position.y); _local1.collideConnected = true; if (jointType == JointType.MOTOR_CLOCKWISE){ _local1.motorTorque = 50000000; _local1.motorSpeed = -5; _local1.enableMotor = true; }; if (jointType == JointType.MOTOR_COUNTER_CLOCKWISE){ _local1.motorTorque = 50000000; _local1.motorSpeed = 5; _local1.enableMotor = true; }; if (jointType == JointType.WELD){ _local1.motorTorque = 50000000; _local1.motorSpeed = 0; _local1.enableMotor = true; }; return (_local1); } public function generatePhysicsJoint(_arg1:b2World):b2Joint{ if (physicsJoint == null){ physicsJoint = _arg1.CreateJoint(generatePhysicsJointDef()); }; return (physicsJoint); } public function setPosition(_arg1:Point):void{ position = _arg1; } public function destroyPhysicsJoint(_arg1:b2World):void{ if (physicsJoint != null){ _arg1.DestroyJoint(physicsJoint); physicsJoint = null; }; } public function getPosition():Point{ return (position); } } }//package contraption.blocks
Section 246
//JointCollection (contraption.blocks.JointCollection) package contraption.blocks { import de.polygonal.ds.*; import flash.geom.*; import Box2D.Dynamics.*; import flash.utils.*; public class JointCollection extends SLinkedList { protected var collisionMaskBitIndex:int;// = 0 public var position:Point; protected var collisionMaskBit:int;// = 1 protected var hasMoved:Boolean;// = false protected var firstBlock:Block; public function JointCollection(_arg1:Block, _arg2:Point){ this.firstBlock = _arg1; this.position = _arg2; } public function moveJoint(_arg1:Point):void{ var _local3:Joint; if (hasMoved){ return; }; hasMoved = true; getTopBlock().moveWithJoint(this, _arg1); var _local2:Iterator = getIterator(); while (_local2.hasNext()) { _local3 = (_local2.next() as Joint); _local3.block1.moveWithJoint(this, _arg1); }; setPosition(getPosition().add(_arg1)); hasMoved = false; } public function isJointedTo(_arg1:Block):Boolean{ var _local3:Joint; if (_arg1 == getTopBlock()){ return (true); }; var _local2:Iterator = getIterator(); while (_local2.hasNext()) { _local3 = (_local2.next() as Joint); if (_local3.block1 == _arg1){ return (true); }; if (_local3.block2 == _arg1){ return (true); }; }; return (false); } public function setPosition(_arg1:Point):void{ position = _arg1; var _local2:Iterator = getIterator(); while (_local2.hasNext()) { (_local2.next() as Joint).setPosition(position); }; } public function getBottomBlock():Block{ if (isEmpty()){ return (firstBlock); }; return ((head.data.block1 as Block)); } public function startJoints(_arg1:b2World):void{ var _local4:Joint; var _local2:Boolean; var _local3:Iterator = getIterator(); while (_local3.hasNext()) { _local4 = (_local3.next() as Joint); if ((((_local4.block2 as Wheel)) && (!((_local4.jointType == JointType.PIN))))){ _local2 = true; }; }; _local3 = getIterator(); while (_local3.hasNext()) { _local4 = (_local3.next() as Joint); _local4.generatePhysicsJoint(_arg1); }; } public function getTopBlock():Block{ if (isEmpty()){ return (firstBlock); }; return ((tail.data.block2 as Block)); } public function getBlockJointedBeneath(_arg1:Block):Block{ var _local3:Joint; var _local2:Iterator = getIterator(); while (_local2.hasNext()) { _local3 = (_local2.next() as Joint); if (_local3.block2 == _arg1){ return (_local3.block1); }; }; return (null); } public function containsWheel():Boolean{ var _local2:Joint; var _local1:Iterator = getIterator(); if ((getTopBlock() as Wheel)){ return (true); }; while (_local1.hasNext()) { _local2 = (_local1.next() as Joint); if ((_local2.block1 as Wheel)){ return (true); }; }; return (false); } public function addJointedBlocks(_arg1:Dictionary):void{ var _local3:Joint; var _local2:Iterator = getIterator(); while (_local2.hasNext()) { _local3 = (_local2.next() as Joint); _arg1[_local3.block1] = _local3.block1; _arg1[_local3.block2] = _local3.block2; }; } public function sharesBlockWith(_arg1:JointCollection):Boolean{ var _local3:Joint; if (_arg1.isJointedTo(getTopBlock())){ return (true); }; var _local2:Iterator = getIterator(); while (_local2.hasNext()) { _local3 = (_local2.next() as Joint); if (_arg1.isJointedTo(_local3.block1)){ return (true); }; if (_arg1.isJointedTo(_local3.block2)){ return (true); }; }; return (false); } public function unjointBlock(_arg1:Block):void{ var _local5:Joint; var _local2:Joint; var _local3:Joint; var _local4:Iterator = getIterator(); while (_local4.hasNext()) { _local5 = (_local4.next() as Joint); if (_local5.block1 == _arg1){ _local2 = _local5; }; if (_local5.block2 == _arg1){ _local3 = _local5; }; }; if ((((_local2 == null)) && ((_local3 == null)))){ return; }; if (((!((_local2 == null))) && ((_local3 == null)))){ firstBlock = _local2.block2; remove(nodeOf(_local2)); if ((((((_local2.jointType == JointType.MOTOR_CLOCKWISE)) && ((_local2.block2 as Wheel)))) && (!((tail == null))))){ (tail.data as Joint).jointType = JointType.MOTOR_COUNTER_CLOCKWISE; } else { if ((((((_local2.jointType == JointType.MOTOR_COUNTER_CLOCKWISE)) && ((_local2.block2 as Wheel)))) && (!((tail == null))))){ (tail.data as Joint).jointType = JointType.MOTOR_CLOCKWISE; }; }; return; }; if (((!((_local3 == null))) && ((_local2 == null)))){ firstBlock = _local3.block1; remove(nodeOf(_local3)); return; }; _local3.block2 = _local2.block2; remove(nodeOf(_local2)); if ((_arg1 as Wheel)){ _local3.jointType = JointType.PIN; } else { if (_local2.jointType != JointType.PIN){ _local3.jointType = _local2.jointType; }; }; } public function getPosition():Point{ return (position); } } }//package contraption.blocks
Section 247
//JointedDynamicRectangle (contraption.blocks.JointedDynamicRectangle) package contraption.blocks { import contraption.*; import flash.display.*; import flash.geom.*; public class JointedDynamicRectangle extends DynamicRectangle { public function JointedDynamicRectangle(_arg1:Boolean, _arg2:Boolean=false, _arg3:Point=null){ super(_arg1, _arg2, _arg3); } override protected function initAllowableActions():void{ if (editing){ return (super.initAllowableActions()); }; allowableActions = new Actions(); allowableActions.move = true; allowableActions.build = true; } override public function getDistance(_arg1:Point):Number{ var _local2:Point = getPosition(); var _local3:Number = getWidth(); var _local4:Number = getHeight(); var _local5:Point = parent.localToGlobal(_arg1); _local5 = globalToLocal(_local5); var _local6:Number = Point.distance(_local2, _local5); if ((((((((_local5.x > (-(_local3) / 2))) && ((_local5.x < (_local3 / 2))))) && ((_local5.y > (-(_local4) / 2))))) && ((_local5.y < (_local4 / 2))))){ if (_local6 > 7){ return (7); }; }; return (_local6); } override public function collidesWithJointedBlocks():Boolean{ return (false); } override protected function getXmlRoot():XML{ return (<JointedDynamicRectangle/> ); } override protected function getMaskBits():int{ return (~(16)); } override protected function drawBlock(_arg1:Sprite, _arg2:Sprite):void{ var _local3:Point; super.drawBlock(_arg1, _arg2); drawAnchor(new Point(0, 0)); drawAnchor(new Point((getWidth() / 2), (getHeight() / 2))); drawAnchor(new Point((-(getWidth()) / 2), (getHeight() / 2))); drawAnchor(new Point((getWidth() / 2), (-(getHeight()) / 2))); drawAnchor(new Point((-(getWidth()) / 2), (-(getHeight()) / 2))); } override protected function getCategoryBits():int{ return (1); } override public function setFromXML(_arg1:XML):void{ var _local5:Point; super.setFromXML(_arg1); var _local2:Point = getPosition(); var _local3:Number = getWidth(); var _local4:Number = getHeight(); var _local6:Number = getRotation(); var _local7:Point = new Point(); var _local8:Point = new Point(); _local7.x = ((Math.cos(_local6) * _local3) / 2); _local7.y = ((Math.sin(_local6) * _local3) / 2); _local8.x = ((Math.sin(_local6) * _local4) / 2); _local8.y = ((-(Math.cos(_local6)) * _local4) / 2); _local5 = new Point(_local2.x, _local2.y); addJoint(new JointCollection(this, _local5)); _local5 = _local2.add(_local7).add(_local8); addJoint(new JointCollection(this, _local5)); _local5 = _local2.subtract(_local7).add(_local8); addJoint(new JointCollection(this, _local5)); _local5 = _local2.add(_local7).subtract(_local8); addJoint(new JointCollection(this, _local5)); _local5 = _local2.subtract(_local7).subtract(_local8); addJoint(new JointCollection(this, _local5)); } } }//package contraption.blocks
Section 248
//JointType (contraption.blocks.JointType) package contraption.blocks { public class JointType { public static const MOTOR_COUNTER_CLOCKWISE:JointType = new (JointType); ; public static const PIN:JointType = new (JointType); ; public static const WELD:JointType = new (JointType); ; public static const MOTOR_CLOCKWISE:JointType = new (JointType); ; } }//package contraption.blocks
Section 249
//Rod (contraption.blocks.Rod) package contraption.blocks { import contraption.*; import de.polygonal.ds.*; import flash.display.*; import flash.geom.*; import Box2D.Dynamics.*; import Box2D.Collision.Shapes.*; public class Rod extends Block { protected var rodCanvas:Sprite; public var point1:Point; public var point2:Point; public function Rod(_arg1:Point, _arg2:Point){ this.point1 = _arg1; this.point2 = _arg2; setPositionFromPoints(); this.point1 = new Point(); this.point2 = new Point(); var _local3:Number = getRotation(); var _local4:Point = getPosition(); var _local5:Number = getWidth(); this.point1.x = (_local4.x - ((Math.cos(_local3) * _local5) / 2)); this.point1.y = (_local4.y - ((Math.sin(_local3) * _local5) / 2)); this.point2.x = (_local4.x + ((Math.cos(_local3) * _local5) / 2)); this.point2.y = (_local4.y + ((Math.sin(_local3) * _local5) / 2)); addJoint(new JointCollection(this, _arg1)); addJoint(new JointCollection(this, _arg2)); setBlockCanvas(); } override public function setRotation(_arg1:Number):void{ super.setRotation(_arg1); setPointsFromPosition(); } protected function setPositionFromPointsy():void{ super.setRotation(Math.atan2((point2.y - point1.y), (point2.x - point1.x))); var _local1:Number = Point.distance(point1, point2); if (_local1 < 1){ _local1 = 1; }; super.setWidth(_local1); super.setHeight(getHeight()); super.setPosition(new Point((point1.x + ((point2.x - point1.x) / 2)), (point1.y + ((point2.y - point1.y) / 2)))); } public function getMaskBits():int{ return (~(17)); } override public function setWidth(_arg1:Number):void{ super.setWidth(_arg1); setPointsFromPosition(); } public function doesJoinWheelMiddles():Boolean{ var _local2:Iterator; var _local3:JointCollection; var _local4:Boolean; var _local5:Joint; var _local1:Iterator = joints.getIterator(); while (_local1.hasNext()) { _local3 = (_local1.next() as JointCollection); _local2 = _local3.getIterator(); _local4 = false; while (_local2.hasNext()) { _local5 = (_local2.next() as Joint); if (_local5.connectsWheelMiddle()){ _local4 = true; }; }; if (!_local4){ return (false); }; }; return (true); } override protected function generatePhysicsBodyDef():b2BodyDef{ var _local3:b2Body; var _local1:b2BoxDef = new b2BoxDef(); var _local2:b2BodyDef = new b2BodyDef(); _local1.extents.Set((getWidth() / 2), (getHeight() / 2)); _local1.density = 1; _local1.friction = 0.7; _local1.restitution = 0.2; _local1.categoryBits = getCategoryBits(); _local1.maskBits = getMaskBits(); _local1.userData = this; _local2.AddShape(_local1); _local2.userData = this; _local2.position.x = getPosition().x; _local2.position.y = getPosition().y; _local2.rotation = getRotation(); _local2.linearDamping = 0.009; _local2.angularDamping = 0.2; return (_local2); } override public function moveWithJoint(_arg1:JointCollection, _arg2:Point):void{ if (Point.distance(_arg1.getPosition(), point1) < Point.distance(_arg1.getPosition(), point2)){ point1 = point1.add(_arg2); } else { point2 = point2.add(_arg2); }; setPositionFromPointsy(); setBlockCanvas(); } protected function getSimpleColour():int{ return (0xFF); } protected function drawSimpleBlock(_arg1:Sprite, _arg2:Sprite):void{ var _local3:Number = (getWidth() - 4); var _local4:Number = 8; _arg1.graphics.beginFill(getSimpleColour()); _arg1.graphics.drawRect((((-1 * _local3) / 2) + 2), ((-(_local4) / 2) + 2), (_local3 - 4), (_local4 - 4)); _arg1.graphics.endFill(); _arg2.graphics.lineStyle(4, getSimpleBackgroundColour()); _arg2.graphics.drawRect((((-1 * _local3) / 2) + 1), ((-(_local4) / 2) + 1), (_local3 - 2), (_local4 - 2)); drawAnchor(new Point(((-1 * getWidth()) / 2), 0)); drawAnchor(new Point((getWidth() / 2), 0)); } public function getCategoryBits():int{ return (16); } override public function getHeight():Number{ return (4); } override protected function getXmlRoot():XML{ return (<HollowRod/> ); } protected function getTile():Sprite{ return (new HollowRodGraphic()); } protected function drawFancyBlock(_arg1:Sprite, _arg2:Sprite):void{ var _local10:Sprite; var _local3:Number = (getWidth() - 4); var _local4:Number = getHeight(); _arg1.graphics.beginFill(0xFFFFFF, 0); _arg1.graphics.drawRect(((-(_local3) / 2) - 7), (-10 / 2), (_local3 + 14), 10); var _local5 = 100; var _local6:int = Math.ceil((_local3 / _local5)); rodCanvas = new Sprite(); _arg1.addChild(rodCanvas); var _local7:int; while (_local7 < _local6) { _local10 = getTile(); _local10.x = ((-(_local3) / 2) + (_local7 * _local5)); rodCanvas.addChild(_local10); _local10 = getTileBackground(); _local10.x = ((-(_local3) / 2) + (_local7 * _local5)); _arg2.addChild(_local10); _local7++; }; var _local8:Sprite = new Sprite(); _local8.graphics.beginFill(0xFF0000); _local8.graphics.drawRect(((-1 * _local3) / 2), -25, _local3, 50); rodCanvas.addChild(_local8); rodCanvas.mask = _local8; _local8 = new Sprite(); _local8.graphics.beginFill(0xFF0000); _local8.graphics.drawRect(((-1 * _local3) / 2), -25, _local3, 50); _arg2.addChild(_local8); _arg2.mask = _local8; var _local9:Sprite = new Sprite(); _arg1.addChild(_local9); drawAnchor(new Point(((-1 * getWidth()) / 2), 0), _local9); drawAnchor(new Point((getWidth() / 2), 0), _local9); } protected function getSimpleBackgroundColour():int{ return (0xFFFFFF); } override public function setPosition(_arg1:Point):void{ super.setPosition(_arg1); setPointsFromPosition(); } override protected function drawBlock(_arg1:Sprite, _arg2:Sprite):void{ if (Configuration.getInstance().isInSimpleGraphicsMode()){ drawSimpleBlock(_arg1, _arg2); } else { drawFancyBlock(_arg1, _arg2); }; } protected function getTileBackground():Sprite{ return (new HollowRodGraphicBG()); } override public function collidesWithJointedBlocks():Boolean{ return (false); } protected function setPointsFromPosition():void{ if (getPosition() == null){ return; }; if (point1 == null){ point1 = new Point(); }; if (point2 == null){ point2 = new Point(); }; var _local1:Number = getWidth(); point1.x = (getPosition().x - ((Math.cos(getRotation()) * _local1) / 2)); point1.y = (getPosition().y - ((Math.sin(getRotation()) * _local1) / 2)); point2.x = (getPosition().x + ((Math.cos(getRotation()) * _local1) / 2)); point2.y = (getPosition().y + ((Math.sin(getRotation()) * _local1) / 2)); } override public function getDistance(_arg1:Point):Number{ var _local9:Number; var _local12:Number; var _local13:Number; var _local2:Number = (((_arg1.x - point1.x) * (point2.x - point1.x)) + ((_arg1.y - point1.y) * (point2.y - point1.y))); var _local3:Number = (((point2.x - point1.x) * (point2.x - point1.x)) + ((point2.y - point1.y) * (point2.y - point1.y))); var _local4:Number = (_local2 / _local3); var _local5:Number = (point1.x + (_local4 * (point2.x - point1.x))); var _local6:Number = (point1.y + (_local4 * (point2.y - point1.y))); var _local7:Number = ((((point1.y - _arg1.y) * (point2.x - point1.x)) - ((point1.x - _arg1.x) * (point2.y - point1.y))) / _local3); var _local8:Number = (Math.abs(_local7) * Math.sqrt(_local3)); var _local10:Number = _local5; var _local11:Number = _local6; if ((((_local4 >= 0)) && ((_local4 <= 1)))){ _local9 = _local8; } else { _local12 = (((_arg1.x - point1.x) * (_arg1.x - point1.x)) + ((_arg1.y - point1.y) * (_arg1.y - point1.y))); _local13 = (((_arg1.x - point2.x) * (_arg1.x - point2.x)) + ((_arg1.y - point2.y) * (_arg1.y - point2.y))); if (_local12 < _local13){ _local10 = point1.x; _local11 = point1.y; _local9 = Math.sqrt(_local12); } else { _local10 = point2.x; _local11 = point2.y; _local9 = Math.sqrt(_local13); }; }; return (_local9); } protected function setPositionFromPoints():void{ super.setRotation(Math.atan2((point2.y - point1.y), (point2.x - point1.x))); super.setWidth(Point.distance(point1, point2)); super.setHeight(getHeight()); super.setPosition(new Point((point1.x + ((point2.x - point1.x) / 2)), (point1.y + ((point2.y - point1.y) / 2)))); } } }//package contraption.blocks
Section 250
//SolidRod (contraption.blocks.SolidRod) package contraption.blocks { import flash.display.*; import flash.geom.*; public class SolidRod extends Rod { public function SolidRod(_arg1:Point, _arg2:Point){ super(_arg1, _arg2); } override protected function getSimpleBackgroundColour():int{ return (0xB55900); } override protected function getTile():Sprite{ return (new SolidRodGraphic()); } override protected function getXmlRoot():XML{ return (<SolidRod/> ); } override public function getMaskBits():int{ return (~(16)); } override protected function getTileBackground():Sprite{ return (new SolidRodGraphicBG()); } override public function getCategoryBits():int{ return (0x0100); } override protected function getSimpleColour():int{ return (0x6B3400); } override public function getHeight():Number{ return (8); } } }//package contraption.blocks
Section 251
//StaticCircle (contraption.blocks.StaticCircle) package contraption.blocks { import flash.display.*; import flash.geom.*; import Box2D.Dynamics.*; import Box2D.Collision.Shapes.*; public class StaticCircle extends EditableBlock { public function StaticCircle(_arg1:Boolean, _arg2:Point=null){ super(_arg1, false, _arg2); generatePhysicsBodyDef(); } override protected function generatePhysicsBodyDef():b2BodyDef{ var _local1:b2BodyDef; var _local2:b2CircleDef; var _local3:b2Body; _local1 = new b2BodyDef(); _local2 = new b2CircleDef(); _local2.radius = getWidth(); _local2.friction = 0.7; _local2.categoryBits = ~(0); _local2.maskBits = ~(0); _local1.AddShape(_local2); _local1.position.x = getPosition().x; _local1.position.y = getPosition().y; _local1.userData = this; return (_local1); } override protected function drawBlock(_arg1:Sprite, _arg2:Sprite):void{ _arg1.graphics.beginFill(48641); _arg1.graphics.drawCircle(0, 0, (getWidth() - 4)); _arg1.graphics.endFill(); _arg2.graphics.lineStyle(6, 32777, 100); _arg2.graphics.drawCircle(0, 0, (getWidth() - 3)); } override protected function getXmlRoot():XML{ return (<StaticCircle/> ); } override public function getHeight():Number{ return (getWidth()); } } }//package contraption.blocks
Section 252
//StaticRectangle (contraption.blocks.StaticRectangle) package contraption.blocks { import flash.display.*; import flash.geom.*; import Box2D.Dynamics.*; import Box2D.Collision.Shapes.*; public class StaticRectangle extends EditableBlock { public function StaticRectangle(_arg1:Boolean, _arg2:Point=null){ super(_arg1, false, _arg2); generatePhysicsBodyDef(); } override protected function generatePhysicsBodyDef():b2BodyDef{ var _local2:b2BodyDef; var _local3:b2Body; var _local1:b2BoxDef = new b2BoxDef(); _local2 = new b2BodyDef(); _local1.extents.Set((getWidth() / 2), (getHeight() / 2)); _local1.friction = 0.7; _local1.categoryBits = ~(0); _local1.maskBits = ~(0); _local2.AddShape(_local1); _local2.userData = this; _local2.position.x = getPosition().x; _local2.position.y = getPosition().y; _local2.rotation = getRotation(); return (_local2); } override protected function drawBlock(_arg1:Sprite, _arg2:Sprite):void{ _arg1.graphics.beginFill(48641); _arg1.graphics.drawRect(((-(getWidth()) / 2) + 4), ((-(getHeight()) / 2) + 4), (getWidth() - 8), (getHeight() - 8)); _arg1.graphics.endFill(); _arg2.graphics.lineStyle(6, 32777, 100); _arg2.graphics.drawRect(((-(getWidth()) / 2) + 3), ((-(getHeight()) / 2) + 3), (getWidth() - 5), (getHeight() - 5)); } override protected function getXmlRoot():XML{ return (<StaticRectangle/> ); } } }//package contraption.blocks
Section 253
//UnstretchableBlock (contraption.blocks.UnstretchableBlock) package contraption.blocks { import de.polygonal.ds.*; import flash.geom.*; public class UnstretchableBlock extends EditableBlock { protected var hasMoved:Boolean;// = false public function UnstretchableBlock(_arg1:Boolean, _arg2:Boolean=false, _arg3:Point=null){ super(_arg1, _arg2, _arg3); } override public function moveWithJoint(_arg1:JointCollection, _arg2:Point):void{ var _local4:JointCollection; if (hasMoved){ return; }; hasMoved = true; super.moveWithJoint(_arg1, _arg2); var _local3:SListIterator = joints.getListIterator(); while (_local3.hasNext()) { _local4 = (_local3.next() as JointCollection); _local4.moveJoint(_arg2); }; hasMoved = false; } } }//package contraption.blocks
Section 254
//Wheel (contraption.blocks.Wheel) package contraption.blocks { import contraption.*; import flash.display.*; import flash.geom.*; import Box2D.Dynamics.*; import Box2D.Collision.Shapes.*; public class Wheel extends UnstretchableBlock { public var spinDirection:int; public var radius:Number;// = 20 public static const DEFAULT_RADIUS:int = 20; public static const CLOCKWISE:int = 0; public static const NO_SPIN:int = 1; public static const COUNTER_CLOCKWISE:int = -1; public function Wheel(_arg1:Point, _arg2:int, _arg3:Number=0, _arg4:Number=NaN, _arg5:Boolean=false, _arg6:Boolean=false){ super(_arg5, _arg6); if (((!(isNaN(_arg4))) && (_arg6))){ setRadius(_arg4); } else { _arg4 = getRadius(); }; setRotation(_arg3); setPosition(_arg1); this.spinDirection = _arg2; addJoint(new JointCollection(this, new Point(_arg1.x, _arg1.y))); addJoint(new JointCollection(this, getAnchorPoint(0))); addJoint(new JointCollection(this, getAnchorPoint((Math.PI / 2)))); addJoint(new JointCollection(this, getAnchorPoint(Math.PI))); addJoint(new JointCollection(this, getAnchorPoint(((Math.PI / 2) * 3)))); setBlockCanvas(); } override public function getDistance(_arg1:Point):Number{ var _local2:Number = Point.distance(getPosition(), _arg1); if (_local2 < getRadius()){ if (_local2 > 7){ _local2 = 7; } else { _local2 = (_local2 - getRadius()); }; }; return (_local2); } override public function setWidth(_arg1:Number):void{ radius = (_arg1 / 2); } protected function getAnchorPoint(_arg1:Number):Point{ return (getPosition().add(new Point((Math.cos((getRotation() + _arg1)) * getRadius()), (Math.sin((getRotation() + _arg1)) * getRadius())))); } public function getRadius():Number{ return (radius); } override public function setHeight(_arg1:Number):void{ radius = (_arg1 / 2); } override protected function getXmlRoot():XML{ if (spinDirection == CLOCKWISE){ return (<ClockwiseWheel/> ); }; if (spinDirection == COUNTER_CLOCKWISE){ return (<CounterClockwiseWheel/> ); }; return (<NoSpinWheel/> ); } override public function getJointType():JointType{ if (spinDirection == CLOCKWISE){ return (JointType.MOTOR_CLOCKWISE); }; if (spinDirection == COUNTER_CLOCKWISE){ return (JointType.MOTOR_COUNTER_CLOCKWISE); }; return (JointType.PIN); } override public function getWidth():Number{ return ((radius * 2)); } override protected function generatePhysicsBodyDef():b2BodyDef{ var _local3:b2Body; var _local1:b2BodyDef = new b2BodyDef(); var _local2:b2CircleDef = new b2CircleDef(); _local2.radius = getRadius(); _local2.density = 1; _local2.friction = 0.7; _local2.restitution = 0.2; _local2.categoryBits = 1; _local2.maskBits = ~(16); _local2.userData = this; _local1.AddShape(_local2); _local1.rotation = getRotation(); _local1.position.x = getPosition().x; _local1.position.y = getPosition().y; _local1.userData = this; return (_local1); } public function setRadius(_arg1:Number):void{ radius = _arg1; } override protected function drawBlock(_arg1:Sprite, _arg2:Sprite):void{ var _local5:int; var _local7:Point; var _local8:Sprite; var _local3:Number = getPosition().x; var _local4:Number = getPosition().y; if (isGoalBlock){ _arg1.graphics.beginFill(16737894); _arg1.graphics.drawCircle(0, 0, (getRadius() - 4)); _local5 = 12281446; } else { if (spinDirection == CLOCKWISE){ _local8 = new ClockwiseWheelGraphic(); _local5 = 16547843; } else { if (spinDirection == COUNTER_CLOCKWISE){ _local8 = new CounterClockwiseWheelGraphic(); _local5 = 13715365; } else { _local8 = new NonPoweredWheelGraphic(); _local5 = 682493; }; }; _arg1.addChild(_local8); _arg1.graphics.beginFill(0xFFFFFF, 0); _arg1.graphics.drawCircle(0, 0, getRadius()); }; _arg2.graphics.lineStyle(6, _local5, 100); _arg2.graphics.drawCircle(0, 0, (getRadius() - 3)); var _local6:Sprite = new Sprite(); _arg1.addChild(_local6); drawAnchor(new Point(getRadius(), 0), _local6); drawAnchor(new Point(0, getRadius()), _local6); drawAnchor(new Point((-1 * getRadius()), 0), _local6); drawAnchor(new Point(0, (-1 * getRadius())), _local6); drawMotorAnchor(new Point(0, 0), _local6); } override protected function initAllowableActions():void{ if (editing){ return (super.initAllowableActions()); }; allowableActions = new Actions(); allowableActions.move = true; allowableActions.build = true; if (!isGoalBlock){ allowableActions.delete_ = true; }; } override public function collidesWithJointedBlocks():Boolean{ return (false); } override public function getHeight():Number{ return ((radius * 2)); } } }//package contraption.blocks
Section 255
//OfficialLevels (contraption.data.OfficialLevels) package contraption.data { public class OfficialLevels { public static function getOfficialLevels():XML{ return (<officialLevels> <level1> <retrieveLevel> <levelId>91</levelId> <levelNumber>1</levelNumber> <name>Rolling Away</name> <level> <levelBlocks> <StaticCircle> <rotation>0</rotation> <position> <x>-155</x> <y>190</y> </position> <width>162</width> <height>162</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0</rotation> <position> <x>85</x> <y>135</y> </position> <width>348</width> <height>80</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>123</x> <y>296</y> </position> <width>192</width> <height>192</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-463.49999999999994</x> <y>-333.34999999999997</y> </position> <width>136</width> <height>136</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-254.64999999999998</x> <y>-432</y> </position> <width>173</width> <height>173</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0</rotation> <position> <x>-284.25</x> <y>-287.24999999999994</y> </position> <width>287.1</width> <height>94.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>402.1</x> <y>-64.99999999999999</y> </position> <width>141.6</width> <height>141.6</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>288.05000000000007</x> <y>-301.05</y> </position> <width>188.8</width> <height>188.8</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0.38529804259629785</rotation> <position> <x>242.75</x> <y>-118.10000000000001</y> </position> <width>277.6</width> <height>87.30000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>-229</x> <y>-31</y> </position> <width>40</width> <height>40</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>-154</x> <y>15</y> </position> <width>256</width> <height>188</height> </start> <end> <position> <x>153</x> <y>25</y> </position> <width>200</width> <height>200</height> </end> </level> </retrieveLevel> </level1> <level2> <retrieveLevel> <levelId>55</levelId> <levelNumber>2</levelNumber> <name>Reach Up</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>317</x> <y>277</y> </position> <width>622</width> <height>62</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>180</x> <y>-37.20000000000001</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0</rotation> <position> <x>-67.15</x> <y>27.15</y> </position> <width>122.8</width> <height>120</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>555.75</x> <y>408.6</y> </position> <width>137.20000000000002</width> <height>125.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-27.149999999999984</x> <y>350</y> </position> <width>134.3</width> <height>122.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>758.5500000000001</x> <y>-21.4</y> </position> <width>128.6</width> <height>111.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>884.3000000000001</x> <y>257.1</y> </position> <width>205.7</width> <height>168.60000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>629.45</x> <y>277.2</y> </position> <width>32</width> <height>32</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> </levelBlocks> <playerBlocks> <JointedDynamicRectangle id="0"> <rotation>0</rotation> <position> <x>268.25</x> <y>100.5</y> </position> <width>28</width> <height>30</height> <goalBlock>true</goalBlock> <joints/> </JointedDynamicRectangle> <NoSpinWheel id="1"> <rotation>0</rotation> <position> <x>38.900000000000006</x> <y>225.10000000000002</y> </position> <width>40</width> <height>40</height> <goalBlock>false</goalBlock> <joints/> </NoSpinWheel> <NoSpinWheel id="2"> <rotation>0</rotation> <position> <x>134.05</x> <y>225.10000000000002</y> </position> <width>40</width> <height>40</height> <goalBlock>false</goalBlock> <joints/> </NoSpinWheel> <SolidRod id="3"> <rotation>0</rotation> <position> <x>86.47500000000001</x> <y>225.10000000000002</y> </position> <width>95.15</width> <height>8</height> <goalBlock>false</goalBlock> <joints> <jointedTo>1</jointedTo> <jointedTo>2</jointedTo> </joints> </SolidRod> <SolidRod id="4"> <rotation>-2.2225965468532523</rotation> <position> <x>111.025</x> <y>194.925</y> </position> <width>75.91261423505321</width> <height>8</height> <goalBlock>false</goalBlock> <joints> <jointedTo>3</jointedTo> </joints> </SolidRod> <SolidRod id="5"> <rotation>2.2537675358563143</rotation> <position> <x>63.45</x> <y>194.925</y> </position> <width>77.80059447073656</width> <height>8</height> <goalBlock>false</goalBlock> <joints> <jointedTo>4</jointedTo> <jointedTo>3</jointedTo> </joints> </SolidRod> </playerBlocks> <start> <position> <x>201.75</x> <y>160.9</y> </position> <width>379.5</width> <height>197.1</height> </start> <end> <position> <x>554.25</x> <y>73.5</y> </position> <width>148</width> <height>142</height> </end> </level> </retrieveLevel> </level2> <level3> <retrieveLevel> <levelId>16</levelId> <levelNumber>3</levelNumber> <name>Mind The Gap</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>94.75</x> <y>228.35</y> </position> <width>412</width> <height>92</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>528.8</x> <y>229.4</y> </position> <width>254</width> <height>90</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>-101.3</x> <y>231.75</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>662.1</x> <y>279.1</y> </position> <width>93.4</width> <height>93.4</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>27.75</x> <y>27.749999999999996</y> </position> <width>61.3</width> <height>61.3</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>2.050224006112992</rotation> <position> <x>640.1500000000001</x> <y>35.8</y> </position> <width>42.3</width> <height>68.60000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>444.1</x> <y>268.8</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>158.4</x> <y>316.8</y> </position> <width>96.4</width> <height>96.4</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>521.45</x> <y>305.5500000000001</y> </position> <width>71.5</width> <height>71.5</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>171</x> <y>106</y> </position> <width>26</width> <height>26</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>90</x> <y>109</y> </position> <width>404</width> <height>166</height> </start> <end> <position> <x>562.8000000000001</x> <y>123.4</y> </position> <width>159.10000000000002</width> <height>135.70000000000002</height> </end> </level> </retrieveLevel> </level3> <level4> <retrieveLevel> <levelId>102</levelId> <levelNumber>4</levelNumber> <name>Junkyard</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>243</x> <y>280</y> </position> <width>778</width> <height>68</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>254.99999999999997</x> <y>117.24999999999999</y> </position> <width>25</width> <height>58.400000000000006</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0.032246882435253865</rotation> <position> <x>284.54999999999995</x> <y>216</y> </position> <width>39.3</width> <height>40.8</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicCircle> <rotation>0</rotation> <position> <x>321.15</x> <y>178.65</y> </position> <width>18</width> <height>18</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicRectangle> <rotation>0</rotation> <position> <x>364</x> <y>217</y> </position> <width>48</width> <height>46</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>202.25</x> <y>178.45</y> </position> <width>21.700000000000003</width> <height>36.7</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>431.25</x> <y>208.75</y> </position> <width>29.700000000000003</width> <height>42</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>404</x> <y>110</y> </position> <width>23.400000000000002</width> <height>56.7</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>339.45000000000005</x> <y>110.25</y> </position> <width>20</width> <height>20.1</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>240.35000000000002</x> <y>168.35000000000002</y> </position> <width>39.6</width> <height>29.700000000000003</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>367.1</x> <y>158.70000000000002</y> </position> <width>26.700000000000003</width> <height>41.800000000000004</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicCircle> <rotation>0</rotation> <position> <x>404.35</x> <y>164.00000000000003</y> </position> <width>17.3</width> <height>17.3</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicRectangle> <rotation>0</rotation> <position> <x>161.10000000000002</x> <y>220.45000000000002</y> </position> <width>51.800000000000004</width> <height>18.400000000000002</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>466.65000000000003</x> <y>162.3</y> </position> <width>52</width> <height>29.700000000000003</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>492.65000000000003</x> <y>213</y> </position> <width>59.300000000000004</width> <height>37.1</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>472.35</x> <y>102.65</y> </position> <width>58.400000000000006</width> <height>25.1</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>240.35</x> <y>219.45000000000002</y> </position> <width>41.7</width> <height>28.3</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-203.85000000000005</x> <y>280.49999999999994</y> </position> <width>240.20000000000002</width> <height>67.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>-180.75000000000003</x> <y>222.05</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>-235.35000000000002</x> <y>207.5</y> </position> <width>29.1</width> <height>78.30000000000001</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicCircle> <rotation>0</rotation> <position> <x>-190.75000000000003</x> <y>166.50000000000003</y> </position> <width>31</width> <height>31</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicRectangle> <rotation>0</rotation> <position> <x>-289.95</x> <y>230.25000000000003</y> </position> <width>61.900000000000006</width> <height>32.800000000000004</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicCircle> <rotation>0</rotation> <position> <x>-291.8</x> <y>195.70000000000002</y> </position> <width>18.2</width> <height>18.2</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicRectangle> <rotation>-0.20477186860842284</rotation> <position> <x>-276.35</x> <y>157.45000000000005</y> </position> <width>85.5</width> <height>32.7</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0.017512709110314773</rotation> <position> <x>-212.55</x> <y>109.14999999999999</y> </position> <width>69.2</width> <height>51</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-14.200000000000045</x> <y>420.4000000000001</y> </position> <width>660.7</width> <height>60</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>-189.9</x> <y>365.84999999999997</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>-36.99999999999999</x> <y>374.95</y> </position> <width>29.1</width> <height>30.900000000000002</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>-37.90000000000002</x> <y>344.05</y> </position> <width>60.1</width> <height>30.900000000000002</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>-110.70000000000005</x> <y>356.75000000000006</y> </position> <width>54.6</width> <height>67.3</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>32.199999999999996</x> <y>378.55</y> </position> <width>60</width> <height>23.700000000000003</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0.39204627244228374</rotation> <position> <x>91.25000000000001</x> <y>358.6</y> </position> <width>74.7</width> <height>38.2</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>25.800000000000004</x> <y>353.05000000000007</y> </position> <width>25.5</width> <height>27.3</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>-0.5044164118269181</rotation> <position> <x>145.94999999999996</x> <y>362.20000000000005</y> </position> <width>18.2</width> <height>56.400000000000006</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>240.55</x> <y>356.7</y> </position> <width>76.4</width> <height>67.4</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>-150.75</x> <y>378.55</y> </position> <width>18.2</width> <height>23.700000000000003</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicCircle> <rotation>0</rotation> <position> <x>184.15</x> <y>372.1500000000001</y> </position> <width>18.2</width> <height>18.2</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>-153.45000000000002</x> <y>356.70000000000005</y> </position> <width>10.9</width> <height>10.9</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>7</x> <y>173</y> </position> <width>40</width> <height>40</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>-4</x> <y>160</y> </position> <width>280</width> <height>190</height> </start> <end> <position> <x>572</x> <y>152</y> </position> <width>100</width> <height>208</height> </end> </level> </retrieveLevel> </level4> <level5> <retrieveLevel> <levelId>31</levelId> <levelNumber>5</levelNumber> <name>The Wall</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>110.2</x> <y>287.6</y> </position> <width>467.1</width> <height>87.60000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>740.8</x> <y>273.70000000000005</y> </position> <width>480.3</width> <height>61.3</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>490.25</x> <y>337.9000000000001</y> </position> <width>1129.9</width> <height>90.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>291.25</x> <y>159.1</y> </position> <width>29.200000000000003</width> <height>32.1</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>252.54999999999995</x> <y>162.8</y> </position> <width>35.1</width> <height>40.900000000000006</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>289.05</x> <y>193.4</y> </position> <width>27.8</width> <height>35</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>251.75</x> <y>202.2</y> </position> <width>24.8</width> <height>38</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>290.55</x> <y>227</y> </position> <width>30.6</width> <height>32.1</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>253.30000000000004</x> <y>232.9</y> </position> <width>32.1</width> <height>19</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>294.20000000000005</x> <y>100</y> </position> <width>33.6</width> <height>30.700000000000003</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>255.44999999999993</x> <y>101.45</y> </position> <width>26.200000000000003</width> <height>27.8</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>273.74999999999994</x> <y>129.95</y> </position> <width>71.5</width> <height>23.3</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>328.50000000000006</x> <y>111.7</y> </position> <width>32.1</width> <height>30.700000000000003</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>325.55</x> <y>148.15</y> </position> <width>30.700000000000003</width> <height>36.5</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>325.55000000000007</x> <y>183.95</y> </position> <width>30.6</width> <height>33.6</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>324.75000000000006</x> <y>223.35</y> </position> <width>23.3</width> <height>40.900000000000006</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>-72.25000000000001</x> <y>330.65</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>989.05</x> <y>310.2</y> </position> <width>67.10000000000001</width> <height>67.10000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-111.70000000000002</x> <y>12.399999999999991</y> </position> <width>77.9</width> <height>77.9</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>135.25</x> <y>-28.95000000000001</y> </position> <width>31.6</width> <height>31.6</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>93.9</x> <y>-49.650000000000006</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-13.149999999999997</x> <y>-71.55</y> </position> <width>70.60000000000001</width> <height>70.60000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-101.95000000000002</x> <y>-97.05</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>61.09999999999998</x> <y>-110.45000000000002</y> </position> <width>36.5</width> <height>36.5</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>-0.5742878193317579</rotation> <position> <x>795.9000000000002</x> <y>-7.100000000000001</y> </position> <width>80.30000000000001</width> <height>82.80000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.4531278240870904</rotation> <position> <x>548.9</x> <y>-20.450000000000006</y> </position> <width>70.4</width> <height>55.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.005127687802247816</rotation> <position> <x>603.65</x> <y>-42.349999999999994</y> </position> <width>77.80000000000001</width> <height>70.60000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.38987614128793013</rotation> <position> <x>663.25</x> <y>-35.099999999999994</y> </position> <width>82.80000000000001</width> <height>75.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.42419355299901373</rotation> <position> <x>726.5</x> <y>-38.7</y> </position> <width>92.5</width> <height>75.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> </levelBlocks> <playerBlocks> <JointedDynamicRectangle id="0"> <rotation>0</rotation> <position> <x>29</x> <y>158</y> </position> <width>28</width> <height>30</height> <goalBlock>true</goalBlock> <joints/> </JointedDynamicRectangle> </playerBlocks> <start> <position> <x>14</x> <y>153</y> </position> <width>274</width> <height>194</height> </start> <end> <position> <x>611.7</x> <y>151.85</y> </position> <width>200</width> <height>200</height> </end> </level> </retrieveLevel> </level5> <level6> <retrieveLevel> <levelId>89</levelId> <levelNumber>6</levelNumber> <name>On a Roll</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>-290</x> <y>230</y> </position> <width>816</width> <height>58</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <DynamicCircle> <rotation>0</rotation> <position> <x>-338</x> <y>119</y> </position> <width>82</width> <height>82</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <StaticRectangle> <rotation>-0.4911863378316689</rotation> <position> <x>-586.1499999999997</x> <y>68.69999999999997</y> </position> <width>64.9</width> <height>31</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.790117623877445</rotation> <position> <x>-618.65</x> <y>40.45</y> </position> <width>87.5</width> <height>33.9</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-661.0500000000002</x> <y>37.650000000000006</y> </position> <width>84.7</width> <height>25.400000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.8298537316689694</rotation> <position> <x>-685.0500000000001</x> <y>60.300000000000004</y> </position> <width>60.800000000000004</width> <height>27.200000000000003</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-394.2</x> <y>-137.45000000000005</y> </position> <width>22.6</width> <height>56.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.40323852203169236</rotation> <position> <x>-418.2</x> <y>-151.60000000000002</y> </position> <width>59.300000000000004</width> <height>28.3</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.31018911492659573</rotation> <position> <x>-416.75000000000006</x> <y>-172.70000000000002</y> </position> <width>22.6</width> <height>56.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.16229887623745093</rotation> <position> <x>-439.29999999999995</x> <y>-184.04999999999998</y> </position> <width>62.2</width> <height>19.700000000000003</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.45018601367763234</rotation> <position> <x>-18.550000000000015</x> <y>-110.64999999999999</y> </position> <width>84.80000000000001</width> <height>28.3</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.5698629937964668</rotation> <position> <x>-62.35</x> <y>-121.94999999999999</y> </position> <width>84.7</width> <height>22.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.1560780599440067</rotation> <position> <x>-107.60000000000002</x> <y>-117.75000000000004</y> </position> <width>87.5</width> <height>22.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.45234394718667875</rotation> <position> <x>22.349999999999966</x> <y>-100.75</y> </position> <width>70.60000000000001</width> <height>22.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.41422262451345127</rotation> <position> <x>118.40000000000002</x> <y>248.00000000000003</y> </position> <width>25.400000000000002</width> <height>73.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.8628470922264423</rotation> <position> <x>149.45</x> <y>232.50000000000003</y> </position> <width>74.5</width> <height>25.700000000000003</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.10371808350983186</rotation> <position> <x>180.25000000000003</x> <y>237.90000000000006</y> </position> <width>69.9</width> <height>16.900000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.5447021293342041</rotation> <position> <x>-260</x> <y>262.15000000000003</y> </position> <width>84.5</width> <height>25</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.7553069146140182</rotation> <position> <x>-276.95000000000005</x> <y>280.49999999999994</y> </position> <width>24.1</width> <height>66.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.7440872017124346</rotation> <position> <x>-268.45</x> <y>311</y> </position> <width>58.6</width> <height>18.400000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-271.2</x> <y>333.95000000000005</y> </position> <width>12.9</width> <height>56.800000000000004</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>1.8495910970201173</rotation> <position> <x>-701</x> <y>231.3</y> </position> <width>93.5</width> <height>42.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.5620757484096769</rotation> <position> <x>-703.75</x> <y>284.5</y> </position> <width>94.30000000000001</width> <height>36.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.6863295277912818</rotation> <position> <x>-701.0500000000001</x> <y>319.35</y> </position> <width>23.8</width> <height>55</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>1.8317160080084676</rotation> <position> <x>-685.5000000000001</x> <y>331.30000000000007</y> </position> <width>16</width> <height>59</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>-248.70000000000002</x> <y>-20.25</y> </position> <width>40</width> <height>40</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>-385.5</x> <y>19.75</y> </position> <width>386.90000000000003</width> <height>189.3</height> </start> <end> <position> <x>10.100000000000001</x> <y>22.900000000000002</y> </position> <width>155.8</width> <height>194.3</height> </end> </level> </retrieveLevel> </level6> <level7> <retrieveLevel> <levelId>88</levelId> <levelNumber>7</levelNumber> <name>Full-up</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>-268</x> <y>202</y> </position> <width>636</width> <height>116</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>380</x> <y>195</y> </position> <width>310</width> <height>94</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <DynamicCircle> <rotation>0</rotation> <position> <x>-116</x> <y>-110</y> </position> <width>86</width> <height>86</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <StaticRectangle> <rotation>0</rotation> <position> <x>-118</x> <y>-4</y> </position> <width>28</width> <height>40</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>245.29999999999998</x> <y>306.6</y> </position> <width>56</width> <height>56</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0</rotation> <position> <x>140</x> <y>626</y> </position> <width>520</width> <height>134</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-335.65</x> <y>435.05000000000007</y> </position> <width>500</width> <height>515.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>416.6500000000001</x> <y>438.75</y> </position> <width>236.20000000000002</width> <height>507.90000000000003</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>125.20000000000003</x> <y>394.05000000000007</y> </position> <width>94.9</width> <height>94.9</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>153.3</x> <y>540.3500000000001</y> </position> <width>18.1</width> <height>18.1</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>239.15</x> <y>499.9</y> </position> <width>64.60000000000001</width> <height>64.60000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-14.200000000000001</x> <y>485.8000000000001</y> </position> <width>72.7</width> <height>72.7</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>89.75</x> <y>521.1500000000001</y> </position> <width>38.400000000000006</width> <height>38.400000000000006</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>3.9499999999999957</x> <y>387.90000000000003</y> </position> <width>26.200000000000003</width> <height>26.200000000000003</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>259.34999999999997</x> <y>399.00000000000006</y> </position> <width>40.400000000000006</width> <height>40.400000000000006</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> </levelBlocks> <playerBlocks> <JointedDynamicRectangle id="0"> <rotation>0</rotation> <position> <x>-469</x> <y>98</y> </position> <width>82</width> <height>20</height> <goalBlock>true</goalBlock> <joints/> </JointedDynamicRectangle> </playerBlocks> <start> <position> <x>-319</x> <y>53</y> </position> <width>490</width> <height>216</height> </start> <end> <position> <x>375</x> <y>70</y> </position> <width>200</width> <height>200</height> </end> </level> </retrieveLevel> </level7> <level8> <retrieveLevel> <levelId>86</levelId> <levelNumber>8</levelNumber> <name>Higher</name> <level> <levelBlocks> <StaticCircle> <rotation>0</rotation> <position> <x>-266</x> <y>316</y> </position> <width>102</width> <height>102</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-126</x> <y>353</y> </position> <width>120</width> <height>120</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-35</x> <y>293</y> </position> <width>64</width> <height>64</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>136</x> <y>305</y> </position> <width>140</width> <height>140</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>348</x> <y>218</y> </position> <width>164</width> <height>164</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>547</x> <y>194</y> </position> <width>96</width> <height>96</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>633</x> <y>248</y> </position> <width>46</width> <height>46</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-358</x> <y>384</y> </position> <width>66</width> <height>66</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-435</x> <y>388</y> </position> <width>36</width> <height>36</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-290</x> <y>-181</y> </position> <width>62</width> <height>62</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>215</x> <y>-170</y> </position> <width>24</width> <height>24</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-401</x> <y>-163</y> </position> <width>16</width> <height>16</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-358</x> <y>-190</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>174</x> <y>-194</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-81</x> <y>-238</y> </position> <width>114</width> <height>114</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-199</x> <y>-225</y> </position> <width>74</width> <height>74</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>84</x> <y>-263</y> </position> <width>104</width> <height>104</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>17</x> <y>-180</y> </position> <width>18</width> <height>18</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> </levelBlocks> <playerBlocks> <JointedDynamicRectangle id="0"> <rotation>0</rotation> <position> <x>-217</x> <y>68</y> </position> <width>34</width> <height>36</height> <goalBlock>true</goalBlock> <joints/> </JointedDynamicRectangle> </playerBlocks> <start> <position> <x>-39</x> <y>141</y> </position> <width>454</width> <height>222</height> </start> <end> <position> <x>-39</x> <y>-23</y> </position> <width>454</width> <height>100</height> </end> </level> </retrieveLevel> </level8> <level9> <retrieveLevel> <levelId>100</levelId> <levelNumber>9</levelNumber> <name>Around the Bend</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>-191.90000000000003</x> <y>33.85</y> </position> <width>482.5</width> <height>101.60000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-184.85000000000002</x> <y>299.1500000000001</y> </position> <width>869.1</width> <height>84.60000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>290.6</x> <y>176.35000000000002</y> </position> <width>101.5</width> <height>330.20000000000005</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-647.6000000000001</x> <y>413.3499999999999</y> </position> <width>110</width> <height>313.20000000000005</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-384.05000000000007</x> <y>74.65</y> </position> <width>98.2</width> <height>141.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>328.3999999999999</x> <y>60.84999999999999</y> </position> <width>160.9</width> <height>98.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-696.15</x> <y>518.25</y> </position> <width>164.9</width> <height>102.10000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-344.45000000000005</x> <y>-279.90000000000003</y> </position> <width>969.6</width> <height>137.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>59.94999999999996</x> <y>-442.35</y> </position> <width>161</width> <height>255.10000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-746.8</x> <y>-93.00000000000003</y> </position> <width>164.8</width> <height>365.1</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <DynamicCircle> <rotation>0</rotation> <position> <x>307.3</x> <y>-16.85</y> </position> <width>27.5</width> <height>27.5</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>-744.7500000000001</x> <y>436.5</y> </position> <width>31.400000000000002</width> <height>31.400000000000002</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>-365.95</x> <y>-44.4</y> </position> <width>27.5</width> <height>27.5</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>-65.6000000000001</x> <y>-376.15000000000003</y> </position> <width>27.5</width> <height>27.5</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>99.30000000000008</x> <y>-601.3000000000001</y> </position> <width>31.400000000000002</width> <height>31.400000000000002</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>-638.8000000000001</x> <y>-379.55</y> </position> <width>31.400000000000002</width> <height>31.400000000000002</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>-436.7</x> <y>228.95000000000002</y> </position> <width>27.5</width> <height>27.5</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>-174.65000000000003</x> <y>-64.10000000000002</y> </position> <width>40</width> <height>40</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>-191.9</x> <y>-126.95</y> </position> <width>434.6</width> <height>279.40000000000003</height> </start> <end> <position> <x>-187.65</x> <y>180.60000000000002</y> </position> <width>460</width> <height>220.10000000000002</height> </end> </level> </retrieveLevel> </level9> <level10> <retrieveLevel> <levelId>17</levelId> <levelNumber>10</levelNumber> <name>Up The Hump</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>318.45</x> <y>278.6</y> </position> <width>873.8000000000001</width> <height>133.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>351.55000000000007</x> <y>213.95</y> </position> <width>102.2</width> <height>102.2</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0.364926276337564</rotation> <position> <x>-11.900000000000007</x> <y>347.40000000000003</y> </position> <width>139.5</width> <height>61.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.16829401120136167</rotation> <position> <x>185.15</x> <y>353.90000000000003</y> </position> <width>113.6</width> <height>73</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.4720399232666762</rotation> <position> <x>718.0500000000001</x> <y>349</y> </position> <width>112.4</width> <height>63</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.056705940703367985</rotation> <position> <x>546</x> <y>359.50000000000006</y> </position> <width>123.3</width> <height>56.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.4676269911188695</rotation> <position> <x>362.75</x> <y>362</y> </position> <width>66.5</width> <height>95.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.24992450923689735</rotation> <position> <x>-126.95000000000002</x> <y>270.65</y> </position> <width>45</width> <height>60.1</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>664.45</x> <y>22.94999999999999</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>81.2</x> <y>14.300000000000011</y> </position> <width>37.4</width> <height>37.4</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> </levelBlocks> <playerBlocks> <JointedDynamicRectangle id="0"> <rotation>0</rotation> <position> <x>-7</x> <y>92</y> </position> <width>84</width> <height>70</height> <goalBlock>true</goalBlock> <joints/> </JointedDynamicRectangle> </playerBlocks> <start> <position> <x>11</x> <y>129</y> </position> <width>258</width> <height>176</height> </start> <end> <position> <x>619</x> <y>132</y> </position> <width>244</width> <height>184</height> </end> </level> </retrieveLevel> </level10> <level11> <retrieveLevel> <levelId>62</levelId> <levelNumber>11</levelNumber> <name>Mission to Mars</name> <level> <levelBlocks> <StaticCircle> <rotation>0</rotation> <position> <x>152.15</x> <y>155.5</y> </position> <width>33.5</width> <height>33.5</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>454.55000000000007</x> <y>152.15</y> </position> <width>34.800000000000004</width> <height>34.800000000000004</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>152.85</x> <y>97.3</y> </position> <width>17.400000000000002</width> <height>17.400000000000002</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>150</x> <y>150</y> </position> <width>200</width> <height>200</height> </start> <end> <position> <x>450</x> <y>150</y> </position> <width>200</width> <height>200</height> </end> </level> </retrieveLevel> </level11> <level12> <retrieveLevel> <levelId>19</levelId> <levelNumber>12</levelNumber> <name>Up The Stairs</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>80.35</x> <y>320.4</y> </position> <width>322.6</width> <height>68.60000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>281</x> <y>302.25000000000006</y> </position> <width>113.9</width> <height>80.30000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>351.75</x> <y>281.80000000000007</y> </position> <width>131.4</width> <height>87.60000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>403.65</x> <y>248.2</y> </position> <width>111</width> <height>70.10000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>462.1</x> <y>217.50000000000003</y> </position> <width>106.6</width> <height>65.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>543.1000000000001</x> <y>189.1</y> </position> <width>140.20000000000002</width> <height>68.60000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>593.35</x> <y>156.2</y> </position> <width>112.4</width> <height>61.3</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>647.1999999999999</x> <y>180.85</y> </position> <width>56.400000000000006</width> <height>56.400000000000006</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>525</x> <y>312.65000000000003</y> </position> <width>134.3</width> <height>134.3</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>270.8</x> <y>377.35</y> </position> <width>67.2</width> <height>67.2</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>364.50000000000006</x> <y>352.00000000000006</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-84.55000000000001</x> <y>387.85</y> </position> <width>102.2</width> <height>102.2</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>98.95</x> <y>382.55</y> </position> <width>62.6</width> <height>62.6</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>184.50000000000003</x> <y>359.35</y> </position> <width>41.400000000000006</width> <height>41.400000000000006</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>36.4</x> <y>351.3</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0.13210546652388205</rotation> <position> <x>85.79999999999997</x> <y>62.25</y> </position> <width>96.3</width> <height>56.1</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>89.35</x> <y>38.64999999999999</y> </position> <width>48.400000000000006</width> <height>48.400000000000006</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>-0.4308491039314226</rotation> <position> <x>266.90000000000003</x> <y>24.9</y> </position> <width>44.8</width> <height>22.700000000000003</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>261.6</x> <y>14.500000000000004</y> </position> <width>22.9</width> <height>22.9</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>546</x> <y>100</y> </position> <width>20</width> <height>20</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>480</x> <y>-117</y> </position> <width>8</width> <height>8</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>241</x> <y>-29</y> </position> <width>18</width> <height>18</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <StaticCircle> <rotation>0</rotation> <position> <x>513</x> <y>-48</y> </position> <width>30</width> <height>30</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>533</x> <y>-8</y> </position> <width>10</width> <height>10</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>451</x> <y>-179</y> </position> <width>10</width> <height>10</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>306</x> <y>-8</y> </position> <width>8</width> <height>8</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>-0.714090698612158</rotation> <position> <x>295</x> <y>-43</y> </position> <width>10</width> <height>10</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <StaticRectangle> <rotation>-2.066529346548105</rotation> <position> <x>527.3000000000001</x> <y>-56.15</y> </position> <width>58.900000000000006</width> <height>28</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>63</x> <y>221</y> </position> <width>24</width> <height>24</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>56.95</x> <y>192.75</y> </position> <width>275.90000000000003</width> <height>191.2</height> </start> <end> <position> <x>605.1</x> <y>62.800000000000004</y> </position> <width>131.4</width> <height>146</height> </end> </level> </retrieveLevel> </level12> <level13> <retrieveLevel> <levelId>23</levelId> <levelNumber>13</levelNumber> <name>Big Ball</name> <level> <levelBlocks> <StaticRectangle> <rotation>0.08609323420781712</rotation> <position> <x>636.2999999999998</x> <y>281.25000000000006</y> </position> <width>194.5</width> <height>45.900000000000006</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>744.5500000000001</x> <y>192.54999999999998</y> </position> <width>48</width> <height>240</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <DynamicCircle> <rotation>0</rotation> <position> <x>412.3000000000002</x> <y>-43.09999999999998</y> </position> <width>70.10000000000001</width> <height>70.10000000000001</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <StaticRectangle> <rotation>0.39331112360490583</rotation> <position> <x>413.8500000000001</x> <y>52.44999999999999</y> </position> <width>159.5</width> <height>33.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.00000806919550522256</rotation> <position> <x>224.0999999999999</x> <y>273.75000000000006</y> </position> <width>658.4000000000001</width> <height>45.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-25</x> <y>19</y> </position> <width>232</width> <height>28</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <DynamicCircle> <rotation>0</rotation> <position> <x>-88</x> <y>-61</y> </position> <width>66</width> <height>66</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>745</x> <y>0</y> </position> <width>70</width> <height>70</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>393</x> <y>379</y> </position> <width>70</width> <height>70</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <StaticRectangle> <rotation>0</rotation> <position> <x>316</x> <y>468</y> </position> <width>236</width> <height>38</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> </levelBlocks> <playerBlocks> <JointedDynamicRectangle id="0"> <rotation>0</rotation> <position> <x>207</x> <y>170</y> </position> <width>58</width> <height>12</height> <goalBlock>true</goalBlock> <joints/> </JointedDynamicRectangle> </playerBlocks> <start> <position> <x>86.2</x> <y>157.65</y> </position> <width>346</width> <height>204.4</height> </start> <end> <position> <x>682.5</x> <y>229.9</y> </position> <width>100.7</width> <height>115.3</height> </end> </level> </retrieveLevel> </level13> <level14> <retrieveLevel> <levelId>20</levelId> <levelNumber>14</levelNumber> <name>Four Balls</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>212.45</x> <y>266.40000000000003</y> </position> <width>401.4</width> <height>62.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.2374387084494178</rotation> <position> <x>-21.85</x> <y>154.00000000000003</y> </position> <width>184.5</width> <height>17.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>389.05</x> <y>234.3</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>405.85</x> <y>175.15</y> </position> <width>54</width> <height>54</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>602.2</x> <y>188.75000000000003</y> </position> <width>68.4</width> <height>68.4</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>492.3</x> <y>243.05</y> </position> <width>68.60000000000001</width> <height>68.60000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-117</x> <y>174</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-274</x> <y>45</y> </position> <width>40</width> <height>40</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-196</x> <y>76</y> </position> <width>30</width> <height>30</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-137</x> <y>97</y> </position> <width>20</width> <height>20</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-53</x> <y>215</y> </position> <width>72</width> <height>72</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-4</x> <y>189</y> </position> <width>34</width> <height>34</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0.507098504392337</rotation> <position> <x>2.0999999999999996</x> <y>255.19999999999993</y> </position> <width>70</width> <height>62.300000000000004</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.36397895650964407</rotation> <position> <x>423</x> <y>266</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>565.95</x> <y>249.5</y> </position> <width>35.300000000000004</width> <height>35.300000000000004</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0.3085500010704924</rotation> <position> <x>-80.85000000000001</x> <y>163.4</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>45</x> <y>144</y> </position> <width>26</width> <height>26</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> <NoSpinWheel id="1"> <rotation>0</rotation> <position> <x>1</x> <y>132</y> </position> <width>26</width> <height>26</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> <NoSpinWheel id="2"> <rotation>0</rotation> <position> <x>-39</x> <y>121</y> </position> <width>24</width> <height>24</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> <NoSpinWheel id="3"> <rotation>0</rotation> <position> <x>-85</x> <y>110</y> </position> <width>24</width> <height>24</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>196.10000000000002</x> <y>144.55</y> </position> <width>358.70000000000005</width> <height>183.3</height> </start> <end> <position> <x>508</x> <y>167.85000000000002</y> </position> <width>159.20000000000002</width> <height>83.30000000000001</height> </end> </level> </retrieveLevel> </level14> <level15> <retrieveLevel> <levelId>24</levelId> <levelNumber>15</levelNumber> <name>Down Under</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>339.45000000000005</x> <y>86.15</y> </position> <width>324.1</width> <height>84.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>348.2</x> <y>313.90000000000003</y> </position> <width>159.10000000000002</width> <height>59.900000000000006</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>349</x> <y>373</y> </position> <width>86</width> <height>86</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0</rotation> <position> <x>347</x> <y>464</y> </position> <width>10</width> <height>140</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>345</x> <y>539</y> </position> <width>24</width> <height>24</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>284</x> <y>404</y> </position> <width>26</width> <height>26</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>418</x> <y>342</y> </position> <width>28</width> <height>28</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>275</x> <y>95</y> </position> <width>46</width> <height>46</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>330</x> <y>114</y> </position> <width>36</width> <height>36</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>492</x> <y>100</y> </position> <width>14</width> <height>14</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>342</x> <y>-55</y> </position> <width>40</width> <height>40</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>341.6</x> <y>-24.85</y> </position> <width>251.1</width> <height>172.3</height> </start> <end> <position> <x>348.15000000000003</x> <y>244.55</y> </position> <width>129.9</width> <height>115.3</height> </end> </level> </retrieveLevel> </level15> <level16> <retrieveLevel> <levelId>28</levelId> <levelNumber>16</levelNumber> <name>Awash</name> <level> <levelBlocks> <StaticRectangle> <rotation>-0.34706526203385135</rotation> <position> <x>392.00000000000006</x> <y>278.80000000000007</y> </position> <width>417.7000000000001</width> <height>65</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <DynamicCircle> <rotation>0</rotation> <position> <x>548.85</x> <y>124.79999999999998</y> </position> <width>19</width> <height>19</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>494.8500000000001</x> <y>84.69999999999999</y> </position> <width>21.9</width> <height>21.9</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>490.5</x> <y>148.9</y> </position> <width>19</width> <height>19</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>402.2000000000001</x> <y>67.85000000000001</y> </position> <width>19</width> <height>19</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>548.9000000000001</x> <y>67.9</y> </position> <width>17.5</width> <height>17.5</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>529.9499999999999</x> <y>170.8</y> </position> <width>17.5</width> <height>17.5</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>473.00000000000006</x> <y>189.05</y> </position> <width>17.5</width> <height>17.5</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>327</x> <y>219</y> </position> <width>23.4</width> <height>23.4</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>359.85</x> <y>56.249999999999986</y> </position> <width>10.2</width> <height>10.2</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>366.4</x> <y>105.1</y> </position> <width>24.8</width> <height>24.8</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>365.7</x> <y>168.60000000000002</y> </position> <width>17.5</width> <height>17.5</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>375.2000000000001</x> <y>224.8</y> </position> <width>16.1</width> <height>16.1</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <StaticRectangle> <rotation>0</rotation> <position> <x>59.849999999999994</x> <y>344.55000000000007</y> </position> <width>296.40000000000003</width> <height>54</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>713.1500000000001</x> <y>204.4</y> </position> <width>285.6</width> <height>49.800000000000004</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <DynamicCircle> <rotation>0</rotation> <position> <x>274.6</x> <y>189.75</y> </position> <width>22</width> <height>22</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>311.15</x> <y>91.65</y> </position> <width>24</width> <height>24</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>312.40000000000003</x> <y>146.7</y> </position> <width>27.8</width> <height>27.8</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>489.05000000000007</x> <y>24.09999999999999</y> </position> <width>24.8</width> <height>24.8</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>430.65</x> <y>133.5</y> </position> <width>35.1</width> <height>35.1</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>443.05</x> <y>66.4</y> </position> <width>14.6</width> <height>14.6</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>270.90000000000003</x> <y>150.65</y> </position> <width>13.2</width> <height>13.2</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>310.95</x> <y>34.3</y> </position> <width>29.200000000000003</width> <height>29.200000000000003</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>427.75</x> <y>10.949999999999998</y> </position> <width>33.6</width> <height>33.6</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>418.2</x> <y>194.95</y> </position> <width>24.9</width> <height>24.9</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <StaticRectangle> <rotation>0.26313751420353326</rotation> <position> <x>594.1</x> <y>241.5</y> </position> <width>121.2</width> <height>78.30000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>2.2640688357474295</rotation> <position> <x>194.00000000000003</x> <y>376.4500000000001</y> </position> <width>87.60000000000001</width> <height>56.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.3192953406522806</rotation> <position> <x>-106.14999999999999</x> <y>353.75</y> </position> <width>72.3</width> <height>54.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.4360672976842675</rotation> <position> <x>877.5000000000001</x> <y>220.75000000000003</y> </position> <width>87.60000000000001</width> <height>53.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.36918610597890567</rotation> <position> <x>-40.5</x> <y>19.69999999999999</y> </position> <width>131.3</width> <height>50.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.4487233440107211</rotation> <position> <x>23.899999999999988</x> <y>7.499999999999999</y> </position> <width>59.7</width> <height>48.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>434.85</x> <y>286.15</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>380.15</x> <y>326.2</y> </position> <width>62.1</width> <height>62.1</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>315.35</x> <y>333.55</y> </position> <width>32.800000000000004</width> <height>32.800000000000004</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>582.6500000000001</x> <y>267.8500000000001</y> </position> <width>63.900000000000006</width> <height>63.900000000000006</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>508.75</x> <y>278.90000000000003</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>544.35</x> <y>316.25</y> </position> <width>18.2</width> <height>18.2</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>225</x> <y>269</y> </position> <width>32</width> <height>32</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>179</x> <y>107</y> </position> <width>46</width> <height>46</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>201</x> <y>165</y> </position> <width>14</width> <height>14</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>219</x> <y>207</y> </position> <width>30</width> <height>30</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>304</x> <y>255</y> </position> <width>14</width> <height>14</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>273</x> <y>236</y> </position> <width>18</width> <height>18</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>241</x> <y>137</y> </position> <width>18</width> <height>18</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>250</x> <y>74</y> </position> <width>26</width> <height>26</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>35</x> <y>293</y> </position> <width>40</width> <height>40</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>41</x> <y>249</y> </position> <width>298</width> <height>154</height> </start> <end> <position> <x>704.75</x> <y>99.4</y> </position> <width>253</width> <height>198.9</height> </end> </level> </retrieveLevel> </level16> <level17> <retrieveLevel> <levelId>69</levelId> <levelNumber>17</levelNumber> <name>Handling</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>122</x> <y>176.99999999999997</y> </position> <width>1166.1000000000001</width> <height>46.800000000000004</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>265</x> <y>-187.4</y> </position> <width>96.30000000000001</width> <height>489.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.1782558204336252</rotation> <position> <x>226.89999999999998</x> <y>-439.8</y> </position> <width>954.6</width> <height>53.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.41144162737828727</rotation> <position> <x>-343.3</x> <y>-43.00000000000001</y> </position> <width>39.300000000000004</width> <height>185.9</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>-314.75</x> <y>-112.75</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>228.7</x> <y>-400.55</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>309.1</x> <y>-382.65</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-280.70000000000005</x> <y>-531.05</y> </position> <width>21.400000000000002</width> <height>21.400000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-384.45</x> <y>46.349999999999994</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-307.54999999999995</x> <y>-205.7</y> </position> <width>32.2</width> <height>32.2</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-327.20000000000005</x> <y>-282.6</y> </position> <width>21.5</width> <height>21.5</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-362.95</x> <y>-329</y> </position> <width>14.3</width> <height>14.3</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>-0.5364578174643075</rotation> <position> <x>-334.40000000000015</x> <y>-541.7499999999999</y> </position> <width>25.3</width> <height>27.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> </levelBlocks> <playerBlocks> <JointedDynamicRectangle id="0"> <rotation>-1.578258831084456</rotation> <position> <x>1.0999999999999432</x> <y>67.50000000000001</y> </position> <width>114.4</width> <height>20</height> <goalBlock>true</goalBlock> <joints/> </JointedDynamicRectangle> </playerBlocks> <start> <position> <x>1.3</x> <y>-11</y> </position> <width>517</width> <height>338.3</height> </start> <end> <position> <x>400.40000000000003</x> <y>93.65</y> </position> <width>37.2</width> <height>124.4</height> </end> </level> </retrieveLevel> </level17> <level18> <retrieveLevel> <levelId>76</levelId> <levelNumber>18</levelNumber> <name>Tube</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>25.449999999999932</x> <y>156.20000000000007</y> </position> <width>50.2</width> <height>859.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>192.40000000000003</x> <y>164.95000000000005</y> </position> <width>50.3</width> <height>875.9000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>231.65000000000006</x> <y>-93.90000000000003</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-17.749999999999936</x> <y>219.45000000000005</y> </position> <width>27.200000000000003</width> <height>27.200000000000003</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>212.05000000000013</x> <y>584.3999999999999</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>1.0000000000000906</x> <y>586.0999999999999</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>0.29999999999999716</x> <y>-181.85000000000005</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>219.15000000000006</x> <y>-145.3</y> </position> <width>22.200000000000003</width> <height>22.200000000000003</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>109.80000000000003</x> <y>404.3</y> </position> <width>17</width> <height>17</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>108.85000000000001</x> <y>413.40000000000003</y> </position> <width>180.8</width> <height>306.2</height> </start> <end> <position> <x>111.95</x> <y>-192.55</y> </position> <width>167.3</width> <height>156.20000000000002</height> </end> </level> </retrieveLevel> </level18> <level19> <retrieveLevel> <levelId>60</levelId> <levelNumber>19</levelNumber> <name>Back and Forth</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>94.40000000000003</x> <y>268.75</y> </position> <width>504.1</width> <height>52.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>281.95</x> <y>317.40000000000003</y> </position> <width>105.5</width> <height>105.5</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>-0.15533789293086786</rotation> <position> <x>637.4499999999999</x> <y>341.75</y> </position> <width>332.70000000000005</width> <height>95.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>-157.95</x> <y>333.79999999999995</y> </position> <width>92</width> <height>92</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0.09327589932936298</rotation> <position> <x>57.79999999999998</x> <y>369.8500000000001</y> </position> <width>448.3</width> <height>65.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>52.099999999999994</x> <y>316.54999999999995</y> </position> <width>454.6</width> <height>100.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>493.75</x> <y>453.3</y> </position> <width>28.700000000000003</width> <height>149.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>630.35</x> <y>494.9</y> </position> <width>31.6</width> <height>241.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>666.3500000000003</x> <y>404.3500000000001</y> </position> <width>10</width> <height>60.400000000000006</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>565.6500000000001</x> <y>417.25</y> </position> <width>31.700000000000003</width> <height>74.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>738.25</x> <y>410.1</y> </position> <width>25.9</width> <height>164</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>790.05</x> <y>473.4</y> </position> <width>34.6</width> <height>241.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>-330.6</x> <y>46.05</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-254.35</x> <y>-76.25</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>-0.6264402302885688</rotation> <position> <x>-287.45000000000005</x> <y>-21.6</y> </position> <width>152.5</width> <height>28.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>886.45</x> <y>-66.15</y> </position> <width>31.700000000000003</width> <height>31.700000000000003</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>841.8</x> <y>5.749999999999997</y> </position> <width>31.700000000000003</width> <height>31.700000000000003</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>-0.6105716305576829</rotation> <position> <x>869.1500000000001</x> <y>-34.45</y> </position> <width>87.4</width> <height>25.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>-118.05</x> <y>213.2</y> </position> <width>56.900000000000006</width> <height>56.900000000000006</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>150</x> <y>155.55</y> </position> <width>309.70000000000005</width> <height>195.9</height> </start> <end> <position> <x>688.9000000000001</x> <y>241.70000000000002</y> </position> <width>200</width> <height>200</height> </end> </level> </retrieveLevel> </level19> <level20> <retrieveLevel> <levelId>54</levelId> <levelNumber>20</levelNumber> <name>Unpossible</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>327</x> <y>145</y> </position> <width>86</width> <height>232</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>219</x> <y>271</y> </position> <width>702</width> <height>54</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>432.9</x> <y>40</y> </position> <width>300</width> <height>42</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>547.2</x> <y>393.70000000000005</y> </position> <width>46.5</width> <height>272.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.42337293418504707</rotation> <position> <x>428.7</x> <y>327.05</y> </position> <width>263.6</width> <height>43.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>130.65</x> <y>367.29999999999995</y> </position> <width>42.2</width> <height>194.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.2837730021668529</rotation> <position> <x>223.7</x> <y>395.80000000000007</y> </position> <width>209.4</width> <height>31.700000000000003</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>263.8</x> <y>337.70000000000005</y> </position> <width>38</width> <height>101.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.341047829634894</rotation> <position> <x>-100.74999999999999</x> <y>337.74999999999994</y> </position> <width>27.5</width> <height>114.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-78.64999999999998</x> <y>362.00000000000006</y> </position> <width>35.9</width> <height>160.70000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.6387545653136661</rotation> <position> <x>19.650000000000006</x> <y>399.04999999999995</y> </position> <width>27.5</width> <height>152.20000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>58.80000000000001</x> <y>304.95000000000005</y> </position> <width>29.6</width> <height>95.10000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-22.6</x> <y>383.15</y> </position> <width>27.5</width> <height>219.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-186.45000000000002</x> <y>25.900000000000013</y> </position> <width>139.6</width> <height>38.1</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.4679534168639694</rotation> <position> <x>-196.99999999999997</x> <y>86.15000000000003</y> </position> <width>33.800000000000004</width> <height>158.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.4865762139617804</rotation> <position> <x>-245.60000000000002</x> <y>-14.299999999999983</y> </position> <width>23.200000000000003</width> <height>112.10000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-220.25000000000003</x> <y>81.95000000000002</y> </position> <width>21.1</width> <height>95.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-235.05000000000004</x> <y>-59.749999999999986</y> </position> <width>61.300000000000004</width> <height>10.600000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>100</x> <y>100</y> </position> <width>20.4</width> <height>20.4</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>75</x> <y>162</y> </position> <width>330</width> <height>176</height> </start> <end> <position> <x>450</x> <y>150</y> </position> <width>200</width> <height>200</height> </end> </level> </retrieveLevel> </level20> <level21> <retrieveLevel> <levelId>4575</levelId> <levelNumber>21</levelNumber> <name>U-Turn</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>-60.900000000000006</x> <y>-91.30000000000001</y> </position> <width>869.2</width> <height>74.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-61.10000000000002</x> <y>167.60000000000002</y> </position> <width>869.2</width> <height>74.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-61.35000000000002</x> <y>424.8</y> </position> <width>869.2</width> <height>74.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>365.90000000000003</x> <y>167.65000000000003</y> </position> <width>37.5</width> <height>37.5</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-498.45</x> <y>-91.25</y> </position> <width>38</width> <height>38</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-498.35000000000014</x> <y>167.50000000000003</y> </position> <width>38</width> <height>38</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-492.65000000000003</x> <y>424.8</y> </position> <width>38</width> <height>38</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>-0.057433946420220594</rotation> <position> <x>377.75000000000006</x> <y>413.29999999999995</y> </position> <width>50.1</width> <height>54.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.2188890647345736</rotation> <position> <x>412.3</x> <y>407.6000000000001</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.3727196492481757</rotation> <position> <x>443.84999999999997</x> <y>396.4</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.5501214374048453</rotation> <position> <x>476.85</x> <y>379.59999999999997</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.6900361164950406</rotation> <position> <x>507.0000000000001</x> <y>357.6</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.8042638494191203</rotation> <position> <x>530.3499999999999</x> <y>336.8</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.9492195254248363</rotation> <position> <x>552.6999999999999</x> <y>310.4</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.4676001575875561</rotation> <position> <x>569.9</x> <y>281.4500000000001</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.3585090955969665</rotation> <position> <x>582.0500000000001</x> <y>255.85</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.22619580274782458</rotation> <position> <x>592.5</x> <y>220.1</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.12264364424939811</rotation> <position> <x>597.1000000000001</x> <y>193.70000000000002</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>598.2</x> <y>162.3</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.05887294616330241</rotation> <position> <x>596.5000000000001</x> <y>132</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.14586641283292168</rotation> <position> <x>593.5</x> <y>119.25</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.27362909316359363</rotation> <position> <x>586.2500000000002</x> <y>90.05</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.35917800222360374</rotation> <position> <x>578.4</x> <y>68.19999999999999</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.487147555620417</rotation> <position> <x>567.1500000000001</x> <y>47.4</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.6550203157012948</rotation> <position> <x>546.9500000000002</x> <y>17.100000000000005</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.795643706526244</rotation> <position> <x>522.75</x> <y>-11.5</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.644438315641658</rotation> <position> <x>497.00000000000006</x> <y>-33.400000000000006</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-1.0681021101544852</rotation> <position> <x>466.70000000000005</x> <y>-51.949999999999996</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.3781423153226016</rotation> <position> <x>441.9500000000001</x> <y>-65.35000000000001</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.2381962321567037</rotation> <position> <x>417.80000000000007</x> <y>-73.25</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.20163119104657812</rotation> <position> <x>395.95000000000005</x> <y>-77.80000000000001</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>375.70000000000005</x> <y>-80.00000000000001</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>372.2</x> <y>447.2</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>374.80000000000007</x> <y>-110.10000000000001</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>431.1000000000001</x> <y>-91.95</y> </position> <width>40.7</width> <height>40.7</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>423.40000000000003</x> <y>-137.65</y> </position> <width>16.900000000000002</width> <height>16.900000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>466.70000000000016</x> <y>-74.6</y> </position> <width>28.900000000000002</width> <height>28.900000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>414.4000000000001</x> <y>445.65000000000003</y> </position> <width>40</width> <height>40</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>474.5000000000001</x> <y>420.1</y> </position> <width>35.6</width> <height>35.6</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>546.7500000000001</x> <y>354.55</y> </position> <width>15.5</width> <height>15.5</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>595.6499999999999</x> <y>66.60000000000001</y> </position> <width>28.900000000000002</width> <height>28.900000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>-0.8079149353758508</rotation> <position> <x>575.2</x> <y>384.50000000000006</y> </position> <width>12</width> <height>80.80000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>604.3000000000001</x> <y>413.19999999999993</y> </position> <width>12</width> <height>12</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>-0.29077191014988335</rotation> <position> <x>385.3500000000001</x> <y>-177.10000000000002</y> </position> <width>12</width> <height>104.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>371.40000000000003</x> <y>-223.9</y> </position> <width>23.400000000000002</width> <height>23.400000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-753.0500000000001</x> <y>-28.400000000000002</y> </position> <width>82.9</width> <height>82.9</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-800.6500000000001</x> <y>-87.39999999999999</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-687.45</x> <y>7.599999999999994</y> </position> <width>23.900000000000002</width> <height>23.900000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-751.3500000000001</x> <y>-99.25000000000004</y> </position> <width>34</width> <height>34</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-680.4000000000002</x> <y>-58.20000000000002</y> </position> <width>12</width> <height>12</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>-0.5874199932276543</rotation> <position> <x>-862.2</x> <y>-122.25000000000003</y> </position> <width>12</width> <height>111.80000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>-900.15</x> <y>-179.10000000000002</y> </position> <width>38</width> <height>38</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0.7114652320242791</rotation> <position> <x>-832.95</x> <y>-160.65</y> </position> <width>12</width> <height>96.80000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>-802.8500000000001</x> <y>-193.5</y> </position> <width>12</width> <height>12</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-743.8000000000001</x> <y>367.15000000000003</y> </position> <width>27.6</width> <height>27.6</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-762.9500000000002</x> <y>355.4</y> </position> <width>12</width> <height>12</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>-0.23395050645486792</rotation> <position> <x>-736.35</x> <y>391.55</y> </position> <width>12</width> <height>42.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>-728.85</x> <y>417</y> </position> <width>17</width> <height>17</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>10.850000000000044</x> <y>535.0999999999999</y> </position> <width>33.5</width> <height>33.5</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-19.549999999999997</x> <y>529</y> </position> <width>16</width> <height>16</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-231.65000000000003</x> <y>-240.44999999999996</y> </position> <width>50.1</width> <height>50.1</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0.008042722022367443</rotation> <position> <x>-170.35000000000002</x> <y>-252.90000000000003</y> </position> <width>25</width> <height>25</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-185.95</x> <y>-265.35</y> </position> <width>18.8</width> <height>18.8</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>-0.06856778645581586</rotation> <position> <x>-107.89999999999999</x> <y>-259.6</y> </position> <width>107.30000000000001</width> <height>12</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>-61.099999999999994</x> <y>-252.20000000000005</y> </position> <width>20.3</width> <height>20.3</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-47.55000000000002</x> <y>-245.45000000000005</y> </position> <width>12</width> <height>12</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>-274.5</x> <y>293.1</y> </position> <width>40</width> <height>40</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>-285.35</x> <y>303.05</y> </position> <width>417.70000000000005</width> <height>233.9</height> </start> <end> <position> <x>-285.85</x> <y>34.95</y> </position> <width>415.8</width> <height>211.9</height> </end> </level> </retrieveLevel> </level21> </officialLevels> ); } public static function getLeveListXML():XML{ return (<levelList> <levelCount>21</levelCount> <level> <levelName>Rolling Away</levelName> <description>level 3!</description> <levelId>91</levelId> <levelNumber>1</levelNumber> </level> <level> <levelName>Reach Up</levelName> <description></description> <levelId>55</levelId> <levelNumber>2</levelNumber> </level> <level> <levelName>Mind The Gap</levelName> <description></description> <levelId>16</levelId> <levelNumber>3</levelNumber> </level> <level> <levelName>Junkyard</levelName> <description>j2</description> <levelId>102</levelId> <levelNumber>4</levelNumber> </level> <level> <levelName>The Wall</levelName> <description></description> <levelId>31</levelId> <levelNumber>5</levelNumber> </level> <level> <levelName>On a Roll</levelName> <description>medium</description> <levelId>89</levelId> <levelNumber>6</levelNumber> </level> <level> <levelName>Full-up</levelName> <description>easyish</description> <levelId>88</levelId> <levelNumber>7</levelNumber> </level> <level> <levelName>Higher</levelName> <description>6ish</description> <levelId>86</levelId> <levelNumber>8</levelNumber> </level> <level> <levelName>Around the Bend</levelName> <description></description> <levelId>100</levelId> <levelNumber>9</levelNumber> </level> <level> <levelName>Up The Hump</levelName> <description></description> <levelId>17</levelId> <levelNumber>10</levelNumber> </level> <level> <levelName>Mission to Mars</levelName> <description></description> <levelId>62</levelId> <levelNumber>11</levelNumber> </level> <level> <levelName>Up The Stairs</levelName> <description></description> <levelId>19</levelId> <levelNumber>12</levelNumber> </level> <level> <levelName>Big Ball</levelName> <description></description> <levelId>23</levelId> <levelNumber>13</levelNumber> </level> <level> <levelName>Four Balls</levelName> <description></description> <levelId>20</levelId> <levelNumber>14</levelNumber> </level> <level> <levelName>Down Under</levelName> <description></description> <levelId>24</levelId> <levelNumber>15</levelNumber> </level> <level> <levelName>Awash</levelName> <description></description> <levelId>28</levelId> <levelNumber>16</levelNumber> </level> <level> <levelName>Handling</levelName> <description></description> <levelId>69</levelId> <levelNumber>17</levelNumber> </level> <level> <levelName>Tube</levelName> <description></description> <levelId>76</levelId> <levelNumber>18</levelNumber> </level> <level> <levelName>Back and Forth</levelName> <description></description> <levelId>60</levelId> <levelNumber>19</levelNumber> </level> <level> <levelName>Unpossible</levelName> <description></description> <levelId>54</levelId> <levelNumber>20</levelNumber> </level> <level> <levelName>U-Turn</levelName> <description></description> <levelId>4575</levelId> <levelNumber>21</levelNumber> </level> </levelList> ); } } }//package contraption.data
Section 256
//OfficialLevelsExp (contraption.data.OfficialLevelsExp) package contraption.data { public class OfficialLevelsExp { public static function getOfficialLevels():XML{ return (<officialLevelsExp> <level1> <retrieveLevel> <levelId>91</levelId> <levelNumber>1</levelNumber> <name>Rolling Away</name> <level> <levelBlocks> <StaticCircle> <rotation>0</rotation> <position> <x>-155</x> <y>190</y> </position> <width>162</width> <height>162</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0</rotation> <position> <x>85</x> <y>135</y> </position> <width>348</width> <height>80</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>123</x> <y>296</y> </position> <width>192</width> <height>192</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-463.49999999999994</x> <y>-333.34999999999997</y> </position> <width>136</width> <height>136</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-254.64999999999998</x> <y>-432</y> </position> <width>173</width> <height>173</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0</rotation> <position> <x>-284.25</x> <y>-287.24999999999994</y> </position> <width>287.1</width> <height>94.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>402.1</x> <y>-64.99999999999999</y> </position> <width>141.6</width> <height>141.6</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>288.05000000000007</x> <y>-301.05</y> </position> <width>188.8</width> <height>188.8</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0.38529804259629785</rotation> <position> <x>242.75</x> <y>-118.10000000000001</y> </position> <width>277.6</width> <height>87.30000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>-229</x> <y>-31</y> </position> <width>40</width> <height>40</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>-154</x> <y>15</y> </position> <width>256</width> <height>188</height> </start> <end> <position> <x>153</x> <y>25</y> </position> <width>200</width> <height>200</height> </end> </level> </retrieveLevel> </level1> <level2> <retrieveLevel> <levelId>55</levelId> <levelNumber>2</levelNumber> <name>Reach Up</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>317</x> <y>277</y> </position> <width>622</width> <height>62</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>180</x> <y>-37.20000000000001</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0</rotation> <position> <x>-67.15</x> <y>27.15</y> </position> <width>122.8</width> <height>120</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>555.75</x> <y>408.6</y> </position> <width>137.20000000000002</width> <height>125.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-27.149999999999984</x> <y>350</y> </position> <width>134.3</width> <height>122.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>758.5500000000001</x> <y>-21.4</y> </position> <width>128.6</width> <height>111.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>884.3000000000001</x> <y>257.1</y> </position> <width>205.7</width> <height>168.60000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>629.45</x> <y>277.2</y> </position> <width>32</width> <height>32</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> </levelBlocks> <playerBlocks> <JointedDynamicRectangle id="0"> <rotation>0</rotation> <position> <x>268.25</x> <y>100.5</y> </position> <width>28</width> <height>30</height> <goalBlock>true</goalBlock> <joints/> </JointedDynamicRectangle> <NoSpinWheel id="1"> <rotation>0</rotation> <position> <x>38.900000000000006</x> <y>225.10000000000002</y> </position> <width>40</width> <height>40</height> <goalBlock>false</goalBlock> <joints/> </NoSpinWheel> <NoSpinWheel id="2"> <rotation>0</rotation> <position> <x>134.05</x> <y>225.10000000000002</y> </position> <width>40</width> <height>40</height> <goalBlock>false</goalBlock> <joints/> </NoSpinWheel> <SolidRod id="3"> <rotation>0</rotation> <position> <x>86.47500000000001</x> <y>225.10000000000002</y> </position> <width>95.15</width> <height>8</height> <goalBlock>false</goalBlock> <joints> <jointedTo>1</jointedTo> <jointedTo>2</jointedTo> </joints> </SolidRod> <SolidRod id="4"> <rotation>-2.2225965468532523</rotation> <position> <x>111.025</x> <y>194.925</y> </position> <width>75.91261423505321</width> <height>8</height> <goalBlock>false</goalBlock> <joints> <jointedTo>3</jointedTo> </joints> </SolidRod> <SolidRod id="5"> <rotation>2.2537675358563143</rotation> <position> <x>63.45</x> <y>194.925</y> </position> <width>77.80059447073656</width> <height>8</height> <goalBlock>false</goalBlock> <joints> <jointedTo>4</jointedTo> <jointedTo>3</jointedTo> </joints> </SolidRod> </playerBlocks> <start> <position> <x>201.75</x> <y>160.9</y> </position> <width>379.5</width> <height>197.1</height> </start> <end> <position> <x>554.25</x> <y>73.5</y> </position> <width>148</width> <height>142</height> </end> </level> </retrieveLevel> </level2> <level3> <retrieveLevel> <levelId>16</levelId> <levelNumber>3</levelNumber> <name>Mind The Gap</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>94.75</x> <y>228.35</y> </position> <width>412</width> <height>92</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>528.8</x> <y>229.4</y> </position> <width>254</width> <height>90</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>-101.3</x> <y>231.75</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>662.1</x> <y>279.1</y> </position> <width>93.4</width> <height>93.4</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>27.75</x> <y>27.749999999999996</y> </position> <width>61.3</width> <height>61.3</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>2.050224006112992</rotation> <position> <x>640.1500000000001</x> <y>35.8</y> </position> <width>42.3</width> <height>68.60000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>444.1</x> <y>268.8</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>158.4</x> <y>316.8</y> </position> <width>96.4</width> <height>96.4</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>521.45</x> <y>305.5500000000001</y> </position> <width>71.5</width> <height>71.5</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>171</x> <y>106</y> </position> <width>26</width> <height>26</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>90</x> <y>109</y> </position> <width>404</width> <height>166</height> </start> <end> <position> <x>562.8000000000001</x> <y>123.4</y> </position> <width>159.10000000000002</width> <height>135.70000000000002</height> </end> </level> </retrieveLevel> </level3> <level4> <retrieveLevel> <levelId>102</levelId> <levelNumber>4</levelNumber> <name>Junkyard</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>243</x> <y>280</y> </position> <width>778</width> <height>68</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>254.99999999999997</x> <y>117.24999999999999</y> </position> <width>25</width> <height>58.400000000000006</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0.032246882435253865</rotation> <position> <x>284.54999999999995</x> <y>216</y> </position> <width>39.3</width> <height>40.8</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicCircle> <rotation>0</rotation> <position> <x>321.15</x> <y>178.65</y> </position> <width>18</width> <height>18</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicRectangle> <rotation>0</rotation> <position> <x>364</x> <y>217</y> </position> <width>48</width> <height>46</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>202.25</x> <y>178.45</y> </position> <width>21.700000000000003</width> <height>36.7</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>431.25</x> <y>208.75</y> </position> <width>29.700000000000003</width> <height>42</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>404</x> <y>110</y> </position> <width>23.400000000000002</width> <height>56.7</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>339.45000000000005</x> <y>110.25</y> </position> <width>20</width> <height>20.1</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>240.35000000000002</x> <y>168.35000000000002</y> </position> <width>39.6</width> <height>29.700000000000003</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>367.1</x> <y>158.70000000000002</y> </position> <width>26.700000000000003</width> <height>41.800000000000004</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicCircle> <rotation>0</rotation> <position> <x>404.35</x> <y>164.00000000000003</y> </position> <width>17.3</width> <height>17.3</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicRectangle> <rotation>0</rotation> <position> <x>161.10000000000002</x> <y>220.45000000000002</y> </position> <width>51.800000000000004</width> <height>18.400000000000002</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>466.65000000000003</x> <y>162.3</y> </position> <width>52</width> <height>29.700000000000003</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>492.65000000000003</x> <y>213</y> </position> <width>59.300000000000004</width> <height>37.1</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>472.35</x> <y>102.65</y> </position> <width>58.400000000000006</width> <height>25.1</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>240.35</x> <y>219.45000000000002</y> </position> <width>41.7</width> <height>28.3</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-203.85000000000005</x> <y>280.49999999999994</y> </position> <width>240.20000000000002</width> <height>67.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>-180.75000000000003</x> <y>222.05</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>-235.35000000000002</x> <y>207.5</y> </position> <width>29.1</width> <height>78.30000000000001</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicCircle> <rotation>0</rotation> <position> <x>-190.75000000000003</x> <y>166.50000000000003</y> </position> <width>31</width> <height>31</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicRectangle> <rotation>0</rotation> <position> <x>-289.95</x> <y>230.25000000000003</y> </position> <width>61.900000000000006</width> <height>32.800000000000004</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicCircle> <rotation>0</rotation> <position> <x>-291.8</x> <y>195.70000000000002</y> </position> <width>18.2</width> <height>18.2</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicRectangle> <rotation>-0.20477186860842284</rotation> <position> <x>-276.35</x> <y>157.45000000000005</y> </position> <width>85.5</width> <height>32.7</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0.017512709110314773</rotation> <position> <x>-212.55</x> <y>109.14999999999999</y> </position> <width>69.2</width> <height>51</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-14.200000000000045</x> <y>420.4000000000001</y> </position> <width>660.7</width> <height>60</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>-189.9</x> <y>365.84999999999997</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>-36.99999999999999</x> <y>374.95</y> </position> <width>29.1</width> <height>30.900000000000002</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>-37.90000000000002</x> <y>344.05</y> </position> <width>60.1</width> <height>30.900000000000002</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>-110.70000000000005</x> <y>356.75000000000006</y> </position> <width>54.6</width> <height>67.3</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>32.199999999999996</x> <y>378.55</y> </position> <width>60</width> <height>23.700000000000003</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0.39204627244228374</rotation> <position> <x>91.25000000000001</x> <y>358.6</y> </position> <width>74.7</width> <height>38.2</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>25.800000000000004</x> <y>353.05000000000007</y> </position> <width>25.5</width> <height>27.3</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>-0.5044164118269181</rotation> <position> <x>145.94999999999996</x> <y>362.20000000000005</y> </position> <width>18.2</width> <height>56.400000000000006</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>240.55</x> <y>356.7</y> </position> <width>76.4</width> <height>67.4</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>-150.75</x> <y>378.55</y> </position> <width>18.2</width> <height>23.700000000000003</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicCircle> <rotation>0</rotation> <position> <x>184.15</x> <y>372.1500000000001</y> </position> <width>18.2</width> <height>18.2</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>-153.45000000000002</x> <y>356.70000000000005</y> </position> <width>10.9</width> <height>10.9</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>7</x> <y>173</y> </position> <width>40</width> <height>40</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>-4</x> <y>160</y> </position> <width>280</width> <height>190</height> </start> <end> <position> <x>572</x> <y>152</y> </position> <width>100</width> <height>208</height> </end> </level> </retrieveLevel> </level4> <level5> <retrieveLevel> <levelId>31</levelId> <levelNumber>5</levelNumber> <name>The Wall</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>110.2</x> <y>287.6</y> </position> <width>467.1</width> <height>87.60000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>740.8</x> <y>273.70000000000005</y> </position> <width>480.3</width> <height>61.3</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>490.25</x> <y>337.9000000000001</y> </position> <width>1129.9</width> <height>90.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>291.25</x> <y>159.1</y> </position> <width>29.200000000000003</width> <height>32.1</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>252.54999999999995</x> <y>162.8</y> </position> <width>35.1</width> <height>40.900000000000006</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>289.05</x> <y>193.4</y> </position> <width>27.8</width> <height>35</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>251.75</x> <y>202.2</y> </position> <width>24.8</width> <height>38</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>290.55</x> <y>227</y> </position> <width>30.6</width> <height>32.1</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>253.30000000000004</x> <y>232.9</y> </position> <width>32.1</width> <height>19</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>294.20000000000005</x> <y>100</y> </position> <width>33.6</width> <height>30.700000000000003</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>255.44999999999993</x> <y>101.45</y> </position> <width>26.200000000000003</width> <height>27.8</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>273.74999999999994</x> <y>129.95</y> </position> <width>71.5</width> <height>23.3</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>328.50000000000006</x> <y>111.7</y> </position> <width>32.1</width> <height>30.700000000000003</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>325.55</x> <y>148.15</y> </position> <width>30.700000000000003</width> <height>36.5</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>325.55000000000007</x> <y>183.95</y> </position> <width>30.6</width> <height>33.6</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>324.75000000000006</x> <y>223.35</y> </position> <width>23.3</width> <height>40.900000000000006</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>-72.25000000000001</x> <y>330.65</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>989.05</x> <y>310.2</y> </position> <width>67.10000000000001</width> <height>67.10000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-111.70000000000002</x> <y>12.399999999999991</y> </position> <width>77.9</width> <height>77.9</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>135.25</x> <y>-28.95000000000001</y> </position> <width>31.6</width> <height>31.6</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>93.9</x> <y>-49.650000000000006</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-13.149999999999997</x> <y>-71.55</y> </position> <width>70.60000000000001</width> <height>70.60000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-101.95000000000002</x> <y>-97.05</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>61.09999999999998</x> <y>-110.45000000000002</y> </position> <width>36.5</width> <height>36.5</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>-0.5742878193317579</rotation> <position> <x>795.9000000000002</x> <y>-7.100000000000001</y> </position> <width>80.30000000000001</width> <height>82.80000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.4531278240870904</rotation> <position> <x>548.9</x> <y>-20.450000000000006</y> </position> <width>70.4</width> <height>55.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.005127687802247816</rotation> <position> <x>603.65</x> <y>-42.349999999999994</y> </position> <width>77.80000000000001</width> <height>70.60000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.38987614128793013</rotation> <position> <x>663.25</x> <y>-35.099999999999994</y> </position> <width>82.80000000000001</width> <height>75.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.42419355299901373</rotation> <position> <x>726.5</x> <y>-38.7</y> </position> <width>92.5</width> <height>75.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> </levelBlocks> <playerBlocks> <JointedDynamicRectangle id="0"> <rotation>0</rotation> <position> <x>29</x> <y>158</y> </position> <width>28</width> <height>30</height> <goalBlock>true</goalBlock> <joints/> </JointedDynamicRectangle> </playerBlocks> <start> <position> <x>14</x> <y>153</y> </position> <width>274</width> <height>194</height> </start> <end> <position> <x>611.7</x> <y>151.85</y> </position> <width>200</width> <height>200</height> </end> </level> </retrieveLevel> </level5> <level6> <retrieveLevel> <levelId>89</levelId> <levelNumber>6</levelNumber> <name>On a Roll</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>-290</x> <y>230</y> </position> <width>816</width> <height>58</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <DynamicCircle> <rotation>0</rotation> <position> <x>-338</x> <y>119</y> </position> <width>82</width> <height>82</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <StaticRectangle> <rotation>-0.4911863378316689</rotation> <position> <x>-586.1499999999997</x> <y>68.69999999999997</y> </position> <width>64.9</width> <height>31</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.790117623877445</rotation> <position> <x>-618.65</x> <y>40.45</y> </position> <width>87.5</width> <height>33.9</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-661.0500000000002</x> <y>37.650000000000006</y> </position> <width>84.7</width> <height>25.400000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.8298537316689694</rotation> <position> <x>-685.0500000000001</x> <y>60.300000000000004</y> </position> <width>60.800000000000004</width> <height>27.200000000000003</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-394.2</x> <y>-137.45000000000005</y> </position> <width>22.6</width> <height>56.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.40323852203169236</rotation> <position> <x>-418.2</x> <y>-151.60000000000002</y> </position> <width>59.300000000000004</width> <height>28.3</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.31018911492659573</rotation> <position> <x>-416.75000000000006</x> <y>-172.70000000000002</y> </position> <width>22.6</width> <height>56.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.16229887623745093</rotation> <position> <x>-439.29999999999995</x> <y>-184.04999999999998</y> </position> <width>62.2</width> <height>19.700000000000003</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.45018601367763234</rotation> <position> <x>-18.550000000000015</x> <y>-110.64999999999999</y> </position> <width>84.80000000000001</width> <height>28.3</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.5698629937964668</rotation> <position> <x>-62.35</x> <y>-121.94999999999999</y> </position> <width>84.7</width> <height>22.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.1560780599440067</rotation> <position> <x>-107.60000000000002</x> <y>-117.75000000000004</y> </position> <width>87.5</width> <height>22.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.45234394718667875</rotation> <position> <x>22.349999999999966</x> <y>-100.75</y> </position> <width>70.60000000000001</width> <height>22.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.41422262451345127</rotation> <position> <x>118.40000000000002</x> <y>248.00000000000003</y> </position> <width>25.400000000000002</width> <height>73.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.8628470922264423</rotation> <position> <x>149.45</x> <y>232.50000000000003</y> </position> <width>74.5</width> <height>25.700000000000003</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.10371808350983186</rotation> <position> <x>180.25000000000003</x> <y>237.90000000000006</y> </position> <width>69.9</width> <height>16.900000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.5447021293342041</rotation> <position> <x>-260</x> <y>262.15000000000003</y> </position> <width>84.5</width> <height>25</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.7553069146140182</rotation> <position> <x>-276.95000000000005</x> <y>280.49999999999994</y> </position> <width>24.1</width> <height>66.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.7440872017124346</rotation> <position> <x>-268.45</x> <y>311</y> </position> <width>58.6</width> <height>18.400000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-271.2</x> <y>333.95000000000005</y> </position> <width>12.9</width> <height>56.800000000000004</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>1.8495910970201173</rotation> <position> <x>-701</x> <y>231.3</y> </position> <width>93.5</width> <height>42.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.5620757484096769</rotation> <position> <x>-703.75</x> <y>284.5</y> </position> <width>94.30000000000001</width> <height>36.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.6863295277912818</rotation> <position> <x>-701.0500000000001</x> <y>319.35</y> </position> <width>23.8</width> <height>55</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>1.8317160080084676</rotation> <position> <x>-685.5000000000001</x> <y>331.30000000000007</y> </position> <width>16</width> <height>59</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>-248.70000000000002</x> <y>-20.25</y> </position> <width>40</width> <height>40</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>-385.5</x> <y>19.75</y> </position> <width>386.90000000000003</width> <height>189.3</height> </start> <end> <position> <x>10.100000000000001</x> <y>22.900000000000002</y> </position> <width>155.8</width> <height>194.3</height> </end> </level> </retrieveLevel> </level6> <level7> <retrieveLevel> <levelId>88</levelId> <levelNumber>7</levelNumber> <name>Full-up</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>-268</x> <y>202</y> </position> <width>636</width> <height>116</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>380</x> <y>195</y> </position> <width>310</width> <height>94</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <DynamicCircle> <rotation>0</rotation> <position> <x>-116</x> <y>-110</y> </position> <width>86</width> <height>86</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <StaticRectangle> <rotation>0</rotation> <position> <x>-118</x> <y>-4</y> </position> <width>28</width> <height>40</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>245.29999999999998</x> <y>306.6</y> </position> <width>56</width> <height>56</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0</rotation> <position> <x>140</x> <y>626</y> </position> <width>520</width> <height>134</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-335.65</x> <y>435.05000000000007</y> </position> <width>500</width> <height>515.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>416.6500000000001</x> <y>438.75</y> </position> <width>236.20000000000002</width> <height>507.90000000000003</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>125.20000000000003</x> <y>394.05000000000007</y> </position> <width>94.9</width> <height>94.9</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>153.3</x> <y>540.3500000000001</y> </position> <width>18.1</width> <height>18.1</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>239.15</x> <y>499.9</y> </position> <width>64.60000000000001</width> <height>64.60000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-14.200000000000001</x> <y>485.8000000000001</y> </position> <width>72.7</width> <height>72.7</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>89.75</x> <y>521.1500000000001</y> </position> <width>38.400000000000006</width> <height>38.400000000000006</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>3.9499999999999957</x> <y>387.90000000000003</y> </position> <width>26.200000000000003</width> <height>26.200000000000003</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>259.34999999999997</x> <y>399.00000000000006</y> </position> <width>40.400000000000006</width> <height>40.400000000000006</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> </levelBlocks> <playerBlocks> <JointedDynamicRectangle id="0"> <rotation>0</rotation> <position> <x>-469</x> <y>98</y> </position> <width>82</width> <height>20</height> <goalBlock>true</goalBlock> <joints/> </JointedDynamicRectangle> </playerBlocks> <start> <position> <x>-319</x> <y>53</y> </position> <width>490</width> <height>216</height> </start> <end> <position> <x>375</x> <y>70</y> </position> <width>200</width> <height>200</height> </end> </level> </retrieveLevel> </level7> <level8> <retrieveLevel> <levelId>86</levelId> <levelNumber>8</levelNumber> <name>Higher</name> <level> <levelBlocks> <StaticCircle> <rotation>0</rotation> <position> <x>-266</x> <y>316</y> </position> <width>102</width> <height>102</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-126</x> <y>353</y> </position> <width>120</width> <height>120</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-35</x> <y>293</y> </position> <width>64</width> <height>64</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>136</x> <y>305</y> </position> <width>140</width> <height>140</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>348</x> <y>218</y> </position> <width>164</width> <height>164</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>547</x> <y>194</y> </position> <width>96</width> <height>96</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>633</x> <y>248</y> </position> <width>46</width> <height>46</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-358</x> <y>384</y> </position> <width>66</width> <height>66</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-435</x> <y>388</y> </position> <width>36</width> <height>36</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-290</x> <y>-181</y> </position> <width>62</width> <height>62</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>215</x> <y>-170</y> </position> <width>24</width> <height>24</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-401</x> <y>-163</y> </position> <width>16</width> <height>16</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-358</x> <y>-190</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>174</x> <y>-194</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-81</x> <y>-238</y> </position> <width>114</width> <height>114</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-199</x> <y>-225</y> </position> <width>74</width> <height>74</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>84</x> <y>-263</y> </position> <width>104</width> <height>104</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>17</x> <y>-180</y> </position> <width>18</width> <height>18</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> </levelBlocks> <playerBlocks> <JointedDynamicRectangle id="0"> <rotation>0</rotation> <position> <x>-217</x> <y>68</y> </position> <width>34</width> <height>36</height> <goalBlock>true</goalBlock> <joints/> </JointedDynamicRectangle> </playerBlocks> <start> <position> <x>-39</x> <y>141</y> </position> <width>454</width> <height>222</height> </start> <end> <position> <x>-39</x> <y>-23</y> </position> <width>454</width> <height>100</height> </end> </level> </retrieveLevel> </level8> <level9> <retrieveLevel> <levelId>100</levelId> <levelNumber>9</levelNumber> <name>Around the Bend</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>-191.90000000000003</x> <y>33.85</y> </position> <width>482.5</width> <height>101.60000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-184.85000000000002</x> <y>299.1500000000001</y> </position> <width>869.1</width> <height>84.60000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>290.6</x> <y>176.35000000000002</y> </position> <width>101.5</width> <height>330.20000000000005</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-647.6000000000001</x> <y>413.3499999999999</y> </position> <width>110</width> <height>313.20000000000005</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-384.05000000000007</x> <y>74.65</y> </position> <width>98.2</width> <height>141.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>328.3999999999999</x> <y>60.84999999999999</y> </position> <width>160.9</width> <height>98.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-696.15</x> <y>518.25</y> </position> <width>164.9</width> <height>102.10000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-344.45000000000005</x> <y>-279.90000000000003</y> </position> <width>969.6</width> <height>137.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>59.94999999999996</x> <y>-442.35</y> </position> <width>161</width> <height>255.10000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-746.8</x> <y>-93.00000000000003</y> </position> <width>164.8</width> <height>365.1</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <DynamicCircle> <rotation>0</rotation> <position> <x>307.3</x> <y>-16.85</y> </position> <width>27.5</width> <height>27.5</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>-744.7500000000001</x> <y>436.5</y> </position> <width>31.400000000000002</width> <height>31.400000000000002</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>-365.95</x> <y>-44.4</y> </position> <width>27.5</width> <height>27.5</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>-65.6000000000001</x> <y>-376.15000000000003</y> </position> <width>27.5</width> <height>27.5</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>99.30000000000008</x> <y>-601.3000000000001</y> </position> <width>31.400000000000002</width> <height>31.400000000000002</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>-638.8000000000001</x> <y>-379.55</y> </position> <width>31.400000000000002</width> <height>31.400000000000002</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>-436.7</x> <y>228.95000000000002</y> </position> <width>27.5</width> <height>27.5</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>-174.65000000000003</x> <y>-64.10000000000002</y> </position> <width>40</width> <height>40</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>-191.9</x> <y>-126.95</y> </position> <width>434.6</width> <height>279.40000000000003</height> </start> <end> <position> <x>-187.65</x> <y>180.60000000000002</y> </position> <width>460</width> <height>220.10000000000002</height> </end> </level> </retrieveLevel> </level9> <level10> <retrieveLevel> <levelId>17</levelId> <levelNumber>10</levelNumber> <name>Up The Hump</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>318.45</x> <y>278.6</y> </position> <width>873.8000000000001</width> <height>133.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>351.55000000000007</x> <y>213.95</y> </position> <width>102.2</width> <height>102.2</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0.364926276337564</rotation> <position> <x>-11.900000000000007</x> <y>347.40000000000003</y> </position> <width>139.5</width> <height>61.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.16829401120136167</rotation> <position> <x>185.15</x> <y>353.90000000000003</y> </position> <width>113.6</width> <height>73</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.4720399232666762</rotation> <position> <x>718.0500000000001</x> <y>349</y> </position> <width>112.4</width> <height>63</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.056705940703367985</rotation> <position> <x>546</x> <y>359.50000000000006</y> </position> <width>123.3</width> <height>56.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.4676269911188695</rotation> <position> <x>362.75</x> <y>362</y> </position> <width>66.5</width> <height>95.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.24992450923689735</rotation> <position> <x>-126.95000000000002</x> <y>270.65</y> </position> <width>45</width> <height>60.1</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>664.45</x> <y>22.94999999999999</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>81.2</x> <y>14.300000000000011</y> </position> <width>37.4</width> <height>37.4</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> </levelBlocks> <playerBlocks> <JointedDynamicRectangle id="0"> <rotation>0</rotation> <position> <x>-7</x> <y>92</y> </position> <width>84</width> <height>70</height> <goalBlock>true</goalBlock> <joints/> </JointedDynamicRectangle> </playerBlocks> <start> <position> <x>11</x> <y>129</y> </position> <width>258</width> <height>176</height> </start> <end> <position> <x>619</x> <y>132</y> </position> <width>244</width> <height>184</height> </end> </level> </retrieveLevel> </level10> <level11> <retrieveLevel> <levelId>62</levelId> <levelNumber>11</levelNumber> <name>Mission to Mars</name> <level> <levelBlocks> <StaticCircle> <rotation>0</rotation> <position> <x>152.15</x> <y>155.5</y> </position> <width>33.5</width> <height>33.5</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>454.55000000000007</x> <y>152.15</y> </position> <width>34.800000000000004</width> <height>34.800000000000004</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>152.85</x> <y>97.3</y> </position> <width>17.400000000000002</width> <height>17.400000000000002</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>150</x> <y>150</y> </position> <width>200</width> <height>200</height> </start> <end> <position> <x>450</x> <y>150</y> </position> <width>200</width> <height>200</height> </end> </level> </retrieveLevel> </level11> <level12> <retrieveLevel> <levelId>19</levelId> <levelNumber>12</levelNumber> <name>Up The Stairs</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>80.35</x> <y>320.4</y> </position> <width>322.6</width> <height>68.60000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>281</x> <y>302.25000000000006</y> </position> <width>113.9</width> <height>80.30000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>351.75</x> <y>281.80000000000007</y> </position> <width>131.4</width> <height>87.60000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>403.65</x> <y>248.2</y> </position> <width>111</width> <height>70.10000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>462.1</x> <y>217.50000000000003</y> </position> <width>106.6</width> <height>65.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>543.1000000000001</x> <y>189.1</y> </position> <width>140.20000000000002</width> <height>68.60000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>593.35</x> <y>156.2</y> </position> <width>112.4</width> <height>61.3</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>647.1999999999999</x> <y>180.85</y> </position> <width>56.400000000000006</width> <height>56.400000000000006</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>525</x> <y>312.65000000000003</y> </position> <width>134.3</width> <height>134.3</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>270.8</x> <y>377.35</y> </position> <width>67.2</width> <height>67.2</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>364.50000000000006</x> <y>352.00000000000006</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-84.55000000000001</x> <y>387.85</y> </position> <width>102.2</width> <height>102.2</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>98.95</x> <y>382.55</y> </position> <width>62.6</width> <height>62.6</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>184.50000000000003</x> <y>359.35</y> </position> <width>41.400000000000006</width> <height>41.400000000000006</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>36.4</x> <y>351.3</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0.13210546652388205</rotation> <position> <x>85.79999999999997</x> <y>62.25</y> </position> <width>96.3</width> <height>56.1</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>89.35</x> <y>38.64999999999999</y> </position> <width>48.400000000000006</width> <height>48.400000000000006</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>-0.4308491039314226</rotation> <position> <x>266.90000000000003</x> <y>24.9</y> </position> <width>44.8</width> <height>22.700000000000003</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>261.6</x> <y>14.500000000000004</y> </position> <width>22.9</width> <height>22.9</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>546</x> <y>100</y> </position> <width>20</width> <height>20</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>480</x> <y>-117</y> </position> <width>8</width> <height>8</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>241</x> <y>-29</y> </position> <width>18</width> <height>18</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <StaticCircle> <rotation>0</rotation> <position> <x>513</x> <y>-48</y> </position> <width>30</width> <height>30</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>533</x> <y>-8</y> </position> <width>10</width> <height>10</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>451</x> <y>-179</y> </position> <width>10</width> <height>10</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>306</x> <y>-8</y> </position> <width>8</width> <height>8</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>-0.714090698612158</rotation> <position> <x>295</x> <y>-43</y> </position> <width>10</width> <height>10</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <StaticRectangle> <rotation>-2.066529346548105</rotation> <position> <x>527.3000000000001</x> <y>-56.15</y> </position> <width>58.900000000000006</width> <height>28</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>63</x> <y>221</y> </position> <width>24</width> <height>24</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>56.95</x> <y>192.75</y> </position> <width>275.90000000000003</width> <height>191.2</height> </start> <end> <position> <x>605.1</x> <y>62.800000000000004</y> </position> <width>131.4</width> <height>146</height> </end> </level> </retrieveLevel> </level12> <level13> <retrieveLevel> <levelId>23</levelId> <levelNumber>13</levelNumber> <name>Big Ball</name> <level> <levelBlocks> <StaticRectangle> <rotation>0.08609323420781712</rotation> <position> <x>636.2999999999998</x> <y>281.25000000000006</y> </position> <width>194.5</width> <height>45.900000000000006</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>744.5500000000001</x> <y>192.54999999999998</y> </position> <width>48</width> <height>240</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <DynamicCircle> <rotation>0</rotation> <position> <x>412.3000000000002</x> <y>-43.09999999999998</y> </position> <width>70.10000000000001</width> <height>70.10000000000001</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <StaticRectangle> <rotation>0.39331112360490583</rotation> <position> <x>413.8500000000001</x> <y>52.44999999999999</y> </position> <width>159.5</width> <height>33.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.00000806919550522256</rotation> <position> <x>224.0999999999999</x> <y>273.75000000000006</y> </position> <width>658.4000000000001</width> <height>45.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-25</x> <y>19</y> </position> <width>232</width> <height>28</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <DynamicCircle> <rotation>0</rotation> <position> <x>-88</x> <y>-61</y> </position> <width>66</width> <height>66</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>745</x> <y>0</y> </position> <width>70</width> <height>70</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>393</x> <y>379</y> </position> <width>70</width> <height>70</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <StaticRectangle> <rotation>0</rotation> <position> <x>316</x> <y>468</y> </position> <width>236</width> <height>38</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> </levelBlocks> <playerBlocks> <JointedDynamicRectangle id="0"> <rotation>0</rotation> <position> <x>207</x> <y>170</y> </position> <width>58</width> <height>12</height> <goalBlock>true</goalBlock> <joints/> </JointedDynamicRectangle> </playerBlocks> <start> <position> <x>86.2</x> <y>157.65</y> </position> <width>346</width> <height>204.4</height> </start> <end> <position> <x>682.5</x> <y>229.9</y> </position> <width>100.7</width> <height>115.3</height> </end> </level> </retrieveLevel> </level13> <level14> <retrieveLevel> <levelId>20</levelId> <levelNumber>14</levelNumber> <name>Four Balls</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>212.45</x> <y>266.40000000000003</y> </position> <width>401.4</width> <height>62.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.2374387084494178</rotation> <position> <x>-21.85</x> <y>154.00000000000003</y> </position> <width>184.5</width> <height>17.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>389.05</x> <y>234.3</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>405.85</x> <y>175.15</y> </position> <width>54</width> <height>54</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>602.2</x> <y>188.75000000000003</y> </position> <width>68.4</width> <height>68.4</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>492.3</x> <y>243.05</y> </position> <width>68.60000000000001</width> <height>68.60000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-117</x> <y>174</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-274</x> <y>45</y> </position> <width>40</width> <height>40</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-196</x> <y>76</y> </position> <width>30</width> <height>30</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-137</x> <y>97</y> </position> <width>20</width> <height>20</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-53</x> <y>215</y> </position> <width>72</width> <height>72</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-4</x> <y>189</y> </position> <width>34</width> <height>34</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0.507098504392337</rotation> <position> <x>2.0999999999999996</x> <y>255.19999999999993</y> </position> <width>70</width> <height>62.300000000000004</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.36397895650964407</rotation> <position> <x>423</x> <y>266</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>565.95</x> <y>249.5</y> </position> <width>35.300000000000004</width> <height>35.300000000000004</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0.3085500010704924</rotation> <position> <x>-80.85000000000001</x> <y>163.4</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>45</x> <y>144</y> </position> <width>26</width> <height>26</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> <NoSpinWheel id="1"> <rotation>0</rotation> <position> <x>1</x> <y>132</y> </position> <width>26</width> <height>26</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> <NoSpinWheel id="2"> <rotation>0</rotation> <position> <x>-39</x> <y>121</y> </position> <width>24</width> <height>24</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> <NoSpinWheel id="3"> <rotation>0</rotation> <position> <x>-85</x> <y>110</y> </position> <width>24</width> <height>24</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>196.10000000000002</x> <y>144.55</y> </position> <width>358.70000000000005</width> <height>183.3</height> </start> <end> <position> <x>508</x> <y>167.85000000000002</y> </position> <width>159.20000000000002</width> <height>83.30000000000001</height> </end> </level> </retrieveLevel> </level14> <level15> <retrieveLevel> <levelId>24</levelId> <levelNumber>15</levelNumber> <name>Down Under</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>339.45000000000005</x> <y>86.15</y> </position> <width>324.1</width> <height>84.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>348.2</x> <y>313.90000000000003</y> </position> <width>159.10000000000002</width> <height>59.900000000000006</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>349</x> <y>373</y> </position> <width>86</width> <height>86</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0</rotation> <position> <x>347</x> <y>464</y> </position> <width>10</width> <height>140</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>345</x> <y>539</y> </position> <width>24</width> <height>24</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>284</x> <y>404</y> </position> <width>26</width> <height>26</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>418</x> <y>342</y> </position> <width>28</width> <height>28</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>275</x> <y>95</y> </position> <width>46</width> <height>46</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>330</x> <y>114</y> </position> <width>36</width> <height>36</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>492</x> <y>100</y> </position> <width>14</width> <height>14</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>342</x> <y>-55</y> </position> <width>40</width> <height>40</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>341.6</x> <y>-24.85</y> </position> <width>251.1</width> <height>172.3</height> </start> <end> <position> <x>348.15000000000003</x> <y>244.55</y> </position> <width>129.9</width> <height>115.3</height> </end> </level> </retrieveLevel> </level15> <level16> <retrieveLevel> <levelId>28</levelId> <levelNumber>16</levelNumber> <name>Awash</name> <level> <levelBlocks> <StaticRectangle> <rotation>-0.34706526203385135</rotation> <position> <x>392.00000000000006</x> <y>278.80000000000007</y> </position> <width>417.7000000000001</width> <height>65</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <DynamicCircle> <rotation>0</rotation> <position> <x>548.85</x> <y>124.79999999999998</y> </position> <width>19</width> <height>19</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>494.8500000000001</x> <y>84.69999999999999</y> </position> <width>21.9</width> <height>21.9</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>490.5</x> <y>148.9</y> </position> <width>19</width> <height>19</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>402.2000000000001</x> <y>67.85000000000001</y> </position> <width>19</width> <height>19</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>548.9000000000001</x> <y>67.9</y> </position> <width>17.5</width> <height>17.5</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>529.9499999999999</x> <y>170.8</y> </position> <width>17.5</width> <height>17.5</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>473.00000000000006</x> <y>189.05</y> </position> <width>17.5</width> <height>17.5</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>327</x> <y>219</y> </position> <width>23.4</width> <height>23.4</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>359.85</x> <y>56.249999999999986</y> </position> <width>10.2</width> <height>10.2</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>366.4</x> <y>105.1</y> </position> <width>24.8</width> <height>24.8</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>365.7</x> <y>168.60000000000002</y> </position> <width>17.5</width> <height>17.5</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>375.2000000000001</x> <y>224.8</y> </position> <width>16.1</width> <height>16.1</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <StaticRectangle> <rotation>0</rotation> <position> <x>59.849999999999994</x> <y>344.55000000000007</y> </position> <width>296.40000000000003</width> <height>54</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>713.1500000000001</x> <y>204.4</y> </position> <width>285.6</width> <height>49.800000000000004</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <DynamicCircle> <rotation>0</rotation> <position> <x>274.6</x> <y>189.75</y> </position> <width>22</width> <height>22</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>311.15</x> <y>91.65</y> </position> <width>24</width> <height>24</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>312.40000000000003</x> <y>146.7</y> </position> <width>27.8</width> <height>27.8</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>489.05000000000007</x> <y>24.09999999999999</y> </position> <width>24.8</width> <height>24.8</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>430.65</x> <y>133.5</y> </position> <width>35.1</width> <height>35.1</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>443.05</x> <y>66.4</y> </position> <width>14.6</width> <height>14.6</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>270.90000000000003</x> <y>150.65</y> </position> <width>13.2</width> <height>13.2</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>310.95</x> <y>34.3</y> </position> <width>29.200000000000003</width> <height>29.200000000000003</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>427.75</x> <y>10.949999999999998</y> </position> <width>33.6</width> <height>33.6</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>418.2</x> <y>194.95</y> </position> <width>24.9</width> <height>24.9</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <StaticRectangle> <rotation>0.26313751420353326</rotation> <position> <x>594.1</x> <y>241.5</y> </position> <width>121.2</width> <height>78.30000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>2.2640688357474295</rotation> <position> <x>194.00000000000003</x> <y>376.4500000000001</y> </position> <width>87.60000000000001</width> <height>56.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.3192953406522806</rotation> <position> <x>-106.14999999999999</x> <y>353.75</y> </position> <width>72.3</width> <height>54.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.4360672976842675</rotation> <position> <x>877.5000000000001</x> <y>220.75000000000003</y> </position> <width>87.60000000000001</width> <height>53.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.36918610597890567</rotation> <position> <x>-40.5</x> <y>19.69999999999999</y> </position> <width>131.3</width> <height>50.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.4487233440107211</rotation> <position> <x>23.899999999999988</x> <y>7.499999999999999</y> </position> <width>59.7</width> <height>48.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>434.85</x> <y>286.15</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>380.15</x> <y>326.2</y> </position> <width>62.1</width> <height>62.1</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>315.35</x> <y>333.55</y> </position> <width>32.800000000000004</width> <height>32.800000000000004</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>582.6500000000001</x> <y>267.8500000000001</y> </position> <width>63.900000000000006</width> <height>63.900000000000006</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>508.75</x> <y>278.90000000000003</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>544.35</x> <y>316.25</y> </position> <width>18.2</width> <height>18.2</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>225</x> <y>269</y> </position> <width>32</width> <height>32</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>179</x> <y>107</y> </position> <width>46</width> <height>46</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>201</x> <y>165</y> </position> <width>14</width> <height>14</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>219</x> <y>207</y> </position> <width>30</width> <height>30</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>304</x> <y>255</y> </position> <width>14</width> <height>14</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>273</x> <y>236</y> </position> <width>18</width> <height>18</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>241</x> <y>137</y> </position> <width>18</width> <height>18</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>250</x> <y>74</y> </position> <width>26</width> <height>26</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>35</x> <y>293</y> </position> <width>40</width> <height>40</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>41</x> <y>249</y> </position> <width>298</width> <height>154</height> </start> <end> <position> <x>704.75</x> <y>99.4</y> </position> <width>253</width> <height>198.9</height> </end> </level> </retrieveLevel> </level16> <level17> <retrieveLevel> <levelId>69</levelId> <levelNumber>17</levelNumber> <name>Handling</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>122</x> <y>176.99999999999997</y> </position> <width>1166.1000000000001</width> <height>46.800000000000004</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>265</x> <y>-187.4</y> </position> <width>96.30000000000001</width> <height>489.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.1782558204336252</rotation> <position> <x>226.89999999999998</x> <y>-439.8</y> </position> <width>954.6</width> <height>53.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.41144162737828727</rotation> <position> <x>-343.3</x> <y>-43.00000000000001</y> </position> <width>39.300000000000004</width> <height>185.9</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>-314.75</x> <y>-112.75</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>228.7</x> <y>-400.55</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>309.1</x> <y>-382.65</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-280.70000000000005</x> <y>-531.05</y> </position> <width>21.400000000000002</width> <height>21.400000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-384.45</x> <y>46.349999999999994</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-307.54999999999995</x> <y>-205.7</y> </position> <width>32.2</width> <height>32.2</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-327.20000000000005</x> <y>-282.6</y> </position> <width>21.5</width> <height>21.5</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-362.95</x> <y>-329</y> </position> <width>14.3</width> <height>14.3</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>-0.5364578174643075</rotation> <position> <x>-334.40000000000015</x> <y>-541.7499999999999</y> </position> <width>25.3</width> <height>27.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> </levelBlocks> <playerBlocks> <JointedDynamicRectangle id="0"> <rotation>-1.578258831084456</rotation> <position> <x>1.0999999999999432</x> <y>67.50000000000001</y> </position> <width>114.4</width> <height>20</height> <goalBlock>true</goalBlock> <joints/> </JointedDynamicRectangle> </playerBlocks> <start> <position> <x>1.3</x> <y>-11</y> </position> <width>517</width> <height>338.3</height> </start> <end> <position> <x>400.40000000000003</x> <y>93.65</y> </position> <width>37.2</width> <height>124.4</height> </end> </level> </retrieveLevel> </level17> <level18> <retrieveLevel> <levelId>76</levelId> <levelNumber>18</levelNumber> <name>Tube</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>25.449999999999932</x> <y>156.20000000000007</y> </position> <width>50.2</width> <height>859.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>192.40000000000003</x> <y>164.95000000000005</y> </position> <width>50.3</width> <height>875.9000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>231.65000000000006</x> <y>-93.90000000000003</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-17.749999999999936</x> <y>219.45000000000005</y> </position> <width>27.200000000000003</width> <height>27.200000000000003</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>212.05000000000013</x> <y>584.3999999999999</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>1.0000000000000906</x> <y>586.0999999999999</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>0.29999999999999716</x> <y>-181.85000000000005</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>219.15000000000006</x> <y>-145.3</y> </position> <width>22.200000000000003</width> <height>22.200000000000003</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>109.80000000000003</x> <y>404.3</y> </position> <width>17</width> <height>17</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>108.85000000000001</x> <y>413.40000000000003</y> </position> <width>180.8</width> <height>306.2</height> </start> <end> <position> <x>111.95</x> <y>-192.55</y> </position> <width>167.3</width> <height>156.20000000000002</height> </end> </level> </retrieveLevel> </level18> <level19> <retrieveLevel> <levelId>60</levelId> <levelNumber>19</levelNumber> <name>Back and Forth</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>94.40000000000003</x> <y>268.75</y> </position> <width>504.1</width> <height>52.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>281.95</x> <y>317.40000000000003</y> </position> <width>105.5</width> <height>105.5</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>-0.15533789293086786</rotation> <position> <x>637.4499999999999</x> <y>341.75</y> </position> <width>332.70000000000005</width> <height>95.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>-157.95</x> <y>333.79999999999995</y> </position> <width>92</width> <height>92</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0.09327589932936298</rotation> <position> <x>57.79999999999998</x> <y>369.8500000000001</y> </position> <width>448.3</width> <height>65.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>52.099999999999994</x> <y>316.54999999999995</y> </position> <width>454.6</width> <height>100.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>493.75</x> <y>453.3</y> </position> <width>28.700000000000003</width> <height>149.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>630.35</x> <y>494.9</y> </position> <width>31.6</width> <height>241.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>666.3500000000003</x> <y>404.3500000000001</y> </position> <width>10</width> <height>60.400000000000006</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>565.6500000000001</x> <y>417.25</y> </position> <width>31.700000000000003</width> <height>74.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>738.25</x> <y>410.1</y> </position> <width>25.9</width> <height>164</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>790.05</x> <y>473.4</y> </position> <width>34.6</width> <height>241.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>-330.6</x> <y>46.05</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-254.35</x> <y>-76.25</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>-0.6264402302885688</rotation> <position> <x>-287.45000000000005</x> <y>-21.6</y> </position> <width>152.5</width> <height>28.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>886.45</x> <y>-66.15</y> </position> <width>31.700000000000003</width> <height>31.700000000000003</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>841.8</x> <y>5.749999999999997</y> </position> <width>31.700000000000003</width> <height>31.700000000000003</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>-0.6105716305576829</rotation> <position> <x>869.1500000000001</x> <y>-34.45</y> </position> <width>87.4</width> <height>25.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>-118.05</x> <y>213.2</y> </position> <width>56.900000000000006</width> <height>56.900000000000006</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>150</x> <y>155.55</y> </position> <width>309.70000000000005</width> <height>195.9</height> </start> <end> <position> <x>688.9000000000001</x> <y>241.70000000000002</y> </position> <width>200</width> <height>200</height> </end> </level> </retrieveLevel> </level19> <level20> <retrieveLevel> <levelId>54</levelId> <levelNumber>20</levelNumber> <name>Unpossible</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>327</x> <y>145</y> </position> <width>86</width> <height>232</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>219</x> <y>271</y> </position> <width>702</width> <height>54</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>432.9</x> <y>40</y> </position> <width>300</width> <height>42</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>547.2</x> <y>393.70000000000005</y> </position> <width>46.5</width> <height>272.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.42337293418504707</rotation> <position> <x>428.7</x> <y>327.05</y> </position> <width>263.6</width> <height>43.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>130.65</x> <y>367.29999999999995</y> </position> <width>42.2</width> <height>194.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.2837730021668529</rotation> <position> <x>223.7</x> <y>395.80000000000007</y> </position> <width>209.4</width> <height>31.700000000000003</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>263.8</x> <y>337.70000000000005</y> </position> <width>38</width> <height>101.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.341047829634894</rotation> <position> <x>-100.74999999999999</x> <y>337.74999999999994</y> </position> <width>27.5</width> <height>114.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-78.64999999999998</x> <y>362.00000000000006</y> </position> <width>35.9</width> <height>160.70000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.6387545653136661</rotation> <position> <x>19.650000000000006</x> <y>399.04999999999995</y> </position> <width>27.5</width> <height>152.20000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>58.80000000000001</x> <y>304.95000000000005</y> </position> <width>29.6</width> <height>95.10000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-22.6</x> <y>383.15</y> </position> <width>27.5</width> <height>219.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-186.45000000000002</x> <y>25.900000000000013</y> </position> <width>139.6</width> <height>38.1</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.4679534168639694</rotation> <position> <x>-196.99999999999997</x> <y>86.15000000000003</y> </position> <width>33.800000000000004</width> <height>158.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.4865762139617804</rotation> <position> <x>-245.60000000000002</x> <y>-14.299999999999983</y> </position> <width>23.200000000000003</width> <height>112.10000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-220.25000000000003</x> <y>81.95000000000002</y> </position> <width>21.1</width> <height>95.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-235.05000000000004</x> <y>-59.749999999999986</y> </position> <width>61.300000000000004</width> <height>10.600000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>100</x> <y>100</y> </position> <width>20.4</width> <height>20.4</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>75</x> <y>162</y> </position> <width>330</width> <height>176</height> </start> <end> <position> <x>450</x> <y>150</y> </position> <width>200</width> <height>200</height> </end> </level> </retrieveLevel> </level20> <level21> <retrieveLevel> <levelId>4575</levelId> <levelNumber>21</levelNumber> <name>U-Turn</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>-60.900000000000006</x> <y>-91.30000000000001</y> </position> <width>869.2</width> <height>74.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-61.10000000000002</x> <y>167.60000000000002</y> </position> <width>869.2</width> <height>74.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-61.35000000000002</x> <y>424.8</y> </position> <width>869.2</width> <height>74.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>365.90000000000003</x> <y>167.65000000000003</y> </position> <width>37.5</width> <height>37.5</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-498.45</x> <y>-91.25</y> </position> <width>38</width> <height>38</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-498.35000000000014</x> <y>167.50000000000003</y> </position> <width>38</width> <height>38</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-492.65000000000003</x> <y>424.8</y> </position> <width>38</width> <height>38</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>-0.057433946420220594</rotation> <position> <x>377.75000000000006</x> <y>413.29999999999995</y> </position> <width>50.1</width> <height>54.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.2188890647345736</rotation> <position> <x>412.3</x> <y>407.6000000000001</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.3727196492481757</rotation> <position> <x>443.84999999999997</x> <y>396.4</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.5501214374048453</rotation> <position> <x>476.85</x> <y>379.59999999999997</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.6900361164950406</rotation> <position> <x>507.0000000000001</x> <y>357.6</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.8042638494191203</rotation> <position> <x>530.3499999999999</x> <y>336.8</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.9492195254248363</rotation> <position> <x>552.6999999999999</x> <y>310.4</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.4676001575875561</rotation> <position> <x>569.9</x> <y>281.4500000000001</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.3585090955969665</rotation> <position> <x>582.0500000000001</x> <y>255.85</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.22619580274782458</rotation> <position> <x>592.5</x> <y>220.1</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.12264364424939811</rotation> <position> <x>597.1000000000001</x> <y>193.70000000000002</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>598.2</x> <y>162.3</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.05887294616330241</rotation> <position> <x>596.5000000000001</x> <y>132</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.14586641283292168</rotation> <position> <x>593.5</x> <y>119.25</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.27362909316359363</rotation> <position> <x>586.2500000000002</x> <y>90.05</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.35917800222360374</rotation> <position> <x>578.4</x> <y>68.19999999999999</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.487147555620417</rotation> <position> <x>567.1500000000001</x> <y>47.4</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.6550203157012948</rotation> <position> <x>546.9500000000002</x> <y>17.100000000000005</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.795643706526244</rotation> <position> <x>522.75</x> <y>-11.5</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.644438315641658</rotation> <position> <x>497.00000000000006</x> <y>-33.400000000000006</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-1.0681021101544852</rotation> <position> <x>466.70000000000005</x> <y>-51.949999999999996</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.3781423153226016</rotation> <position> <x>441.9500000000001</x> <y>-65.35000000000001</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.2381962321567037</rotation> <position> <x>417.80000000000007</x> <y>-73.25</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.20163119104657812</rotation> <position> <x>395.95000000000005</x> <y>-77.80000000000001</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>375.70000000000005</x> <y>-80.00000000000001</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>372.2</x> <y>447.2</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>374.80000000000007</x> <y>-110.10000000000001</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>431.1000000000001</x> <y>-91.95</y> </position> <width>40.7</width> <height>40.7</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>423.40000000000003</x> <y>-137.65</y> </position> <width>16.900000000000002</width> <height>16.900000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>466.70000000000016</x> <y>-74.6</y> </position> <width>28.900000000000002</width> <height>28.900000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>414.4000000000001</x> <y>445.65000000000003</y> </position> <width>40</width> <height>40</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>474.5000000000001</x> <y>420.1</y> </position> <width>35.6</width> <height>35.6</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>546.7500000000001</x> <y>354.55</y> </position> <width>15.5</width> <height>15.5</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>595.6499999999999</x> <y>66.60000000000001</y> </position> <width>28.900000000000002</width> <height>28.900000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>-0.8079149353758508</rotation> <position> <x>575.2</x> <y>384.50000000000006</y> </position> <width>12</width> <height>80.80000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>604.3000000000001</x> <y>413.19999999999993</y> </position> <width>12</width> <height>12</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>-0.29077191014988335</rotation> <position> <x>385.3500000000001</x> <y>-177.10000000000002</y> </position> <width>12</width> <height>104.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>371.40000000000003</x> <y>-223.9</y> </position> <width>23.400000000000002</width> <height>23.400000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-753.0500000000001</x> <y>-28.400000000000002</y> </position> <width>82.9</width> <height>82.9</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-800.6500000000001</x> <y>-87.39999999999999</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-687.45</x> <y>7.599999999999994</y> </position> <width>23.900000000000002</width> <height>23.900000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-751.3500000000001</x> <y>-99.25000000000004</y> </position> <width>34</width> <height>34</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-680.4000000000002</x> <y>-58.20000000000002</y> </position> <width>12</width> <height>12</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>-0.5874199932276543</rotation> <position> <x>-862.2</x> <y>-122.25000000000003</y> </position> <width>12</width> <height>111.80000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>-900.15</x> <y>-179.10000000000002</y> </position> <width>38</width> <height>38</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0.7114652320242791</rotation> <position> <x>-832.95</x> <y>-160.65</y> </position> <width>12</width> <height>96.80000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>-802.8500000000001</x> <y>-193.5</y> </position> <width>12</width> <height>12</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-743.8000000000001</x> <y>367.15000000000003</y> </position> <width>27.6</width> <height>27.6</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-762.9500000000002</x> <y>355.4</y> </position> <width>12</width> <height>12</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>-0.23395050645486792</rotation> <position> <x>-736.35</x> <y>391.55</y> </position> <width>12</width> <height>42.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>-728.85</x> <y>417</y> </position> <width>17</width> <height>17</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>10.850000000000044</x> <y>535.0999999999999</y> </position> <width>33.5</width> <height>33.5</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-19.549999999999997</x> <y>529</y> </position> <width>16</width> <height>16</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-231.65000000000003</x> <y>-240.44999999999996</y> </position> <width>50.1</width> <height>50.1</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0.008042722022367443</rotation> <position> <x>-170.35000000000002</x> <y>-252.90000000000003</y> </position> <width>25</width> <height>25</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-185.95</x> <y>-265.35</y> </position> <width>18.8</width> <height>18.8</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>-0.06856778645581586</rotation> <position> <x>-107.89999999999999</x> <y>-259.6</y> </position> <width>107.30000000000001</width> <height>12</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>-61.099999999999994</x> <y>-252.20000000000005</y> </position> <width>20.3</width> <height>20.3</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-47.55000000000002</x> <y>-245.45000000000005</y> </position> <width>12</width> <height>12</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>-274.5</x> <y>293.1</y> </position> <width>40</width> <height>40</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>-285.35</x> <y>303.05</y> </position> <width>417.70000000000005</width> <height>233.9</height> </start> <end> <position> <x>-285.85</x> <y>34.95</y> </position> <width>415.8</width> <height>211.9</height> </end> </level> </retrieveLevel> </level21> <level22> <retrieveLevel> <levelId>868</levelId> <levelNumber>22</levelNumber> <name>Pit & Pendulum</name> <level> <levelBlocks> <StaticRectangle> <rotation>0.5565742760105719</rotation> <position> <x>-906.4</x> <y>-13.90000000000002</y> </position> <width>727.3</width> <height>210.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-574.55</x> <y>139.70000000000002</y> </position> <width>405.9</width> <height>122.3</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.2529635126586314</rotation> <position> <x>-404.94999999999993</x> <y>131.4</y> </position> <width>211.3</width> <height>100.1</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.38615431632138203</rotation> <position> <x>334.65000000000003</x> <y>159.14999999999998</y> </position> <width>232</width> <height>98.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>412.4500000000001</x> <y>209.25</y> </position> <width>228</width> <height>166.9</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.4931366537449091</rotation> <position> <x>743.4</x> <y>381.65</y> </position> <width>637.7</width> <height>244.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.05417105997412064</rotation> <position> <x>-744.1500000000002</x> <y>570.6999999999999</y> </position> <width>856.4</width> <height>900.9</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-963.8499999999999</x> <y>103.54999999999998</y> </position> <width>328.1</width> <height>172.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.030670138878387432</rotation> <position> <x>-1030.55</x> <y>1062.8</y> </position> <width>1484.8</width> <height>1479.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.04199257697046632</rotation> <position> <x>693.3</x> <y>654.15</y> </position> <width>978.7</width> <height>506</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.061421059756234575</rotation> <position> <x>380.09999999999997</x> <y>309.3</y> </position> <width>319.6</width> <height>331.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>-35.15</x> <y>-227.25000000000003</y> </position> <width>16.7</width> <height>16.7</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>-991.65</x> <y>-307.95000000000005</y> </position> <width>40</width> <height>40</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>150.1</x> <y>-225.25</y> </position> <width>495</width> <height>127.9</height> </start> <end> <position> <x>450.45</x> <y>66.75</y> </position> <width>150.2</width> <height>133.4</height> </end> </level> </retrieveLevel> </level22> <level23> <retrieveLevel> <levelId>80432</levelId> <levelNumber>23</levelNumber> <name>Chimichangas</name> <level> <levelBlocks> <StaticRectangle> <rotation>-1.509796292802691</rotation> <position> <x>-559.25</x> <y>-344.1500000000001</y> </position> <width>14.1</width> <height>735.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.8100406755762687</rotation> <position> <x>-318.55000000000007</x> <y>-79.25000000000003</y> </position> <width>12</width> <height>547.8000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.778563347360475</rotation> <position> <x>-159.34999999999997</x> <y>-59.70000000000002</y> </position> <width>12</width> <height>569.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.7810878452636342</rotation> <position> <x>4.95000000000001</x> <y>-29.700000000000017</y> </position> <width>12</width> <height>581.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>405.50000000000006</x> <y>-240.6</y> </position> <width>12</width> <height>389.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.8922362280869369</rotation> <position> <x>265.2</x> <y>63.40000000000002</y> </position> <width>12</width> <height>356.20000000000005</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>-0.08755116384329364</rotation> <position> <x>-857.4000000000001</x> <y>-443.9500000000001</y> </position> <width>55.7</width> <height>55.7</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>-209.65</x> <y>22.3</y> </position> <width>478.5</width> <height>233.7</height> </start> <end> <position> <x>-203.85000000000002</x> <y>374.20000000000005</y> </position> <width>530.6</width> <height>100</height> </end> </level> </retrieveLevel> </level23> <level24> <retrieveLevel> <levelId>61704</levelId> <levelNumber>24</levelNumber> <name>Ack and Forth</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>-24</x> <y>-174.375</y> </position> <width>52.8</width> <height>504.1</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-1.72611317693</rotation> <position> <x>-96.973</x> <y>368.676</y> </position> <width>332.7</width> <height>95.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-1.47756083815</rotation> <position> <x>-125.104</x> <y>-210.983</y> </position> <width>448.3</width> <height>65.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-71.8</x> <y>-216.675</y> </position> <width>100.7</width> <height>454.601</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-208.549</x> <y>224.974</y> </position> <width>149.6</width> <height>28.699</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-250.15</x> <y>361.574</y> </position> <width>241.7</width> <height>31.601</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-159.599</x> <y>397.574</y> </position> <width>60.399</width> <height>10</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-172.499</x> <y>296.874</y> </position> <width>74.801</width> <height>31.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-165.35</x> <y>469.474</y> </position> <width>164</width> <height>25.9</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-228.65</x> <y>521.275</y> </position> <width>241.6</width> <height>34.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-2.1972822618</rotation> <position> <x>266.336</x> <y>-556.201</y> </position> <width>152.5</width> <height>28.799</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-2.18132995244</rotation> <position> <x>279.204</x> <y>600.417</y> </position> <width>87.401</width> <height>25.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>-72.65</x> <y>13.175</y> </position> <width>105.5</width> <height>105.5</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-89.049</x> <y>-426.726</y> </position> <width>92</width> <height>92</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>198.701</x> <y>-599.375</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>321</x> <y>-523.125</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>310.9</x> <y>617.675</y> </position> <width>31.7</width> <height>31.7</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>239</x> <y>573.024</y> </position> <width>31.7</width> <height>31.7</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> </levelBlocks> <playerBlocks> <NoSpinWheel> <rotation>0</rotation> <position> <x>31.55</x> <y>-386.825</y> </position> <width>56.9</width> <height>56.9</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>89.2</x> <y>-118.775</y> </position> <width>195.899</width> <height>309.7</height> </start> <end> <position> <x>3.05</x> <y>420.125</y> </position> <width>200</width> <height>200</height> </end> </level> </retrieveLevel> </level24> <level25> <retrieveLevel> <levelId>55555</levelId> <levelNumber>25</levelNumber> <name>Tote 'em Pole</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>-114.29999999999998</x> <y>133.10000000000002</y> </position> <width>486.1</width> <height>69.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>-205.65000000000006</x> <y>-154.60000000000005</y> </position> <width>31.9</width> <height>376.2</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> </levelBlocks> <playerBlocks> <JointedDynamicRectangle id="0"> <rotation>0</rotation> <position> <x>-206.5</x> <y>-357.7</y> </position> <width>62.1</width> <height>30.3</height> <goalBlock>true</goalBlock> <joints/> </JointedDynamicRectangle> </playerBlocks> <start> <position> <x>-98</x> <y>17</y> </position> <width>396</width> <height>192</height> </start> <end> <position> <x>46.55</x> <y>-369.8</y> </position> <width>100</width> <height>100</height> </end> </level> </retrieveLevel> </level25> <level26> <retrieveLevel> <levelId>81679</levelId> <levelNumber>26</levelNumber> <name>Canyon</name> <level> <levelBlocks> <StaticRectangle> <rotation>0.2802010385982985</rotation> <position> <x>564.8500000000001</x> <y>-82.45000000000002</y> </position> <width>58</width> <height>351.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.2599916544165059</rotation> <position> <x>460.65000000000003</x> <y>60.15</y> </position> <width>105.9</width> <height>51</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.7989224215209647</rotation> <position> <x>497.95</x> <y>30.700000000000014</y> </position> <width>121.60000000000001</width> <height>43.1</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>84.1</x> <y>62.2</y> </position> <width>294.2</width> <height>35.300000000000004</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>203.75</x> <y>158.25</y> </position> <width>54.900000000000006</width> <height>204</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>429.25</x> <y>160.20000000000005</y> </position> <width>54.900000000000006</width> <height>219.70000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-55.150000000000006</x> <y>148.35000000000002</y> </position> <width>47.1</width> <height>208</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-249.35</x> <y>183.70000000000005</y> </position> <width>58.900000000000006</width> <height>380.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.9176021018690403</rotation> <position> <x>-192.45</x> <y>371.99999999999994</y> </position> <width>63.7</width> <height>135.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>1.2125971867695706</rotation> <position> <x>-218.00000000000003</x> <y>311.15000000000003</y> </position> <width>136.70000000000002</width> <height>47.900000000000006</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>729.4499999999998</x> <y>411.2999999999999</y> </position> <width>1074.8</width> <height>54.900000000000006</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-168.89999999999998</x> <y>413.20000000000005</y> </position> <width>251</width> <height>62.800000000000004</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>317.4500000000001</x> <y>262.09999999999997</y> </position> <width>282.40000000000003</width> <height>35.300000000000004</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>804.5</x> <y>254.10000000000005</y> </position> <width>757.1</width> <height>51</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>15.399999999999977</x> <y>756.3</y> </position> <width>1294.6000000000001</width> <height>317.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-94.45000000000006</x> <y>589.7</y> </position> <width>102</width> <height>392.3</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>672.5</x> <y>634.8000000000001</y> </position> <width>961.1</width> <height>478.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-748.8999999999999</x> <y>234.64999999999995</y> </position> <width>1059.2</width> <height>1400.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.1813795344022609</rotation> <position> <x>-926.1000000000001</x> <y>-573.8</y> </position> <width>1137.7</width> <height>486.40000000000003</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-190.5</x> <y>520.6</y> </position> <width>168.70000000000002</width> <height>180.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>892.15</x> <y>-311.1000000000001</y> </position> <width>615.9000000000001</width> <height>1133.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>545.0500000000001</x> <y>148.4</y> </position> <width>215.70000000000002</width> <height>192.20000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>582.3</x> <y>9.100000000000003</y> </position> <width>94.10000000000001</width> <height>156.9</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>560.9000000000002</x> <y>-257.79999999999995</y> </position> <width>40</width> <height>40</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>202</x> <y>149.1</y> </position> <width>486.5</width> <height>145.1</height> </start> <end> <position> <x>1049</x> <y>325.95000000000005</y> </position> <width>866.9000000000001</width> <height>211.8</height> </end> </level> </retrieveLevel> </level26> <level27> <retrieveLevel> <levelId>74376</levelId> <levelNumber>27</levelNumber> <name>Default</name> <level> <levelBlocks/> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>-102</x> <y>-3</y> </position> <width>40</width> <height>40</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>-150</x> <y>50</y> </position> <width>200</width> <height>200</height> </start> <end> <position> <x>150</x> <y>50</y> </position> <width>200</width> <height>200</height> </end> </level> </retrieveLevel> </level27> <level28> <retrieveLevel> <levelId>5109</levelId> <levelNumber>28</levelNumber> <name>Brick Layer</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>-258.05</x> <y>235</y> </position> <width>420.6</width> <height>131.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>171.05</x> <y>256.85000000000014</y> </position> <width>675.3</width> <height>88</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>495.3</x> <y>219.65000000000003</y> </position> <width>26.4</width> <height>85.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>116.55</x> <y>-188.1</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0</rotation> <position> <x>139.75</x> <y>-168.85000000000002</y> </position> <width>50.8</width> <height>59.3</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0.6147450585432935</rotation> <position> <x>-357.5</x> <y>-267.75</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0</rotation> <position> <x>-382.25</x> <y>-292.29999999999995</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>1.1036919414393886</rotation> <position> <x>340.75</x> <y>423.19999999999993</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0</rotation> <position> <x>319.29999999999995</x> <y>446.00000000000006</y> </position> <width>57</width> <height>52.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> </levelBlocks> <playerBlocks> <JointedDynamicRectangle id="0"> <rotation>0</rotation> <position> <x>-381.25000000000006</x> <y>45.75000000000003</y> </position> <width>92.4</width> <height>26.4</height> <goalBlock>true</goalBlock> <joints/> </JointedDynamicRectangle> <JointedDynamicRectangle id="1"> <rotation>0</rotation> <position> <x>-380.15</x> <y>128.60000000000005</y> </position> <width>96.8</width> <height>26.4</height> <goalBlock>true</goalBlock> <joints/> </JointedDynamicRectangle> <JointedDynamicRectangle id="2"> <rotation>0</rotation> <position> <x>-381.15000000000003</x> <y>101.44999999999999</y> </position> <width>94.6</width> <height>26.4</height> <goalBlock>true</goalBlock> <joints/> </JointedDynamicRectangle> <JointedDynamicRectangle id="3"> <rotation>0</rotation> <position> <x>-380.09999999999985</x> <y>73.44999999999993</y> </position> <width>92.4</width> <height>26.4</height> <goalBlock>true</goalBlock> <joints/> </JointedDynamicRectangle> <JointedDynamicRectangle id="4"> <rotation>0</rotation> <position> <x>-380.19999999999976</x> <y>156.25000000000003</y> </position> <width>99</width> <height>26.4</height> <goalBlock>true</goalBlock> <joints/> </JointedDynamicRectangle> </playerBlocks> <start> <position> <x>-277.2</x> <y>31.9</y> </position> <width>310.2</width> <height>279.4</height> </start> <end> <position> <x>169.4</x> <y>227.7</y> </position> <width>666.5</width> <height>100</height> </end> </level> </retrieveLevel> </level28> <level29> <retrieveLevel> <levelId>72627</levelId> <levelNumber>29</levelNumber> <name>Stuck</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>80.5</x> <y>248.00000000000003</y> </position> <width>969.1</width> <height>59.1</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.3209836240517654</rotation> <position> <x>-341.6000000000001</x> <y>-44.4</y> </position> <width>139.1</width> <height>343.90000000000003</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.3171774989916758</rotation> <position> <x>532.3</x> <y>-46.05000000000004</y> </position> <width>144.3</width> <height>347.20000000000005</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.4690498526999152</rotation> <position> <x>-325.25000000000006</x> <y>147.85000000000002</y> </position> <width>137.70000000000002</width> <height>192.10000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.47968047972806416</rotation> <position> <x>519.05</x> <y>147.89999999999998</y> </position> <width>150.4</width> <height>196.20000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>554.7</x> <y>234.85000000000005</y> </position> <width>147.8</width> <height>85.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-381.5</x> <y>236.70000000000005</y> </position> <width>94.9</width> <height>82</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>100.80000000000001</x> <y>197.65</y> </position> <width>40</width> <height>40</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>93.60000000000001</x> <y>-111.65</y> </position> <width>847.5</width> <height>203.70000000000002</height> </start> <end> <position> <x>75.5</x> <y>44.400000000000006</y> </position> <width>795</width> <height>100</height> </end> </level> </retrieveLevel> </level29> <level30> <retrieveLevel> <levelId>75888</levelId> <levelNumber>30</levelNumber> <name>Crown Jewels</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>-150</x> <y>51</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>151</x> <y>52</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> </levelBlocks> <playerBlocks> <JointedDynamicRectangle id="0"> <rotation>0.7853981633974483</rotation> <position> <x>-151</x> <y>-11</y> </position> <width>50</width> <height>50</height> <goalBlock>true</goalBlock> <joints/> </JointedDynamicRectangle> <JointedDynamicRectangle id="1"> <rotation>0.7853981633974483</rotation> <position> <x>149</x> <y>-9</y> </position> <width>50</width> <height>50</height> <goalBlock>true</goalBlock> <joints/> </JointedDynamicRectangle> </playerBlocks> <start> <position> <x>-150</x> <y>50</y> </position> <width>200</width> <height>200</height> </start> <end> <position> <x>150</x> <y>45</y> </position> <width>184</width> <height>186</height> </end> </level> </retrieveLevel> </level30> <level31> <retrieveLevel> <levelId>55555</levelId> <levelNumber>31</levelNumber> <name>Projected</name> levelId: 55511 <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>-364.45000000000005</x> <y>-22.400000000000002</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-554.95</x> <y>191.25</y> </position> <width>45.300000000000004</width> <height>158.70000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-597.4500000000002</x> <y>228.3</y> </position> <width>57.7</width> <height>111.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-465.8</x> <y>124.44999999999999</y> </position> <width>64.2</width> <height>50.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-209.15000000000003</x> <y>86.94999999999999</y> </position> <width>47.400000000000006</width> <height>175.10000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-364.05000000000007</x> <y>34.00000000000001</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-309.79999999999995</x> <y>44.599999999999994</y> </position> <width>43.2</width> <height>126</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>-260.1500000000001</x> <y>-227.65</y> </position> <width>31.400000000000002</width> <height>51.300000000000004</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-304.8</x> <y>169.55</y> </position> <width>238.3</width> <height>12</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.17194919081630078</rotation> <position> <x>-504.55</x> <y>-187.75</y> </position> <width>257.8</width> <height>16.900000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-434.29999999999995</x> <y>293.35</y> </position> <width>1437.2</width> <height>89.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-119.45</x> <y>123.05000000000003</y> </position> <width>34.2</width> <height>277.1</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-427.40000000000003</x> <y>243.70000000000002</y> </position> <width>505.5</width> <height>61.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-379.15</x> <y>138</y> </position> <width>182</width> <height>76.9</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>-638.0500000000002</x> <y>166.30000000000004</y> </position> <width>102.7</width> <height>12</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-497.75000000000006</x> <y>216.8</y> </position> <width>110.10000000000001</width> <height>150.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.2820246636701127</rotation> <position> <x>-25.75</x> <y>167.35000000000002</y> </position> <width>92.4</width> <height>17.3</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>47.00000000000001</x> <y>115.20000000000002</y> </position> <width>56.2</width> <height>325</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>12.700000000000005</x> <y>35.05</y> </position> <width>131.8</width> <height>42.1</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-119.75000000000001</x> <y>-34.300000000000004</y> </position> <width>35.2</width> <height>137</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>155.75000000000003</x> <y>71.3</y> </position> <width>12</width> <height>391.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>128.7</x> <y>-185.45000000000005</y> </position> <width>175.4</width> <height>125.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>48.4</x> <y>-100.95000000000002</y> </position> <width>58.400000000000006</width> <height>311</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.2994355982190906</rotation> <position> <x>201.8</x> <y>231.75</y> </position> <width>116.4</width> <height>52.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>1.6698889302964977</rotation> <position> <x>230.30000000000004</x> <y>262.24999999999994</y> </position> <width>53.900000000000006</width> <height>183.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>379.75000000000006</x> <y>288.95</y> </position> <width>216.8</width> <height>68.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>635.15</x> <y>229.45</y> </position> <width>189.70000000000002</width> <height>12</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.29504166743795235</rotation> <position> <x>769.6</x> <y>222.20000000000002</y> </position> <width>303.7</width> <height>26.3</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.8161119878817885</rotation> <position> <x>849.7000000000002</x> <y>269.9000000000001</y> </position> <width>555.5</width> <height>84.60000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.26432973879228183</rotation> <position> <x>919.7500000000001</x> <y>273.3</y> </position> <width>12</width> <height>1183.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.23423889967665124</rotation> <position> <x>568.6</x> <y>234.90000000000003</y> </position> <width>124.30000000000001</width> <height>12</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.2113973769956824</rotation> <position> <x>269.25000000000006</x> <y>264.9</y> </position> <width>263.2</width> <height>74</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.5096997015819713</rotation> <position> <x>830.3</x> <y>233.90000000000003</y> </position> <width>376.20000000000005</width> <height>73.3</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.9835398424208726</rotation> <position> <x>946.25</x> <y>163.25000000000003</y> </position> <width>264</width> <height>75.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.1234671473593531</rotation> <position> <x>719.1000000000001</x> <y>250.90000000000003</y> </position> <width>190.4</width> <height>72.9</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.5509904895084676</rotation> <position> <x>336.35</x> <y>196.2</y> </position> <width>69.5</width> <height>12</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>-456.84999999999997</x> <y>-135.3</y> </position> <width>18.3</width> <height>18.3</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> <NoSpinWheel id="1"> <rotation>0</rotation> <position> <x>-619.7500000000001</x> <y>-237.85000000000002</y> </position> <width>29.400000000000002</width> <height>29.400000000000002</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> <NoSpinWheel id="2"> <rotation>0</rotation> <position> <x>-166.25</x> <y>-171.8</y> </position> <width>14.4</width> <height>14.4</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> <NoSpinWheel id="3"> <rotation>0</rotation> <position> <x>-164.05000000000004</x> <y>-194.25</y> </position> <width>12</width> <height>12</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> <NoSpinWheel id="4"> <rotation>0</rotation> <position> <x>-168.35000000000002</x> <y>-210</y> </position> <width>12</width> <height>12</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> <NoSpinWheel id="5"> <rotation>0</rotation> <position> <x>-167.95000000000002</x> <y>-228.85000000000002</y> </position> <width>12</width> <height>12</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> <NoSpinWheel id="6"> <rotation>0</rotation> <position> <x>-166.35000000000002</x> <y>-258.95</y> </position> <width>12</width> <height>12</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> <JointedDynamicRectangle id="7"> <rotation>0</rotation> <position> <x>-599.95</x> <y>141.95</y> </position> <width>37.2</width> <height>38.300000000000004</height> <goalBlock>true</goalBlock> <joints/> </JointedDynamicRectangle> <NoSpinWheel id="8"> <rotation>0</rotation> <position> <x>4.300000000000004</x> <y>90.30000000000001</y> </position> <width>22.700000000000003</width> <height>22.700000000000003</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> <JointedDynamicRectangle id="9"> <rotation>0</rotation> <position> <x>99.05000000000001</x> <y>-102.79999999999998</y> </position> <width>39.6</width> <height>37.5</height> <goalBlock>true</goalBlock> <joints/> </JointedDynamicRectangle> <NoSpinWheel id="10"> <rotation>0</rotation> <position> <x>1049.0500000000002</x> <y>-339.90000000000003</y> </position> <width>20.900000000000002</width> <height>20.900000000000002</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>-116.85000000000001</x> <y>5.3500000000000005</y> </position> <width>661.9000000000001</width> <height>100</height> </start> <end> <position> <x>-200.75</x> <y>167.95000000000002</y> </position> <width>842.7</width> <height>100</height> </end> </level> </retrieveLevel> </level31> <level32> <retrieveLevel> <levelId>72743</levelId> <levelNumber>32</levelNumber> <name>Be a Champ</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>-229.95000000000002</x> <y>150.39999999999998</y> </position> <width>416.90000000000003</width> <height>65.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.09850200844897491</rotation> <position> <x>11.399999999999977</x> <y>-189.5</y> </position> <width>381.6</width> <height>27.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.14873551517456748</rotation> <position> <x>-351.25000000000006</x> <y>-180.55000000000004</y> </position> <width>372.90000000000003</width> <height>28.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-1.2801699808938487</rotation> <position> <x>-588.6500000000001</x> <y>104.14999999999999</y> </position> <width>66</width> <height>346.20000000000005</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>1.3536038879628585</rotation> <position> <x>-584.5999999999999</x> <y>186.25000000000006</y> </position> <width>65.9</width> <height>345</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.4904954413610285</rotation> <position> <x>-328.69999999999993</x> <y>-292.49999999999994</y> </position> <width>368.6</width> <height>26.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.35032680816718687</rotation> <position> <x>-202.65</x> <y>370.65000000000003</y> </position> <width>118.10000000000001</width> <height>19.700000000000003</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.27008127451373576</rotation> <position> <x>-208.54999999999998</x> <y>406.15000000000003</y> </position> <width>109.5</width> <height>17.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-118</x> <y>390.35</y> </position> <width>94.5</width> <height>19.700000000000003</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> </levelBlocks> <playerBlocks> <JointedDynamicRectangle id="0"> <rotation>0</rotation> <position> <x>-88.4</x> <y>50.54999999999999</y> </position> <width>43</width> <height>40.5</height> <goalBlock>true</goalBlock> <joints/> </JointedDynamicRectangle> <NoSpinWheel id="1"> <rotation>0</rotation> <position> <x>-160.45000000000002</x> <y>-232.39999999999998</y> </position> <width>25.200000000000003</width> <height>25.200000000000003</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>-231.20000000000002</x> <y>27.8</y> </position> <width>384.1</width> <height>187</height> </start> <end> <position> <x>269.15000000000003</x> <y>34.15</y> </position> <width>176.8</width> <height>106.10000000000001</height> </end> </level> </retrieveLevel> </level32> <level33> <retrieveLevel> <levelId>74274</levelId> <levelNumber>33</levelNumber> <name>Sunset</name> <level> <levelBlocks> <DynamicCircle> <rotation>0</rotation> <position> <x>-53</x> <y>-51</y> </position> <width>118</width> <height>118</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <StaticRectangle> <rotation>0</rotation> <position> <x>-66</x> <y>123</y> </position> <width>610</width> <height>52</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>-312.2</x> <y>338.99999999999994</y> </position> <width>112.9</width> <height>112.9</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-122.89999999999998</x> <y>341.90000000000003</y> </position> <width>121.4</width> <height>121.4</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-365.8500000000001</x> <y>142.7</y> </position> <width>45.2</width> <height>45.2</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-242.9</x> <y>158.25</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-163.90000000000003</x> <y>156.85000000000002</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-76.24999999999997</x> <y>154</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>9.900000000000016</x> <y>148.4</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>87.55000000000003</x> <y>169.55</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>158.2</x> <y>159.65000000000003</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>237.25000000000003</x> <y>146.95</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-303.65</x> <y>155.4</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>32.50000000000002</x> <y>367.25</y> </position> <width>129.9</width> <height>129.9</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>224.60000000000005</x> <y>353.2</y> </position> <width>115.8</width> <height>115.8</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-450.5499999999999</x> <y>298.45</y> </position> <width>101.7</width> <height>101.7</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>382.7000000000001</x> <y>304.05000000000007</y> </position> <width>113</width> <height>113</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-676.25</x> <y>691.6000000000001</y> </position> <width>262.40000000000003</width> <height>262.40000000000003</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-265.90000000000003</x> <y>758.5500000000001</y> </position> <width>234.4</width> <height>234.4</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>102.45000000000002</x> <y>764.1500000000001</y> </position> <width>228.9</width> <height>228.9</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>646.6000000000001</x> <y>663.65</y> </position> <width>251.2</width> <height>251.2</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>384.35000000000014</x> <y>761.3500000000001</y> </position> <width>223.3</width> <height>223.3</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-346.84999999999997</x> <y>-257.29999999999995</y> </position> <width>94.9</width> <height>94.9</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-285.20000000000005</x> <y>-230.35</y> </position> <width>62</width> <height>62</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-189.84999999999988</x> <y>-201.3</y> </position> <width>28</width> <height>28</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-428.25</x> <y>-210.45</y> </position> <width>48.5</width> <height>48.5</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-225.05</x> <y>-202.59999999999997</y> </position> <width>37.7</width> <height>37.7</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> </levelBlocks> <playerBlocks> <JointedDynamicRectangle id="0"> <rotation>0.001573115877719522</rotation> <position> <x>-51</x> <y>-178</y> </position> <width>95.8</width> <height>18.9</height> <goalBlock>true</goalBlock> <joints/> </JointedDynamicRectangle> </playerBlocks> <start> <position> <x>-56.5</x> <y>31.1</y> </position> <width>720</width> <height>148</height> </start> <end> <position> <x>-53.2</x> <y>114.35000000000001</y> </position> <width>214.3</width> <height>100</height> </end> </level> </retrieveLevel> </level33> <level34> <retrieveLevel> <levelId>79565</levelId> <levelNumber>34</levelNumber> <name>Displacement</name> <level> <levelBlocks> <StaticRectangle> <rotation>0.011831537722138546</rotation> <position> <x>-33</x> <y>149</y> </position> <width>604.5</width> <height>50.3</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>241</x> <y>56</y> </position> <width>54</width> <height>212</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>120</x> <y>-64.2</y> </position> <width>295.8</width> <height>49.300000000000004</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <DynamicCircle> <rotation>0</rotation> <position> <x>20</x> <y>74</y> </position> <width>16</width> <height>16</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>32</x> <y>107</y> </position> <width>20</width> <height>20</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>74</x> <y>108</y> </position> <width>22</width> <height>22</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>118</x> <y>111</y> </position> <width>20</width> <height>20</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>190.5</x> <y>42.65000000000001</y> </position> <width>24</width> <height>24</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>132.14999999999998</x> <y>69.55</y> </position> <width>22</width> <height>22</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>139.49999999999997</x> <y>20.949999999999992</y> </position> <width>22</width> <height>22</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>183.95</x> <y>96.1</y> </position> <width>28</width> <height>28</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>81.94999999999999</x> <y>58.7</y> </position> <width>26</width> <height>26</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>94</x> <y>-2</y> </position> <width>26</width> <height>26</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>189</x> <y>-8</y> </position> <width>18</width> <height>18</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>-7</x> <y>104</y> </position> <width>22</width> <height>22</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>30</x> <y>42</y> </position> <width>18</width> <height>18</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>37</x> <y>-8</y> </position> <width>26</width> <height>26</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <StaticCircle> <rotation>0</rotation> <position> <x>248.14999999999995</x> <y>155.19999999999996</y> </position> <width>32.9</width> <height>32.9</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>247.84999999999997</x> <y>-68.35</y> </position> <width>33.4</width> <height>33.4</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-327.7</x> <y>146.65</y> </position> <width>25.700000000000003</width> <height>25.700000000000003</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0</rotation> <position> <x>38.84999999999998</x> <y>245.05</y> </position> <width>251</width> <height>45.900000000000006</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>230.75</x> <y>-201.45000000000002</y> </position> <width>158</width> <height>32.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>-78.05000000000001</x> <y>245.40000000000003</y> </position> <width>23.5</width> <height>23.5</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>160.05</x> <y>245.35</y> </position> <width>23.6</width> <height>23.6</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>308.05</x> <y>-201.00000000000003</y> </position> <width>16.1</width> <height>16.1</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-152.64999999999998</x> <y>245.4</y> </position> <width>23.5</width> <height>23.5</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-250.60000000000002</x> <y>242.95000000000002</y> </position> <width>27.5</width> <height>27.5</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-364.7</x> <y>240.50000000000003</y> </position> <width>34</width> <height>34</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>-268</x> <y>-183</y> </position> <width>90</width> <height>90</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>-173</x> <y>-51</y> </position> <width>316</width> <height>412</height> </start> <end> <position> <x>126.15</x> <y>45.800000000000004</y> </position> <width>179</width> <height>173.10000000000002</height> </end> </level> </retrieveLevel> </level34> <level35> <retrieveLevel> <levelId>180614</levelId> <levelNumber>35</levelNumber> <name>Gate Keeper</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>-174.2</x> <y>232.85</y> </position> <width>349.5</width> <height>112.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>203.35000000000005</x> <y>232.84999999999997</y> </position> <width>352.4</width> <height>112.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-53.44999999999999</x> <y>321.54999999999995</y> </position> <width>40.4</width> <height>152.9</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>82.75000000000001</x> <y>337.55</y> </position> <width>40.3</width> <height>122.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>14.6</x> <y>403.8999999999999</y> </position> <width>176.4</width> <height>37</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-335.55</x> <y>118.65</y> </position> <width>27.5</width> <height>172.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>365.55000000000007</x> <y>113.7</y> </position> <width>27.5</width> <height>160.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <DynamicCircle> <rotation>0</rotation> <position> <x>367.2000000000001</x> <y>12.7</y> </position> <width>19.6</width> <height>19.6</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0.4453010438876858</rotation> <position> <x>-335.05</x> <y>13.6</y> </position> <width>19.6</width> <height>19.6</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> </levelBlocks> <playerBlocks> <JointedDynamicRectangle id="0"> <rotation>1.5736103812761604</rotation> <position> <x>15.800000000000022</x> <y>163.55</y> </position> <width>25.4</width> <height>84.6</height> <goalBlock>true</goalBlock> <joints/> </JointedDynamicRectangle> </playerBlocks> <start> <position> <x>15.55</x> <y>17.6</y> </position> <width>698.2</width> <height>244.3</height> </start> <end> <position> <x>14.3</x> <y>338.65</y> </position> <width>100</width> <height>100</height> </end> </level> </retrieveLevel> </level35> <level36> <retrieveLevel> <levelId>44106</levelId> <levelNumber>36</levelNumber> <name>Fix Big Ben</name> <level> <levelBlocks> <StaticRectangle> <rotation>-0.5044934872067843</rotation> <position> <x>-431.79999999999995</x> <y>-348.85</y> </position> <width>36.4</width> <height>163.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.47477439222855</rotation> <position> <x>-527.2499999999999</x> <y>-350.5500000000001</y> </position> <width>37.7</width> <height>167.20000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>-480.7</x> <y>-435.4500000000001</y> </position> <width>32.2</width> <height>32.2</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0</rotation> <position> <x>-479.00000000000006</x> <y>-476.9</y> </position> <width>12</width> <height>100</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-479.00000000000006</x> <y>-327.1</y> </position> <width>52.6</width> <height>174.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.9985362244848351</rotation> <position> <x>-451.90000000000003</x> <y>-305.1</y> </position> <width>119.30000000000001</width> <height>81</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.3868757177310273</rotation> <position> <x>-515.4</x> <y>-322</y> </position> <width>67.3</width> <height>130.1</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-479.3500000000001</x> <y>-81.29999999999998</y> </position> <width>365.90000000000003</width> <height>34</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-479.05</x> <y>-226.15000000000003</y> </position> <width>205.5</width> <height>137</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.7759866765789607</rotation> <position> <x>-581.8000000000001</x> <y>-144.95000000000002</y> </position> <width>28.5</width> <height>176.20000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.7614385526121312</rotation> <position> <x>-367.75000000000006</x> <y>-135.14999999999998</y> </position> <width>29.8</width> <height>150.1</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-481.6500000000001</x> <y>-134.75</y> </position> <width>196.4</width> <height>96.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.746723382426592</rotation> <position> <x>-585.8</x> <y>-111</y> </position> <width>48.800000000000004</width> <height>75</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.7468072934247967</rotation> <position> <x>-376.65</x> <y>-106.80000000000001</y> </position> <width>54.400000000000006</width> <height>73.60000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <DynamicRectangle> <rotation>0</rotation> <position> <x>-652.1</x> <y>63.550000000000004</y> </position> <width>25.6</width> <height>234</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicCircle> <rotation>0</rotation> <position> <x>-479.0000000000001</x> <y>53.250000000000014</y> </position> <width>102.2</width> <height>102.2</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <StaticRectangle> <rotation>0</rotation> <position> <x>-618.3000000000001</x> <y>53.400000000000006</y> </position> <width>38.900000000000006</width> <height>255.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-339.7</x> <y>49.80000000000002</y> </position> <width>41.400000000000006</width> <height>292</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-482.2</x> <y>188.4</y> </position> <width>311.3</width> <height>45.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-478.45000000000016</x> <y>214.7</y> </position> <width>383</width> <height>67.9</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-476.55000000000007</x> <y>194</y> </position> <width>33.9</width> <height>77.30000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-478.84999999999997</x> <y>427.8</y> </position> <width>351.1</width> <height>396.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>269.4</x> <y>490.5</y> </position> <width>823.8000000000001</width> <height>83.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>-133.20000000000002</x> <y>513.7</y> </position> <width>65.10000000000001</width> <height>65.10000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>669.4000000000001</x> <y>456.05</y> </position> <width>78</width> <height>78</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>-0.48133567044418424</rotation> <position> <x>-263.3</x> <y>566.65</y> </position> <width>210.70000000000002</width> <height>75.60000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>-354.4</x> <y>601.35</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> </levelBlocks> <playerBlocks> <JointedDynamicRectangle id="0"> <rotation>0</rotation> <position> <x>526.3500000000001</x> <y>331.15000000000003</y> </position> <width>26.400000000000002</width> <height>232</height> <goalBlock>true</goalBlock> <joints/> </JointedDynamicRectangle> </playerBlocks> <start> <position> <x>240.05</x> <y>265.05</y> </position> <width>680.3000000000001</width> <height>396.5</height> </start> <end> <position> <x>-478.35</x> <y>57.400000000000006</y> </position> <width>389.8</width> <height>293.8</height> </end> </level> </retrieveLevel> </level36> <level37> <retrieveLevel> <levelId>10130</levelId> <levelNumber>37</levelNumber> <name>Close the Door</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>258.05000000000007</x> <y>137.15</y> </position> <width>251</width> <height>78.30000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>269.15000000000003</x> <y>274.65000000000003</y> </position> <width>273.3</width> <height>73.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>132.95</x> <y>139.25000000000003</y> </position> <width>27.1</width> <height>27.1</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0</rotation> <position> <x>80.94999999999999</x> <y>393.40000000000003</y> </position> <width>725.7</width> <height>218.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>131.64999999999998</x> <y>278.9000000000001</y> </position> <width>25.6</width> <height>25.6</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0</rotation> <position> <x>408.1</x> <y>209.00000000000009</y> </position> <width>70.4</width> <height>222.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>41.55000000000003</x> <y>204</y> </position> <width>40</width> <height>40</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> <JointedDynamicRectangle id="1"> <rotation>0</rotation> <position> <x>95.75</x> <y>190.89999999999995</y> </position> <width>18.1</width> <height>176.3</height> <goalBlock>true</goalBlock> <joints/> </JointedDynamicRectangle> </playerBlocks> <start> <position> <x>-100.30000000000001</x> <y>172.8</y> </position> <width>353.8</width> <height>359.3</height> </start> <end> <position> <x>218.20000000000002</x> <y>195.85000000000002</y> </position> <width>272.1</width> <height>191.8</height> </end> </level> </retrieveLevel> </level37> <level38> <retrieveLevel> <levelId>82409</levelId> <levelNumber>38</levelNumber> <name>Skyscaper</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>48.6</x> <y>-357</y> </position> <width>86.2</width> <height>13.600000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-72</x> <y>-357</y> </position> <width>94</width> <height>14</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>551.25</x> <y>456.09999999999997</y> </position> <width>1095.8</width> <height>50.1</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-5.6000000000000085</x> <y>785.3499999999999</y> </position> <width>283.7</width> <height>383.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-557.75</x> <y>469.25</y> </position> <width>1006.8000000000001</width> <height>77.9</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-143.39999999999995</x> <y>628.3499999999999</y> </position> <width>178</width> <height>350.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-358.2</x> <y>630.5500000000002</y> </position> <width>133.5</width> <height>361.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-299.09999999999997</x> <y>811.35</y> </position> <width>294.8</width> <height>233.70000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-644.8</x> <y>555.0999999999999</y> </position> <width>461.70000000000005</width> <height>144.70000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-632.85</x> <y>741.75</y> </position> <width>456.20000000000005</width> <height>100.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-897.1</x> <y>661.05</y> </position> <width>417.20000000000005</width> <height>356</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>68.99999999999997</x> <y>540.8</y> </position> <width>131</width> <height>204.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>296.95000000000005</x> <y>573.1</y> </position> <width>346</width> <height>83.9</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>462.09999999999997</x> <y>528.5500000000001</y> </position> <width>157.3</width> <height>172.9</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>234.09999999999997</x> <y>725.1</y> </position> <width>73.3</width> <height>235.9</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>386.1499999999999</x> <y>662.2</y> </position> <width>309.3</width> <height>141.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>855.3</x> <y>604.45</y> </position> <width>513.7</width> <height>345.90000000000003</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>572.9</x> <y>767.0500000000001</y> </position> <width>152</width> <height>188.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-533.3</x> <y>-672.6</y> </position> <width>157.3</width> <height>466.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>528.15</x> <y>-562.5</y> </position> <width>157.3</width> <height>513.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>266.1</x> <y>-625.3000000000001</y> </position> <width>162.5</width> <height>361.70000000000005</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-958.0000000000001</x> <y>-523.2</y> </position> <width>188.70000000000002</width> <height>602.8000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>-9</x> <y>-369</y> </position> <width>32</width> <height>32</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>0</x> <y>443</y> </position> <width>1410.2</width> <height>597.6</height> </start> <end> <position> <x>-11.350000000000001</x> <y>-627.0500000000001</y> </position> <width>143.1</width> <height>534.9</height> </end> </level> </retrieveLevel> </level38> <level39> <retrieveLevel> <levelId>3024</levelId> <levelNumber>39</levelNumber> <name>On the Edge</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>-171.70000000000002</x> <y>305.40000000000003</y> </position> <width>155.8</width> <height>48.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>252.04999999999998</x> <y>305.34999999999997</y> </position> <width>155.8</width> <height>51.1</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-661.3499999999999</x> <y>202.00000000000003</y> </position> <width>973.1</width> <height>255.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>661.2500000000001</x> <y>201.70000000000002</y> </position> <width>801.8000000000001</width> <height>256.1</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-152.9</x> <y>130.89999999999998</y> </position> <width>119.30000000000001</width> <height>112</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>227.40000000000003</x> <y>129.95</y> </position> <width>111.60000000000001</width> <height>111.60000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-546.6</x> <y>85.05000000000001</y> </position> <width>907.5</width> <height>25.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>674.25</x> <y>88.3</y> </position> <width>1005</width> <height>33.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-913.3</x> <y>40.40000000000001</y> </position> <width>217.9</width> <height>335.1</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>39.60000000000004</x> <y>-244.75000000000006</y> </position> <width>257</width> <height>48.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <DynamicCircle> <rotation>0</rotation> <position> <x>-811.25</x> <y>-238.1</y> </position> <width>111.2</width> <height>111.2</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <StaticRectangle> <rotation>0</rotation> <position> <x>269.80000000000007</x> <y>667.6000000000001</y> </position> <width>189</width> <height>728.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-188.35</x> <y>669.4000000000001</y> </position> <width>189</width> <height>728.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <DynamicCircle> <rotation>0</rotation> <position> <x>182.64999999999998</x> <y>58.000000000000014</y> </position> <width>13.200000000000001</width> <height>13.200000000000001</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>-134.25</x> <y>-10.899999999999995</y> </position> <width>82.9</width> <height>82.9</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicRectangle> <rotation>0</rotation> <position> <x>495.5</x> <y>52.95</y> </position> <width>158.4</width> <height>37.800000000000004</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0.7440129383911611</rotation> <position> <x>398.19999999999993</x> <y>14.900000000000013</y> </position> <width>55.900000000000006</width> <height>106.10000000000001</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> <DynamicRectangle> <rotation>0.534830484068921</rotation> <position> <x>442.0000000000001</x> <y>-39.84999999999998</y> </position> <width>249.5</width> <height>26.900000000000002</height> <goalBlock>false</goalBlock> <joints/> </DynamicRectangle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>37.44999999999997</x> <y>-292.45000000000005</y> </position> <width>40</width> <height>40</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> <JointedDynamicRectangle id="1"> <rotation>-0.002468929162811398</rotation> <position> <x>174.65</x> <y>273.20000000000005</y> </position> <width>166.20000000000002</width> <height>12.700000000000001</height> <goalBlock>true</goalBlock> <joints/> </JointedDynamicRectangle> </playerBlocks> <start> <position> <x>-603.1</x> <y>-114</y> </position> <width>722.8000000000001</width> <height>394.70000000000005</height> </start> <end> <position> <x>-135.1</x> <y>233.55</y> </position> <width>944.6</width> <height>100.30000000000001</height> </end> </level> </retrieveLevel> </level39> <level40> <retrieveLevel> <levelId>21</levelId> <levelNumber>40</levelNumber> <name>Sisyphea</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>-187.84999999999997</x> <y>298.2499999999999</y> </position> <width>357.8</width> <height>37.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.8318488380415413</rotation> <position> <x>127.74999999999996</x> <y>131.35</y> </position> <width>461.2000000000001</width> <height>43.3</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.0003437691070120319</rotation> <position> <x>406.6</x> <y>53.999999999999986</y> </position> <width>285.7</width> <height>214.3</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>93.6</x> <y>291.3</y> </position> <width>223.5</width> <height>51.1</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>106.45</x> <y>229</y> </position> <width>63.8</width> <height>63.8</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>50.5</x> <y>264.15000000000003</y> </position> <width>38.400000000000006</width> <height>38.400000000000006</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0</rotation> <position> <x>358.6</x> <y>125.3</y> </position> <width>92.6</width> <height>146.9</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>-324.6000000000001</x> <y>326.4000000000001</y> </position> <width>44.7</width> <height>44.7</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-257.6</x> <y>331.20000000000005</y> </position> <width>41.5</width> <height>41.5</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-196.85</x> <y>328</y> </position> <width>38.3</width> <height>38.3</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-141</x> <y>329.6</y> </position> <width>38.3</width> <height>38.3</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-83.5</x> <y>331.20000000000005</y> </position> <width>38.3</width> <height>38.3</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-29.250000000000018</x> <y>331.25</y> </position> <width>38.3</width> <height>38.3</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>21.85</x> <y>329.6</y> </position> <width>38.400000000000006</width> <height>38.400000000000006</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>183.05</x> <y>327.99999999999994</y> </position> <width>38.3</width> <height>38.3</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>130.35</x> <y>332.8</y> </position> <width>35.2</width> <height>35.2</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>79.3</x> <y>329.65</y> </position> <width>38.3</width> <height>38.3</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>363.75000000000006</x> <y>218.15</y> </position> <width>255.5</width> <height>255.5</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0.834060107844887</rotation> <position> <x>845.8499999999999</x> <y>359.90000000000003</y> </position> <width>1018.9000000000001</width> <height>112.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>640</x> <y>295.75000000000006</y> </position> <width>88</width> <height>88</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>746.8499999999999</x> <y>495.45</y> </position> <width>78.60000000000001</width> <height>78.60000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>921.35</x> <y>627.55</y> </position> <width>75.5</width> <height>75.5</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>624.2</x> <y>196.70000000000002</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>-133.35000000000002</x> <y>238.85</y> </position> <width>77.80000000000001</width> <height>77.80000000000001</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>-177.25</x> <y>210.85000000000002</y> </position> <width>351.1</width> <height>188.9</height> </start> <end> <position> <x>405.3</x> <y>-119.55000000000001</y> </position> <width>168.9</width> <height>151.1</height> </end> </level> </retrieveLevel> </level40> <level41> <retrieveLevel> <levelId>30</levelId> <levelNumber>41</levelNumber> <name>Under Over</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>27.049999999999955</x> <y>290.5</y> </position> <width>332.90000000000003</width> <height>112.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>603.55</x> <y>271.1</y> </position> <width>344.5</width> <height>99.3</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>310.95000000000005</x> <y>131.95000000000002</y> </position> <width>37.6</width> <height>209.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>90.64999999999996</x> <y>12.950000000000005</y> </position> <width>479.3</width> <height>46.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>-136.00000000000003</x> <y>298.3</y> </position> <width>65.7</width> <height>65.7</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>73.25</x> <y>355.45</y> </position> <width>121.7</width> <height>121.7</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-94.64999999999998</x> <y>395.6</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-59.40000000000001</x> <y>342.1</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-41.10000000000001</x> <y>-0.9500000000000028</y> </position> <width>34</width> <height>34</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>19.699999999999992</x> <y>-1.0000000000000029</y> </position> <width>31.6</width> <height>31.6</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>82.95</x> <y>-7.1000000000000005</y> </position> <width>34.1</width> <height>34.1</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>147.45</x> <y>-4.6499999999999995</y> </position> <width>36.5</width> <height>36.5</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>207.05</x> <y>-5.850000000000006</y> </position> <width>26.8</width> <height>26.8</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>267.90000000000003</x> <y>-0.9500000000000092</y> </position> <width>34.1</width> <height>34.1</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>319</x> <y>-0.9500000000000092</y> </position> <width>29.200000000000003</width> <height>29.200000000000003</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>-0.7239579039273718</rotation> <position> <x>776.3499999999999</x> <y>270.7</y> </position> <width>59.400000000000006</width> <height>79.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.27582304109951566</rotation> <position> <x>681.7000000000002</x> <y>295.2</y> </position> <width>148.4</width> <height>68.10000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.2903124806845081</rotation> <position> <x>764.2</x> <y>314.05</y> </position> <width>34.1</width> <height>85.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.3813390163870549</rotation> <position> <x>716.7500000000001</x> <y>347</y> </position> <width>14.1</width> <height>54.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.32669057708462856</rotation> <position> <x>609.75</x> <y>312.9</y> </position> <width>65.60000000000001</width> <height>87.60000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>1.799909020837338</rotation> <position> <x>505.1500000000001</x> <y>331.1500000000001</y> </position> <width>110.5</width> <height>52.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>247.8</x> <y>-210.2</y> </position> <width>73</width> <height>73</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>171.2</x> <y>-217.55</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> </levelBlocks> <playerBlocks> <JointedDynamicRectangle id="0"> <rotation>0</rotation> <position> <x>244</x> <y>184</y> </position> <width>50</width> <height>12</height> <goalBlock>true</goalBlock> <joints/> </JointedDynamicRectangle> </playerBlocks> <start> <position> <x>76.7</x> <y>133.8</y> </position> <width>442.7000000000001</width> <height>219</height> </start> <end> <position> <x>549.65</x> <y>145.95000000000002</y> </position> <width>200</width> <height>200</height> </end> </level> </retrieveLevel> </level41> <level42> <retrieveLevel> <levelId>71621</levelId> <levelNumber>42</levelNumber> <name>More Balls</name> <level> <levelBlocks> <DynamicCircle> <rotation>0</rotation> <position> <x>-141.45</x> <y>-139.05</y> </position> <width>39.2</width> <height>39.2</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>-139.95000000000002</x> <y>-47.400000000000006</y> </position> <width>31.3</width> <height>31.3</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <DynamicCircle> <rotation>0</rotation> <position> <x>-141.69999999999996</x> <y>14.899999999999997</y> </position> <width>20.1</width> <height>20.1</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <StaticRectangle> <rotation>-0.11920692927676169</rotation> <position> <x>-227.9</x> <y>-39.349999999999994</y> </position> <width>53.2</width> <height>236.5</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.08306398730417808</rotation> <position> <x>-57.34999999999998</x> <y>-38.70000000000002</y> </position> <width>52.5</width> <height>238</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.02073291968115082</rotation> <position> <x>-351.6</x> <y>146.04999999999998</y> </position> <width>390.6</width> <height>43.3</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.06114326175171261</rotation> <position> <x>-111.40000000000002</x> <y>147.15</y> </position> <width>164.8</width> <height>44.3</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <DynamicCircle> <rotation>0</rotation> <position> <x>-140.60000000000002</x> <y>83.64999999999999</y> </position> <width>17</width> <height>17</height> <goalBlock>false</goalBlock> <joints/> </DynamicCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-239.90000000000003</x> <y>-83.6</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-39.450000000000045</x> <y>-85.10000000000001</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-237.6</x> <y>-0.7500000000000089</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-41.750000000000036</x> <y>-3.049999999999997</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0</rotation> <position> <x>-233.80000000000004</x> <y>-154.40000000000003</y> </position> <width>44.900000000000006</width> <height>83.60000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-52.000000000000036</x> <y>-166.15000000000003</y> </position> <width>44.900000000000006</width> <height>61.900000000000006</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.0931627216259383</rotation> <position> <x>-215.05000000000007</x> <y>77.39999999999999</y> </position> <width>66.5</width> <height>29.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.1013369450708228</rotation> <position> <x>-70.74999999999999</x> <y>69.79999999999998</y> </position> <width>65.4</width> <height>29.9</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>-208.39999999999995</x> <y>54.9</y> </position> <width>31</width> <height>31</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-80.30000000000003</x> <y>54.3</y> </position> <width>24.8</width> <height>24.8</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0.8402251912807288</rotation> <position> <x>4.100000000000012</x> <y>208.4</y> </position> <width>181.4</width> <height>63.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.002372610624896132</rotation> <position> <x>80.59999999999997</x> <y>216.65000000000003</y> </position> <width>196.3</width> <height>57.900000000000006</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>2.340866990433879</rotation> <position> <x>176.4</x> <y>192.05</y> </position> <width>125.9</width> <height>67</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>68.6</x> <y>-161.2</y> </position> <width>116.6</width> <height>116.6</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>-0.3103378504096006</rotation> <position> <x>31.099999999999987</x> <y>16.099999999999994</y> </position> <width>184.6</width> <height>81.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>95.55000000000004</x> <y>-58.85000000000002</y> </position> <width>92.8</width> <height>92.8</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0</rotation> <position> <x>-3.700000000000001</x> <y>-43.400000000000006</y> </position> <width>59.3</width> <height>101.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>-397.4</x> <y>-184.4500000000001</y> </position> <width>164.20000000000002</width> <height>164.20000000000002</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0.24362877978321656</rotation> <position> <x>-324.65</x> <y>31.75</y> </position> <width>188.1</width> <height>74.3</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-238.85</x> <y>50.85</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>-402.4500000000001</x> <y>-0.1500000000000039</y> </position> <width>50.7</width> <height>50.7</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-315.9000000000001</x> <y>-41.999999999999986</y> </position> <width>80.60000000000001</width> <height>80.60000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>272</x> <y>301.54999999999995</y> </position> <width>195.2</width> <height>195.2</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-450.25000000000006</x> <y>325.25</y> </position> <width>200</width> <height>200</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-541.3</x> <y>150.60000000000002</y> </position> <width>29.9</width> <height>29.9</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>-297.95</x> <y>232.7</y> </position> <width>95.5</width> <height>95.5</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>79.65000000000002</x> <y>280.4</y> </position> <width>86.60000000000001</width> <height>86.60000000000001</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>1.1333826759106085</rotation> <position> <x>-8.64999999999999</x> <y>242.35000000000005</y> </position> <width>157.3</width> <height>44.400000000000006</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0.3687643619549</rotation> <position> <x>-213.79999999999995</x> <y>213.75</y> </position> <width>44.3</width> <height>95.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-141.80000000000004</x> <y>167.60000000000005</y> </position> <width>206.7</width> <height>47.2</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>-497.55000000000007</x> <y>106.95</y> </position> <width>27.9</width> <height>27.9</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> <NoSpinWheel id="1"> <rotation>0</rotation> <position> <x>-350.25</x> <y>110.14999999999998</y> </position> <width>26.3</width> <height>26.3</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> <NoSpinWheel id="2"> <rotation>0</rotation> <position> <x>-290.9</x> <y>110.85000000000002</y> </position> <width>26.3</width> <height>26.3</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> <NoSpinWheel id="3"> <rotation>0</rotation> <position> <x>-418.85</x> <y>108.5</y> </position> <width>27.8</width> <height>27.8</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>-137.20000000000002</x> <y>-105.9</y> </position> <width>190.4</width> <height>492.3</height> </start> <end> <position> <x>81.30000000000001</x> <y>141.25</y> </position> <width>247.7</width> <height>120</height> </end> </level> </retrieveLevel> </level42> </officialLevelsExp> ); } public static function getLeveListXML():XML{ return (<levelList> <levelCount>42</levelCount> <level> <levelName>Rolling Away</levelName> <description>level 3!</description> <levelId>91</levelId> <levelNumber>1</levelNumber> </level> <level> <levelName>Reach Up</levelName> <description></description> <levelId>55</levelId> <levelNumber>2</levelNumber> </level> <level> <levelName>Mind The Gap</levelName> <description></description> <levelId>16</levelId> <levelNumber>3</levelNumber> </level> <level> <levelName>Junkyard</levelName> <description>j2</description> <levelId>102</levelId> <levelNumber>4</levelNumber> </level> <level> <levelName>The Wall</levelName> <description></description> <levelId>31</levelId> <levelNumber>5</levelNumber> </level> <level> <levelName>On a Roll</levelName> <description>medium</description> <levelId>89</levelId> <levelNumber>6</levelNumber> </level> <level> <levelName>Full-up</levelName> <description>easyish</description> <levelId>88</levelId> <levelNumber>7</levelNumber> </level> <level> <levelName>Higher</levelName> <description>6ish</description> <levelId>86</levelId> <levelNumber>8</levelNumber> </level> <level> <levelName>Around the Bend</levelName> <description></description> <levelId>100</levelId> <levelNumber>9</levelNumber> </level> <level> <levelName>Up The Hump</levelName> <description></description> <levelId>17</levelId> <levelNumber>10</levelNumber> </level> <level> <levelName>Mission to Mars</levelName> <description></description> <levelId>62</levelId> <levelNumber>11</levelNumber> </level> <level> <levelName>Up The Stairs</levelName> <description></description> <levelId>19</levelId> <levelNumber>12</levelNumber> </level> <level> <levelName>Big Ball</levelName> <description></description> <levelId>23</levelId> <levelNumber>13</levelNumber> </level> <level> <levelName>Four Balls</levelName> <description></description> <levelId>20</levelId> <levelNumber>14</levelNumber> </level> <level> <levelName>Down Under</levelName> <description></description> <levelId>24</levelId> <levelNumber>15</levelNumber> </level> <level> <levelName>Awash</levelName> <description></description> <levelId>28</levelId> <levelNumber>16</levelNumber> </level> <level> <levelName>Handling</levelName> <description></description> <levelId>69</levelId> <levelNumber>17</levelNumber> </level> <level> <levelName>Tube</levelName> <description></description> <levelId>76</levelId> <levelNumber>18</levelNumber> </level> <level> <levelName>Back and Forth</levelName> <description></description> <levelId>60</levelId> <levelNumber>19</levelNumber> </level> <level> <levelName>Unpossible</levelName> <description></description> <levelId>54</levelId> <levelNumber>20</levelNumber> </level> <level> <levelName>U-Turn</levelName> <description></description> <levelId>4575</levelId> <levelNumber>21</levelNumber> </level> <level> <levelName>Pit & Pendulum</levelName> <description></description> <levelId>868</levelId> <levelNumber>22</levelNumber> </level> <level> <levelName>Chimichangas</levelName> <description></description> <levelId>80432</levelId> <levelNumber>23</levelNumber> </level> <level> <levelName>Ack and Forth</levelName> <description></description> <levelId>61704</levelId> <levelNumber>24</levelNumber> </level> <level> <levelName>Tote 'em Pole</levelName> <description></description> <levelId>55555</levelId> <levelNumber>25</levelNumber> </level> <level> <levelName>Canyon</levelName> <description></description> <levelId>81679</levelId> <levelNumber>26</levelNumber> </level> <level> <levelName>Default</levelName> <description></description> <levelId>74376</levelId> <levelNumber>27</levelNumber> </level> <level> <levelName>Brick Layer</levelName> <description></description> <levelId>5109</levelId> <levelNumber>28</levelNumber> </level> <level> <levelName>Stuck</levelName> <description></description> <levelId>72627</levelId> <levelNumber>29</levelNumber> </level> <level> <levelName>Crown Jewels</levelName> <description></description> <levelId>75888</levelId> <levelNumber>30</levelNumber> </level> <level> <levelName>Projected</levelName> <description></description> <levelId>55555</levelId> <levelNumber>31</levelNumber> </level> <level> <levelName>Be a Champ</levelName> <description></description> <levelId>72743</levelId> <levelNumber>32</levelNumber> </level> <level> <levelName>Sunset</levelName> <description></description> <levelId>74274</levelId> <levelNumber>33</levelNumber> </level> <level> <levelName>Displacement</levelName> <description></description> <levelId>79565</levelId> <levelNumber>34</levelNumber> </level> <level> <levelName>Gate Keeper</levelName> <description></description> <levelId>180614</levelId> <levelNumber>35</levelNumber> </level> <level> <levelName>Fix Big Ben</levelName> <description></description> <levelId>44106</levelId> <levelNumber>36</levelNumber> </level> <level> <levelName>Close the Door</levelName> <description></description> <levelId>10130</levelId> <levelNumber>37</levelNumber> </level> <level> <levelName>Skyscaper</levelName> <description></description> <levelId>82409</levelId> <levelNumber>38</levelNumber> </level> <level> <levelName>On the Edge</levelName> <description></description> <levelId>3024</levelId> <levelNumber>39</levelNumber> </level> <level> <levelName>Sisyphea</levelName> <description></description> <levelId>21</levelId> <levelNumber>40</levelNumber> </level> <level> <levelName>Under Over</levelName> <description></description> <levelId>30</levelId> <levelNumber>41</levelNumber> </level> <level> <levelName>More Balls</levelName> <description></description> <levelId>71621</levelId> <levelNumber>42</levelNumber> </level> </levelList> ); } } }//package contraption.data
Section 257
//TutorialLevels (contraption.data.TutorialLevels) package contraption.data { public class TutorialLevels { public static function getTutorialLevels():XML{ return (<tutorialLevels> <level1> <retrieveLevel> <levelId>264</levelId> <tutorialNumber>1</tutorialNumber> <name>How to Create</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>-98</x> <y>237</y> </position> <width>1128</width> <height>180</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>-101</x> <y>106</y> </position> <width>40</width> <height>40</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> </playerBlocks> <start> <position> <x>-151</x> <y>51</y> </position> <width>258</width> <height>208</height> </start> <end> <position> <x>217</x> <y>66</y> </position> <width>170</width> <height>198</height> </end> </level> </retrieveLevel> </level1> <level2> <retrieveLevel> <levelId>266</levelId> <tutorialNumber>2</tutorialNumber> <name>How to Edit</name> <level> <levelBlocks> <StaticRectangle> <rotation>0</rotation> <position> <x>176.89999999999998</x> <y>360.2999999999999</y> </position> <width>1279.8000000000002</width> <height>392.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-44.35000000000002</x> <y>-81.35</y> </position> <width>240.8</width> <height>277.40000000000003</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>271.84999999999997</x> <y>112.05</y> </position> <width>159</width> <height>238.4</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-566</x> <y>-4.250000000000014</y> </position> <width>270.1</width> <height>673.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>-239.64999999999992</x> <y>-251.45</y> </position> <width>630.8000000000001</width> <height>437.1</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>-209.35000000000008</x> <y>120.30000000000004</y> </position> <width>41.900000000000006</width> <height>41.900000000000006</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> <ClockwiseWheel id="1"> <rotation>0</rotation> <position> <x>-346.45000000000005</x> <y>127.15000000000002</y> </position> <width>40</width> <height>40</height> <goalBlock>false</goalBlock> <joints/> </ClockwiseWheel> <ClockwiseWheel id="2"> <rotation>0</rotation> <position> <x>-371.65</x> <y>38.349999999999994</y> </position> <width>40</width> <height>40</height> <goalBlock>false</goalBlock> <joints/> </ClockwiseWheel> <HollowRod id="3"> <rotation>0.4675831439645074</rotation> <position> <x>-290.5</x> <y>79.32500000000002</y> </position> <width>181.81609527211825</width> <height>4</height> <goalBlock>false</goalBlock> <joints> <jointedTo>2</jointedTo> <jointedTo>0</jointedTo> </joints> </HollowRod> <HollowRod id="4"> <rotation>-2.0474725145327923</rotation> <position> <x>-359.05</x> <y>82.75</y> </position> <width>54.92249083936378</width> <height>4</height> <goalBlock>false</goalBlock> <joints> <jointedTo>1</jointedTo> <jointedTo>2</jointedTo> </joints> </HollowRod> <HollowRod id="5"> <rotation>-0.07112268338379367</rotation> <position> <x>-278.37500000000006</x> <y>123.72500000000002</y> </position> <width>96.39369792678355</width> <height>4</height> <goalBlock>false</goalBlock> <joints> <jointedTo>1</jointedTo> <jointedTo>0</jointedTo> </joints> </HollowRod> </playerBlocks> <start> <position> <x>-301</x> <y>41.85</y> </position> <width>274.8</width> <height>280.1</height> </start> <end> <position> <x>146.55</x> <y>-52.300000000000004</y> </position> <width>164.9</width> <height>183.2</height> </end> </level> </retrieveLevel> </level2> <level3> <retrieveLevel> <levelId>14</levelId> <tutorialNumber>3</tutorialNumber> <name>Easy As Pie</name> <level> <levelBlocks> <StaticCircle> <rotation>0</rotation> <position> <x>83.94999999999997</x> <y>278.80000000000007</y> </position> <width>108.1</width> <height>108.1</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>0</rotation> <position> <x>395.65</x> <y>180.3</y> </position> <width>630.7</width> <height>19</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.3069971628664862</rotation> <position> <x>402.2000000000001</x> <y>282.5</y> </position> <width>644.5</width> <height>16.7</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.30900981675940253</rotation> <position> <x>259.8499999999999</x> <y>277.4</y> </position> <width>362</width> <height>100.9</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>314.3</x> <y>214.6</y> </position> <width>438.3</width> <height>68.9</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.30957547603700286</rotation> <position> <x>459.85</x> <y>248.85000000000005</y> </position> <width>453.2000000000001</width> <height>16.3</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.13568348287377818</rotation> <position> <x>661.6999999999998</x> <y>190.3</y> </position> <width>75.2</width> <height>23</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>544.2</x> <y>202.2</y> </position> <width>133.6</width> <height>45.900000000000006</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.2940495524427015</rotation> <position> <x>506.3</x> <y>230.60000000000008</y> </position> <width>298.5</width> <height>37.6</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>193.15000000000003</x> <y>250.45</y> </position> <width>50</width> <height>50</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>663.8000000000001</x> <y>296.3</y> </position> <width>62.6</width> <height>62.6</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>-0.4269466595720473</rotation> <position> <x>548.9499999999999</x> <y>296.90000000000003</y> </position> <width>243.5</width> <height>29.8</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>0</rotation> <position> <x>557.9999999999998</x> <y>343.65000000000003</y> </position> <width>235.8</width> <height>31.3</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticRectangle> <rotation>-0.3742209110809005</rotation> <position> <x>605.35</x> <y>303.95000000000005</y> </position> <width>89.2</width> <height>81.9</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> <StaticCircle> <rotation>0</rotation> <position> <x>547.25</x> <y>323.1000000000001</y> </position> <width>33.4</width> <height>33.4</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>510.4500000000001</x> <y>326.55000000000007</y> </position> <width>16.7</width> <height>16.7</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>442.45</x> <y>344.45</y> </position> <width>15.2</width> <height>15.2</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticCircle> <rotation>0</rotation> <position> <x>706.5500000000001</x> <y>182.35</y> </position> <width>12.4</width> <height>12.4</height> <goalBlock>false</goalBlock> <joints/> </StaticCircle> <StaticRectangle> <rotation>-0.0015385844126063195</rotation> <position> <x>342.45000000000016</x> <y>-39.8</y> </position> <width>473.8</width> <height>27.3</height> <goalBlock>false</goalBlock> <joints/> </StaticRectangle> </levelBlocks> <playerBlocks> <NoSpinWheel id="0"> <rotation>0</rotation> <position> <x>200</x> <y>144</y> </position> <width>40</width> <height>40</height> <goalBlock>true</goalBlock> <joints/> </NoSpinWheel> <ClockwiseWheel id="1"> <rotation>0</rotation> <position> <x>115</x> <y>145</y> </position> <width>40</width> <height>40</height> <goalBlock>false</goalBlock> <joints/> </ClockwiseWheel> <ClockwiseWheel id="2"> <rotation>0</rotation> <position> <x>145.04999999999998</x> <y>-79.55</y> </position> <width>40</width> <height>40</height> <goalBlock>false</goalBlock> <joints/> </ClockwiseWheel> <NoSpinWheel id="3"> <rotation>0</rotation> <position> <x>227.55</x> <y>-80.55</y> </position> <width>40</width> <height>40</height> <goalBlock>false</goalBlock> <joints/> </NoSpinWheel> <SolidRod id="4"> <rotation>3.129472035047703</rotation> <position> <x>186.3</x> <y>-80.05</y> </position> <width>82.5060603834652</width> <height>8</height> <goalBlock>false</goalBlock> <joints> <jointedTo>3</jointedTo> <jointedTo>2</jointedTo> </joints> </SolidRod> </playerBlocks> <start> <position> <x>151.3</x> <y>52.2</y> </position> <width>248.4</width> <height>321.5</height> </start> <end> <position> <x>597.8000000000001</x> <y>118.25</y> </position> <width>119.7</width> <height>115.3</height> </end> </level> </retrieveLevel> </level3> </tutorialLevels> ); } public static function getTutorialListXML():XML{ return (<tutorialLevelList> <levelCount>3</levelCount> <level> <levelName>How to Create</levelName> <description></description> <levelId>264</levelId> <tutorialNumber>1</tutorialNumber> </level> <level> <levelName>How to Edit</levelName> <description></description> <levelId>266</levelId> <tutorialNumber>2</tutorialNumber> </level> <level> <levelName>Easy As Pie</levelName> <description></description> <levelId>14</levelId> <tutorialNumber>3</tutorialNumber> </level> </tutorialLevelList> ); } } }//package contraption.data
Section 258
//Button (contraption.menu.Button) package contraption.menu { import flash.events.*; import contraption.*; import flash.display.*; import flash.geom.*; import flash.text.*; public class Button extends MovieClip implements ActionContainer { protected var buttonHeight:int; public var userId:int;// = 0 public var tutorialNumber:int;// = 0 protected var isInitialized:Boolean;// = false protected var downEvent:String; protected var toolTip:String; protected var overrideDownEvent:String; public var levelNumber:int;// = 0 protected var buttonWidth:int; public var userName:String; protected var isEnabled:Boolean;// = true public var designId:int;// = 0 protected var text:TextField; public var levelId:int;// = 0 public function Button(_arg1:String=""){ gotoAndPlay(1); addEventListener(MouseEvent.MOUSE_DOWN, buttonPress); addEventListener(MouseEvent.ROLL_OVER, mouseOver); addEventListener(MouseEvent.ROLL_OUT, mouseOut); if (buttonWidth != 0){ initialize(); }; } public function setToolTip(_arg1:String):void{ this.toolTip = _arg1; } protected function initialize():void{ if (isInitialized){ return; }; graphics.beginFill(0, 0); graphics.drawRect(0, 0, buttonWidth, buttonHeight); isInitialized = true; } public function enable():void{ isEnabled = true; transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0); } public function setDownEvent(_arg1:String):void{ overrideDownEvent = _arg1; } public function getAllowableActions():Actions{ var _local1:Actions = new Actions(); if (isEnabled){ _local1.button = true; }; return (_local1); } protected function mouseOver(_arg1:MouseEvent):void{ var _local2:TooltipEvent; initialize(); if (toolTip){ _local2 = new TooltipEvent(TooltipEvent.ADD_TOOLTIP, true, true); _local2.toolTip = toolTip; dispatchEvent(_local2); }; } public function setAllowableActions(_arg1:Actions):void{ } protected function mouseOut(_arg1:MouseEvent):void{ if (toolTip){ dispatchEvent(new TooltipEvent(TooltipEvent.REMOVE_TOOLTIP, true, true)); }; } public function disable():void{ isEnabled = false; var _local1:ColorTransform = new ColorTransform(0.8, 0.8, 0.8, 1, 0, 0, 0, 0); transform.colorTransform = _local1; } protected function buttonPress(_arg1:MouseEvent):void{ var _local2:MenuEvent; if (!isEnabled){ return; }; if (overrideDownEvent != null){ downEvent = overrideDownEvent; }; if (downEvent != null){ _local2 = new MenuEvent(downEvent, true, true); _local2.levelId = levelId; _local2.levelNumber = levelNumber; _local2.tutorialNumber = tutorialNumber; _local2.designId = designId; _local2.userId = userId; _local2.userName = userName; dispatchEvent(_local2); }; } } }//package contraption.menu
Section 259
//BuyGameMenu (contraption.menu.BuyGameMenu) package contraption.menu { import flash.events.*; import contraption.*; import flash.display.*; import flash.net.*; public class BuyGameMenu extends ModalMenu { protected var canvas:Sprite; public function BuyGameMenu():void{ super("", false); var _local1:MovieClip = new BuyMenuBackground(); _local1.x = 100; _local1.y = 50; addChild(_local1); canvas = new Sprite(); addChild(canvas); setMenu(); } protected function setMenu():void{ var _local1:User; var _local2:TextArea; var _local3:TextArea; var _local4:TextArea; var _local5:Button; var _local6:Button; var _local7:Button; var _local8:Button; var _local9:Button; removeChild(canvas); canvas = new Sprite(); addChild(canvas); _local1 = User.getInstance(); _local2 = new TextArea("", 14); _local2.bold(); _local2.setHtmlText((((((("Thank you for playing Fantastic Contraption!\n" + "When you buy the full version for only $10 you:\n\n") + "<ul><li>Make your own levels</li>\n") + "<li>Share your levels with other people</li>\n") + "<li>Play levels other people have made</li>\n") + "<li>Support independent game deveopment</li>\n") + "<li>Get the really excelent full music</li></ul>")); _local2.x = 160; _local2.y = 125; canvas.addChild(_local2); if (_local1.isLoggedIn()){ _local2 = new TextArea("Now Registering:", 14); _local2.bold(); _local2.x = 160; _local2.y = 250; canvas.addChild(_local2); _local2 = new TextArea("User Name:", 14); _local2.bold(); _local2.x = 170; _local2.y = 270; canvas.addChild(_local2); _local2 = new TextArea("Email:", 14); _local2.bold(); _local2.x = 170; _local2.y = 290; canvas.addChild(_local2); _local3 = new TextArea(_local1.getUserName(), 14); _local3.bold(); _local3.x = 260; _local3.y = 270; canvas.addChild(_local3); _local4 = new TextArea(_local1.getEmail(), 14); _local4.bold(); _local4.x = 260; _local4.y = 290; canvas.addChild(_local4); _local5 = new BuyGameButton(); _local5.x = 280; _local5.y = 310; canvas.addChild(_local5); _local5.addEventListener(MenuEvent.BUY_GAME, buyGame); _local6 = new UpdateUserInfoButton(); _local6.x = 215; _local6.y = 375; canvas.addChild(_local6); _local7 = new SmallCancelButton(); _local7.x = 355; _local7.y = 375; canvas.addChild(_local7); } else { _local2 = new TextArea("First you have to sign in or register (only takes a second)", 14); _local2.bold(); _local2.x = 160; _local2.y = 270; canvas.addChild(_local2); _local8 = new LogInButton(); _local8.x = 215; _local8.y = 310; canvas.addChild(_local8); _local9 = new NewUserButton(); _local9.x = 355; _local9.y = 310; canvas.addChild(_local9); _local7 = new SmallCancelButton(); _local7.x = 355; _local7.y = 375; canvas.addChild(_local7); }; } override public function refresh():void{ setMenu(); } protected function buyGame(_arg1:Event):void{ _arg1.stopPropagation(); var _local2:URLLoader = new URLLoader(); var _local3:URLRequest = new URLRequest((Contraption.SERVER_LOCATION + "/buy.php")); var _local4:URLVariables = new URLVariables(); _local4.versionName = Contraption.VERSION_NAME; _local4.versionNumber = Contraption.VERSION_NUMBER; _local3.data = _local4; _local3.method = URLRequestMethod.GET; _local2.load(_local3); var _local5:User = User.getInstance(); _local3 = new URLRequest("https://www.paypal.com/cgi-bin/webscr"); _local4 = new URLVariables(); _local4.cmd = "_xclick"; _local4.business = "AR@inxile.net"; _local4.item_name = "Fantastic Contraption"; _local4.amount = "10.00"; _local4.shipping = "0.00"; _local4.no_shipping = "1"; _local4.no_note = "1"; _local4.currency_code = "USD"; _local4.tax = "0.00"; _local4.lc = "US"; _local4.bn = "PP-BuyNowBF"; _local4.on0 = "userID"; _local4.os0 = _local5.getUserId(); _local3.data = _local4; _local3.method = URLRequestMethod.POST; navigateToURL(_local3); } } }//package contraption.menu
Section 260
//CompletedLevelMenu (contraption.menu.CompletedLevelMenu) package contraption.menu { import flash.events.*; import contraption.*; public class CompletedLevelMenu extends ModalMenu { protected var levelNumber:int; protected var levelId:int; public function CompletedLevelMenu(_arg1:int, _arg2:int):void{ var _local3:Button; var _local4:Button; var _local5:Button; var _local6:Button; super("Victory!"); this.levelNumber = _arg1; this.levelId = _arg2; if (_arg2 != 0){ if (((((!(User.getInstance().isRegistered())) && ((_arg1 >= 1000)))) && ((_arg1 <= 1010)))){ } else { if (_arg1 != 0){ _local6 = new NextLevelButton(); _local6.x = 230; _local6.y = 210; addChild(_local6); _local6.addEventListener(MenuEvent.LOAD_LEVEL, loadLevel); }; }; _local4 = new BackToMenuButton(); _local4.x = 370; _local4.y = 270; addChild(_local4); _local4.addEventListener(MenuEvent.MENU_BACK, backToMenu); _local5 = new SmallSaveButton(); _local5.x = 370; _local5.y = 210; addChild(_local5); _local5.addEventListener(MouseEvent.MOUSE_DOWN, save); }; _local3 = new SmallBackButton(); _local3.x = 230; _local3.y = 270; addChild(_local3); } protected function backToMenu(_arg1:Event):void{ _arg1.stopPropagation(); dispatchEvent(new MenuEvent(MenuEvent.MENU_BACK, true, true)); dispatchEvent(new MenuEvent(MenuEvent.MENU_BACK, true, true)); } protected function save(_arg1:Event):void{ _arg1.stopPropagation(); dispatchEvent(new SaveEvent(MenuEvent.SAVE_CONTRAPTION, true, true)); } protected function loadLevel(_arg1:Event):void{ _arg1.stopPropagation(); var _local2:MenuEvent = new MenuEvent(MenuEvent.LOAD_OFFICIAL_LEVEL, true, true); _local2.levelNumber = (levelNumber + 1); dispatchEvent(_local2); } } }//package contraption.menu
Section 261
//CompletedTutorialLevelMenu (contraption.menu.CompletedTutorialLevelMenu) package contraption.menu { import flash.events.*; public class CompletedTutorialLevelMenu extends ModalMenu { protected var tutorialNumber:int; public function CompletedTutorialLevelMenu(_arg1:int):void{ var _local3:Button; var _local4:TextArea; super("Victory!"); this.tutorialNumber = _arg1; var _local2:Button = new ContinueTutorialButton(); _local2.x = 220; _local2.y = 300; addChild(_local2); if (_arg1 < 3){ _local2.addEventListener(MouseEvent.MOUSE_DOWN, loadTutorial); _local4 = new TextArea(); _local4.setText(("You have finished this tutorial level.\n" + "Let's move on to the next one.")); _local4.x = 0xFF; _local4.y = 200; addChild(_local4); } else { _local2.addEventListener(MouseEvent.MOUSE_DOWN, startLevels); _local4 = new TextArea(); _local4.setText((("Congratulations!\nYou've finished the tutorials.\n" + "From here on you're on your own.\n") + "Good luck and have fun!")); _local4.x = 0xFF; _local4.y = 190; addChild(_local4); }; _local3 = new BackToMenuButton(); _local3.x = 370; _local3.y = 300; addChild(_local3); _local3.addEventListener(MenuEvent.MENU_BACK, backToMenu); } protected function startLevels(_arg1:Event):void{ _arg1.stopPropagation(); var _local2:MenuEvent = new MenuEvent(MenuEvent.LOAD_OFFICIAL_LEVEL, true, true); _local2.levelNumber = 1; dispatchEvent(_local2); } protected function backToMenu(_arg1:Event):void{ _arg1.stopPropagation(); dispatchEvent(new MenuEvent(MenuEvent.MENU_BACK, true, true)); dispatchEvent(new MenuEvent(MenuEvent.MENU_BACK, true, true)); } protected function loadTutorial(_arg1:Event):void{ _arg1.stopPropagation(); var _local2:MenuEvent = new MenuEvent(MenuEvent.LOAD_TUTORIAL_LEVEL, true, true); _local2.tutorialNumber = (tutorialNumber + 1); dispatchEvent(_local2); } } }//package contraption.menu
Section 262
//Dashboard (contraption.menu.Dashboard) package contraption.menu { import flash.events.*; import flash.display.*; import flash.text.*; public class Dashboard extends MovieClip { public var dynamicCircleButton:DashboardButton; public var tooltip:TextField; public var zoomOutButton:DashboardButton; public var dynamicSquareButton:DashboardButton; public var saveButton:DashboardButton; protected var mode:String; public var staticCircleButton:DashboardButton; public var zoomInButton:DashboardButton; public var hollowRodButton:DashboardButton; public var goButton:DashboardButton; public var staticSquareButton:DashboardButton; protected var fatInitFunction:Function; public var npWheelButton:DashboardButton; public var stopButton:DashboardButton; public var goalCircleButton:DashboardButton; public var ccwWheelButton:DashboardButton; public var cwWheelButton:DashboardButton; public var deleteButton:DashboardButton; public var goalSquareButton:DashboardButton; public var testLevelButton:DashboardButton; public var stopButtonPing:MovieClip; public var moveButton:DashboardButton; protected var hilightedButton:DashboardButton; public var solidRodButton:DashboardButton; public var backButton:DashboardButton; public static const MODE_TEST_LEVEL:String = "testLevel"; public static const MODE_EDIT_LEVEL:String = "editLevel"; public static const MODE_EDIT_CONTRPATION:String = "editContraption"; public function Dashboard(_arg1:String="editContraption"){ this.mode = _arg1; addEventListener(MouseEvent.MOUSE_DOWN, buttonPress); } protected function init():void{ zoomInButton.init(DashboardEvent.ZOOM_IN, "Zoom In", this); zoomOutButton.init(DashboardEvent.ZOOM_OUT, "Zoom Out", this); if (mode == MODE_EDIT_LEVEL){ testLevelButton.init(DashboardEvent.TEST_LEVEL, "Make a test contraption to test your level", this); goalCircleButton.init(DashboardEvent.GOAL_CIRCLE, "Goal Circle: these must be moved to the end area to win the level", this); goalSquareButton.init(DashboardEvent.GOAL_SQUARE, "Goal Square: these must be moved to the end area to win the level", this); staticCircleButton.init(DashboardEvent.STATIC_CIRCLE, "Static Circle: these form unmovable terrain", this); staticSquareButton.init(DashboardEvent.STATIC_SQUARE, "Static Square: these form unmovable terrain", this); dynamicCircleButton.init(DashboardEvent.DYNAMIC_CIRCLE, "Dynamic Circle: these form movable objects affected by gravity", this); dynamicSquareButton.init(DashboardEvent.DYNAMIC_SQUARE, "Dynamic Square: these form movable objects affected by gravity", this); } else { goButton.init(DashboardEvent.GO, "Start contraption (Space)", this); stopButton.init(DashboardEvent.STOP, "Stop and build contraption (Space)", this); cwWheelButton.init(DashboardEvent.CW_WHEEL, "Clockwise wheels (W): will turn if a rod is connected to the center joint", this); ccwWheelButton.init(DashboardEvent.CCW_WHEEL, "Counter-Clockwise wheels (C): will turn if a rod is connected to the center joint", this); npWheelButton.init(DashboardEvent.NP_WHEEL, "Un-Powered wheels (U): will roll if pushed, but not on their own", this); hollowRodButton.init(DashboardEvent.HOLLOW_ROD, "Water rod (R): can pass through other rods but not through the environment", this); solidRodButton.init(DashboardEvent.SOLID_ROD, "Solid wood rods (S): will collide with other solid wood rods", this); moveButton.init(DashboardEvent.MOVE, "Move stuff (Shift-click): click and drag to move", this); deleteButton.init(DashboardEvent.DELETE, "Delete stuff (Ctrl-click): click near items to remove", this); hilightButton(solidRodButton); }; if (mode != MODE_TEST_LEVEL){ saveButton.init(DashboardEvent.SAVE, "Save your contraption online", this); backButton.init(DashboardEvent.BACK, "Return to main menu: unsaved contraption will be lost!", this); } else { backButton.init(DashboardEvent.BACK, "Go back to editing level: this contraption can't be saved", this); }; backButton.addEventListener(MouseEvent.MOUSE_DOWN, backButtonPress); } public function setMode(_arg1:String):void{ this.mode = _arg1; } protected function buttonPress(_arg1:MouseEvent):void{ _arg1.stopPropagation(); } public function hilightButton(_arg1:DashboardButton):void{ if (hilightedButton == _arg1){ return; }; if (hilightedButton != null){ hilightedButton.state = DashboardButton.UP; }; _arg1.state = DashboardButton.DOWN; hilightedButton = _arg1; setTooltip(hilightedButton.tooltip); } public function setTooltip(_arg1:String):void{ if (_arg1 == null){ if (hilightedButton != null){ tooltip.text = hilightedButton.tooltip; } else { tooltip.text = ""; }; } else { tooltip.text = _arg1; }; } protected function backButtonPress(_arg1:MouseEvent):void{ var _local2:MenuEvent = new MenuEvent(MenuEvent.MENU_BACK, true, true); dispatchEvent(_local2); } public function initFat():void{ fatInitFunction(mode); } public function pingStopButton():void{ stopButtonPing.gotoAndPlay(1); } } }//package contraption.menu
Section 263
//DashboardButton (contraption.menu.DashboardButton) package contraption.menu { import flash.events.*; import contraption.*; import flash.display.*; public class DashboardButton extends SimpleButton implements ActionContainer { protected var currentState:String;// = "up" protected var dashboard:Dashboard; public var eventType:String;// = null protected var origUpState:DisplayObject; public var tooltip:String; public static const DOWN:String = "down"; public static const OVER:String = "over"; public static const UP:String = "up"; public function DashboardButton(){ tabEnabled = false; addEventListener(MouseEvent.MOUSE_DOWN, buttonPress); } public function set state(_arg1:String):void{ if (currentState == _arg1){ return; }; currentState = _arg1; if (origUpState == null){ origUpState = upState; }; if (_arg1 == "up"){ upState = origUpState; } else { if (_arg1 == "over"){ upState = overState; } else { if (_arg1 == "down"){ upState = downState; }; }; }; } protected function removeTooltip(_arg1:Event):void{ dashboard.setTooltip(null); } protected function addTooltip(_arg1:Event):void{ dashboard.setTooltip(tooltip); } public function init(_arg1:String, _arg2:String, _arg3:Dashboard):void{ this.eventType = _arg1; this.tooltip = _arg2; this.dashboard = _arg3; overState.addEventListener(Event.ADDED_TO_STAGE, addTooltip); downState.addEventListener(Event.ADDED_TO_STAGE, addTooltip); upState.addEventListener(Event.ADDED_TO_STAGE, removeTooltip); } public function get state():String{ return (currentState); } public function getAllowableActions():Actions{ throw ("sad"); } protected function buttonPress(_arg1:MouseEvent):void{ var _local2:DashboardEvent = new DashboardEvent(eventType, true, true); dispatchEvent(_local2); } public function setAllowableActions(_arg1:Actions):void{ } } }//package contraption.menu
Section 264
//DashboardEvent (contraption.menu.DashboardEvent) package contraption.menu { import flash.events.*; public class DashboardEvent extends Event { public static const STATIC_CIRCLE:String = "staticCircle"; public static const STOP:String = "stop"; public static const GOAL_CIRCLE:String = "goalCircle"; public static const ZOOM_OUT:String = "zoomOut"; public static const SAVE:String = "save"; public static const STATIC_SQUARE:String = "staticSquare"; public static const ZOOM_IN:String = "zoomIn"; public static const HOLLOW_ROD:String = "hollowRod"; public static const MOVE:String = "move"; public static const GOAL_SQUARE:String = "goalSquare"; public static const GO:String = "go"; public static const DELETE:String = "delete"; public static const CW_WHEEL:String = "cwWheel"; public static const SOLID_ROD:String = "solidRod"; public static const BACK:String = "back"; public static const TEST_LEVEL:String = "testLevel"; public static const CCW_WHEEL:String = "ccwWheel"; public static const DYNAMIC_SQUARE:String = "dynamicSquare"; public static const NP_WHEEL:String = "npWheel"; public static const DYNAMIC_CIRCLE:String = "dynamicCircle"; public function DashboardEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } override public function clone():Event{ return (new DashboardEvent(type)); } } }//package contraption.menu
Section 265
//DesignLinkMenu (contraption.menu.DesignLinkMenu) package contraption.menu { import flash.events.*; import contraption.*; import flash.net.*; public class DesignLinkMenu extends ModalMenu { public var textLink:String; public function DesignLinkMenu(_arg1:int):void{ var _local4:Button; super("Link"); var _local2:TextArea = new TextArea(); _local2.setText(((("Anyone who uses this link will \n" + "get to see your Fantastic Contraption.\n\n") + "You can copy and paste it to your friends,\n") + "post it on your blog, a forum, or whatever!")); _local2.x = 230; _local2.y = 180; addChild(_local2); _local2 = new TextArea(((Contraption.SERVER_LOCATION + "/?designId=") + _arg1), 12); _local2.mouseEnabled = true; _local2.bold(); _local2.x = 230; _local2.y = 270; addChild(_local2); textLink = _local2.text; var _local3:Button = new SmallBackButton(); _local3.x = 430; _local3.y = 320; addChild(_local3); _local4 = new TweetThis(); _local4.x = 230; _local4.y = 320; addChild(_local4); _local4.addEventListener(MenuEvent.LOAD_TWITTER, loadTwitter); var _local5:Button = new EmailThis(); _local5.x = 350; _local5.y = 320; _local5.width = 46; _local5.height = 46; addChild(_local5); _local5.addEventListener(MenuEvent.LOAD_EMAIL, loadEmail); var _local6:Button = new LoadFacebook(); _local6.x = 290; _local6.y = 320; addChild(_local6); _local6.addEventListener(MenuEvent.LOAD_FACEBOOK, doFacebookLogin); } private function loadEmail(_arg1:Event):void{ _arg1.stopPropagation(); var _local2:User = User.getInstance(); var _local3 = ((("See my new Fantastic Contraption design at " + textLink) + "%0A%0a") + "Play Fantastic Contraption at http://www.fantasticcontraption.com/"); var _local4 = (_local2.getUserName() + " wants to let you know he made a new contraption!"); var _local5:String = ((("mailto:?subject=" + _local4) + "&body=") + _local3); navigateToURL(new URLRequest(_local5), "_blank"); } private function doFacebookLogin(_arg1:Event):void{ _arg1.stopPropagation(); var _local2:MenuEvent = new MenuEvent(MenuEvent.LOAD_FACEBOOK); _local2.defaultText = textLink; _local2.description = "just published a solution in Fantastic Contraption!"; _local2.additionalText = "See It"; _local2.userName = User.getInstance().getUserName(); FacebookMenu.getInstance().setLinkText(_local2); dispatchEvent(_local2); } private function loadTwitter(_arg1:Event):void{ _arg1.stopPropagation(); var _local2:MenuEvent = new MenuEvent(MenuEvent.LOAD_TWITTER); _local2.defaultText = textLink; _local2.description = (("See " + User.getInstance().getUserName()) + "'s new design at: \n"); TwitterMenu.getInstance().initTwitterText(_local2); dispatchEvent(_local2); } } }//package contraption.menu
Section 266
//FacebookCompleteMenu (contraption.menu.FacebookCompleteMenu) package contraption.menu { import flash.net.*; public class FacebookCompleteMenu extends ModalMenu { private var twitterAddress:String; protected var nameField:TextBox; protected var validationError:TextArea; protected var descriptionField:TextBox; protected var passwordField:TextBox; public function FacebookCompleteMenu():void{ var _local3:Button; super("Facebook"); var _local1:TextArea = new TextArea(); _local1.setText("You just updated your status! \n\nCheck it out by clicking the button below."); _local1.x = 230; _local1.y = 190; addChild(_local1); var _local2:Button = new LoadFacebook(); _local2.x = 250; _local2.y = 300; addChild(_local2); _local2.addEventListener(MenuEvent.LOAD_FACEBOOK, login); _local3 = new SmallBackButton(); _local3.x = 360; _local3.y = 300; addChild(_local3); } protected function login(_arg1:MenuEvent):void{ _arg1.stopPropagation(); goToFacebook(); } private function goToFacebook():void{ navigateToURL(new URLRequest("http://www.facebook.com/"), "_blank"); } } }//package contraption.menu
Section 267
//FacebookMenu (contraption.menu.FacebookMenu) package contraption.menu { import flash.events.*; import contraption.*; import flash.display.*; import com.facebook.events.*; import com.facebook.session.*; import com.facebook.net.*; import com.facebook.*; import com.facebook.data.feed.*; import com.facebook.utils.*; import FacebookConnect.*; import com.facebook.commands.stream.*; import flash.external.*; public class FacebookMenu extends ModalMenu { private var twitterAddress:String; public var loginButton:Button; protected var validationError:TextArea; public var session:FacebookSessionUtil; protected var passwordField:TextBox; public var publishButton:Button; private var titleText:TextArea; private var fldConnect:FacebookConnectObject; protected var nameField:TextBox; private var workingButton:SimpleButton; private var fldFacebook:Facebook; private var linkText:String; private var descriptionText:TextArea; private var testString:TextArea; private var testString1:TextArea; private var userFirstName:String; private var messageText:String; private var userFacebookName:String; private var descText:TextArea; private var sessionKey:String; protected var descriptionField:TextBox; private var defaultNameField:String; private var additionalText:String; protected var userName:String; private var defaultDescription:String; private var isConnected:Boolean; private static const SECRET_KEY:String = "ef0ce2a3fc597dea82f5d9d7dda6c807"; private static const API_KEY:String = "aaa5a17ae841d997e71adef085d22116"; private static var allowInstantiation:Boolean; private static var instance:FacebookMenu; public function FacebookMenu():void{ testString = new TextArea(); testString1 = new TextArea(); isConnected = false; super(" ", false); descText = new TextArea(); descText.setText(" "); descText.x = (180 + 20); descText.y = 195; descText.bold(); addChild(descText); titleText = new TextArea(" "); titleText.setText(" "); titleText.x = (260 + 20); titleText.y = 260; titleText.wordWrap = true; titleText.width = 320; titleText.bold(); addChild(titleText); validationError = new TextArea("Must complete Facebook login to post"); validationError.x = 270; validationError.y = 180; validationError.textColor = 16720418; validationError.width = 250; addChild(validationError); var _local1:TextArea = new TextArea("Message:", 14, "niobium"); _local1.x = 270; _local1.y = 270; descriptionField = new TextBox(250, 80, 150, false, " "); descriptionField.x = 260; descriptionField.y = 250; descriptionField.getText(); descriptionText = new TextArea("Build amazing contraptions to solve mind-bending levels in this brain-stretching puzzle game. Play it for free at fantasticcontraption.com."); descriptionText.x = (260 + 20); descriptionText.y = ((280 + titleText.height) - 20); descriptionText.wordWrap = true; descriptionText.width = 320; descriptionText.height = 80; addChild(descriptionText); nameField = new TextBox(350, 40, 420, false, " "); nameField.x = (180 + 20); nameField.y = 215; addChild(nameField); publishButton = new SendFacebook(); publishButton.x = 250; publishButton.y = 393; publishButton.addEventListener(MenuEvent.SEND_FACEBOOK, login); this.addChild(publishButton); publishButton.visible = false; loginButton = new LoadFacebook(); loginButton.x = 270; loginButton.y = 393; loginButton.addEventListener(MenuEvent.LOAD_FACEBOOK, facebookLoginButton); this.addChild(loginButton); loginButton.visible = true; workingButton = new WorkingButton(); workingButton.x = 250; workingButton.y = 393; addChild(workingButton); workingButton.visible = false; var _local2:Button = new SmallCancelButton(); _local2.x = 380; _local2.y = 390; addChild(_local2); var _local3:SimpleButton = new FCIcon(); _local3.x = (180 + 20); _local3.y = 260; addChild(_local3); var _local4:SimpleButton = new FacebookTitle(); _local4.x = (270 + 20); _local4.y = 130; addChild(_local4); testString = new TextArea(); testString.x = 15; testString.y = 350; testString.width = 100; testString.height = 100; testString.bold(); testString.textColor = 0; testString1 = new TextArea(); testString1.x = 15; testString1.y = 300; testString1.width = 100; testString1.height = 100; testString1.bold(); testString1.textColor = 0; } private function onStatPermission(_arg1:FacebookEvent):void{ publishButton.visible = false; loginButton.visible = false; workingButton.visible = true; validationError.text = ""; } public function onLoginClickHandler():void{ fldConnect.login(); publishButton.visible = false; workingButton.visible = false; loginButton.visible = true; } public function initFacebook(_arg1:LoaderInfo):void{ this.fldFacebook = new Facebook(); fldConnect = new FacebookConnectObject(this.fldFacebook, API_KEY, _arg1); fldConnect.addEventListener(FacebookEvent.CONNECT, onConnectHandler); } private function onFullNameCallback(_arg1:String):void{ descText.text = _arg1; } private function getFBName(_arg1:Event):void{ getFacebookName(); } private function onConnectHandler(_arg1:FacebookEvent):void{ if (_arg1.success){ ExternalInterface.call("getFirstName"); ExternalInterface.addCallback("onNameCallback", onNameCallback); ExternalInterface.call("getFullName"); ExternalInterface.addCallback("onFullNameCallback", onFullNameCallback); onStatPermission(_arg1); } else { dispatchEvent(new MenuEvent(MenuEvent.MENU_BACK, true, true)); }; _arg1.currentTarget.removeEventListener(FacebookEvent.COMPLETE, arguments.callee); } public function facebookLoginButton(_arg1:Event):void{ _arg1.stopPropagation(); fldConnect.login(); } private function publishStats():void{ var _local1:String = nameField.getText(); var _local2:String = descriptionText.text; var _local3:Object = {name:titleText.text, href:linkText, media:[{type:"image", src:"http://www.sparkworkz.com/images/FC_Icon.jpg", href:linkText}], description:_local2}; var _local4:ActionLinkData = new ActionLinkData(); _local4.href = linkText; _local4.text = additionalText; var _local5:FacebookCall = this.fldFacebook.post(new PublishPost(_local1, _local3, [_local4], this.fldFacebook.uid)); workingButton.visible = false; publishButton.visible = true; } public function setLinkText(_arg1:MenuEvent):void{ linkText = _arg1.defaultText; descText.text = " "; defaultDescription = _arg1.description; titleText.text = "See the latest creation at FantasticContraption.com!"; this.userName = _arg1.userName; if (((!((_arg1.userName == User.getInstance().getUserName()))) && (!((_arg1.userName == null))))){ titleText.text = (("See the latest creation by " + _arg1.userName) + " at FantasticContraption.com!"); }; descriptionText.y = ((280 + titleText.height) - 20); additionalText = _arg1.additionalText; if (additionalText == "See It"){ defaultNameField = "created a new design!"; if (((!((_arg1.userName == User.getInstance().getUserName()))) && (!((_arg1.userName == null))))){ defaultNameField = (("likes a new design by " + _arg1.userName) + "!"); }; } else { defaultNameField = "created a new level!"; if (((!((_arg1.userName == User.getInstance().getUserName()))) && (!((_arg1.userName == null))))){ defaultNameField = (("likes a new level by " + _arg1.userName) + "!"); }; }; resetTextBoxText(); messageText = defaultNameField; } public function getFacebookName():void{ } public function resetTextBoxText():void{ nameField.setText(defaultNameField); } private function onNameCallback(_arg1:String):void{ userFirstName = _arg1; titleText.text = (("See " + _arg1) + "'s latest creation at FantasticContraption.com!"); if (((!((this.userName == User.getInstance().getUserName()))) && (!((this.userName == null))))){ titleText.text = (("See the latest creation by " + this.userName) + " at FantasticContraption.com!"); }; descriptionText.y = ((280 + titleText.height) - 20); publishButton.visible = true; workingButton.visible = false; } public function getisConnected():Boolean{ return (isConnected); } private function verifyLogin(_arg1:Event):void{ session.validateLogin(); getFacebookName(); } protected function login(_arg1:MenuEvent):void{ _arg1.stopPropagation(); validationError.text = ""; workingButton.visible = true; publishButton.visible = false; loginButton.visible = false; publishStats(); dispatchEvent(new MenuEvent(MenuEvent.MENU_BACK, true, true)); dispatchEvent(new MenuEvent(MenuEvent.DONE_FACEBOOK, true, true)); } protected function sendComplete():void{ dispatchEvent(new MenuEvent(MenuEvent.MENU_BACK, true, true)); } public static function getInstance():FacebookMenu{ if (instance == null){ allowInstantiation = true; instance = new (FacebookMenu); allowInstantiation = false; }; return (instance); } } }//package contraption.menu
Section 268
//LevelLinkMenu (contraption.menu.LevelLinkMenu) package contraption.menu { import flash.events.*; import contraption.*; import flash.net.*; public class LevelLinkMenu extends ModalMenu { public var textLink:String; public function LevelLinkMenu(_arg1:int):void{ var _local4:Button; super("Link"); var _local2:TextArea = new TextArea(); _local2.setText(((("Anyone who uses this link will be \n" + "transported to this saved level.\n\n") + "You can copy and paste it to your friends,\n") + "post it on your blog, a forum, or whatever!")); _local2.x = 230; _local2.y = 190; addChild(_local2); _local2 = new TextArea(((Contraption.SERVER_LOCATION + "/?levelId=") + _arg1), 12); _local2.mouseEnabled = true; _local2.bold(); _local2.x = 230; _local2.y = 290; addChild(_local2); textLink = _local2.text; var _local3:Button = new SmallBackButton(); _local3.x = 430; _local3.y = 320; addChild(_local3); _local4 = new TweetThis(); _local4.x = 230; _local4.y = 320; addChild(_local4); _local4.addEventListener(MenuEvent.LOAD_TWITTER, loadTwitter); var _local5:Button = new EmailThis(); _local5.x = 350; _local5.y = 320; _local5.width = 46; _local5.height = 46; addChild(_local5); _local5.addEventListener(MenuEvent.LOAD_EMAIL, loadEmail); var _local6:Button = new LoadFacebook(); _local6.x = 290; _local6.y = 320; addChild(_local6); _local6.addEventListener(MenuEvent.LOAD_FACEBOOK, doFacebookLogin); } private function loadEmail(_arg1:Event):void{ _arg1.stopPropagation(); var _local2:User = User.getInstance(); var _local3 = ((("See my new Fantastic Contraption level at " + textLink) + "%0A%0a") + "Play Fantastic Contraption at http://www.fantasticcontraption.com/"); var _local4 = (_local2.getUserName() + " wants to let you know he made a new level in fantastic contraption!"); var _local5:String = ((("mailto:?subject=" + _local4) + "&body=") + _local3); navigateToURL(new URLRequest(_local5), "_blank"); } private function doFacebookLogin(_arg1:Event):void{ _arg1.stopPropagation(); var _local2:MenuEvent = new MenuEvent(MenuEvent.LOAD_FACEBOOK); _local2.defaultText = textLink; _local2.description = "just published a new level in Fantastic Contraption!"; _local2.additionalText = "Play It"; _local2.userName = User.getInstance().getUserName(); FacebookMenu.getInstance().setLinkText(_local2); dispatchEvent(_local2); } private function loadTwitter(_arg1:Event):void{ _arg1.stopPropagation(); var _local2:MenuEvent = new MenuEvent(MenuEvent.LOAD_TWITTER); _local2.defaultText = textLink; _local2.description = (("See " + User.getInstance().getUserName()) + "'s new level at: \n"); TwitterMenu.getInstance().initTwitterText(_local2); dispatchEvent(_local2); } } }//package contraption.menu
Section 269
//LinkButton (contraption.menu.LinkButton) package contraption.menu { import flash.events.*; import contraption.*; import flash.text.*; public class LinkButton extends TextField implements ActionContainer { protected var enabled:Boolean;// = true protected var format:TextFormat; protected var downEvent:String; public var levelId:int; public function LinkButton(_arg1:String, _arg2:int=13, _arg3:String="arial", _arg4:Boolean=false):void{ this.text = _arg1; textColor = 0xFF; format = new TextFormat(); format.font = _arg3; format.bold = true; format.size = _arg2; setTextFormat(format); autoSize = "left"; selectable = false; if (!_arg4){ addEventListener(MouseEvent.ROLL_OVER, mouseOver); addEventListener(MouseEvent.ROLL_OUT, mouseOut); }; addEventListener(MouseEvent.MOUSE_DOWN, buttonPress); } public function enable():void{ textColor = 0xFF; enabled = true; } public function disable():void{ textColor = 0xDDDDDD; enabled = false; } protected function mouseOut(_arg1:MouseEvent):void{ removeUnderline(); } public function addUnderline():void{ format.underline = true; setTextFormat(format); } public function removeUnderline():void{ format.underline = false; setTextFormat(format); } protected function buttonPress(_arg1:MouseEvent):void{ var _local2:MenuEvent; if (downEvent != null){ _local2 = new MenuEvent(downEvent, true, true); _local2.levelId = levelId; dispatchEvent(_local2); }; } public function getAllowableActions():Actions{ var _local1:Actions = new Actions(); if (enabled){ _local1.button = true; }; return (_local1); } public function setDownEvent(_arg1:String):void{ downEvent = _arg1; } protected function mouseOver(_arg1:MouseEvent):void{ addUnderline(); } public function setAllowableActions(_arg1:Actions):void{ } } }//package contraption.menu
Section 270
//LinkedIntoBadLevelMenu (contraption.menu.LinkedIntoBadLevelMenu) package contraption.menu { import flash.display.*; public class LinkedIntoBadLevelMenu extends ModalMenu { protected var canvas:Sprite; public function LinkedIntoBadLevelMenu():void{ var _local3:Button; super("Restricted"); var _local1:TextArea = new TextArea(); _local1.setText(((("Sorry! You need to buy the full version of the \n" + "game to see solutions to this player-made level.\n\n") + "But you can still play the game!\n") + "Or you can register for $10 and have\nfull access to The Fantastic Contraption.")); _local1.x = 230; _local1.y = 190; addChild(_local1); var _local2:Button = new PlayGameButton(); _local2.x = 230; _local2.y = 310; addChild(_local2); _local3 = new BuyGameButton(); _local3.x = 360; _local3.y = 310; addChild(_local3); } } }//package contraption.menu
Section 271
//LinkInMenu (contraption.menu.LinkInMenu) package contraption.menu { import flash.events.*; import flash.display.*; public class LinkInMenu extends ModalMenu { protected var canvas:Sprite; public function LinkInMenu():void{ var _local2:Button; super("Welcome"); addChild(new LinkedInOverlay()); var _local1:TextArea = new TextArea((((("Welcome to Fantastic Contraption!\n\n" + "Someone built this machine and thought you'd \nlike it. ") + "Press continue and then the start button \nto watch it go. ") + "To play the game and make your \nown contraptions, ") + "press the red back arrow.")); _local1.x = 230; _local1.y = 190; _local1.width = 430; _local1.height = 400; addChild(_local1); _local2 = new ContinueButton(); _local2.x = 270; _local2.y = 310; addChild(_local2); _local2.addEventListener(MenuEvent.MENU_BACK, closeMenu); } public function closeMenu(_arg1:Event):void{ _arg1.stopPropagation(); parent.removeChild(this); } } }//package contraption.menu
Section 272
//LogInMenu (contraption.menu.LogInMenu) package contraption.menu { import flash.events.*; import contraption.*; public class LogInMenu extends ModalMenu { protected var passwordField:TextBox; protected var validationError:TextArea; protected var nameField:TextBox; public function LogInMenu():void{ var _local1:TextArea; var _local4:LinkButton; super("Sign In"); validationError = new TextArea(""); validationError.x = 250; validationError.y = 0xFF; validationError.textColor = 16720418; validationError.width = 250; addChild(validationError); _local1 = new TextArea("User Name:"); _local1.x = 250; _local1.y = 190; addChild(_local1); _local1 = new TextArea("Password:"); _local1.x = 250; _local1.y = 220; addChild(_local1); nameField = new TextBox(100, 20, 15); nameField.x = 330; nameField.y = 190; addChild(nameField); passwordField = new TextBox(100, 20, 15, true); passwordField.x = 330; passwordField.y = 220; addChild(passwordField); var _local2:Button = new LogInButton(); _local2.x = 230; _local2.y = 280; addChild(_local2); _local2.addEventListener(MenuEvent.LOG_IN, login); var _local3:Button = new SmallCancelButton(); _local3.x = 360; _local3.y = 280; addChild(_local3); _local4 = new LinkButton("forgot your password?"); _local4.width = 200; _local4.x = 295; _local4.y = 335; addChild(_local4); _local4.addEventListener(MouseEvent.MOUSE_DOWN, resetPassword); } override public function disposeMenu():void{ var _local1:User = User.getInstance(); _local1.removeEventListener(MenuEvent.LOGGED_IN, loginComplete); _local1.removeEventListener(MenuEvent.LOG_IN_FAILED, loginFailed); _local1.removeEventListener(MenuEvent.ADD_SPINNER, addSpinner); _local1.removeEventListener(MenuEvent.REMOVE_SPINNER, removeSpinner); } protected function loginComplete(_arg1:Event):void{ dispatchEvent(new MenuEvent(MenuEvent.MENU_BACK, true, true)); dispatchEvent(new MenuEvent(MenuEvent.LOGGED_IN, true, true)); } protected function loginFailed(_arg1:MenuEvent):void{ if (_arg1.defaultText == null){ validationError.text = "Oops, Wrong user name or password"; } else { validationError.text = _arg1.defaultText; }; } protected function login(_arg1:MenuEvent):void{ _arg1.stopPropagation(); validationError.text = ""; var _local2:User = User.getInstance(); _local2.addEventListener(MenuEvent.LOGGED_IN, loginComplete, false, 0, true); _local2.addEventListener(MenuEvent.LOG_IN_FAILED, loginFailed, false, 0, true); _local2.addEventListener(MenuEvent.ADD_SPINNER, addSpinner, false, 0, true); _local2.addEventListener(MenuEvent.REMOVE_SPINNER, removeSpinner, false, 0, true); _local2.logIn(nameField.getText(), passwordField.getText()); } protected function resetPassword(_arg1:Event):void{ dispatchEvent(new MenuEvent(MenuEvent.RESET_PASSWORD)); } } }//package contraption.menu
Section 273
//LoginPanel (contraption.menu.LoginPanel) package contraption.menu { import contraption.*; import flash.display.*; public class LoginPanel extends Sprite { protected var userNameField:TextArea; protected var loggedOutPanel:Sprite; protected var loggedInPanel:Sprite; public function LoginPanel(){ var _local1:Button; super(); loggedInPanel = new Sprite(); addChild(loggedInPanel); loggedOutPanel = new Sprite(); addChild(loggedOutPanel); _local1 = new LogInButton(); _local1.x = 10; _local1.y = 100; loggedOutPanel.addChild(_local1); _local1 = new NewUserButton(); _local1.x = 10; _local1.y = 160; loggedOutPanel.addChild(_local1); userNameField = new TextArea("", 12); userNameField.x = 15; userNameField.y = 10; userNameField.textColor = 0x663300; userNameField.bold(); loggedInPanel.addChild(userNameField); _local1 = new LogOutButton(); _local1.x = 10; _local1.y = 100; loggedInPanel.addChild(_local1); _local1 = new UpdateUserInfoButton(); _local1.x = 10; _local1.y = 160; loggedInPanel.addChild(_local1); setPanel(); } protected function setPanel():void{ var _local1:User = User.getInstance(); loggedInPanel.visible = false; loggedOutPanel.visible = false; if (_local1.isLoggedIn()){ loggedInPanel.visible = true; userNameField.setText(_local1.getUserName()); } else { loggedOutPanel.visible = true; }; } public function refresh():void{ setPanel(); } } }//package contraption.menu
Section 274
//MainMenu (contraption.menu.MainMenu) package contraption.menu { import flash.events.*; import contraption.*; import flash.display.*; import flash.net.*; import contraption.data.*; public class MainMenu extends MenuWindow { protected var savedDesignsButton:Button; private var testString:TextArea; protected var learnToPlayButton:Button; public var pagingData:PagingData; protected var pageCount:TextArea; protected var loginPanel:LoginPanel; protected var regButton:SimpleButton; protected var levelsCanvas:Sprite; protected var savedLevelsButton:Button; protected var viewingSolutions:Boolean;// = false public function MainMenu():void{ var _local1:Button; loginPanel = new LoginPanel(); super(false); addChild(new MenuBackground()); addChild(new MainMenuButtons()); loginPanel = new LoginPanel(); addChild(loginPanel); learnToPlayButton = new LearnToPlayButton(); learnToPlayButton.x = 427; learnToPlayButton.y = 165; addChild(learnToPlayButton); learnToPlayButton.addEventListener(MouseEvent.MOUSE_DOWN, previousPage, false, 0, true); pageCount = new TextArea(); pageCount.x = 390; pageCount.y = 155; pageCount.bold(); pageCount.textColor = 0x663300; addChild(pageCount); _local1 = new PreviousPageButton(); _local1.x = 340; _local1.y = 150; addChild(_local1); _local1.addEventListener(MouseEvent.MOUSE_DOWN, previousPage, false, 0, true); _local1 = new NextPageButton(); _local1.x = 480; _local1.y = 150; addChild(_local1); _local1.addEventListener(MouseEvent.MOUSE_DOWN, nextPage, false, 0, true); addEventListener(MenuEvent.LOGGED_OUT, setLoginPanel, false, 0, true); addEventListener(MenuEvent.LOG_OUT, logOut, false, 0, true); setRegButton(); pagingData = new PagingData(12, 1); levelsCanvas = new Sprite(); addChild(levelsCanvas); listLevels(); testString = new TextArea(); testString.x = 15; testString.y = 350; testString.width = 100; testString.height = 100; testString.bold(); testString.textColor = 0xFFFFFF; } protected function loadEditor(_arg1:Event):void{ dispatchEvent(new MenuEvent(MenuEvent.LOAD_EDITOR)); } protected function renderButtons(_arg1:XML):void{ var _local6:int; var _local7:XML; var _local8:Boolean; var _local9:Button; var _local10:Button; var _local11:StartHere; var _local12:LinkButton; pagingData.numResults = _arg1.levelCount; pageCount.setText(((("Page " + (pagingData.currentPage + 1)) + " of ") + pagingData.getNumPages())); learnToPlayButton.visible = false; removeChild(levelsCanvas); levelsCanvas = new Sprite(); addChild(levelsCanvas); var _local2:SharedObject = SharedObject.getLocal("user"); if (pagingData.currentPage == 0){ _local6 = 1; } else { _local6 = 0; }; var _local3:int = pagingData.getOffset(); if (pagingData.currentPage != 0){ _local3--; }; var _local4:int = (_local3 + pagingData.resultsPerPage); if (pagingData.currentPage == 0){ _local4--; }; var _local5:int = _local3; while ((((_local5 < _local4)) && ((_local5 < _arg1.levelCount)))) { _local7 = _arg1.level[_local5]; _local8 = (_local2.data[("level" + _local7.levelId)] == "true"); if (_local5 == 1){ _local10 = new OfficialLevelButton(0, 0, "", (_local2.data["level14"] == "true")); _local10.setDownEvent(MenuEvent.LOAD_TUTORIALS); _local10.x = 250; _local10.y = 200; levelsCanvas.addChild(_local10); _local11 = new StartHere(); _local10.addChild(_local11); _local11.x = 40; _local11.y = 5; }; _local9 = new OfficialLevelButton(_local7.levelId, _local7.levelNumber, _local7.levelName, _local8); _local9.x = (250 + ((_local6 % 2) * 220)); _local9.y = (200 + (Math.floor((_local6 / 2)) * 47)); levelsCanvas.addChild(_local9); if (_local8){ _local12 = new LinkButton("Other Players' Designs", 12, "contraptionFont"); _local12.embedFonts = true; _local12.textColor = 0x663300; _local12.x = (_local9.x + 45); _local12.y = (_local9.y + 27); levelsCanvas.addChild(_local12); _local12.levelId = _local7.levelId; _local12.setDownEvent(MenuEvent.LOAD_LEVEL_SOLUTIONS); }; _local6++; _local5++; }; finishedLoading(); } protected function loadSolutions(_arg1:MenuEvent):void{ dispatchEvent(_arg1); } protected function loadUserGenLevels(_arg1:Event):void{ dispatchEvent(new MenuEvent(MenuEvent.LOAD_USER_GENERATED_LEVELS)); } protected function loadSavedLevels(_arg1:Event):void{ var _local2:User = User.getInstance(); var _local3:MenuEvent = new MenuEvent(MenuEvent.LOAD_SAVED_LEVELS); _local3.userId = _local2.getUserId(); _local3.userName = _local2.getUserName(); dispatchEvent(_local3); } protected function setLoginPanel(_arg1:Event):void{ loginPanel.refresh(); } override public function refresh():void{ User.getInstance().refreshRegistered(); loginPanel.refresh(); setRegButton(); listLevels(); } protected function setRegButton():void{ var _local1:SimpleButton; if (!Contraption.INCLUDE_PAYPAL_LINKS){ _local1 = new LinkBackButton(); addChild(_local1); _local1.addEventListener(MouseEvent.MOUSE_DOWN, linkToSite); return; }; if (((!(User.getInstance().isRegistered())) && ((regButton == null)))){ regButton = new FullVersionButton(); addChild(regButton); regButton.addEventListener(MouseEvent.MOUSE_DOWN, registerMenu, false, 0, true); }; if (((User.getInstance().isRegistered()) && (!((regButton == null))))){ removeChild(regButton); regButton = null; }; } protected function nextPage(_arg1:Event):void{ if (pagingData.currentPage < (pagingData.getNumPages() - 1)){ pagingData.currentPage++; }; listLevels(); } protected function logOut(_arg1:Event):void{ User.getInstance().logOut(); dispatchEvent(new MenuEvent(MenuEvent.LOGGED_OUT, true, true)); } protected function listLevels():void{ if (User.getInstance().isRegistered()){ renderButtons(OfficialLevelsExp.getLeveListXML()); } else { renderButtons(OfficialLevels.getLeveListXML()); }; } protected function registerMenu(_arg1:Event):void{ dispatchEvent(new MenuEvent(MenuEvent.BUY_GAME)); } protected function loadSavedDesigns(_arg1:Event):void{ var _local2:User = User.getInstance(); var _local3:MenuEvent = new MenuEvent(MenuEvent.LOAD_SAVED_DESIGNS); _local3.userId = _local2.getUserId(); _local3.userName = _local2.getUserName(); dispatchEvent(_local3); } protected function previousPage(_arg1:Event):void{ if (pagingData.currentPage > 0){ pagingData.currentPage--; }; listLevels(); } public function linkToSite(_arg1:Event):void{ var _local2:URLRequest = new URLRequest(Contraption.SERVER_LOCATION); navigateToURL(_local2); } protected function loadLevel(_arg1:Event):void{ _arg1.stopPropagation(); var _local2:MenuEvent = new MenuEvent(MenuEvent.LOAD_LEVEL); _local2.levelId = _arg1.target.levelId; dispatchEvent(_local2); } } }//package contraption.menu
Section 275
//MenuEvent (contraption.menu.MenuEvent) package contraption.menu { import flash.events.*; public class MenuEvent extends Event { public var description:String; public var userId:int; public var tutorialNumber:int; public var levelNumber:int; public var additionalText:String; public var defaultText:String; public var userName:String; public var designId:int; public var levelId:int; public static const LOAD_SAVED_LEVELS:String = "loadSavedLevels"; public static const CURTAIN_OPEN_COMPLETE:String = "curtainOpenComplete"; public static const LOGGED_IN:String = "loggedIn"; public static const LOAD_LEVEL_SOLUTIONS:String = "loadLevelSolutions"; public static const LOAD_OFFICIAL_LEVEL:String = "loadOfficialLevel"; public static const RETURN_TO_MAIN_MENU:String = "returnToMainMenu"; public static const LOG_OUT:String = "logOut"; public static const LOAD_LEVEL_LINK_MENU:String = "loadLevelLinkMenu"; public static const LOAD_USER_GENERATED_LEVELS:String = "loadUserGeneratedLevels"; public static const LOAD_LINKED_IN_MENU:String = "loadLinkedInMenu"; public static const LOAD_TUTORIALS:String = "loadTutorials"; public static const SEND_FACEBOOK:String = "sendFacebookMsg"; public static const LOG_IN:String = "logIn"; public static const CHANGE_GRAPHICS_OPTION:String = "changeGraphicsOption"; public static const SEND_TWITTER:String = "sendTwitter"; public static const NEW_USER:String = "newUser"; public static const RESET_PASSWORD:String = "resetPassword"; public static const UPDATE_USER_INFO:String = "updateUserInfo"; public static const BUY_GAME:String = "buyGame"; public static const LOAD_TWITTER:String = "loadTwitterMenu"; public static const TUTORIAL_LEVEL_COMPLETE:String = "tutorialLevelComplete"; public static const LOAD_DESIGN:String = "loadDesign"; public static const LOAD_USER_MENU:String = "loadUserMenu"; public static const LEVEL_COMPLETE:String = "levelComplete"; public static const LOG_IN_FAILED:String = "loginFailed"; public static const REMOVE_SPINNER:String = "removeSpinner"; public static const TRY_LEVEL:String = "tryLevel"; public static const LOAD_TUTORIAL_LEVEL:String = "loadTutorialLevel"; public static const LOAD_FACEBOOK:String = "loadFacebookMenu"; public static const ADD_SPINNER:String = "addSpinner"; public static const LOAD_LEVEL:String = "loadLevel"; public static const MENU_BACK:String = "menuBack"; public static const FINISHED_LOADING:String = "finishLoading"; public static const DELETE_LEVEL:String = "deleteLevel"; public static const RESET_PASSWORD_FAILED:String = "resetPasswordFailed"; public static const DELETE_DESIGN:String = "deleteDesign"; public static const SAVE_CONTRAPTION:String = "saveDesign"; public static const LOAD_EMAIL:String = "loadEmailMenu"; public static const LOAD_SAVED_DESIGNS:String = "loadSavedDesigns"; public static const LOAD_EDITOR:String = "loadEditor"; public static const EDIT_LEVEL:String = "editLevel"; public static const LOGGED_OUT:String = "loggedOut"; public static const DONE_FACEBOOK:String = "doneFacebookMenu"; public static const GOTO_TWITTER:String = "gotoTwitter"; public static const LOAD_DESIGN_LINK_MENU:String = "loadDesignLinkMenu"; public static const OPEN_CURTAIN:String = "openCurtain"; public function MenuEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } override public function clone():Event{ var _local1:MenuEvent = new MenuEvent(type, bubbles, cancelable); _local1.levelId = levelId; _local1.levelNumber = levelNumber; _local1.tutorialNumber = tutorialNumber; _local1.designId = designId; _local1.userId = userId; _local1.userName = userName; _local1.defaultText = defaultText; _local1.description = description; _local1.additionalText = additionalText; return (_local1); } } }//package contraption.menu
Section 276
//MenuWindow (contraption.menu.MenuWindow) package contraption.menu { import flash.events.*; import contraption.*; public class MenuWindow extends ActionContainerImpl { public function MenuWindow(_arg1:Boolean=true){ if (_arg1){ addChild(new MenuBackground()); addChild(new MenuTopButtons()); }; } protected function returnToMainMenu(_arg1:Event):void{ dispatchEvent(new MenuEvent(MenuEvent.RETURN_TO_MAIN_MENU)); } public function removeSpinner(_arg1:Event=null):void{ dispatchEvent(new MenuEvent(MenuEvent.REMOVE_SPINNER, true, true)); } protected function menuBack(_arg1:Event):void{ dispatchEvent(new MenuEvent(MenuEvent.MENU_BACK)); } public function addSpinner(_arg1:Event=null):void{ dispatchEvent(new MenuEvent(MenuEvent.ADD_SPINNER, true, true)); } public function finishedLoading():void{ dispatchEvent(new MenuEvent(MenuEvent.FINISHED_LOADING)); } public function refresh():void{ } public function disposeMenu():void{ } } }//package contraption.menu
Section 277
//ModalMenu (contraption.menu.ModalMenu) package contraption.menu { import flash.events.*; import flash.display.*; public class ModalMenu extends MenuWindow { public function ModalMenu(_arg1:String, _arg2:Boolean=true){ var _local3:MovieClip; var _local4:TextArea; super(false); graphics.beginFill(0xFFFFFF, 0.4); graphics.drawRect(0, 0, 700, 500); if (_arg2){ _local3 = new ModalMenuCloud(); _local3.x = 100; _local3.y = 50; addChild(_local3); _local4 = new TextArea(_arg1, 30, "contraptionFont", "center"); _local4.embedFonts = true; _local4.bold(); _local4.width = 200; _local4.x = 215; _local4.y = 130; addChild(_local4); } else { _local3 = new ModalMenuLargeCloud(); _local3.x = 100; _local3.y = 50; addChild(_local3); _local4 = new TextArea(_arg1, 30, "contraptionFont", "center"); _local4.embedFonts = true; _local4.bold(); _local4.width = 200; _local4.x = 215; _local4.y = 130; addChild(_local4); }; addEventListener(MouseEvent.MOUSE_DOWN, stopEvent); } protected function stopEvent(_arg1:Event):void{ _arg1.stopPropagation(); } } }//package contraption.menu
Section 278
//MouseBlockingBackground (contraption.menu.MouseBlockingBackground) package contraption.menu { import contraption.*; public class MouseBlockingBackground extends ActionContainerImpl { override public function getAllowableActions():Actions{ var _local1:Actions = new Actions(); return (_local1); } } }//package contraption.menu
Section 279
//MuteButton (contraption.menu.MuteButton) package contraption.menu { import flash.events.*; import contraption.*; import flash.display.*; public class MuteButton extends Button { protected var buttonGraphics:SimpleButton; public function MuteButton(){ buttonWidth = 25; buttonHeight = 25; buttonGraphics = new SoundOnButton(); addChild(buttonGraphics); setButton(); } override protected function buttonPress(_arg1:MouseEvent):void{ var _local2:Configuration = Configuration.getInstance(); _local2.setMute(!(_local2.isMuted())); setButton(); } protected function setButton():void{ removeChild(buttonGraphics); var _local1:Boolean = Configuration.getInstance().isMuted(); Music.getInstance().setMute(_local1); if (_local1){ buttonGraphics = new SoundOffButton(); } else { buttonGraphics = new SoundOnButton(); }; addChild(buttonGraphics); } } }//package contraption.menu
Section 280
//NewUserMenu (contraption.menu.NewUserMenu) package contraption.menu { import flash.events.*; import contraption.*; public class NewUserMenu extends ModalMenu { protected var passwordField:TextBox; protected var nameField:TextBox; protected var emailField:TextBox; protected var validationError:TextArea; protected var confirmPasswordField:TextBox; public function NewUserMenu():void{ var _local1:TextArea; var _local2:Button; super("New User"); validationError = new TextArea(""); validationError.x = 275; validationError.y = 170; validationError.textColor = 16720418; validationError.width = 250; validationError.height = 50; addChild(validationError); _local1 = new TextArea("User Name:"); _local1.x = 270; _local1.y = 200; addChild(_local1); _local1 = new TextArea("Email Address:"); _local1.x = 250; _local1.y = 230; addChild(_local1); _local1 = new TextArea("Password:"); _local1.x = 275; _local1.y = 260; addChild(_local1); _local1 = new TextArea("Confirm Password:"); _local1.x = 230; _local1.y = 290; addChild(_local1); nameField = new TextBox(100, 20, 15); nameField.x = 350; nameField.y = 200; nameField.RestrictChars("0-9a-zA-Z\\-\\^.*|_~@#&!", 30); addChild(nameField); emailField = new TextBox(150, 20, 100); emailField.x = 350; emailField.y = 230; addChild(emailField); passwordField = new TextBox(100, 20, 15, true); passwordField.x = 350; passwordField.y = 260; addChild(passwordField); confirmPasswordField = new TextBox(100, 20, 15, true); confirmPasswordField.x = 350; confirmPasswordField.y = 290; addChild(confirmPasswordField); _local2 = new NewUserButton(); _local2.x = 230; _local2.y = 320; addChild(_local2); _local2.addEventListener(MenuEvent.NEW_USER, newUser); var _local3:Button = new SmallCancelButton(); _local3.x = 360; _local3.y = 320; addChild(_local3); } protected function loginComplete(_arg1:Event):void{ dispatchEvent(new MenuEvent(MenuEvent.MENU_BACK, true, true)); dispatchEvent(new MenuEvent(MenuEvent.LOGGED_IN)); } protected function newUserFailed(_arg1:MenuEvent):void{ if (_arg1.defaultText == null){ validationError.text = "Aw, that user name is taken"; } else { validationError.text = _arg1.defaultText; }; } protected function isValidEmail(_arg1:String):Boolean{ var _local2:RegExp = /^[a-z][\w.-]+@\w[\w.-]+\.[\w.-]*[a-z][a-z]$/i; return (_local2.test(_arg1)); } protected function newUser(_arg1:MenuEvent):void{ _arg1.stopPropagation(); if (!validate()){ return; }; var _local2:User = User.getInstance(); _local2.addEventListener(MenuEvent.LOGGED_IN, loginComplete); _local2.addEventListener(MenuEvent.LOG_IN_FAILED, newUserFailed); _local2.newUser(nameField.getText(), emailField.getText(), passwordField.getText()); } protected function validate():Boolean{ validationError.text = ""; if (!isValidEmail(emailField.getText())){ validationError.appendText("Invalid email address\n"); }; if (passwordField.getText() != confirmPasswordField.getText()){ validationError.appendText("Password fields do not match\n"); }; if (nameField.getText() == ""){ validationError.appendText("Please enter a user name\n"); }; return ((validationError.text == "")); } } }//package contraption.menu
Section 281
//NoTabButton (contraption.menu.NoTabButton) package contraption.menu { import flash.display.*; public class NoTabButton extends SimpleButton { public function NoTabButton(){ tabEnabled = false; } } }//package contraption.menu
Section 282
//OfficialLevelButton (contraption.menu.OfficialLevelButton) package contraption.menu { import flash.events.*; import flash.display.*; import flash.text.*; public class OfficialLevelButton extends Button { protected var circle:SimpleButton; protected var origCircleUpState:DisplayObject; protected var nameLink:LinkButton; protected var levelName:String; public function OfficialLevelButton(_arg1:int, _arg2:int, _arg3:String, _arg4:Boolean){ var _local5:TextArea; buttonWidth = 200; buttonHeight = 40; this.levelId = _arg1; this.levelNumber = _arg2; this.levelName = _arg3; this.downEvent = MenuEvent.LOAD_OFFICIAL_LEVEL; if (_arg4){ circle = new LevelCircleChecked(); } else { circle = new LevelCircle(); }; circle.x = 20; circle.y = 20; origCircleUpState = circle.upState; addChild(circle); _local5 = new TextArea(_arg2.toString(), 18, "contraptionFont", TextFormatAlign.CENTER); _local5.embedFonts = true; _local5.width = 30; _local5.x = 5; _local5.y = 8; addChild(_local5); nameLink = new LinkButton(_arg3, 18, "contraptionFont", true); nameLink.embedFonts = true; nameLink.textColor = 0; nameLink.x = 45; nameLink.y = 5; addChild(nameLink); super(); } override protected function mouseOut(_arg1:MouseEvent):void{ circle.upState = origCircleUpState; nameLink.removeUnderline(); } override protected function mouseOver(_arg1:MouseEvent):void{ circle.upState = circle.overState; nameLink.addUnderline(); } } }//package contraption.menu
Section 283
//PagingData (contraption.menu.PagingData) package contraption.menu { public class PagingData { public var numResults:int; public var resultsPerPage:int; public var currentPage:int; public var additionalResults:int; public function PagingData(_arg1:int, _arg2:int=0):void{ this.numResults = 0; this.resultsPerPage = _arg1; this.currentPage = 0; this.additionalResults = _arg2; } public function getNumPages():int{ return (Math.ceil(((numResults + additionalResults) / resultsPerPage))); } public function getOffset():int{ return ((currentPage * resultsPerPage)); } } }//package contraption.menu
Section 284
//PleaseRegisterMenu (contraption.menu.PleaseRegisterMenu) package contraption.menu { import flash.events.*; import flash.display.*; import flash.net.*; public class PleaseRegisterMenu extends ModalMenu { protected var canvas:Sprite; public function PleaseRegisterMenu():void{ var _local1:Button; var _local3:TextArea; var _local4:LinkButton; super("Restricted"); if (Contraption.INCLUDE_PAYPAL_LINKS){ _local3 = new TextArea(((("Sorry, you need to buy the full version first!\n\n" + "For $10 you can make your own levels, \nplay other player's new levels, ") + "and watch \nsolutions to player-made levels. \n\nYou'll also be ") + "helping to support independant \ngame development.\n\n")); _local3.x = 250; _local3.y = 175; addChild(_local3); } else { _local3 = new TextArea((("Sorry, you need to buy the full version first!\n\n" + "For $10 you can make your own levels, \nplay other player's new levels, ") + "and watch \nsolutions to player-made levels.\n\nPlay ad free and get the full version here:")); _local3.x = 250; _local3.y = 175; addChild(_local3); _local4 = new LinkButton("FantasticContraption.com"); _local4.width = 200; _local4.x = 295; _local4.y = 297; addChild(_local4); _local4.addEventListener(MouseEvent.MOUSE_DOWN, linkToSite); }; _local1 = new SmallBackButton(); _local1.x = 230; _local1.y = 320; addChild(_local1); var _local2:Button = new BuyGameButton(); _local2.x = 360; _local2.y = 320; if (Contraption.INCLUDE_PAYPAL_LINKS){ addChild(_local2); }; } public function linkToSite(_arg1:Event):void{ var _local2:URLRequest = new URLRequest(Contraption.SERVER_LOCATION); navigateToURL(_local2); } } }//package contraption.menu
Section 285
//PublishButton (contraption.menu.PublishButton) package contraption.menu { import flash.events.*; import contraption.*; import flash.net.*; import flash.text.*; public class PublishButton extends Button { public var updateMode:int; protected var textField:TextField; public var publish:Boolean; protected var buttonGraphic:Button; public var id:int; public static var DESIGN_MODE:int = 1; public static var LEVEL_MODE:int = 0; public function PublishButton(_arg1:int, _arg2:Boolean, _arg3:int){ this.updateMode = _arg3; this.publish = _arg2; this.id = _arg1; if (this.publish){ buttonGraphic = new UnPublishButton(); } else { buttonGraphic = new DoPublishButton(); }; determineToolTip(); addChild(buttonGraphic); buttonGraphic.addEventListener(MouseEvent.MOUSE_DOWN, setPublish, false, 0, true); } protected function confirmPublish(_arg1:Event):void{ removeChild(buttonGraphic); if (publish){ buttonGraphic = new UnPublishButton(); } else { buttonGraphic = new DoPublishButton(); }; determineToolTip(); addChild(buttonGraphic); buttonGraphic.addEventListener(MouseEvent.MOUSE_DOWN, setPublish, false, 0, true); } protected function determineToolTip():void{ var _local1:String; if (publish){ _local1 = "Un-Publish: stop sharing this "; } else { _local1 = "Publish: share this "; }; if (updateMode == LEVEL_MODE){ _local1 = (_local1 + "level "); } else { _local1 = (_local1 + "contraption "); }; _local1 = (_local1 + "\nwith other users online"); buttonGraphic.setToolTip(_local1); } protected function setPublish(_arg1:Event):void{ var _local2:String; publish = !(publish); if (publish){ _local2 = "1"; } else { _local2 = "0"; }; var _local3:XML = <setPublish/> ; if (updateMode == LEVEL_MODE){ _local3.appendChild((("<levelId>" + id) + "</levelId>")); } else { _local3.appendChild((("<designId>" + id) + "</designId>")); }; _local3.appendChild((("<publish>" + _local2) + "</publish>")); var _local4:URLLoader = new URLLoader(); _local4.addEventListener(Event.COMPLETE, confirmPublish); var _local5:URLRequest = new URLRequest("http://FantasticContraption.com/setPublish.php"); var _local6:URLVariables = new URLVariables(); _local6.xml = _local3; _local6.userId = User.getInstance().getUserId(); _local6.password = User.getInstance().getPassword(); _local5.data = _local6; _local5.method = URLRequestMethod.POST; _local4.load(_local5); } } }//package contraption.menu
Section 286
//SaveContraptionMenu (contraption.menu.SaveContraptionMenu) package contraption.menu { import flash.events.*; import contraption.*; import flash.display.*; import flash.net.*; import flash.text.*; public class SaveContraptionMenu extends ModalMenu { protected var isSolution:Boolean; protected var nameField:TextBox; protected var loginMenu:Sprite; protected var saveMenu:Sprite; protected var currentLevelId:int; protected var validationError:TextField; protected var descriptionField:TextBox; protected var xml:XML; public function SaveContraptionMenu(_arg1:XML, _arg2:Boolean, _arg3:int):void{ var _local7:Button; super("Save Design"); this.xml = _arg1; this.isSolution = _arg2; this.currentLevelId = _arg3; saveMenu = new Sprite(); addChild(saveMenu); validationError = new TextArea(""); validationError.x = 270; validationError.y = 190; validationError.textColor = 16720418; validationError.width = 250; saveMenu.addChild(validationError); var _local4:TextArea = new TextArea("Name:"); _local4.x = 270; _local4.y = 220; saveMenu.addChild(_local4); _local4 = new TextArea("Description:"); _local4.x = 240; _local4.y = 250; saveMenu.addChild(_local4); nameField = new TextBox(100, 20, 15); nameField.x = 320; nameField.y = 220; saveMenu.addChild(nameField); descriptionField = new TextBox(200, 40, 50); descriptionField.x = 320; descriptionField.y = 250; saveMenu.addChild(descriptionField); var _local5:Button = new SmallSaveButton(); _local5.x = 230; _local5.y = 310; saveMenu.addChild(_local5); _local5.addEventListener(MouseEvent.MOUSE_DOWN, save); var _local6:Button = new SmallCancelButton(); _local6.x = 360; _local6.y = 310; saveMenu.addChild(_local6); loginMenu = new Sprite(); addChild(loginMenu); _local4 = new TextArea(); _local4.setText("Before you save you need to sign in or create \nan account. Only takes a second, I promise!"); _local4.x = 240; _local4.y = 190; loginMenu.addChild(_local4); _local7 = new LogInButton(); _local7.x = 230; _local7.y = 310; loginMenu.addChild(_local7); var _local8:Button = new NewUserButton(); _local8.x = 290; _local8.y = 250; loginMenu.addChild(_local8); _local6 = new SmallCancelButton(); _local6.x = 360; _local6.y = 310; loginMenu.addChild(_local6); setMenu(); } protected function setMenu():void{ saveMenu.visible = false; loginMenu.visible = false; if (User.getInstance().isLoggedIn()){ saveMenu.visible = true; } else { loginMenu.visible = true; }; } protected function save(_arg1:Event):void{ if (!validate()){ return; }; var _local2:XML = <saveDesign/> ; _local2.appendChild((("<name>" + nameField.getText()) + "</name>")); _local2.appendChild((("<description>" + descriptionField.getText()) + "</description>")); _local2.appendChild((("<userId>" + User.getInstance().getUserId()) + "</userId>")); _local2.appendChild((("<levelId>" + currentLevelId) + "</levelId>")); if (isSolution){ _local2.appendChild("<isSolution>1</isSolution>"); } else { _local2.appendChild("<isSolution>0</isSolution>"); }; _local2.appendChild(xml); var _local3:URLLoader = new ContraptionUrlLoader(); _local3.addEventListener(MenuEvent.ADD_SPINNER, bubble); _local3.addEventListener(MenuEvent.REMOVE_SPINNER, bubble); _local3.addEventListener(Event.COMPLETE, saveComplete); var _local4:URLRequest = new URLRequest((Contraption.SERVER_LOCATION + "/saveDesign.php")); var _local5:URLVariables = new URLVariables(); _local5.xml = _local2; _local4.data = _local5; _local4.method = URLRequestMethod.POST; _local3.load(_local4); } protected function saveComplete(_arg1:Event):void{ dispatchEvent(new MenuEvent(MenuEvent.MENU_BACK, true, true)); var _local2:MenuEvent = new MenuEvent(MenuEvent.LOAD_DESIGN_LINK_MENU, true, true); _local2.designId = _arg1.target.data; dispatchEvent(_local2); } public function bubble(_arg1:Event):void{ dispatchEvent(_arg1); } override public function refresh():void{ setMenu(); } protected function validate():Boolean{ validationError.text = ""; if (nameField.getText() == ""){ validationError.text = "Please provide a name"; return (false); }; return (true); } } }//package contraption.menu
Section 287
//SavedContraptionRow (contraption.menu.SavedContraptionRow) package contraption.menu { import flash.events.*; import contraption.*; import flash.display.*; import flash.net.*; import flash.text.*; public class SavedContraptionRow extends MovieClip { protected var userName:String; protected var textLink:String; protected var userId:int; public function SavedContraptionRow(_arg1:Boolean, _arg2:int, _arg3:String, _arg4:String, _arg5:Boolean, _arg6:String, _arg7:int, _arg8:Number){ var _local9:MovieClip; var _local11:TextArea; var _local12:Button; var _local13:Button; var _local14:Button; var _local15:Button; var _local16:Button; var _local17:PublishButton; var _local18:Button; var _local19:LinkButton; var _local20:StarBar; super(); this.userId = _arg7; this.userName = _arg6; textLink = ((Contraption.SERVER_LOCATION + "/?designId=") + _arg2); _local9 = new SavedLevelBackground(); addChild(_local9); var _local10:TextFormat = new TextFormat(); _local10.size = 20; _local10.bold = true; _local11 = new TextArea(_arg3, 19, "contraptionFont"); _local11.embedFonts = true; _local11.x = 10; _local11.y = 10; _local9.addChild(_local11); _local11 = new TextArea(_arg4); _local11.wordWrap = true; _local11.height = 40; _local11.width = 200; _local11.x = 10; _local11.y = 50; _local9.addChild(_local11); if (_arg1){ _local12 = new PlayDesignSmallButton(); _local12.designId = _arg2; _local12.x = 260; _local12.y = 10; _local9.addChild(_local12); _local13 = new LinkDesignButton(); _local13.designId = _arg2; _local13.x = 300; _local13.y = 10; _local9.addChild(_local13); _local14 = new TweetThis(); _local14.x = (0xFF - 40); _local14.y = 50; _local14.width = 40; _local14.height = 40; _local9.addChild(_local14); _local14.addEventListener(MenuEvent.LOAD_TWITTER, loadTwitter); _local15 = new EmailThis(); _local15.x = (0xFF + 40); _local15.y = 50; _local15.width = 40; _local15.height = 40; _local9.addChild(_local15); _local15.addEventListener(MenuEvent.LOAD_EMAIL, loadEmail); _local16 = new LoadFacebook(); _local16.x = 0xFF; _local16.y = 50; _local16.width = 40; _local16.height = 40; _local9.addChild(_local16); _local16.addEventListener(MenuEvent.LOAD_FACEBOOK, doFacebookLogin); _local17 = new PublishButton(_arg2, _arg5, PublishButton.DESIGN_MODE); _local17.x = 340; _local17.y = 10; _local9.addChild(_local17); _local18 = new DeleteDesignButton(); _local18.designId = _arg2; _local18.x = 340; _local18.y = 55; _local9.addChild(_local18); } else { _local11 = new TextArea("By:"); _local11.x = 150; _local11.y = 15; _local9.addChild(_local11); _local19 = new LinkButton(_arg6); _local19.x = 170; _local19.y = 15; _local9.addChild(_local19); _local19.addEventListener(MouseEvent.MOUSE_DOWN, loadUserMenu); _local20 = new StarBar(_arg8, _arg2, StarBar.QUALITY, StarBar.DESIGN); _local20.x = 270; _local20.y = 20; _local9.addChild(_local20); _local12 = new PlayDesignSmallButton(); _local12.designId = _arg2; _local12.x = 340; _local12.y = 10; _local9.addChild(_local12); _local13 = new LinkDesignButton(); _local13.designId = _arg2; _local13.x = 340; _local13.y = 55; _local9.addChild(_local13); _local14 = new TweetThis(); _local14.x = (0xFF - 40); _local14.y = 50; _local14.width = 40; _local14.height = 40; _local9.addChild(_local14); _local14.addEventListener(MenuEvent.LOAD_TWITTER, loadTwitter); _local15 = new EmailThis(); _local15.x = (0xFF + 40); _local15.y = 50; _local15.width = 40; _local15.height = 40; _local9.addChild(_local15); _local15.addEventListener(MenuEvent.LOAD_EMAIL, loadEmail); _local16 = new LoadFacebook(); _local16.x = 0xFF; _local16.y = 50; _local16.width = 40; _local16.height = 40; _local9.addChild(_local16); _local16.addEventListener(MenuEvent.LOAD_FACEBOOK, doFacebookLogin); }; } protected function loadUserMenu(_arg1:MouseEvent):void{ var _local2:MenuEvent = new MenuEvent(MenuEvent.LOAD_USER_MENU, true, true); _local2.userId = userId; _local2.userName = userName; dispatchEvent(_local2); } private function loadTwitter(_arg1:Event):void{ var _local2:MenuEvent = new MenuEvent(MenuEvent.LOAD_TWITTER); _local2.defaultText = textLink; _local2.userName = this.userName; _local2.description = (("See " + User.getInstance().getUserName()) + "'s new design at: \n"); TwitterMenu.getInstance().initTwitterText(_local2); } private function loadEmail(_arg1:Event):void{ _arg1.stopPropagation(); var _local2:User = User.getInstance(); var _local3 = ((("See my new Fantastic Contraption design at " + textLink) + "%0A%0a") + "Play Fantastic Contraption at http://www.fantasticcontraption.com/"); var _local4 = (_local2.getUserName() + " wants to let you know he made a new contraption!"); if (this.userName != User.getInstance().getUserName()){ _local3 = ((((("See " + this.userName) + "'s new Fantastic Contraption design at ") + textLink) + "%0A%0a") + "Play Fantastic Contraption at http://www.fantasticcontraption.com/"); _local4 = (((_local2.getUserName() + " wants to show you a new contraption by ") + this.userName) + "!"); }; var _local5:String = ((("mailto:?subject=" + _local4) + "&body=") + _local3); navigateToURL(new URLRequest(_local5), "_blank"); } private function doFacebookLogin(_arg1:Event):void{ var _local2:MenuEvent = new MenuEvent(MenuEvent.LOAD_FACEBOOK); _local2.defaultText = textLink; _local2.description = "just published a solution in Fantastic Contraption!"; _local2.additionalText = "See It"; _local2.userName = this.userName; FacebookMenu.getInstance().setLinkText(_local2); } } }//package contraption.menu
Section 288
//SaveDesignWindow (contraption.menu.SaveDesignWindow) package contraption.menu { import flash.events.*; import contraption.*; import flash.net.*; public class SaveDesignWindow extends SaveWindow { public var levelId:int;// = 0 override protected function save(_arg1:MouseEvent):void{ var _local2:XML = <saveDesign/> ; _local2.appendChild((("<name>" + nameField.text) + "</name>")); _local2.appendChild((("<description>" + descriptionField.text) + "</description>")); _local2.appendChild((("<userId>" + User.getInstance().getUserId()) + "</userId>")); _local2.appendChild((("<levelId>" + levelId) + "</levelId>")); _local2.appendChild(levelXml); var _local3:URLLoader = new URLLoader(); _local3.addEventListener(Event.COMPLETE, completeHandler); var _local4:URLRequest = new URLRequest((Contraption.SERVER_LOCATION + "/saveDesign.php")); var _local5:URLVariables = new URLVariables(); _local5.xml = _local2; _local4.data = _local5; _local4.method = URLRequestMethod.POST; _local3.load(_local4); } } }//package contraption.menu
Section 289
//SavedLevelBackgroundBase (contraption.menu.SavedLevelBackgroundBase) package contraption.menu { import flash.events.*; import flash.display.*; public class SavedLevelBackgroundBase extends MovieClip { protected var theMask:SavedLevelBackgroundMask; public function SavedLevelBackgroundBase(){ theMask = new SavedLevelBackgroundMask(); super(); addChild(theMask); this.mask = theMask; theMask.gotoAndPlay("default"); gotoAndPlay("default"); this.addEventListener(MouseEvent.ROLL_OVER, mouseOver); this.addEventListener(MouseEvent.ROLL_OUT, mouseOut); } protected function mouseOut(_arg1:MouseEvent):void{ if (_arg1.eventPhase != EventPhase.AT_TARGET){ return; }; if (currentLabel == "open"){ theMask.gotoAndPlay("up"); gotoAndPlay("up"); } else { theMask.gotoAndPlay("default"); gotoAndPlay("default"); }; } protected function mouseOver(_arg1:MouseEvent):void{ if (_arg1.eventPhase != EventPhase.AT_TARGET){ return; }; theMask.gotoAndPlay("over"); gotoAndPlay("over"); } } }//package contraption.menu
Section 290
//SavedLevelRow (contraption.menu.SavedLevelRow) package contraption.menu { import flash.events.*; import contraption.*; import flash.display.*; import flash.net.*; import flash.text.*; public class SavedLevelRow extends MovieClip { protected var textLink:String; public function SavedLevelRow(_arg1:int, _arg2:String, _arg3:String, _arg4:Boolean, _arg5:Boolean){ var _local8:TextArea; var _local16:PublishButton; var _local17:Button; super(); textLink = ((Contraption.SERVER_LOCATION + "/?levelid=") + _arg1); var _local6:MovieClip = new SavedLevelBackground(); addChild(_local6); var _local7:TextFormat = new TextFormat(); _local7.size = 20; _local7.bold = true; _local8 = new TextArea(_arg2, 19, "contraptionFont"); _local8.embedFonts = true; _local8.x = 10; _local8.y = 10; _local6.addChild(_local8); var _local9:Button = new PlayLevelSmallButton(); _local9.levelId = _arg1; _local9.x = 220; _local9.y = 10; _local6.addChild(_local9); var _local10:Button = new LinkLevelButton(); _local10.levelId = _arg1; _local10.x = 260; _local10.y = 10; _local6.addChild(_local10); var _local11:Button = new SolutionsButton(); _local11.levelId = _arg1; _local11.x = 300; _local11.y = 10; _local6.addChild(_local11); if (_arg5){ _local16 = new PublishButton(_arg1, _arg4, PublishButton.LEVEL_MODE); _local16.x = 340; _local16.y = 10; _local6.addChild(_local16); }; _local8 = new TextArea(_arg3, 12); _local8.wordWrap = true; _local8.height = 40; _local8.width = 160; _local8.x = 15; _local8.y = 50; _local6.addChild(_local8); if (_arg5){ _local17 = new DeleteLevelButton(); _local17.levelId = _arg1; _local17.x = 300; _local17.y = 55; _local6.addChild(_local17); }; var _local12:Button = new EditLevelButton(); _local12.levelId = _arg1; _local12.x = 340; _local12.y = 55; _local6.addChild(_local12); var _local13:Button = new TweetThis(); _local13.x = (0xFF - 80); _local13.y = 50; _local13.width = 40; _local13.height = 40; _local6.addChild(_local13); _local13.addEventListener(MenuEvent.LOAD_TWITTER, loadTwitter); var _local14:Button = new EmailThis(); _local14.x = 0xFF; _local14.y = 50; _local14.width = 40; _local14.height = 40; _local6.addChild(_local14); _local14.addEventListener(MenuEvent.LOAD_EMAIL, loadEmail); var _local15:Button = new LoadFacebook(); _local15.x = (0xFF - 40); _local15.y = 50; _local15.width = 40; _local15.height = 40; _local6.addChild(_local15); _local15.addEventListener(MenuEvent.LOAD_FACEBOOK, doFacebookLogin); } private function loadEmail(_arg1:Event):void{ _arg1.stopPropagation(); var _local2:User = User.getInstance(); var _local3 = ((("See my new Fantastic Contraption design at " + textLink) + "%0A%0a") + "Play Fantastic Contraption at http://www.fantasticcontraption.com/"); var _local4 = (_local2.getUserName() + " wants to let you know he made a new contraption!"); var _local5:String = ((("mailto:?subject=" + _local4) + "&body=") + _local3); navigateToURL(new URLRequest(_local5), "_blank"); } private function doFacebookLogin(_arg1:Event):void{ var _local2:MenuEvent = new MenuEvent(MenuEvent.LOAD_FACEBOOK); _local2.defaultText = textLink; _local2.description = "just published a solution in Fantastic Contraption!"; _local2.additionalText = "See It"; _local2.userName = User.getInstance().getUserName(); FacebookMenu.getInstance().setLinkText(_local2); } private function loadTwitter(_arg1:Event):void{ var _local2:MenuEvent = new MenuEvent(MenuEvent.LOAD_TWITTER); _local2.defaultText = textLink; _local2.description = (("See " + User.getInstance().getUserName()) + "'s new level at: \n"); TwitterMenu.getInstance().initTwitterText(_local2); } } }//package contraption.menu
Section 291
//SaveEvent (contraption.menu.SaveEvent) package contraption.menu { import flash.events.*; public class SaveEvent extends Event { public var isSolution:Boolean;// = false public var currentLevelId:int; public var xml:XML; public static const SAVE_CONTRAPTION:String = "saveContraption"; public static const SAVE_LEVEL:String = "saveLevel"; public function SaveEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } override public function clone():Event{ var _local1:SaveEvent = new SaveEvent(type, bubbles, cancelable); _local1.xml = xml; _local1.isSolution = isSolution; _local1.currentLevelId = currentLevelId; return (_local1); } } }//package contraption.menu
Section 292
//SaveLevelMenu (contraption.menu.SaveLevelMenu) package contraption.menu { import flash.events.*; import contraption.*; import flash.display.*; import flash.net.*; public class SaveLevelMenu extends ModalMenu { protected var loginMenu:Sprite; protected var descriptionField:TextBox; protected var validationError:TextArea; protected var nameField:TextBox; protected var xml:XML; protected var saveMenu:Sprite; public function SaveLevelMenu(_arg1:XML):void{ var _local2:TextArea; var _local4:Button; var _local5:Button; super("Save Level"); this.xml = _arg1; saveMenu = new Sprite(); addChild(saveMenu); validationError = new TextArea(""); validationError.x = 270; validationError.y = 180; validationError.textColor = 16720418; validationError.width = 250; saveMenu.addChild(validationError); _local2 = new TextArea("Name:"); _local2.x = 270; _local2.y = 210; saveMenu.addChild(_local2); _local2 = new TextArea("Description:"); _local2.x = 240; _local2.y = 240; saveMenu.addChild(_local2); nameField = new TextBox(100, 20, 15); nameField.x = 320; nameField.y = 210; saveMenu.addChild(nameField); descriptionField = new TextBox(200, 40, 50); descriptionField.x = 320; descriptionField.y = 240; saveMenu.addChild(descriptionField); var _local3:Button = new SmallSaveButton(); _local3.x = 230; _local3.y = 310; saveMenu.addChild(_local3); _local3.addEventListener(MouseEvent.MOUSE_DOWN, save); _local4 = new SmallCancelButton(); _local4.x = 360; _local4.y = 310; saveMenu.addChild(_local4); loginMenu = new Sprite(); addChild(loginMenu); _local2 = new TextArea(("In order to save you must log in or create an account.\n\n" + "(it will only take a second, I promise)")); _local2.x = 250; _local2.y = 190; _local2.width = 400; _local2.height = 100; loginMenu.addChild(_local2); _local5 = new LogInButton(); _local5.x = 230; _local5.y = 260; loginMenu.addChild(_local5); var _local6:Button = new NewUserButton(); _local6.x = 360; _local6.y = 260; loginMenu.addChild(_local6); _local4 = new SmallCancelButton(); _local4.x = 360; _local4.y = 320; loginMenu.addChild(_local4); setMenu(); } protected function setMenu():void{ saveMenu.visible = false; loginMenu.visible = false; if (User.getInstance().isLoggedIn()){ saveMenu.visible = true; } else { loginMenu.visible = true; }; } protected function save(_arg1:Event):void{ if (!validate()){ return; }; var _local2:XML = <saveLevel/> ; _local2.appendChild((("<name>" + nameField.getText()) + "</name>")); _local2.appendChild((("<description>" + descriptionField.getText()) + "</description>")); _local2.appendChild((("<userId>" + User.getInstance().getUserId()) + "</userId>")); _local2.appendChild(xml); var _local3:URLLoader = new ContraptionUrlLoader(); _local3.addEventListener(MenuEvent.ADD_SPINNER, bubble); _local3.addEventListener(MenuEvent.REMOVE_SPINNER, bubble); _local3.addEventListener(Event.COMPLETE, saveComplete); var _local4:URLRequest = new URLRequest((Contraption.SERVER_LOCATION + "/saveLevel2.php")); var _local5:URLVariables = new URLVariables(); _local5.xml = _local2; _local4.data = _local5; _local4.method = URLRequestMethod.POST; _local3.load(_local4); } protected function saveComplete(_arg1:Event):void{ dispatchEvent(new MenuEvent(MenuEvent.MENU_BACK, true, true)); var _local2:MenuEvent = new MenuEvent(MenuEvent.LOAD_LEVEL_LINK_MENU, true, true); _local2.levelId = _arg1.target.data; dispatchEvent(_local2); } public function bubble(_arg1:Event):void{ dispatchEvent(_arg1); } override public function refresh():void{ setMenu(); } protected function validate():Boolean{ validationError.text = ""; if (nameField.getText() == ""){ validationError.text = "Please provide a name"; return (false); }; return (true); } } }//package contraption.menu
Section 293
//SaveLevelWindow (contraption.menu.SaveLevelWindow) package contraption.menu { import flash.events.*; import contraption.*; import flash.net.*; public class SaveLevelWindow extends SaveWindow { override protected function save(_arg1:MouseEvent):void{ var _local2:XML = <saveLevel/> ; _local2.appendChild((("<name>" + nameField.text) + "</name>")); _local2.appendChild((("<description>" + descriptionField.text) + "</description>")); _local2.appendChild((("<userId>" + User.getInstance().getUserId()) + "</userId>")); _local2.appendChild(levelXml); var _local3:URLLoader = new URLLoader(); _local3.addEventListener(Event.COMPLETE, completeHandler); var _local4:URLRequest = new URLRequest((Contraption.SERVER_LOCATION + "/saveLevel.php")); var _local5:URLVariables = new URLVariables(); _local5.xml = _local2; _local4.data = _local5; _local4.method = URLRequestMethod.POST; _local3.load(_local4); } } }//package contraption.menu
Section 294
//SaveWindow (contraption.menu.SaveWindow) package contraption.menu { import flash.events.*; import contraption.*; import flash.display.*; import flash.text.*; import flash.errors.*; public class SaveWindow extends MenuWindow { public var savedLink:TextField; protected var controlPanel:Sprite; protected var loginMenu:LogInMenu; public var nameField:TextField; public var levelXml:XML; protected var saveButton:Button; public var descriptionField:TextField; public function SaveWindow():void{ super(false); controlPanel = new Sprite(); addChild(controlPanel); controlPanel.visible = false; var _local1:Button = new Button("Close"); _local1.x = 10; _local1.y = 10; addChild(_local1); _local1.addEventListener(MouseEvent.MOUSE_DOWN, close); saveButton = new Button("Save"); saveButton.x = 90; saveButton.y = 10; addChild(saveButton); saveButton.addEventListener(MouseEvent.MOUSE_DOWN, save); savedLink = new TextField(); savedLink.x = 10; savedLink.y = 120; savedLink.width = 350; controlPanel.addChild(savedLink); var _local2:TextField = new TextField(); _local2.x = 10; _local2.y = 60; _local2.height = 20; _local2.text = "Name:"; controlPanel.addChild(_local2); nameField = new TextField(); nameField.type = TextFieldType.INPUT; nameField.x = 80; nameField.y = 60; nameField.background = true; nameField.backgroundColor = 0xFFFFFF; nameField.height = 20; controlPanel.addChild(nameField); nameField.addEventListener(KeyboardEvent.KEY_DOWN, keyDown); _local2 = new TextField(); _local2.x = 10; _local2.y = 90; _local2.height = 20; _local2.text = "Description:"; controlPanel.addChild(_local2); descriptionField = new TextField(); descriptionField.type = TextFieldType.INPUT; descriptionField.x = 80; descriptionField.y = 90; descriptionField.background = true; descriptionField.backgroundColor = 0xFFFFFF; descriptionField.height = 20; controlPanel.addChild(descriptionField); descriptionField.addEventListener(KeyboardEvent.KEY_DOWN, keyDown); loginMenu = new LogInMenu(); loginMenu.x = 10; loginMenu.y = 120; addChild(loginMenu); loginMenu.visible = false; loginMenu.addEventListener(MenuEvent.LOGGED_IN, loggedIn); addEventListener(MouseEvent.MOUSE_DOWN, mouseDown); opaqueBackground = 0xEEEEEE; visible = false; } protected function loggedIn(_arg1:Event):void{ controlPanel.visible = true; loginMenu.visible = false; saveButton.visible = true; } public function open(_arg1:XML):void{ this.levelXml = _arg1; savedLink.text = ""; visible = true; if (User.getInstance().isLoggedIn()){ controlPanel.visible = true; } else { loginMenu.visible = true; saveButton.visible = false; }; } protected function completeHandler(_arg1:Event):void{ savedLink.text = _arg1.target.data; } public function close(_arg1:MouseEvent):void{ visible = false; } protected function keyDown(_arg1:KeyboardEvent):void{ if (((!(parent)) || ((visible == false)))){ return; }; _arg1.stopPropagation(); } protected function save(_arg1:MouseEvent):void{ throw (new IllegalOperationError("You must extend SaveMenu and implement \"save\"")); } protected function mouseDown(_arg1:Event):void{ _arg1.stopPropagation(); } } }//package contraption.menu
Section 295
//SceneChange (contraption.menu.SceneChange) package contraption.menu { import flash.display.*; public class SceneChange extends MovieClip { public var lockClosed:Boolean;// = false public var doOpen:Boolean;// = false public function SceneChange(){ stop(); } public function open():void{ if (lockClosed){ return; }; if (currentLabel == "open"){ gotoAndPlay("open"); dispatchEvent(new MenuEvent(MenuEvent.OPEN_CURTAIN)); } else { doOpen = true; }; } public function jumpToClosed():void{ gotoAndStop("open"); } public function close():void{ if (!lockClosed){ gotoAndPlay("close"); doOpen = false; }; } } }//package contraption.menu
Section 296
//SelectDifficultyButton (contraption.menu.SelectDifficultyButton) package contraption.menu { import flash.geom.*; public class SelectDifficultyButton extends Button { public function SelectDifficultyButton(_arg1:int){ addChild(new Star(1, new Point(5, 5), true, 6750054)); if (_arg1 > 1){ addChild(new Star(2, new Point(17, 5), true, 6750054)); }; if (_arg1 > 2){ addChild(new Star(3, new Point(29, 5), true, 6750054)); }; if (_arg1 > 3){ addChild(new Star(4, new Point(41, 5), true, 6750054)); }; if (_arg1 > 4){ addChild(new Star(5, new Point(53, 5), true, 6750054)); }; } } }//package contraption.menu
Section 297
//SortedPagingData (contraption.menu.SortedPagingData) package contraption.menu { public class SortedPagingData extends PagingData { public var sortValue:String; public static const SORT_BY_QUALITY:String = "quality"; public static const SORT_BY_DATE:String = "date"; public function SortedPagingData(_arg1:int):void{ super(_arg1); sortValue = SORT_BY_QUALITY; } } }//package contraption.menu
Section 298
//Spinner (contraption.menu.Spinner) package contraption.menu { import flash.events.*; import flash.display.*; import flash.text.*; public class Spinner extends MovieClip { public function Spinner(){ graphics.beginFill(0xFFFFFF, 0); graphics.drawRect(0, 0, 700, 500); var _local1:TextFormat = new TextFormat(); _local1.size = 28; _local1.bold = true; var _local2:TextField = new TextField(); _local2.text = "Working..."; _local2.height = 40; _local2.width = 200; _local2.mouseEnabled = false; _local2.x = 400; _local2.y = 50; _local2.setTextFormat(_local1); addChild(_local2); addEventListener(MouseEvent.MOUSE_DOWN, stopEvent); addEventListener(KeyboardEvent.KEY_DOWN, stopEvent); } protected function stopEvent(_arg1:Event):void{ _arg1.stopPropagation(); } } }//package contraption.menu
Section 299
//Star (contraption.menu.Star) package contraption.menu { import contraption.*; import flash.geom.*; public class Star extends ActionContainerImpl { protected var rating:int; public function Star(_arg1:int, _arg2:Point, _arg3:Boolean, _arg4:int){ this.rating = _arg1; drawStar(_arg3, _arg4); this.x = _arg2.x; this.y = _arg2.y; } override public function getAllowableActions():Actions{ var _local1:Actions = new Actions(); _local1.button = true; return (_local1); } public function getRating():int{ return (rating); } protected function drawStar(_arg1:Boolean, _arg2:int):void{ graphics.lineStyle(2, 16777062); if (_arg1){ graphics.beginFill(_arg2); } else { graphics.beginFill(16777062); }; graphics.drawCircle(0, 0, 7); } } }//package contraption.menu
Section 300
//StarBar (contraption.menu.StarBar) package contraption.menu { import flash.events.*; import contraption.*; import flash.net.*; import flash.geom.*; public class StarBar extends ActionContainerImpl { protected var stars:Array; protected var barType:int; protected var table:int; protected var id:int; protected var rating:Number; protected var starColour:int; public static const LEVEL:int = 0; public static const DESIGN:int = 1; public static const DIFFICULTY:int = 1; public static const QUALITY:int = 0; public function StarBar(_arg1:Number, _arg2:int, _arg3:int, _arg4:int):void{ this.id = _arg2; this.barType = _arg3; this.table = _arg4; if (_arg3 == QUALITY){ starColour = 16737894; } else { starColour = 6750054; }; setRating(_arg1); addEventListener(MouseEvent.ROLL_OVER, mouseOver); addEventListener(MouseEvent.ROLL_OUT, mouseOut); } protected function drawStarBar():void{ var _local1:int; if (stars != null){ _local1 = 0; while (_local1 < stars.length) { removeChild(stars[_local1]); _local1++; }; }; stars = new Array(); addStar(1, new Point(5, 5), true); addStar(2, new Point(17, 5), (rating > 1.5)); addStar(3, new Point(29, 5), (rating > 2.5)); addStar(4, new Point(41, 5), (rating > 3.5)); addStar(5, new Point(53, 5), (rating >= 4.5)); } protected function addRating(_arg1:Event):void{ var _local2:User = User.getInstance(); if (!_local2.isLoggedIn()){ return; }; var _local3:int = _arg1.target.getRating(); var _local4:XML = <setRating/> ; if (table == LEVEL){ _local4.appendChild((("<levelId>" + id) + "</levelId>")); } else { _local4.appendChild((("<designId>" + id) + "</designId>")); }; if (barType == QUALITY){ _local4.appendChild((("<qualityRating>" + _local3) + "</qualityRating>")); } else { _local4.appendChild((("<difficultyRating>" + _local3) + "</difficultyRating>")); }; _local4.appendChild((("<userId>" + _local2.getUserId()) + "</userId>")); var _local5:URLLoader = new URLLoader(); _local5.addEventListener(Event.COMPLETE, addRatingResponse); var _local6:URLRequest = new URLRequest((Contraption.SERVER_LOCATION + "/setRating.php")); var _local7:URLVariables = new URLVariables(); _local7.xml = _local4; _local6.data = _local7; _local6.method = URLRequestMethod.POST; _local5.load(_local6); } protected function addRatingResponse(_arg1:Event):void{ setRating(_arg1.target.data); } protected function addStar(_arg1:int, _arg2:Point, _arg3:Boolean):Star{ var _local4:Star = new Star(_arg1, _arg2, _arg3, starColour); _local4.addEventListener(MouseEvent.MOUSE_DOWN, addRating, false, 0, true); addChild(_local4); stars.push(_local4); return (_local4); } protected function mouseOut(_arg1:MouseEvent):void{ dispatchEvent(new TooltipEvent(TooltipEvent.REMOVE_TOOLTIP, true, true)); } protected function mouseOver(_arg1:MouseEvent):void{ var _local2:TooltipEvent = new TooltipEvent(TooltipEvent.ADD_TOOLTIP, true, true); if (table == LEVEL){ _local2.toolTip = "Level "; } else { _local2.toolTip = "Contraption "; }; if (barType == QUALITY){ _local2.toolTip = "Quality Rating"; } else { _local2.toolTip = (_local2.toolTip + "Difficulty"); }; dispatchEvent(_local2); } public function setRating(_arg1:Number):void{ this.rating = _arg1; drawStarBar(); } } }//package contraption.menu
Section 301
//TextArea (contraption.menu.TextArea) package contraption.menu { import flash.text.*; public class TextArea extends TextField { protected var format:TextFormat; public function TextArea(_arg1:String="", _arg2:int=13, _arg3:String="arial", _arg4:String="left"):void{ format = new TextFormat(); format.font = _arg3; format.size = _arg2; if (_arg4 == TextFormatAlign.LEFT){ this.autoSize = "left"; } else { format.align = _arg4; }; defaultTextFormat = format; this.text = _arg1; mouseEnabled = false; } public function setAlign(_arg1:String):void{ format.align = _arg1; defaultTextFormat = format; } public function bold():void{ format.bold = true; defaultTextFormat = format; } public function setHtmlText(_arg1:String):void{ this.htmlText = _arg1; } public function setText(_arg1:String):void{ this.text = _arg1; } } }//package contraption.menu
Section 302
//TextBox (contraption.menu.TextBox) package contraption.menu { import flash.events.*; import contraption.*; import flash.text.*; public class TextBox extends ActionContainerImpl { protected var textField:TextField; public function TextBox(_arg1:int=80, _arg2:int=20, _arg3:int=0, _arg4:Boolean=false, _arg5:String=""):void{ textField = new TextField(); textField.border = true; textField.type = TextFieldType.INPUT; textField.background = true; textField.backgroundColor = 0xFFFFFF; textField.width = _arg1; textField.height = _arg2; textField.maxChars = _arg3; textField.text = _arg5; textField.displayAsPassword = _arg4; if (_arg2 > 20){ textField.wordWrap = true; }; addChild(textField); textField.addEventListener(KeyboardEvent.KEY_DOWN, keyDown); var _local6:TextFormat = new TextFormat(); _local6.font = "arial"; _local6.size = 12; textField.defaultTextFormat = _local6; graphics.beginFill(0); graphics.drawRect(0, 0, _arg1, _arg2); } override public function getAllowableActions():Actions{ var _local1:Actions = new Actions(); _local1.inputText = true; return (_local1); } protected function keyDown(_arg1:KeyboardEvent):void{ _arg1.stopPropagation(); } public function getText():String{ return (textField.text); } public function RestrictChars(_arg1:String, _arg2:int=5):void{ textField.restrict = _arg1; textField.maxChars = _arg2; } public function setMaxChars(_arg1:int):void{ textField.maxChars = _arg1; } public function setText(_arg1:String):void{ textField.text = _arg1; } } }//package contraption.menu
Section 303
//TickCounter (contraption.menu.TickCounter) package contraption.menu { import flash.text.*; public class TickCounter extends TextField { protected var paused:Boolean;// = false protected var count:int; public function TickCounter(){ count = 0; text = (count + ""); } public function reset():void{ paused = false; count = 0; text = (count + ""); } public function pause():void{ paused = true; } public function increment():void{ if (!paused){ count++; }; text = (count + ""); } } }//package contraption.menu
Section 304
//ToggleGraphicsButton (contraption.menu.ToggleGraphicsButton) package contraption.menu { import flash.events.*; import contraption.*; import flash.display.*; public class ToggleGraphicsButton extends Button { protected var buttonGraphics:SimpleButton; public function ToggleGraphicsButton(){ buttonWidth = 25; buttonHeight = 25; buttonGraphics = new GraphicsOnButton(); addChild(buttonGraphics); setButton(); } override protected function buttonPress(_arg1:MouseEvent):void{ var _local2:Configuration = Configuration.getInstance(); _local2.setSimpleGraphicsMode(!(_local2.isInSimpleGraphicsMode())); setButton(); dispatchEvent(new MenuEvent(MenuEvent.CHANGE_GRAPHICS_OPTION, true, true)); } public function setButton():void{ removeChild(buttonGraphics); if (Configuration.getInstance().isInSimpleGraphicsMode()){ buttonGraphics = new GraphicsOffButton(); setToolTip("Turn simple graphics off"); } else { buttonGraphics = new GraphicsOnButton(); setToolTip("Use simple graphics\n(if things are running slow)"); }; addChild(buttonGraphics); } } }//package contraption.menu
Section 305
//TooltipEvent (contraption.menu.TooltipEvent) package contraption.menu { import flash.events.*; public class TooltipEvent extends Event { public var toolTip:String; public static const REMOVE_TOOLTIP:String = "removeTooltip"; public static const ADD_TOOLTIP:String = "addTooltip"; public function TooltipEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } override public function clone():Event{ var _local1:TooltipEvent = new TooltipEvent(type, bubbles, cancelable); _local1.toolTip = toolTip; return (_local1); } } }//package contraption.menu
Section 306
//TutorialButton (contraption.menu.TutorialButton) package contraption.menu { import flash.events.*; import contraption.tutorials.*; public class TutorialButton extends Button { override protected function buttonPress(_arg1:MouseEvent):void{ if (!isEnabled){ return; }; var _local2:TutorialEvent = new TutorialEvent(downEvent, true, true); dispatchEvent(_local2); } } }//package contraption.menu
Section 307
//TwitterLinkMenu (contraption.menu.TwitterLinkMenu) package contraption.menu { import flash.net.*; public class TwitterLinkMenu extends ModalMenu { private var twitterAddress:String; protected var nameField:TextBox; protected var validationError:TextArea; protected var descriptionField:TextBox; protected var passwordField:TextBox; public function TwitterLinkMenu(_arg1:String):void{ twitterAddress = _arg1; super("Twitter"); var _local2:TextArea = new TextArea(); _local2.setText("You just sent a Tweet! \n\nCheck it out by clicking the button below."); _local2.x = 230; _local2.y = 190; addChild(_local2); var _local3:Button = new SeeTweet(); _local3.x = 210; _local3.y = 300; addChild(_local3); _local3.addEventListener(MenuEvent.GOTO_TWITTER, login); var _local4:Button = new SmallBackButton(); _local4.x = 360; _local4.y = 300; addChild(_local4); } protected function login(_arg1:MenuEvent):void{ _arg1.stopPropagation(); goToTweet(); } private function goToTweet():void{ navigateToURL(new URLRequest(twitterAddress), "_blank"); } } }//package contraption.menu
Section 308
//TwitterMenu (contraption.menu.TwitterMenu) package contraption.menu { import flash.events.*; import contraption.*; import flash.display.*; import flash.net.*; import com.swfjunkie.tweetr.events.*; import com.swfjunkie.tweetr.data.objects.*; import com.swfjunkie.tweetr.utils.*; import com.swfjunkie.tweetr.*; public class TwitterMenu extends ModalMenu { private var twitterAddress:String; private var workingButton:SimpleButton; private var tweetId:Number; protected var linkText:String; private var connection:LocalConnection; protected var validationError:TextArea; private var shortURL:URLShortener; protected var username:String; protected var passwordField:TextBox; protected var descriptionField:TextBox; protected var nameField:TextBox; private var tweetr:Tweetr; protected var linkTextArea:TextArea; private var proxyPath:String;// = "/proxy" private var loginButton:Button; private static var allowInstantiation:Boolean; private static var instance:TwitterMenu; public function TwitterMenu():void{ var _local2:SimpleButton; initTwitter(); super(" ", false); validationError = new TextArea(""); validationError.x = 250; validationError.y = 170; validationError.textColor = 16720418; validationError.width = 250; addChild(validationError); descriptionField = new TextBox(200, 80, 140, false, ""); descriptionField.x = 330; descriptionField.y = 300; descriptionField.getText(); addChild(descriptionField); nameField = new TextBox(100, 20, 15); nameField.x = 390; nameField.y = 195; addChild(nameField); passwordField = new TextBox(100, 20, 15, true); passwordField.x = 390; passwordField.y = 220; addChild(passwordField); loginButton = new SendTweet(); loginButton.x = 270; loginButton.y = 395; addChild(loginButton); loginButton.addEventListener(MenuEvent.SEND_TWITTER, login); workingButton = new WorkingButton(); workingButton.x = 270; workingButton.y = 395; addChild(workingButton); workingButton.visible = false; var _local1:Button = new SmallCancelButton(); _local1.x = 410; _local1.y = 395; addChild(_local1); linkTextArea = new TextArea(); linkTextArea.x = 270; linkTextArea.y = 250; addChild(linkTextArea); _local2 = new TwitterTitle(); _local2.x = 270; _local2.y = 130; addChild(_local2); shortURL = new URLShortener(); } override public function disposeMenu():void{ var _local1:User = User.getInstance(); _local1.removeEventListener(MenuEvent.ADD_SPINNER, addSpinner); _local1.removeEventListener(MenuEvent.REMOVE_SPINNER, removeSpinner); } private function handleFail(_arg1:TweetEvent):void{ loginFailed(_arg1); } protected function loginComplete(_arg1:Event):void{ } public function initTwitter():void{ tweetr = new Tweetr(); tweetr.serviceHost = "labs.swfjunkie.com/tweetr/proxy"; tweetr.addEventListener(TweetEvent.COMPLETE, handleLoad); tweetr.addEventListener(TweetEvent.FAILED, handleFail); } protected function loginFailed(_arg1:Event):void{ validationError.text = "Oops, Wrong user name or password"; workingButton.visible = false; loginButton.visible = true; } public function initTwitterText(_arg1:MenuEvent):void{ this.linkText = _arg1.defaultText; shortURL.shorten(_arg1.defaultText); shortURL.addEventListener(Event.COMPLETE, showURL); this.username = _arg1.userName; linkTextArea.setText("See my new Fantastic Contraption at: \n"); if (((!((_arg1.userName == User.getInstance().getUserName()))) && (!((_arg1.userName == null))))){ linkTextArea.setText((("See the new Fantastic Contraption by " + _arg1.userName) + "\n at: ")); }; descriptionField.setText(" "); descriptionField.setMaxChars(((140 - linkTextArea.length) - 1)); workingButton.visible = false; loginButton.visible = true; } private function saveTwitterAddress():void{ twitterAddress = ((("http://twitter.com/" + nameField.getText()) + "/status/") + tweetId); } protected function sendComplete():void{ dispatchEvent(new MenuEvent(MenuEvent.MENU_BACK, true, true)); var _local1:MenuEvent = new MenuEvent(MenuEvent.GOTO_TWITTER, true, true); _local1.defaultText = twitterAddress; dispatchEvent(_local1); } protected function login(_arg1:MenuEvent):void{ _arg1.stopPropagation(); validationError.text = ""; sendTweet(); } private function sendTweet():void{ if (((!((nameField.getText() == ""))) && (!((passwordField.getText() == ""))))){ tweetr.username = nameField.getText(); tweetr.password = passwordField.getText(); tweetr.updateStatus(((linkTextArea.text + ". ") + descriptionField.getText())); loginButton.visible = false; workingButton.visible = true; } else { validationError.text = "Username and Password Required."; }; } private function handleLoad(_arg1:TweetEvent):void{ tweetId = StatusData(_arg1.responseArray[0]).id; trace(tweetId); saveTwitterAddress(); sendComplete(); } public function showURL(_arg1:Event):void{ var _local2:String = shortURL.url.toString(); linkTextArea.setText(("See my new Fantastic Contraption at: \n" + _local2)); if (((!((this.username == User.getInstance().getUserName()))) && (!((this.username == null))))){ linkTextArea.setText(((("See the new Fantastic Contraption by " + this.username) + "\n at: ") + _local2)); }; descriptionField.setText(" "); descriptionField.setMaxChars(((140 - linkTextArea.length) - 1)); } public static function getInstance():TwitterMenu{ if (instance == null){ allowInstantiation = true; instance = new (TwitterMenu); allowInstantiation = false; }; return (instance); } } }//package contraption.menu
Section 309
//UpdateUserInfoMenu (contraption.menu.UpdateUserInfoMenu) package contraption.menu { import flash.events.*; import contraption.*; import flash.text.*; public class UpdateUserInfoMenu extends ModalMenu { protected var passwordField:TextBox; protected var validationError:TextArea; protected var emailField:TextBox; protected var confirmPasswordField:TextBox; public function UpdateUserInfoMenu():void{ var _local2:TextField; super("Account"); var _local1:User = User.getInstance(); validationError = new TextArea(""); validationError.x = 270; validationError.y = 175; validationError.textColor = 16720418; validationError.width = 250; validationError.height = 50; addChild(validationError); _local2 = new TextArea("User Name:"); _local2.x = 270; _local2.y = 200; addChild(_local2); _local2 = new TextArea("Email Address:"); _local2.x = 250; _local2.y = 230; addChild(_local2); _local2 = new TextArea("New Password:"); _local2.x = 248; _local2.y = 260; addChild(_local2); _local2 = new TextArea("Confirm New Password:"); _local2.x = 200; _local2.y = 290; _local2.width = 200; addChild(_local2); _local2 = new TextArea(_local1.getUserName()); _local2.x = 350; _local2.y = 200; addChild(_local2); emailField = new TextBox(150, 20, 100); emailField.setText(_local1.getEmail()); emailField.x = 350; emailField.y = 230; addChild(emailField); passwordField = new TextBox(100, 20, 15, true); passwordField.x = 350; passwordField.y = 260; addChild(passwordField); confirmPasswordField = new TextBox(100, 20, 15, true); confirmPasswordField.x = 350; confirmPasswordField.y = 290; addChild(confirmPasswordField); var _local3:Button = new UpdateUserInfoSubmitButton(); _local3.x = 230; _local3.y = 320; addChild(_local3); _local3.addEventListener(MenuEvent.UPDATE_USER_INFO, updateInfo); var _local4:Button = new SmallCancelButton(); _local4.x = 360; _local4.y = 320; addChild(_local4); } protected function updateComplete(_arg1:Event):void{ dispatchEvent(new MenuEvent(MenuEvent.MENU_BACK, true, true)); } protected function isValidEmail(_arg1:String):Boolean{ var _local2:RegExp = /^[a-z][\w.-]+@\w[\w.-]+\.[\w.-]*[a-z][a-z]$/i; return (_local2.test(_arg1)); } protected function validate():Boolean{ validationError.text = ""; if (!isValidEmail(emailField.getText())){ validationError.appendText("Invalid email address\n"); }; if (passwordField.getText() != confirmPasswordField.getText()){ validationError.appendText("Password fields do not match\n"); }; return ((validationError.text == "")); } protected function updateInfo(_arg1:MenuEvent):void{ _arg1.stopPropagation(); if (!validate()){ return; }; var _local2:User = User.getInstance(); _local2.addEventListener(MenuEvent.UPDATE_USER_INFO, updateComplete, false, 0, true); _local2.updateInfo(emailField.getText(), passwordField.getText()); } } }//package contraption.menu
Section 310
//UserDesignsMenu (contraption.menu.UserDesignsMenu) package contraption.menu { import flash.events.*; import contraption.*; import flash.display.*; import flash.net.*; import flash.text.*; public class UserDesignsMenu extends MenuWindow { protected var pageCount:TextArea; protected var contraptionCanvas:Sprite; protected var editable:Boolean; protected var displayMode:int; protected var id:int; protected var pagingData:PagingData; public static var LEVEL_MODE:int = 1; public static var USER_MODE:int = 0; public function UserDesignsMenu(_arg1:int, _arg2:int):void{ var _local3:Button; super(); this.id = _arg1; this.displayMode = _arg2; editable = (((User.getInstance().getUserId() == _arg1)) && ((_arg2 == USER_MODE))); pageCount = new TextArea(); pageCount.x = 430; pageCount.y = 155; pageCount.bold(); pageCount.setAlign(TextFormatAlign.CENTER); pageCount.autoSize = TextFieldAutoSize.CENTER; pageCount.textColor = 0x663300; addChild(pageCount); _local3 = new PreviousPageButton(); _local3.x = 300; _local3.y = 150; addChild(_local3); _local3.addEventListener(MouseEvent.MOUSE_DOWN, previousPage, false, 0, true); _local3 = new NextPageButton(); _local3.x = 520; _local3.y = 150; addChild(_local3); _local3.addEventListener(MouseEvent.MOUSE_DOWN, nextPage, false, 0, true); pagingData = new PagingData(4); contraptionCanvas = new Sprite(); addChild(contraptionCanvas); listDesigns(); } protected function previousPage(_arg1:Event):void{ if (pagingData.currentPage > 0){ pagingData.currentPage--; }; listDesigns(); } protected function deleteDesign(_arg1:Event):void{ var _local2:URLLoader = new URLLoader(); _local2.addEventListener(Event.COMPLETE, confirmDelete); var _local3:URLRequest = new URLRequest((Contraption.SERVER_LOCATION + "/deleteDesign.php")); var _local4:URLVariables = new URLVariables(); _local4.designId = _arg1.target.designId; _local4.userId = User.getInstance().getUserId(); _local4.password = User.getInstance().getPassword(); _local3.data = _local4; _local3.method = URLRequestMethod.POST; _local2.load(_local3); } protected function renderButtons(_arg1:Event):void{ var _local2:XML; var _local3:XML; var _local5:MovieClip; var _local6:Boolean; var _local7:TextArea; var _local8:String; _local2 = new XML(_arg1.target.data); pagingData.numResults = _local2.designCount; pageCount.setText(((("Page " + (pagingData.currentPage + 1)) + " of ") + pagingData.getNumPages())); removeChild(contraptionCanvas); contraptionCanvas = new Sprite(); addChild(contraptionCanvas); var _local4:int; for each (_local3 in _local2.design) { if (_local3.publish == "1"){ _local6 = true; } else { _local6 = false; }; _local5 = new SavedContraptionRow(editable, _local3.designId, _local3.name, _local3.description, _local6, _local3.userName, _local3.userId, _local3.quality); _local5.x = 225; _local5.y = (200 + (_local4 * 65)); contraptionCanvas.addChildAt(_local5, 0); _local5.addEventListener(MenuEvent.DELETE_DESIGN, deleteDesign, false, 0, true); _local4++; }; if (_local4 == 0){ if (editable){ _local8 = "You haven't saved any\ndesigns yet"; } else { _local8 = "There are not yet any\nsaved designs here"; }; _local7 = new TextArea(_local8, 18); _local7.x = 320; _local7.y = 300; _local7.bold(); _local7.textColor = 0x663300; addChild(_local7); }; finishedLoading(); } protected function loadUserMenu(_arg1:Event):void{ _arg1.stopPropagation(); var _local2:MenuEvent = new MenuEvent(MenuEvent.LOAD_USER_MENU); _local2.userId = _arg1.target.userId; _local2.userName = _arg1.target.userName; dispatchEvent(_local2); } protected function nextPage(_arg1:Event):void{ if (pagingData.currentPage < (pagingData.getNumPages() - 1)){ pagingData.currentPage++; }; listDesigns(); } protected function confirmDelete(_arg1:Event):void{ listDesigns(); } override public function refresh():void{ listDesigns(); } protected function listDesigns():void{ var _local1:URLLoader = new URLLoader(); _local1.addEventListener(Event.COMPLETE, renderButtons); var _local2:URLRequest = new URLRequest((Contraption.SERVER_LOCATION + "/getUserDesigns.php")); var _local3:URLVariables = new URLVariables(); if (displayMode == USER_MODE){ if (!editable){ _local3.onlyPublished = "1"; }; _local3.userId = id; } else { _local3.levelId = id; _local3.onlyPublished = "1"; }; _local3.limitOffset = pagingData.getOffset(); _local3.limitCount = pagingData.resultsPerPage; _local2.data = _local3; _local2.method = URLRequestMethod.POST; _local1.load(_local2); } protected function loadDesign(_arg1:Event):void{ _arg1.stopPropagation(); var _local2:MenuEvent = new MenuEvent(MenuEvent.LOAD_DESIGN); _local2.designId = _arg1.target.designId; dispatchEvent(_local2); } } }//package contraption.menu
Section 311
//UserGenLevelRow (contraption.menu.UserGenLevelRow) package contraption.menu { import flash.events.*; import flash.display.*; import flash.text.*; public class UserGenLevelRow extends MovieClip { protected var userName:String; protected var userId:int; public function UserGenLevelRow(_arg1:int, _arg2:String, _arg3:String, _arg4:String, _arg5:int, _arg6:int, _arg7:int){ var _local8:MovieClip; var _local10:TextField; super(); this.userId = _arg5; this.userName = _arg4; _local8 = new SavedLevelBackground(); addChild(_local8); var _local9:TextArea = new TextArea(_arg2, 16, "contraptionFont"); _local9.embedFonts = true; _local9.x = 10; _local9.y = 5; _local8.addChild(_local9); _local10 = new TextField(); _local10.text = "By:"; _local10.mouseEnabled = false; _local10.x = 20; _local10.y = 25; _local8.addChild(_local10); var _local11:LinkButton = new LinkButton(_arg4); _local11.x = 40; _local11.y = 25; _local8.addChild(_local11); _local11.addEventListener(MouseEvent.MOUSE_DOWN, loadUserMenu); var _local12:StarBar = new StarBar(_arg6, _arg1, StarBar.DIFFICULTY, StarBar.LEVEL); _local12.x = 220; _local12.y = 10; _local8.addChild(_local12); _local12 = new StarBar(_arg7, _arg1, StarBar.QUALITY, StarBar.LEVEL); _local12.x = 220; _local12.y = 30; _local8.addChild(_local12); var _local13:Button = new PlayLevelSmallButton(); _local13.levelId = _arg1; _local13.x = 300; _local13.y = 10; _local8.addChild(_local13); var _local14:Button = new LinkLevelButton(); _local14.levelId = _arg1; _local14.x = 340; _local14.y = 10; _local8.addChild(_local14); _local10 = new TextField(); _local10.wordWrap = true; _local10.text = _arg3; _local10.height = 40; _local10.width = 280; _local10.mouseEnabled = false; _local10.x = 10; _local10.y = 50; _local8.addChild(_local10); var _local15:Button = new SolutionsButton(); _local15.levelId = _arg1; _local15.x = 340; _local15.y = 55; _local8.addChild(_local15); } protected function loadUserMenu(_arg1:MouseEvent):void{ var _local2:MenuEvent = new MenuEvent(MenuEvent.LOAD_USER_MENU, true, true); _local2.userId = userId; _local2.userName = userName; dispatchEvent(_local2); } } }//package contraption.menu
Section 312
//UserGenLevelsMenu (contraption.menu.UserGenLevelsMenu) package contraption.menu { import flash.events.*; import contraption.*; import flash.display.*; import flash.net.*; import flash.text.*; public class UserGenLevelsMenu extends MenuWindow { protected var pageCount:TextArea; protected var threeDifficultyButton:Button; protected var qualitySortButton:LinkButton; protected var oneDifficultyButton:Button; protected var allDifficultyButton:LinkButton; protected var fourDifficultyButton:Button; protected var pagingData:SortedPagingData; protected var fiveDifficultyButton:Button; protected var levelsCanvas:Sprite; protected var pleaseRegisterMenu:PleaseRegisterMenu; protected var selectedDifficulty:int;// = 0 protected var twoDifficultyButton:Button; protected var dateSortButton:LinkButton; public function UserGenLevelsMenu():void{ var _local1:Button; super(); pageCount = new TextArea(); pageCount.x = 430; pageCount.y = 145; pageCount.setAlign(TextFormatAlign.CENTER); pageCount.autoSize = TextFieldAutoSize.CENTER; pageCount.bold(); pageCount.textColor = 0x663300; addChild(pageCount); _local1 = new PreviousPageButton(); _local1.x = 300; _local1.y = 140; addChild(_local1); _local1.addEventListener(MouseEvent.MOUSE_DOWN, previousPage, false, 0, true); _local1 = new NextPageButton(); _local1.x = 520; _local1.y = 140; addChild(_local1); _local1.addEventListener(MouseEvent.MOUSE_DOWN, nextPage, false, 0, true); dateSortButton = new LinkButton("Sort by Date"); dateSortButton.x = 315; dateSortButton.y = 175; addChild(dateSortButton); dateSortButton.addEventListener(MouseEvent.MOUSE_DOWN, dateSort, false, 0, true); qualitySortButton = new LinkButton("Sort by Rating"); qualitySortButton.x = 475; qualitySortButton.y = 175; qualitySortButton.disable(); addChild(qualitySortButton); qualitySortButton.addEventListener(MouseEvent.MOUSE_DOWN, qualitySort, false, 0, true); pagingData = new SortedPagingData(4); levelsCanvas = new Sprite(); addChild(levelsCanvas); addDifficultySelectors(); listLevels(); pleaseRegisterMenu = new PleaseRegisterMenu(); if (!User.getInstance().isRegistered()){ addChild(pleaseRegisterMenu); }; } protected function dateSort(_arg1:Event):void{ qualitySortButton.enable(); dateSortButton.disable(); pagingData.currentPage = 0; pagingData.sortValue = SortedPagingData.SORT_BY_DATE; listLevels(); } protected function enabledButtons():void{ allDifficultyButton.enable(); oneDifficultyButton.enable(); twoDifficultyButton.enable(); threeDifficultyButton.enable(); fourDifficultyButton.enable(); fiveDifficultyButton.enable(); } protected function selectDifficultyAll(_arg1:Event):void{ selectedDifficulty = 0; listLevels(); enabledButtons(); allDifficultyButton.disable(); } protected function loadLevel(_arg1:Event):void{ _arg1.stopPropagation(); var _local2:MenuEvent = new MenuEvent(MenuEvent.LOAD_LEVEL); _local2.levelId = _arg1.target.levelId; dispatchEvent(_local2); } protected function loadUserMenu(_arg1:Event):void{ _arg1.stopPropagation(); var _local2:MenuEvent = new MenuEvent(MenuEvent.LOAD_USER_MENU); _local2.userId = _arg1.target.userId; _local2.userName = _arg1.target.userName; dispatchEvent(_local2); } protected function renderButtons(_arg1:Event):void{ var _local2:XML; var _local3:XML; var _local5:MovieClip; _local2 = new XML(_arg1.target.data); pagingData.numResults = _local2.levelCount; pageCount.setText(((("Page " + (pagingData.currentPage + 1)) + " of ") + pagingData.getNumPages())); removeChild(levelsCanvas); levelsCanvas = new Sprite(); addChild(levelsCanvas); var _local4:int; for each (_local3 in _local2.level) { _local5 = new UserGenLevelRow(_local3.levelId, _local3.levelName, _local3.description, _local3.userName, _local3.userId, _local3.difficulty, _local3.quality); _local5.x = 225; _local5.y = (200 + (_local4 * 70)); levelsCanvas.addChildAt(_local5, 0); _local4++; }; finishedLoading(); if (!User.getInstance().isRegistered()){ addChild(pleaseRegisterMenu); }; } protected function loadSolutions(_arg1:MenuEvent):void{ dispatchEvent(_arg1); } protected function selectDifficultyTwo(_arg1:Event):void{ selectedDifficulty = 2; listLevels(); enabledButtons(); twoDifficultyButton.disable(); } override public function refresh():void{ listLevels(); } protected function nextPage(_arg1:Event):void{ if (pagingData.currentPage < (pagingData.getNumPages() - 1)){ pagingData.currentPage++; }; listLevels(); } protected function selectDifficultyFour(_arg1:Event):void{ selectedDifficulty = 4; listLevels(); enabledButtons(); fourDifficultyButton.disable(); } protected function selectDifficultyThree(_arg1:Event):void{ selectedDifficulty = 3; listLevels(); enabledButtons(); threeDifficultyButton.disable(); } protected function addDifficultySelectors():void{ var _local1:TextFormat = new TextFormat(); _local1.bold = true; _local1.size = 15; var _local2:TextField = new TextField(); _local2.text = "Filter by\nDifficulty:"; _local2.autoSize = "left"; _local2.x = 10; _local2.y = 85; _local2.setTextFormat(_local1); _local2.mouseEnabled = false; addChild(_local2); allDifficultyButton = new LinkButton("Show all levels"); allDifficultyButton.x = 10; allDifficultyButton.y = 225; addChild(allDifficultyButton); allDifficultyButton.disable(); allDifficultyButton.addEventListener(MouseEvent.MOUSE_DOWN, selectDifficultyAll, false, 0, true); oneDifficultyButton = new SelectDifficultyButton(1); oneDifficultyButton.x = 15; oneDifficultyButton.y = 130; addChild(oneDifficultyButton); oneDifficultyButton.addEventListener(MouseEvent.MOUSE_DOWN, selectDifficultyOne, false, 0, true); twoDifficultyButton = new SelectDifficultyButton(2); twoDifficultyButton.x = 15; twoDifficultyButton.y = 150; addChild(twoDifficultyButton); twoDifficultyButton.addEventListener(MouseEvent.MOUSE_DOWN, selectDifficultyTwo, false, 0, true); threeDifficultyButton = new SelectDifficultyButton(3); threeDifficultyButton.x = 15; threeDifficultyButton.y = 170; addChild(threeDifficultyButton); threeDifficultyButton.addEventListener(MouseEvent.MOUSE_DOWN, selectDifficultyThree, false, 0, true); fourDifficultyButton = new SelectDifficultyButton(4); fourDifficultyButton.x = 15; fourDifficultyButton.y = 190; addChild(fourDifficultyButton); fourDifficultyButton.addEventListener(MouseEvent.MOUSE_DOWN, selectDifficultyFour, false, 0, true); fiveDifficultyButton = new SelectDifficultyButton(5); fiveDifficultyButton.x = 15; fiveDifficultyButton.y = 210; addChild(fiveDifficultyButton); fiveDifficultyButton.addEventListener(MouseEvent.MOUSE_DOWN, selectDifficultyFive, false, 0, true); } protected function selectDifficultyOne(_arg1:Event):void{ selectedDifficulty = 1; listLevels(); enabledButtons(); oneDifficultyButton.disable(); } protected function listLevels():void{ var _local1:URLLoader = new URLLoader(); _local1.addEventListener(Event.COMPLETE, renderButtons, false, 0, true); var _local2:URLRequest = new URLRequest((Contraption.SERVER_LOCATION + "/getUserGenLevels.php")); var _local3:URLVariables = new URLVariables(); _local3.limitOffset = pagingData.getOffset(); _local3.limitCount = pagingData.resultsPerPage; if (selectedDifficulty != 0){ _local3.difficultyRating = selectedDifficulty; }; _local3.orderBy = pagingData.sortValue; _local2.data = _local3; _local2.method = URLRequestMethod.POST; _local1.load(_local2); } protected function previousPage(_arg1:Event):void{ if (pagingData.currentPage > 0){ pagingData.currentPage--; }; listLevels(); } protected function selectDifficultyFive(_arg1:Event):void{ selectedDifficulty = 5; listLevels(); enabledButtons(); fiveDifficultyButton.disable(); } protected function qualitySort(_arg1:Event):void{ qualitySortButton.disable(); dateSortButton.enable(); pagingData.currentPage = 0; pagingData.sortValue = SortedPagingData.SORT_BY_QUALITY; listLevels(); } } }//package contraption.menu
Section 313
//UserLevelsMenu (contraption.menu.UserLevelsMenu) package contraption.menu { import flash.events.*; import contraption.*; import flash.display.*; import flash.net.*; import flash.text.*; public class UserLevelsMenu extends MenuWindow { protected var pageCount:TextArea; protected var editable:Boolean; protected var userId:int; protected var levelsCanvas:Sprite; protected var pleaseRegisterMenu:PleaseRegisterMenu; protected var pagingData:PagingData; public function UserLevelsMenu(_arg1:int):void{ var _local2:Button; super(); this.userId = _arg1; editable = (User.getInstance().getUserId() == _arg1); pageCount = new TextArea(); pageCount.x = 430; pageCount.y = 155; pageCount.setAlign(TextFormatAlign.CENTER); pageCount.autoSize = TextFieldAutoSize.CENTER; pageCount.bold(); pageCount.textColor = 0x663300; addChild(pageCount); _local2 = new PreviousPageButton(); _local2.x = 300; _local2.y = 150; addChild(_local2); _local2.addEventListener(MouseEvent.MOUSE_DOWN, previousPage, false, 0, true); _local2 = new NextPageButton(); _local2.x = 520; _local2.y = 150; addChild(_local2); _local2.addEventListener(MouseEvent.MOUSE_DOWN, nextPage, false, 0, true); pagingData = new PagingData(4); levelsCanvas = new Sprite(); addChild(levelsCanvas); listLevels(); pleaseRegisterMenu = new PleaseRegisterMenu(); if (!User.getInstance().isRegistered()){ addChild(pleaseRegisterMenu); }; } override public function refresh():void{ listLevels(); } protected function nextPage(_arg1:Event):void{ if (pagingData.currentPage < (pagingData.getNumPages() - 1)){ pagingData.currentPage++; }; listLevels(); } protected function renderButtons(_arg1:Event):void{ var _local2:XML; var _local3:XML; var _local5:MovieClip; var _local6:Boolean; var _local7:TextArea; var _local8:String; _local2 = new XML(_arg1.target.data); pagingData.numResults = _local2.levelCount; pageCount.setText(((("Page " + (pagingData.currentPage + 1)) + " of ") + pagingData.getNumPages())); removeChild(levelsCanvas); levelsCanvas = new Sprite(); addChild(levelsCanvas); var _local4:int; for each (_local3 in _local2.level) { if (_local3.publish == "1"){ _local6 = true; } else { _local6 = false; }; _local5 = new SavedLevelRow(_local3.levelId, _local3.levelName, _local3.description, _local6, editable); _local5.x = 225; _local5.y = (200 + (_local4 * 70)); levelsCanvas.addChildAt(_local5, 0); _local5.addEventListener(MenuEvent.DELETE_LEVEL, deleteLevel, false, 0, true); _local4++; }; if (_local4 == 0){ if (editable){ _local8 = "You haven't saved any\nlevels yet"; } else { _local8 = "There are not yet any\nsaved levels here"; }; _local7 = new TextArea(_local8, 18); _local7.x = 320; _local7.y = 300; _local7.bold(); _local7.textColor = 0x663300; addChild(_local7); }; finishedLoading(); if (!User.getInstance().isRegistered()){ addChild(pleaseRegisterMenu); }; } protected function listLevels():void{ var _local1:URLLoader = new URLLoader(); _local1.addEventListener(Event.COMPLETE, renderButtons, false, 0, true); var _local2:URLRequest = new URLRequest((Contraption.SERVER_LOCATION + "/getUserLevels.php")); var _local3:URLVariables = new URLVariables(); _local3.userId = userId; if (!editable){ _local3.onlyPublished = "1"; }; _local3.limitOffset = pagingData.getOffset(); _local3.limitCount = pagingData.resultsPerPage; _local2.data = _local3; _local2.method = URLRequestMethod.POST; _local1.load(_local2); } protected function confirmDelete(_arg1:Event):void{ listLevels(); } protected function loadSolutions(_arg1:MenuEvent):void{ dispatchEvent(_arg1); } protected function previousPage(_arg1:Event):void{ if (pagingData.currentPage > 0){ pagingData.currentPage--; }; listLevels(); } protected function deleteLevel(_arg1:Event):void{ var _local2:URLLoader = new URLLoader(); _local2.addEventListener(Event.COMPLETE, confirmDelete); var _local3:URLRequest = new URLRequest((Contraption.SERVER_LOCATION + "/deleteLevel.php")); var _local4:URLVariables = new URLVariables(); _local4.levelId = _arg1.target.levelId; _local3.data = _local4; _local3.method = URLRequestMethod.POST; _local2.load(_local3); } protected function loadLevel(_arg1:Event):void{ _arg1.stopPropagation(); var _local2:MenuEvent = new MenuEvent(MenuEvent.LOAD_LEVEL); _local2.levelId = _arg1.target.levelId; dispatchEvent(_local2); } } }//package contraption.menu
Section 314
//UserMenu (contraption.menu.UserMenu) package contraption.menu { import flash.text.*; public class UserMenu extends MenuWindow { protected var userId:int; protected var userName:String; public function UserMenu(_arg1:int, _arg2:String){ this.userName = _arg2; this.userId = _arg1; var _local3:ModalMenuCloud = new ModalMenuCloud(); _local3.x = 100; _local3.y = 80; addChild(_local3); var _local4:TextFormat = new TextFormat(); _local4.size = 22; _local4.bold = true; var _local5:TextArea = new TextArea((_arg2 + "'s Stuff"), 22, "arial", TextFieldAutoSize.CENTER); _local5.bold(); _local5.width = 250; _local5.x = 250; _local5.y = 200; addChild(_local5); var _local6:Button = new SavedLevelsButton(); _local6.userId = _arg1; _local6.x = 300; _local6.y = 320; addChild(_local6); _local6 = new SavedContraptionsButton(); _local6.userId = _arg1; _local6.x = 300; _local6.y = 250; addChild(_local6); } } }//package contraption.menu
Section 315
//XmlWindow (contraption.menu.XmlWindow) package contraption.menu { import flash.events.*; import flash.text.*; public class XmlWindow extends MenuWindow { public var loadButton:Button; public var xmlField:TextField; public function XmlWindow():void{ loadButton = new Button("Load"); super(false); var _local1:Button = new Button("Close"); _local1.x = 10; _local1.y = 10; addChild(_local1); _local1.addEventListener(MouseEvent.MOUSE_DOWN, closeXmlWindow); loadButton.x = 80; loadButton.y = 10; addChild(loadButton); xmlField = new TextField(); xmlField.width = 200; xmlField.height = 300; xmlField.type = TextFieldType.INPUT; xmlField.background = true; xmlField.backgroundColor = 0xFFFFFF; xmlField.multiline = true; xmlField.x = 10; xmlField.y = 60; addChild(xmlField); visible = false; } protected function closeXmlWindow(_arg1:MouseEvent):void{ visible = false; } } }//package contraption.menu
Section 316
//AddedBlockBetweenWheelsOverlay (contraption.tutorials.AddedBlockBetweenWheelsOverlay) package contraption.tutorials { import contraption.*; import contraption.blocks.*; public class AddedBlockBetweenWheelsOverlay extends TutorialOverlay { protected var player:Player; override public function init(_arg1:Player):void{ this.player = _arg1; _arg1.addEventListener(TutorialEvent.ADDED_BLOCK, checkBlock, false, 0, true); } public function checkBlock(_arg1:TutorialEvent):void{ if ((_arg1.block as Rod).doesJoinWheelMiddles()){ overlayFinished(); } else { player.deleteBlock(_arg1.block); }; } override public function dispose(_arg1:Player):void{ _arg1.addEventListener(TutorialEvent.ADDED_BLOCK, checkBlock); } } }//package contraption.tutorials
Section 317
//AddedBlockOverlay (contraption.tutorials.AddedBlockOverlay) package contraption.tutorials { import contraption.*; public class AddedBlockOverlay extends TutorialOverlay { override public function init(_arg1:Player):void{ _arg1.addEventListener(TutorialEvent.ADDED_BLOCK, overlayFinished, false, 0, true); } override public function dispose(_arg1:Player):void{ _arg1.removeEventListener(TutorialEvent.ADDED_BLOCK, overlayFinished); } } }//package contraption.tutorials
Section 318
//DeleteBlockOverlay (contraption.tutorials.DeleteBlockOverlay) package contraption.tutorials { import contraption.*; public class DeleteBlockOverlay extends TutorialOverlay { override public function init(_arg1:Player):void{ _arg1.addEventListener(TutorialEvent.REMOVED_BLOCK, overlayFinished, false, 0, true); } override public function dispose(_arg1:Player):void{ _arg1.removeEventListener(TutorialEvent.REMOVED_BLOCK, overlayFinished); } } }//package contraption.tutorials
Section 319
//DeleteSelectedOverlay (contraption.tutorials.DeleteSelectedOverlay) package contraption.tutorials { import contraption.*; public class DeleteSelectedOverlay extends TutorialOverlay { override public function init(_arg1:Player):void{ _arg1.addEventListener(TutorialEvent.SELECTED_DELETE, overlayFinished, false, 0, true); } override public function dispose(_arg1:Player):void{ _arg1.removeEventListener(TutorialEvent.SELECTED_DELETE, overlayFinished); } } }//package contraption.tutorials
Section 320
//HollowSelectedOverlay (contraption.tutorials.HollowSelectedOverlay) package contraption.tutorials { import contraption.*; public class HollowSelectedOverlay extends TutorialOverlay { override public function init(_arg1:Player):void{ _arg1.addEventListener(TutorialEvent.SELECTED_HOLLOW, overlayFinished, false, 0, true); } override public function dispose(_arg1:Player):void{ _arg1.removeEventListener(TutorialEvent.SELECTED_HOLLOW, overlayFinished); } } }//package contraption.tutorials
Section 321
//PressStartOverlay (contraption.tutorials.PressStartOverlay) package contraption.tutorials { import contraption.*; public class PressStartOverlay extends TutorialOverlay { override public function init(_arg1:Player):void{ _arg1.addEventListener(TutorialEvent.SELECTED_START, overlayFinished, false, 0, true); } override public function dispose(_arg1:Player):void{ _arg1.removeEventListener(TutorialEvent.SELECTED_START, overlayFinished); } } }//package contraption.tutorials
Section 322
//PressStopOverlay (contraption.tutorials.PressStopOverlay) package contraption.tutorials { import contraption.*; public class PressStopOverlay extends TutorialOverlay { override public function init(_arg1:Player):void{ _arg1.addEventListener(TutorialEvent.SELECTED_STOP, overlayFinished, false, 0, true); } override public function dispose(_arg1:Player):void{ _arg1.removeEventListener(TutorialEvent.SELECTED_STOP, overlayFinished); } } }//package contraption.tutorials
Section 323
//TutorialEvent (contraption.tutorials.TutorialEvent) package contraption.tutorials { import flash.events.*; import contraption.blocks.*; public class TutorialEvent extends Event { public var block:Block; public static const FINISHED_OVERLAY:String = "finishedOverlay"; public static const SELECTED_CLOCKWISE_WHEEL:String = "selectedClockwiseWheel"; public static const SELECTED_STOP:String = "selectedStop"; public static const ADDED_BLOCK:String = "addedBlock"; public static const SELECTED_DELETE:String = "selectedDelete"; public static const SELECTED_HOLLOW:String = "selectedWater"; public static const SKIP_TUTORIAL:String = "skipTutorial"; public static const REMOVED_BLOCK:String = "removedBlock"; public static const SELECTED_START:String = "selectedStart"; public function TutorialEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } override public function clone():Event{ var _local1:TutorialEvent = new TutorialEvent(type, bubbles, cancelable); _local1.block = block; return (_local1); } } }//package contraption.tutorials
Section 324
//TutorialLevel1Overlays (contraption.tutorials.TutorialLevel1Overlays) package contraption.tutorials { import de.polygonal.ds.*; public class TutorialLevel1Overlays extends TutorialOverlays { public function TutorialLevel1Overlays():void{ overlays = new SLinkedList(); overlays.append(new tut1Welcome()); overlays.append(new tut1PinkBall()); overlays.append(new tut1Goal()); overlays.append(new tut1Workshop()); overlays.append(new tut1SelectWheel()); overlays.append(new tut1DrawWheel()); overlays.append(new tut1SelectWater()); overlays.append(new tut1DrawWater()); overlays.append(new tut1PressStart()); overlays.append(new tutLocked()); super(); } } }//package contraption.tutorials
Section 325
//TutorialLevel2Overlays (contraption.tutorials.TutorialLevel2Overlays) package contraption.tutorials { import de.polygonal.ds.*; public class TutorialLevel2Overlays extends TutorialOverlays { public function TutorialLevel2Overlays():void{ overlays = new SLinkedList(); overlays.append(new tut2Welcome()); overlays.append(new tut2FirstTry()); overlays.append(new tut2FirstStop()); overlays.append(new tut2FirstSelectDelete()); overlays.append(new tut2DeleteFirstRod()); overlays.append(new tut2FirstSelectWater()); overlays.append(new tut2FirstDrawWater()); overlays.append(new tut2SecondTry()); overlays.append(new tut2SecondStop()); overlays.append(new tut2SecondSelectDelete()); overlays.append(new tut2DeleteSecondRod()); overlays.append(new tut2SecondSelectWater()); overlays.append(new tut2SecondDrawWater()); overlays.append(new tut2ThirdTry()); overlays.append(new tut2ThirdTry()); overlays.append(new tutLocked()); super(); } } }//package contraption.tutorials
Section 326
//TutorialLevel3Overlays (contraption.tutorials.TutorialLevel3Overlays) package contraption.tutorials { import de.polygonal.ds.*; public class TutorialLevel3Overlays extends TutorialOverlays { public function TutorialLevel3Overlays():void{ overlays = new SLinkedList(); overlays.append(new tut3Wheels()); overlays.append(new tut3NonPowerWheel()); overlays.append(new tut3Water()); overlays.append(new tut3Wood()); overlays.append(new tut3Move()); overlays.append(new tut3Delete()); overlays.append(new tut3Start()); overlays.append(new tut3Zoom()); overlays.append(new tut3Save()); overlays.append(new tut3Back()); overlays.append(new tut3Goodbye()); super(); } } }//package contraption.tutorials
Section 327
//TutorialOverlay (contraption.tutorials.TutorialOverlay) package contraption.tutorials { import flash.events.*; import contraption.*; import flash.display.*; public class TutorialOverlay extends MovieClip { public function TutorialOverlay():void{ addEventListener(MouseEvent.MOUSE_DOWN, stopEvent); } protected function stopEvent(_arg1:Event):void{ _arg1.stopPropagation(); } protected function overlayFinished(_arg1:Event=null):void{ dispatchEvent(new TutorialEvent(TutorialEvent.FINISHED_OVERLAY, true, true)); } public function dispose(_arg1:Player):void{ } public function init(_arg1:Player):void{ } } }//package contraption.tutorials
Section 328
//TutorialOverlays (contraption.tutorials.TutorialOverlays) package contraption.tutorials { import de.polygonal.ds.*; public class TutorialOverlays { protected var currentOverlay:SListNode; protected var overlays:SLinkedList; public function TutorialOverlays():void{ currentOverlay = overlays.head; } public function firstOverlay():TutorialOverlay{ return ((overlays.head.data as TutorialOverlay)); } public function getNext():TutorialOverlay{ if (currentOverlay.next == null){ return (null); }; currentOverlay = currentOverlay.next; return ((currentOverlay.data as TutorialOverlay)); } } }//package contraption.tutorials
Section 329
//TutorialPlayer (contraption.tutorials.TutorialPlayer) package contraption.tutorials { import flash.events.*; import contraption.menu.*; import contraption.*; import flash.display.*; import contraption.blocks.*; import contraption.data.*; public class TutorialPlayer extends Player { protected var tutorialNumber:int; protected var tutorialCanvas:Sprite; protected var currentOverlay:TutorialOverlay; protected var overlays:TutorialOverlays; public function TutorialPlayer(_arg1:Stage, _arg2:Contraption){ super(_arg1, _arg2); tutorialCanvas = new Sprite(); addChild(tutorialCanvas); var _local3:SkipTutorialButton = new SkipTutorialButton(); _local3.x = 570; _local3.y = 430; _local3.addEventListener(TutorialEvent.SKIP_TUTORIAL, skipTutorial, false, 0, true); addChild(_local3); } public function loadTutorialLevel(_arg1:int):void{ var _local2:XML = TutorialLevels.getTutorialLevels()[("level" + _arg1)].retrieveLevel[0]; loadRetrievedLevelFromXML(_local2); this.tutorialNumber = _local2.tutorialNumber; switch (_arg1){ case 1: overlays = new TutorialLevel1Overlays(); break; case 2: overlays = new TutorialLevel2Overlays(); break; case 3: overlays = new TutorialLevel3Overlays(); break; default: throw (new Error("Invalid Tutorial")); }; loadOverlay(overlays.firstOverlay()); } override protected function startSimulation(_arg1:Event):void{ super.startSimulation(_arg1); dispatchEvent(new TutorialEvent(TutorialEvent.SELECTED_START, true, true)); } protected function loadOverlay(_arg1:TutorialOverlay):void{ if (currentOverlay != null){ currentOverlay.dispose(this); tutorialCanvas.removeChild(currentOverlay); }; if (_arg1 != null){ currentOverlay = _arg1; currentOverlay.init(this); currentOverlay.addEventListener(TutorialEvent.FINISHED_OVERLAY, incrementOverlay, false, 0, true); tutorialCanvas.addChild(currentOverlay); }; } override protected function loadNextLevel():void{ var _local1:MenuEvent = new MenuEvent(MenuEvent.TUTORIAL_LEVEL_COMPLETE, true, true); _local1.tutorialNumber = tutorialNumber; dispatchEvent(_local1); } override protected function clockwiseWheelMode(_arg1:Event):void{ super.clockwiseWheelMode(_arg1); dispatchEvent(new TutorialEvent(TutorialEvent.SELECTED_CLOCKWISE_WHEEL, true, true)); } override protected function updateMoveScreen(_arg1:MouseEvent=null):void{ } override protected function zoomIn(_arg1:Event=null):void{ } override protected function hollowRodMode(_arg1:Event):void{ super.hollowRodMode(_arg1); dispatchEvent(new TutorialEvent(TutorialEvent.SELECTED_HOLLOW, true, true)); } protected function incrementOverlay(_arg1:TutorialEvent):void{ var _local2:TutorialOverlay = overlays.getNext(); loadOverlay(_local2); } override public function deleteBlock(_arg1:Block):void{ super.deleteBlock(_arg1); var _local2:TutorialEvent = new TutorialEvent(TutorialEvent.REMOVED_BLOCK, true, true); _local2.block = _arg1; dispatchEvent(_local2); } override protected function enterDeleteMode(_arg1:Event):void{ super.enterDeleteMode(_arg1); dispatchEvent(new TutorialEvent(TutorialEvent.SELECTED_DELETE, true, true)); } override protected function keyDown(_arg1:KeyboardEvent):void{ } override protected function stopSimulation(_arg1:Event):void{ super.stopSimulation(_arg1); dispatchEvent(new TutorialEvent(TutorialEvent.SELECTED_STOP, true, true)); } override protected function addedBlock(_arg1:Block):void{ super.addedBlock(_arg1); var _local2:TutorialEvent = new TutorialEvent(TutorialEvent.ADDED_BLOCK, true, true); _local2.block = _arg1; dispatchEvent(_local2); } override protected function mouseWheel(_arg1:MouseEvent):void{ } override public function addTitle(_arg1:String):void{ } override protected function hasPermissionToPlay():Boolean{ return (true); } override protected function zoomOut(_arg1:Event=null):void{ } protected function skipTutorial(_arg1:Event):void{ loadNextLevel(); } } }//package contraption.tutorials
Section 330
//WheelSelectedOverlay (contraption.tutorials.WheelSelectedOverlay) package contraption.tutorials { import contraption.*; public class WheelSelectedOverlay extends TutorialOverlay { override public function init(_arg1:Player):void{ _arg1.addEventListener(TutorialEvent.SELECTED_CLOCKWISE_WHEEL, overlayFinished, false, 0, true); } override public function dispose(_arg1:Player):void{ _arg1.removeEventListener(TutorialEvent.SELECTED_CLOCKWISE_WHEEL, overlayFinished); } } }//package contraption.tutorials
Section 331
//ActionContainer (contraption.ActionContainer) package contraption { public interface ActionContainer { function getAllowableActions():Actions; function setAllowableActions(_arg1:Actions):void; } }//package contraption
Section 332
//ActionContainerImpl (contraption.ActionContainerImpl) package contraption { import flash.display.*; public class ActionContainerImpl extends MovieClip implements ActionContainer { protected var allowableActions:Actions; public function ActionContainerImpl():void{ initAllowableActions(); } public function getAllowableActions():Actions{ return (allowableActions); } protected function initAllowableActions():void{ allowableActions = new Actions(); } public function setAllowableActions(_arg1:Actions):void{ this.allowableActions = _arg1; } } }//package contraption
Section 333
//Actions (contraption.Actions) package contraption { public class Actions { public var alwaysDrag:Boolean; public var build:Boolean; public var move:Boolean; public var button:Boolean; public var drag:Boolean; public var inputText:Boolean; public var delete_:Boolean; } }//package contraption
Section 334
//Arena (contraption.Arena) package contraption { import flash.events.*; import contraption.menu.*; import de.polygonal.ds.*; import flash.display.*; import flash.net.*; import contraption.blocks.*; import flash.geom.*; import Box2D.Dynamics.*; import flash.text.*; import contraption.data.*; import flash.ui.*; import flash.errors.*; public class Arena extends MenuWindow { protected var goalBlocks:SLinkedList; protected var movingScreen:Boolean;// = false protected var physicsWorld:b2World; protected var saveButton:Button; protected var dashboard:Dashboard; protected var editing:Boolean; protected var screenMoveX:Number; protected var arenaForegroundCanvas:Sprite; protected var screenMoveY:Number; protected var permissionToPlayLevel:Boolean;// = true protected var endZone:EndZone; protected var startZone:StartZone; public var testText3:TextArea; protected var targetScale:Number;// = 1 public var testText2:TextArea; protected var levelId:int;// = 0 protected var parentContraption:Contraption; public var arenaCanvas:Sprite; protected var scaleVelocity:Number;// = 0 protected var arenaBackgroundCanvas:Sprite; protected var playerBlocks:BlockCollection; protected var saveWindow:SaveWindow; public var testText:TextArea; protected var xmlWindow:XmlWindow; protected var arenaBlocks:SLinkedList; protected var menuButton:Button; protected var ta:TextField; protected var levelNumber:int;// = 0 public static var ARENA_WIDTH:Number = 2000; public static var MAXIMUM_SCALE:Number = 2.5; public static var ARENA_HEIGHT:Number = 1450; public function Arena(_arg1:Stage, _arg2:Contraption, _arg3:Boolean):void{ arenaCanvas = new Sprite(); arenaForegroundCanvas = new Sprite(); arenaBackgroundCanvas = new Sprite(); xmlWindow = new XmlWindow(); super(false); graphics.beginFill(0xFFFFFF, 0); graphics.drawRect(0, 0, 700, 500); this.parentContraption = _arg2; this.editing = _arg3; addChild(arenaCanvas); arenaCanvas.addChild(arenaBackgroundCanvas); arenaCanvas.addChild(arenaForegroundCanvas); var _local4:Clouds = new Clouds(); _local4.x = -1000; _local4.y = -1000; arenaBackgroundCanvas.addChild(_local4); ta = new TextField(); ta.width = 200; addChild(ta); ta.mouseEnabled = false; playerBlocks = new BlockCollection(); goalBlocks = new SLinkedList(); arenaBlocks = new SLinkedList(); startZone = new StartZone(_arg3); startZone.setPosition(new Point(-150, 50)); arenaBackgroundCanvas.addChild(startZone); endZone = new EndZone(_arg3); endZone.setPosition(new Point(150, 50)); arenaBackgroundCanvas.addChild(endZone); arenaCanvas.x = 350; arenaCanvas.y = 250; dashboard = new DashboardImpl(); dashboard.gotoAndPlay(1); addChild(dashboard); dashboard.addEventListener(DashboardEvent.ZOOM_IN, zoomIn); dashboard.addEventListener(DashboardEvent.ZOOM_OUT, zoomOut); menuButton = new Button("Back to\nMenu"); menuButton.x = 600; menuButton.y = 340; addChild(menuButton); menuButton.addEventListener(MouseEvent.MOUSE_DOWN, returnToMenu); xmlWindow = new XmlWindow(); addChild(xmlWindow); addEventListener(Event.ENTER_FRAME, update, false, 0, true); var _local5:GlobalListener = GlobalListener.getInstance(); _local5.addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheel, false, 0, true); _local5.addEventListener(KeyboardEvent.KEY_DOWN, keyDown, false, 0, true); _arg2.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown, false, 0, true); _arg2.addEventListener(MouseEvent.MOUSE_MOVE, updateMoveScreen, false, 0, true); _arg2.addEventListener(MouseEvent.MOUSE_UP, stopMoveScreen, false, 0, true); testText = new TextArea(); testText.x = 15; testText.y = 300; testText.width = 100; testText.height = 100; testText.bold(); testText.textColor = 0; testText2 = new TextArea(); testText2.x = 15; testText2.y = 350; testText2.width = 100; testText2.height = 100; testText2.bold(); testText2.textColor = 0; testText3 = new TextArea(); testText3.x = 15; testText3.y = 400; testText3.width = 100; testText3.height = 100; testText3.bold(); testText3.textColor = 0; } protected function addArenaBlock(_arg1:EditableBlock):void{ addEditableBlock(_arg1); arenaBlocks.append(_arg1); } public function loadBlocks(_arg1:int, _arg2:Boolean, _arg3:Boolean=false):void{ var _local4:URLLoader = new URLLoader(); _local4.addEventListener(Event.COMPLETE, loadLevelHandler); var _local5:URLRequest = new URLRequest((Contraption.SERVER_LOCATION + "/retrieveLevel.php")); var _local6:URLVariables = new URLVariables(); if (_arg2){ _local6.loadDesign = 1; }; if (_arg3){ _local6.useOfficialLevelNumber = 1; }; _local6.id = _arg1; _local5.data = _local6; _local5.method = URLRequestMethod.POST; _local4.load(_local5); } protected function newSaveWindow():SaveWindow{ throw (new IllegalOperationError("You must extend Arena and implement \"newSaveWindow\"")); } protected function checkPlayerBlocksAreWithinStart():void{ var _local2:Object; var _local3:Rod; var _local1:Iterator = arenaBlocks.getIterator(); _local1 = playerBlocks.getIterator(); while (_local1.hasNext()) { _local2 = _local1.next(); if ((_local2 as Wheel)){ }; if ((_local2 as Rod)){ _local3 = (_local2 as Rod); if (((!(startZone.isInside(_local3.point1))) || (!(startZone.isInside(_local3.point2))))){ deleteBlock(_local3); }; }; }; } public function loadOfficialLevel(_arg1:int):void{ if (User.getInstance().isRegistered()){ loadRetrievedLevelFromXML(OfficialLevelsExp.getOfficialLevels()[("level" + _arg1)].retrieveLevel[0]); } else { loadRetrievedLevelFromXML(OfficialLevels.getOfficialLevels()[("level" + _arg1)].retrieveLevel[0]); }; } protected function addGoalBlock(_arg1:EditableBlock):void{ addEditableBlock(_arg1); goalBlocks.append(_arg1); playerBlocks.append(_arg1); } public function onMouseWheelDownCallback():void{ if (!hasFocus()){ }; testText2.text = "MouseDown"; var _local1 = -3; targetScale = (targetScale + (_local1 / 50)); limitZoom(); } override public function disposeMenu():void{ super.disposeMenu(); GlobalListener.getInstance().removeEventListener(KeyboardEvent.KEY_DOWN, keyDown); } public function deleteBlock(_arg1:Block):void{ removeChildBlock(_arg1); playerBlocks.deleteBlock(physicsWorld, _arg1); } protected function getToppestLeftest(_arg1:Point, _arg2:Point):Point{ var _local3:Point = new Point(_arg1.x, _arg1.y); if (_arg1.x > _arg2.x){ _local3.x = _arg2.x; }; if (_arg1.y > _arg2.y){ _local3.y = _arg2.y; }; return (_local3); } protected function hasPermissionToPlay():Boolean{ return (((!((levelNumber == 0))) || (User.getInstance().isRegistered()))); } protected function loadLevelHandler(_arg1:Event):void{ loadRetrievedLevelFromXML(new XML(_arg1.target.data)); } protected function beginMoveScreen(_arg1:Number, _arg2:Number):void{ movingScreen = true; this.screenMoveX = _arg1; this.screenMoveY = _arg2; } protected function addTutorialOverlay(_arg1:int):void{ if (_arg1 == 2){ arenaBackgroundCanvas.addChild(new Level4Overlay()); }; } protected function limitZoom():void{ testText.text = ("targetScale" + targetScale); if (targetScale > MAXIMUM_SCALE){ targetScale = MAXIMUM_SCALE; } else { if ((targetScale * ARENA_WIDTH) < 700){ targetScale = (700 / ARENA_WIDTH); } else { if ((targetScale * ARENA_HEIGHT) < 500){ targetScale = (500 / ARENA_HEIGHT); }; }; }; } protected function mouseWheel(_arg1:MouseEvent):void{ if (!hasFocus()){ return; }; targetScale = (targetScale + (_arg1.delta / 50)); limitZoom(); } public function addTitle(_arg1:String):void{ var _local2:TextArea = new TextArea(_arg1, 26, "contraptionFont", "right"); _local2.embedFonts = true; _local2.height = 50; _local2.width = 400; _local2.x = 240; _local2.y = 430; addChild(_local2); } public function initZoomAndScroll():void{ var _local4:Block; var _local1:Point = new Point(100000, 100000); var _local2:Point = new Point(-100000, -100000); _local1 = getToppestLeftest(_local1, startZone.getPosition().subtract(new Point((startZone.getWidth() / 2), (startZone.getHeight() / 2)))); _local1 = getToppestLeftest(_local1, endZone.getPosition().subtract(new Point((endZone.getWidth() / 2), (endZone.getHeight() / 2)))); _local2 = getBottomestRightest(_local2, startZone.getPosition().add(new Point((endZone.getWidth() / 2), (endZone.getHeight() / 2)))); _local2 = getBottomestRightest(_local2, endZone.getPosition().add(new Point((endZone.getWidth() / 2), (endZone.getHeight() / 2)))); var _local3:Iterator = goalBlocks.getIterator(); while (_local3.hasNext()) { _local4 = (_local3.next() as Block); _local1 = getToppestLeftest(_local1, _local4.getPosition()); _local2 = getBottomestRightest(_local2, _local4.getPosition()); }; arenaCanvas.x = -((((_local1.x + _local2.x) / 2) - (700 / 2))); arenaCanvas.y = (-((((_local1.y + _local2.y) / 2) - (500 / 2))) / (4 / 5)); var _local5:Number = (_local2.x - _local1.x); var _local6:Number = (_local2.y - _local1.y); if (_local5 > _local6){ targetScale = (700 / (_local5 + 100)); } else { targetScale = ((500 / (_local6 + 100)) / (4 / 5)); }; scaleTo(targetScale); } protected function limitCanvasMovement():void{ var _local1:Point = arenaCanvas.globalToLocal(parentContraption.localToGlobal(new Point(0, 0))); var _local2:Point = arenaCanvas.globalToLocal(parentContraption.localToGlobal(new Point(700, 500))); if (_local1.x < (-(ARENA_WIDTH) / 2)){ arenaCanvas.x = ((ARENA_WIDTH / 2) * arenaCanvas.scaleX); } else { if (_local2.x > (ARENA_WIDTH / 2)){ arenaCanvas.x = -((((ARENA_WIDTH / 2) * arenaCanvas.scaleX) - 700)); }; }; if (_local1.y < (-(ARENA_HEIGHT) / 2)){ arenaCanvas.y = ((ARENA_HEIGHT / 2) * arenaCanvas.scaleX); } else { if (_local2.y > (ARENA_HEIGHT / 2)){ arenaCanvas.y = -((((ARENA_HEIGHT / 2) * arenaCanvas.scaleX) - 500)); }; }; } protected function keyDown(_arg1:KeyboardEvent):void{ if (!hasFocus()){ return; }; if (_arg1.keyCode == Keyboard.LEFT){ arenaCanvas.x = (arenaCanvas.x + 20); }; if (_arg1.keyCode == Keyboard.RIGHT){ arenaCanvas.x = (arenaCanvas.x - 20); }; if (_arg1.keyCode == Keyboard.UP){ arenaCanvas.y = (arenaCanvas.y + 20); }; if (_arg1.keyCode == Keyboard.DOWN){ arenaCanvas.y = (arenaCanvas.y - 20); }; limitCanvasMovement(); if (_arg1.keyCode == 73){ zoomIn(); }; if (_arg1.keyCode == 79){ zoomOut(); }; if (targetScale > MAXIMUM_SCALE){ targetScale = MAXIMUM_SCALE; } else { if ((targetScale * ARENA_WIDTH) < 700){ targetScale = (700 / ARENA_WIDTH); }; }; if (_arg1.keyCode == 88){ }; } public function loadLevel(_arg1:int):void{ loadBlocks(_arg1, false); } public function update(_arg1:Event):void{ if (arenaCanvas.scaleX > (targetScale + 0.01)){ scaleTo((arenaCanvas.scaleX - scaleVelocity)); scaleVelocity = (scaleVelocity + 0.01); if (scaleVelocity > ((arenaCanvas.scaleX - targetScale) / 5)){ scaleVelocity = ((arenaCanvas.scaleX - targetScale) / 5); }; } else { if (arenaCanvas.scaleX < (targetScale - 0.01)){ scaleTo((arenaCanvas.scaleX - scaleVelocity)); scaleVelocity = (scaleVelocity - 0.01); if (scaleVelocity < ((arenaCanvas.scaleX - targetScale) / 5)){ scaleVelocity = ((arenaCanvas.scaleX - targetScale) / 5); }; }; }; } protected function returnToMenu(_arg1:MouseEvent):void{ dispatchEvent(new MenuEvent(MenuEvent.MENU_BACK)); } public function loadDesign(_arg1:int):void{ loadBlocks(_arg1, true); } protected function getBottomestRightest(_arg1:Point, _arg2:Point):Point{ var _local3:Point = new Point(_arg1.x, _arg1.y); if (_arg1.x < _arg2.x){ _local3.x = _arg2.x; }; if (_arg1.y < _arg2.y){ _local3.y = _arg2.y; }; return (_local3); } protected function onBeginEditing(_arg1:BeginEditingEvent):void{ addChildBlock(_arg1.block); } protected function addChildBlock(_arg1:Block):void{ _arg1.addEventListener(BeginEditingEvent.BEGIN_EDITING, onBeginEditing); _arg1.addEventListener(DeleteBlockEvent.DELETE_BLOCK, onDelete); arenaForegroundCanvas.addChild(_arg1); arenaBackgroundCanvas.addChild(_arg1.getBlockBackground()); } protected function clearPlayerBlocks():void{ var _local2:Block; var _local1:Iterator = playerBlocks.getIterator(); while (_local1.hasNext()) { _local2 = (_local1.next() as Block); _local2.destroyBlock(physicsWorld); removeChildBlock(_local2); }; playerBlocks.clear(); } protected function stopMoveScreen(_arg1:MouseEvent=null):void{ movingScreen = false; } protected function zoomIn(_arg1:Event=null):void{ targetScale = (targetScale + 0.1); limitZoom(); } protected function loadFromxmlWindow(_arg1:MouseEvent):void{ loadFromXml(new XML(xmlWindow.xmlField.text)); } protected function updateMoveScreen(_arg1:MouseEvent=null):void{ if (movingScreen){ arenaCanvas.x = (arenaCanvas.x + (mouseX - screenMoveX)); arenaCanvas.y = (arenaCanvas.y + (mouseY - screenMoveY)); screenMoveX = mouseX; screenMoveY = mouseY; limitCanvasMovement(); }; } public function onMouseWheelUpCallback():void{ if (!hasFocus()){ }; testText2.text = "MouseUP"; var _local1 = 3; targetScale = (targetScale + (_local1 / 50)); limitZoom(); } protected function scaleTo(_arg1:Number):void{ if ((((stage == null)) || ((arenaCanvas == null)))){ testText3.text = "canvas null"; return; }; testText3.text = "canvas not null"; var _local2:Point = arenaCanvas.globalToLocal(parentContraption.localToGlobal(new Point((700 / 2), (500 / 2)))); var _local3:Number = (_arg1 - arenaCanvas.scaleX); arenaCanvas.scaleX = _arg1; arenaCanvas.scaleY = _arg1; arenaCanvas.x = (arenaCanvas.x - (_local2.x * _local3)); arenaCanvas.y = (arenaCanvas.y - (_local2.y * _local3)); limitCanvasMovement(); } protected function onDelete(_arg1:DeleteBlockEvent):void{ var _local2:EditableBlock = _arg1.block; _local2.destroyBlock(physicsWorld); removeChildBlock(_local2); if (arenaBlocks.nodeOf(_local2) != null){ arenaBlocks.remove(arenaBlocks.nodeOf(_local2)); }; if (goalBlocks.nodeOf(_local2) != null){ goalBlocks.remove(goalBlocks.nodeOf(_local2)); }; if (playerBlocks.nodeOf(_local2) != null){ playerBlocks.remove(playerBlocks.nodeOf(_local2)); }; } protected function loadRetrievedLevelFromXML(_arg1:XML):void{ levelId = _arg1.levelId; levelNumber = _arg1.levelNumber; loadFromXml(_arg1.level[0]); addTitle(_arg1.name); addTutorialOverlay(levelNumber); initZoomAndScroll(); } protected function mouseDown(_arg1:MouseEvent):void{ if (((!(parent)) || ((visible == false)))){ return; }; _arg1.stopPropagation(); beginMoveScreen(mouseX, mouseY); } protected function addEditableBlock(_arg1:EditableBlock):void{ addChildBlock(_arg1); } public function loadFromXml(_arg1:XML):void{ var _local3:EditableBlock; var _local4:XML; var _local5:Block; var _local2:Iterator = arenaBlocks.getIterator(); while (_local2.hasNext()) { _local3 = (_local2.next() as EditableBlock); _local3.destroyBlock(physicsWorld); removeChildBlock(_local3); }; arenaBlocks.clear(); clearPlayerBlocks(); playerBlocks = new BlockCollection(); goalBlocks = new SLinkedList(); arenaBlocks = new SLinkedList(); startZone.setFromXML(_arg1.start[0]); endZone.setFromXML(_arg1.end[0]); for each (_local4 in _arg1.levelBlocks.*) { _local3 = BlockCollection.createLevelBlockFromXml(_local4, physicsWorld, editing); addArenaBlock(_local3); }; for each (_local4 in _arg1.playerBlocks.*) { _local5 = playerBlocks.createPlayerBlockFromXml(_local4, editing); if (_local5.isGoalBlock){ goalBlocks.append(_local5); }; addChildBlock(_local5); }; checkPlayerBlocksAreWithinStart(); finishedLoading(); if (!hasPermissionToPlay()){ addChild(new LinkedIntoBadLevelMenu()); permissionToPlayLevel = false; }; } protected function removeChildBlock(_arg1:Block):void{ arenaForegroundCanvas.removeChild(_arg1); arenaBackgroundCanvas.removeChild(_arg1.getBlockBackground()); } public function hasFocus():Boolean{ return (((((((parent) && ((visible == true)))) && (parentContraption.isCurrentMenu(this)))) && (permissionToPlayLevel))); } public function getLevelXml():XML{ var _local5:Block; var _local7:XML; var _local1:XML = <level/> ; var _local2:XML = <levelBlocks/> ; var _local3:XML = <playerBlocks/> ; _local1.appendChild(_local2); _local1.appendChild(_local3); _local1.appendChild(startZone.getXml()); _local1.appendChild(endZone.getXml()); var _local4:Iterator = arenaBlocks.getIterator(); while (_local4.hasNext()) { _local5 = (_local4.next() as EditableBlock); _local2.appendChild(_local5.getXml()); }; _local4 = playerBlocks.getIterator(); while (_local4.hasNext()) { _local5 = (_local4.next() as Block); _local5.saveIndex = undefined; }; _local4 = playerBlocks.getIterator(); var _local6:int; while (_local4.hasNext()) { _local5 = (_local4.next() as Block); _local5.saveIndex = _local6; _local6++; }; _local4 = playerBlocks.getIterator(); while (_local4.hasNext()) { _local5 = (_local4.next() as Block); _local7 = _local5.getXml(); _local3.appendChild(_local7); }; return (_local1); } protected function zoomOut(_arg1:Event=null):void{ targetScale = (targetScale - 0.1); limitZoom(); } public function isInStartZone(_arg1:Point):Boolean{ return (startZone.isInside(arenaCanvas.globalToLocal(parentContraption.localToGlobal(_arg1)))); } } }//package contraption
Section 335
//BuildingPointer (contraption.BuildingPointer) package contraption { import flash.display.*; public class BuildingPointer extends MousePointer { public function BuildingPointer(_arg1:Boolean):void{ super(_arg1); } override protected function getActingPointer():MovieClip{ return (new BuildingMousePointer()); } override protected function getPointer():MovieClip{ return (new BuildingMousePointer()); } } }//package contraption
Section 336
//ButtonPointer (contraption.ButtonPointer) package contraption { import flash.display.*; public class ButtonPointer extends MousePointer { public function ButtonPointer(_arg1:Boolean):void{ super(_arg1); } override protected function getActingPointer():MovieClip{ return (new ButtonMousePointer()); } override protected function getPointer():MovieClip{ return (new ButtonMousePointer()); } } }//package contraption
Section 337
//Configuration (contraption.Configuration) package contraption { import flash.net.*; public class Configuration { protected var simpleGraphicsMode:Boolean; protected var userCookie:SharedObject; protected var mute:Boolean; private static var allowInstantiation:Boolean; private static var instance:Configuration; public function Configuration():void{ if (!allowInstantiation){ throw (new Error("Error: Instantiation failed: Use Configuration.getInstance() instead of new.")); }; userCookie = SharedObject.getLocal("configuration"); if (userCookie.data.simpleGraphicsMode != null){ simpleGraphicsMode = (userCookie.data.simpleGraphicsMode as Boolean); mute = (userCookie.data.mute as Boolean); } else { simpleGraphicsMode = false; mute = true; }; } public function isMuted():Boolean{ return (mute); } public function setSimpleGraphicsMode(_arg1:Boolean):void{ this.simpleGraphicsMode = _arg1; userCookie.data.simpleGraphicsMode = _arg1; } public function setMute(_arg1:Boolean):void{ this.mute = _arg1; userCookie.data.mute = _arg1; } public function isInSimpleGraphicsMode():Boolean{ return (simpleGraphicsMode); } public static function getInstance():Configuration{ if (instance == null){ allowInstantiation = true; instance = new (Configuration); allowInstantiation = false; }; return (instance); } } }//package contraption
Section 338
//ContraptionUrlLoader (contraption.ContraptionUrlLoader) package contraption { import flash.events.*; import contraption.menu.*; import flash.net.*; public class ContraptionUrlLoader extends URLLoader { protected var addSpinner:Boolean; public function ContraptionUrlLoader(_arg1:Boolean=true, _arg2:URLRequest=null){ super(_arg2); this.addSpinner = _arg1; addEventListener(Event.COMPLETE, loadComplete); } protected function loadComplete(_arg1:Event):void{ if (addSpinner){ dispatchEvent(new MenuEvent(MenuEvent.REMOVE_SPINNER, true, true)); }; } override public function load(_arg1:URLRequest):void{ if (addSpinner){ dispatchEvent(new MenuEvent(MenuEvent.ADD_SPINNER, true, true)); }; super.load(_arg1); } } }//package contraption
Section 339
//DeletePointer (contraption.DeletePointer) package contraption { import flash.display.*; public class DeletePointer extends MousePointer { public function DeletePointer(_arg1:Boolean):void{ super(_arg1); } override protected function getActingPointer():MovieClip{ return (new DeleteMousePointer()); } override protected function getPointer():MovieClip{ return (new DeleteMousePointer()); } } }//package contraption
Section 340
//DragPointer (contraption.DragPointer) package contraption { import flash.display.*; public class DragPointer extends MousePointer { public function DragPointer(_arg1:Boolean):void{ super(_arg1); } override protected function getActingPointer():MovieClip{ return (new DragActingMousePointer()); } override protected function getPointer():MovieClip{ return (new DragMousePointer()); } } }//package contraption
Section 341
//Editor (contraption.Editor) package contraption { import flash.events.*; import contraption.menu.*; import flash.display.*; import contraption.blocks.*; import flash.geom.*; import flash.external.*; public class Editor extends Arena { protected var pleaseRegisterMenu:PleaseRegisterMenu; public function Editor(_arg1:Stage, _arg2:Contraption){ super(_arg1, _arg2, true); graphics.beginFill(16703853, 1); graphics.drawRect(0, 0, 700, 500); dashboard.setMode(Dashboard.MODE_EDIT_LEVEL); dashboard.addEventListener(DashboardEvent.SAVE, saveLevel); dashboard.addEventListener(DashboardEvent.GOAL_CIRCLE, addGoalCircle); dashboard.addEventListener(DashboardEvent.GOAL_SQUARE, addGoalRectangle); dashboard.addEventListener(DashboardEvent.STATIC_CIRCLE, addStaticCircle); dashboard.addEventListener(DashboardEvent.STATIC_SQUARE, addStaticRectangle); dashboard.addEventListener(DashboardEvent.DYNAMIC_CIRCLE, addDynamicCircle); dashboard.addEventListener(DashboardEvent.DYNAMIC_SQUARE, addDynamicRectangle); dashboard.addEventListener(DashboardEvent.TEST_LEVEL, tryLevel); ExternalInterface.addCallback("onMouseWheelDown", handleMouseWheelDownCallback); ExternalInterface.addCallback("onMouseWheelUp", handleMouseWheelUpCallback); pleaseRegisterMenu = new PleaseRegisterMenu(); if (!User.getInstance().isRegistered()){ addChild(pleaseRegisterMenu); }; } protected function addStaticRectangle(_arg1:Event):void{ if (isOverMaxBlocks()){ return; }; var _local2:EditableBlock = new StaticRectangle(true, arenaCanvas.globalToLocal(new Point(200, 200))); addArenaBlock(_local2); } override public function refresh():void{ ExternalInterface.addCallback("onMouseWheelDown", handleMouseWheelDownCallback); ExternalInterface.addCallback("onMouseWheelUp", handleMouseWheelUpCallback); } protected function addGoalCircle(_arg1:Event):void{ if (isOverMaxBlocks()){ return; }; var _local2:EditableBlock = new Wheel(arenaCanvas.globalToLocal(new Point(200, 200)), Wheel.NO_SPIN, 0, NaN, true, true); addGoalBlock(_local2); } public function handleMouseWheelDownCallback():void{ onMouseWheelDownCallback(); } protected function saveLevel(_arg1:Event):void{ if (_arg1.target == this){ return; }; _arg1.stopPropagation(); var _local2:SaveEvent = new SaveEvent(SaveEvent.SAVE_LEVEL, true, true); _local2.xml = getLevelXml(); dispatchEvent(_local2); } protected function tryLevel(_arg1:Event):void{ dispatchEvent(new MenuEvent(MenuEvent.TRY_LEVEL)); } protected function isOverMaxBlocks():Boolean{ return (false); } override protected function newSaveWindow():SaveWindow{ return (new SaveLevelWindow()); } protected function addDynamicRectangle(_arg1:Event):void{ if (isOverMaxBlocks()){ return; }; var _local2:EditableBlock = new DynamicRectangle(true, false, arenaCanvas.globalToLocal(new Point(200, 200))); addArenaBlock(_local2); } protected function addDynamicCircle(_arg1:Event):void{ if (isOverMaxBlocks()){ return; }; var _local2:EditableBlock = new DynamicCircle(true, arenaCanvas.globalToLocal(new Point(200, 200))); addArenaBlock(_local2); } protected function addGoalRectangle(_arg1:Event):void{ if (isOverMaxBlocks()){ return; }; var _local2:EditableBlock = new JointedDynamicRectangle(true, true, arenaCanvas.globalToLocal(new Point(200, 200))); addGoalBlock(_local2); } public function handleMouseWheelUpCallback():void{ onMouseWheelUpCallback(); } protected function addStaticCircle(_arg1:Event):void{ if (isOverMaxBlocks()){ return; }; var _local2:EditableBlock = new StaticCircle(true, arenaCanvas.globalToLocal(new Point(200, 200))); addArenaBlock(_local2); } } }//package contraption
Section 342
//EndZone (contraption.EndZone) package contraption { import contraption.menu.*; public class EndZone extends StartZone { public function EndZone(_arg1:Boolean):void{ super(_arg1); } override protected function drawZone():void{ var _local1:TextArea; if (!editing){ _local1 = new TextArea("Goal", 18); _local1.bold(); _local1.textColor = 15496308; _local1.x = -22; _local1.y = -15; addChild(_local1); }; super.drawZone(); } override protected function initAllowableActions():void{ allowableActions = new Actions(); allowableActions.alwaysDrag = true; } override protected function getColour():int{ return (15831441); } override protected function getXmlRoot():XML{ return (<end/> ); } override protected function getBorderColour():int{ return (12281446); } } }//package contraption
Section 343
//GlobalListener (contraption.GlobalListener) package contraption { import flash.display.*; public class GlobalListener { protected var stage:Stage; private static var allowInstantiation:Boolean; private static var instance:GlobalListener; public function GlobalListener():void{ if (!allowInstantiation){ throw (new Error("Error: Instantiation failed: Use Configuration.getInstance() instead of new.")); }; } public function init(_arg1:Stage, _arg2:DisplayObject):void{ this.stage = _arg1; } public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ stage.removeEventListener(_arg1, _arg2, _arg3); } public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ stage.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); } public static function getInstance():GlobalListener{ if (instance == null){ allowInstantiation = true; instance = new (GlobalListener); allowInstantiation = false; }; return (instance); } } }//package contraption
Section 344
//ModeEvent (contraption.ModeEvent) package contraption { import flash.events.*; public class ModeEvent extends Event { public var actionType:int; public static const ACTION_UNKNOWN:int = 0; public static const ACTION_BUILD:int = 2; public static const DEFAULT_MODE:String = "defaultMode"; public static const MOVE_MODE:String = "moveMode"; public static const END_ACTION:String = "endAction"; public static const START_ACTION:String = "startAction"; public static const DELETE_MODE:String = "deleteMode"; public static const ACTION_MOVE:int = 1; public static const ACTION_BUTTON:int = 3; public function ModeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); actionType = ACTION_UNKNOWN; } override public function clone():Event{ var _local1:ModeEvent = new ModeEvent(type, bubbles, cancelable); _local1.actionType = actionType; return (_local1); } } }//package contraption
Section 345
//MousePointer (contraption.MousePointer) package contraption { import flash.display.*; public class MousePointer extends Sprite { protected var acting:Boolean; public static var NORMAL_DOWN:Number = 1; public static var BUILDING_UP:Number = 2; public static var DRAG_UP:Number = 8; public static var MOVE_UP:Number = 6; public static var BUILDING_DOWN:Number = 3; public static var DELETE_UP:Number = 4; public static var MOVE_DOWN:Number = 7; public static var BUTTON_DOWN:Number = 11; public static var NORMAL_UP:Number = 0; public static var DELETE_DOWN:Number = 5; public static var BUTTON_UP:Number = 10; public static var DRAG_DOWN:Number = 9; public function MousePointer(_arg1:Boolean):void{ mouseEnabled = false; if (_arg1){ drawActingPointer(); } else { drawPointer(); }; } public function getActing():Boolean{ return (acting); } protected function getPointer():MovieClip{ return (new DefaultMousePointer()); } protected function drawActingPointer():void{ var _local1:MovieClip = getActingPointer(); _local1.mouseEnabled = false; addChild(_local1); } protected function drawPointer():void{ var _local1:MovieClip = getPointer(); _local1.mouseEnabled = false; addChild(_local1); } protected function getActingPointer():MovieClip{ return (new DefaultMousePointer()); } } }//package contraption
Section 346
//MovePointer (contraption.MovePointer) package contraption { import flash.display.*; public class MovePointer extends MousePointer { public function MovePointer(_arg1:Boolean):void{ super(_arg1); } override protected function getActingPointer():MovieClip{ return (new MoveMousePointer()); } override protected function getPointer():MovieClip{ return (new MoveMousePointer()); } } }//package contraption
Section 347
//Music (contraption.Music) package contraption { import flash.net.*; import flash.media.*; public class Music { protected var mute:Boolean;// = false protected var arenaSound:Sound; protected var menuSound:Sound; protected var menuSoundChannel:SoundChannel; protected var playRegisteredSound:Boolean;// = false protected var arenaSoundChannel:SoundChannel; protected var playArenaSound:Boolean;// = false private static var allowInstantiation:Boolean; private static var instance:Music; public function Music():void{ var _local2:URLRequest; super(); if (!allowInstantiation){ throw (new Error("Error: Instantiation failed: Use Music.getInstance() instead of new.")); }; playRegisteredSound = User.getInstance().isRegistered(); mute = Configuration.getInstance().isMuted(); menuSound = new Sound(); if (playRegisteredSound){ _local2 = new URLRequest((Contraption.SERVER_LOCATION + "/game/arenaLoop.mp3")); } else { _local2 = new URLRequest((Contraption.SERVER_LOCATION + "/game/menuLoop.mp3")); }; var _local1:SoundLoaderContext = new SoundLoaderContext(4000, true); menuSound.load(_local2, _local1); arenaSound = menuSound; } public function playMenu():void{ return (playArena()); } protected function checkRegistered():void{ } public function playArena():void{ checkRegistered(); playArenaSound = true; if (mute){ return; }; if (menuSoundChannel != null){ menuSoundChannel.stop(); menuSoundChannel = null; }; if (arenaSoundChannel == null){ arenaSoundChannel = arenaSound.play(0, 10000000); }; } public function stopSound():void{ setMute(true); } public function setMute(_arg1:Boolean):void{ this.mute = _arg1; if (_arg1){ if (menuSoundChannel != null){ menuSoundChannel.stop(); menuSoundChannel = null; }; if (arenaSoundChannel != null){ arenaSoundChannel.stop(); arenaSoundChannel = null; }; } else { if (playArenaSound){ playArena(); } else { playMenu(); }; }; } public static function getInstance():Music{ if (instance == null){ allowInstantiation = true; try { instance = new (Music); } catch(e:Error) { }; allowInstantiation = false; }; return (instance); } } }//package contraption
Section 348
//NoJointedCollisionsFilter (contraption.NoJointedCollisionsFilter) package contraption { import contraption.blocks.*; import Box2D.Dynamics.*; import Box2D.Collision.Shapes.*; public class NoJointedCollisionsFilter extends b2CollisionFilter { public static var b2_defaultFilter:b2CollisionFilter = new b2CollisionFilter(); override public function ShouldCollide(_arg1:b2Shape, _arg2:b2Shape):Boolean{ if (!super.ShouldCollide(_arg1, _arg2)){ return (false); }; var _local3:Block = (_arg1.GetUserData() as Block); var _local4:Block = (_arg2.GetUserData() as Block); if ((((_local3 == null)) || ((_local4 == null)))){ return (true); }; if (((_local3.collidesWithJointedBlocks()) && (_local4.collidesWithJointedBlocks()))){ return (true); }; if (((!((_local3.jointedBlocks == null))) && (!((_local3.jointedBlocks[_local4] == null))))){ return (false); }; return (true); } } }//package contraption
Section 349
//Player (contraption.Player) package contraption { import flash.events.*; import contraption.menu.*; import de.polygonal.ds.*; import flash.display.*; import flash.net.*; import contraption.blocks.*; import flash.geom.*; import Box2D.Dynamics.*; import flash.utils.*; import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Dynamics.Joints.*; import Box2D.Dynamics.Contacts.*; import Box2D.Collision.Shapes.*; import flash.text.*; import flash.ui.*; import flash.external.*; public class Player extends Arena { public var currentLevelId:int;// = 0 protected var buildingBlockType:BlockType; public var moveMode:Boolean;// = false protected var movingJoints:Dictionary; public var linkedIn:Boolean; protected var buildingBlock:Block; public var m_iterations:int;// = 10 protected var moving:Boolean;// = false protected var movingIllegal:Boolean; protected var movingJointsOriginalPosition:Dictionary; protected var movingIllegalNotification:Sprite; protected var isCurrentDesignSolution:Boolean;// = false protected var te:TextField; protected var movingBlocks:SLinkedList; public var currentLevelXml:XML; protected var tickCounter:TickCounter; protected var movingJOriginal:Point; protected var movingBlocksOriginalPosition:SLinkedList; public var building:Boolean;// = false protected var movingJ:Boolean;// = false public var hasFinishedLevel:Boolean;// = false public var running:Boolean;// = false public var m_timeStep:Number;// = 0.0333333333333333 protected var movingJoint:JointCollection; private var ox:Number; private var oy:Number; public var deleteMode:Boolean;// = false protected var movingNumCollisions:int; public function Player(_arg1:Stage, _arg2:Contraption, _arg3:Boolean=false, _arg4:Boolean=false){ buildingBlockType = BlockType.ROD_HOLLOW; super(_arg1, _arg2, false); this.linkedIn = _arg3; if (!_arg4){ dashboard.setMode(Dashboard.MODE_EDIT_CONTRPATION); } else { dashboard.setMode(Dashboard.MODE_TEST_LEVEL); }; dashboard.addEventListener(DashboardEvent.GO, startSimulation); dashboard.addEventListener(DashboardEvent.STOP, stopSimulation); dashboard.addEventListener(DashboardEvent.CW_WHEEL, clockwiseWheelMode); dashboard.addEventListener(DashboardEvent.CCW_WHEEL, counterClockwiseWheelMode); dashboard.addEventListener(DashboardEvent.NP_WHEEL, noSpinWheelMode); dashboard.addEventListener(DashboardEvent.HOLLOW_ROD, hollowRodMode); dashboard.addEventListener(DashboardEvent.SOLID_ROD, solidRodMode); dashboard.addEventListener(DashboardEvent.MOVE, enterMoveMode); dashboard.addEventListener(DashboardEvent.DELETE, enterDeleteMode); dashboard.addEventListener(DashboardEvent.SAVE, saveDesign); solidRodMode(); var _local5:GlobalListener = GlobalListener.getInstance(); _local5.addEventListener(KeyboardEvent.KEY_UP, keyUp, false, 0, true); _arg2.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown); _arg2.addEventListener(MouseEvent.MOUSE_UP, mouseUp, false, 0, true); resetPhysicsWorld(); _arg2.addEventListener(MouseEvent.MOUSE_MOVE, updateMoving, false, 0, true); _arg2.addEventListener(MouseEvent.MOUSE_MOVE, drawBuilding, false, 0, true); _arg2.addEventListener(MenuEvent.SAVE_CONTRAPTION, saveDesign, false, 0, true); _arg2.addEventListener(MenuEvent.CHANGE_GRAPHICS_OPTION, updateBlockGraphics, false, 0, true); ExternalInterface.addCallback("onMouseWheelDown", handleMouseWheelDownCallback); ExternalInterface.addCallback("onMouseWheelUp", handleMouseWheelUpCallback); te = new TextField(); te.mouseEnabled = false; addChild(te); tickCounter = new TickCounter(); tickCounter.x = 650; tickCounter.y = 470; tickCounter.visible = false; addChild(tickCounter); var _local6:Button = new ToggleGraphicsButton(); _local6.x = 10; _local6.y = 425; addChild(_local6); } protected function startSimulation(_arg1:Event):void{ if (running){ return; }; mouseUp(); running = true; currentLevelXml = null; currentLevelXml = getLevelXml(); loadFromXml(currentLevelXml); resetPhysicsWorld(); initPlayerBlocks(); initJoints(); initArenaBlocks(); var _local2:Sprite = (dashboard.stopButton.parent as Sprite); if (_local2 == null){ _local2 = (dashboard.goButton.parent as Sprite); }; _local2.addChild(dashboard.stopButton); _local2.removeChild(dashboard.goButton); tickCounter.reset(); } protected function loadNextLevel():void{ var _local1:MenuEvent = new MenuEvent(MenuEvent.LEVEL_COMPLETE, true, true); _local1.levelNumber = levelNumber; _local1.levelId = levelId; dispatchEvent(_local1); } protected function clockwiseWheelMode(_arg1:Event):void{ resetMode(); buildingBlockType = BlockType.WHEEL_CLOCKWISE; dashboard.hilightButton(dashboard.cwWheelButton); dispatchEvent(new ModeEvent(ModeEvent.DEFAULT_MODE)); } protected function drawBuilding(_arg1:Event):void{ var _local4:Block; if (!building){ return; }; if (buildingBlock != null){ removeChildBlock(buildingBlock); playerBlocks.deleteBlock(physicsWorld, buildingBlock); }; var _local2:Number = arenaCanvas.mouseX; var _local3:Number = arenaCanvas.mouseY; if (buildingBlockType == BlockType.ROD_HOLLOW){ _local4 = playerBlocks.createHollowRod(new Point(ox, oy), new Point(_local2, _local3), arenaCanvas.scaleX, null, true); } else { if (buildingBlockType == BlockType.ROD_SOLID){ _local4 = playerBlocks.createSolidRod(new Point(ox, oy), new Point(_local2, _local3), arenaCanvas.scaleX, null, true); } else { if (buildingBlockType == BlockType.WHEEL_NO_SPIN){ _local4 = playerBlocks.createWheel(new Point(_local2, _local3), arenaCanvas.scaleX, Wheel.NO_SPIN); } else { if (buildingBlockType == BlockType.WHEEL_CLOCKWISE){ _local4 = playerBlocks.createWheel(new Point(_local2, _local3), arenaCanvas.scaleX, Wheel.CLOCKWISE); } else { if (buildingBlockType == BlockType.WHEEL_COUNTER_CLOCKWISE){ _local4 = playerBlocks.createWheel(new Point(_local2, _local3), arenaCanvas.scaleX, Wheel.COUNTER_CLOCKWISE); }; }; }; }; }; if ((_local4 as Wheel)){ ox = _local2; oy = _local3; }; buildingBlock = _local4; addChildBlock(buildingBlock); buildingBlock.generatePhysicsBody(physicsWorld); if (movingIllegalNotification != null){ arenaCanvas.removeChild(movingIllegalNotification); movingIllegalNotification = null; }; if (checkCollisions(buildingBlock)){ movingIllegalNotification = getIllegalNotification(ox, oy, _local2, _local3); arenaCanvas.addChild(movingIllegalNotification); }; } protected function mouseUp(_arg1:MouseEvent=null):void{ var _local8:Block; if (((!((movingIllegalNotification == null))) && (arenaCanvas.contains(movingIllegalNotification)))){ arenaCanvas.removeChild(movingIllegalNotification); movingIllegalNotification = null; }; if (movingJ){ movingJ = false; if (movingIllegal){ movingJoint.moveJoint(movingJOriginal.subtract(movingJoint.getPosition())); }; }; if (movingScreen){ movingScreen = false; }; if (moving){ stopMoving(); }; if (((running) || (!(building)))){ return; }; if (building){ building = false; removeChildBlock(buildingBlock); playerBlocks.deleteBlock(physicsWorld, buildingBlock); buildingBlock = null; }; var _local2:Number = arenaCanvas.mouseX; var _local3:Number = arenaCanvas.mouseY; var _local4:Number = startZone.getPosition().x; var _local5:Number = startZone.getPosition().y; var _local6:Number = startZone.getWidth(); var _local7:Number = startZone.getHeight(); if ((((Math.abs((ox - _local4)) > (_local6 / 2))) || ((Math.abs((_local2 - _local4)) > (_local6 / 2))))){ return; }; if ((((Math.abs((oy - _local5)) > (_local7 / 2))) || ((Math.abs((_local3 - _local5)) > (_local7 / 2))))){ return; }; if (buildingBlockType == BlockType.ROD_HOLLOW){ _local8 = playerBlocks.createHollowRod(new Point(ox, oy), new Point(_local2, _local3), arenaCanvas.scaleX, null, true); } else { if (buildingBlockType == BlockType.ROD_SOLID){ _local8 = playerBlocks.createSolidRod(new Point(ox, oy), new Point(_local2, _local3), arenaCanvas.scaleX, null, true); } else { if (buildingBlockType == BlockType.WHEEL_NO_SPIN){ _local8 = playerBlocks.createWheel(new Point(_local2, _local3), arenaCanvas.scaleX, Wheel.NO_SPIN); } else { if (buildingBlockType == BlockType.WHEEL_CLOCKWISE){ _local8 = playerBlocks.createWheel(new Point(_local2, _local3), arenaCanvas.scaleX, Wheel.CLOCKWISE); } else { if (buildingBlockType == BlockType.WHEEL_COUNTER_CLOCKWISE){ _local8 = playerBlocks.createWheel(new Point(_local2, _local3), arenaCanvas.scaleX, Wheel.COUNTER_CLOCKWISE); }; }; }; }; }; addChildBlock(_local8); _local8.generatePhysicsBody(physicsWorld); if (checkCollisions(_local8)){ playerBlocks.deleteBlock(physicsWorld, _local8); removeChildBlock(_local8); } else { addedBlock(_local8); }; } protected function hollowRodMode(_arg1:Event):void{ resetMode(); buildingBlockType = BlockType.ROD_HOLLOW; dashboard.hilightButton(dashboard.hollowRodButton); dispatchEvent(new ModeEvent(ModeEvent.DEFAULT_MODE)); } protected function enterMoveMode(_arg1:Event):void{ resetMode(); dashboard.hilightButton(dashboard.moveButton); moveMode = true; dispatchEvent(new ModeEvent(ModeEvent.MOVE_MODE)); } public function handleMouseWheelDownCallback():void{ onMouseWheelDownCallback(); } override protected function loadLevelHandler(_arg1:Event):void{ super.loadLevelHandler(_arg1); if (((linkedIn) && (hasPermissionToPlay()))){ addChild(new LinkInMenu()); }; } override public function disposeMenu():void{ super.disposeMenu(); stopSimulation(null); parentContraption.removeEventListener(MenuEvent.SAVE_CONTRAPTION, saveDesign); } protected function counterClockwiseWheelMode(_arg1:Event):void{ resetMode(); buildingBlockType = BlockType.WHEEL_COUNTER_CLOCKWISE; dashboard.hilightButton(dashboard.ccwWheelButton); dispatchEvent(new ModeEvent(ModeEvent.DEFAULT_MODE)); } public function isRunning():Boolean{ return (running); } protected function initBuildingBoundries():void{ startZone.x; var _local1:b2BoxDef = new b2BoxDef(); var _local2:b2BodyDef = new b2BodyDef(); _local1.extents.Set((ARENA_WIDTH / 2), (ARENA_HEIGHT / 2)); _local1.categoryBits = 0xFFFFFF; _local2.AddShape(_local1); _local2.position.x = ((startZone.getPosition().x + (startZone.width / 2)) + (ARENA_WIDTH / 2)); _local2.position.y = startZone.getPosition().y; _local2.userData = new Block(); physicsWorld.CreateBody(_local2); _local2.position.x = ((startZone.getPosition().x - (startZone.width / 2)) - (ARENA_WIDTH / 2)); _local2.position.y = startZone.getPosition().y; _local2.userData = new Block(); physicsWorld.CreateBody(_local2); _local2.position.x = startZone.getPosition().x; _local2.position.y = ((startZone.getPosition().y + (startZone.height / 2)) + (ARENA_HEIGHT / 2)); _local2.userData = new Block(); physicsWorld.CreateBody(_local2); _local2.position.x = startZone.getPosition().x; _local2.position.y = ((startZone.getPosition().y - (startZone.height / 2)) - (ARENA_HEIGHT / 2)); _local2.userData = new Block(); physicsWorld.CreateBody(_local2); } protected function noSpinWheelMode(_arg1:Event):void{ resetMode(); buildingBlockType = BlockType.WHEEL_NO_SPIN; dashboard.hilightButton(dashboard.npWheelButton); dispatchEvent(new ModeEvent(ModeEvent.DEFAULT_MODE)); } protected function initArenaBlocks():void{ var _local1:Iterator = arenaBlocks.getIterator(); while (_local1.hasNext()) { (_local1.next() as Block).generatePhysicsBody(physicsWorld); }; } override public function loadFromXml(_arg1:XML):void{ super.loadFromXml(_arg1); initArenaBlocks(); initPlayerBlocks(); initBuildingBoundries(); } protected function getIllegalNotification(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Sprite{ var _local5 = 60; var _local6:Number = Math.abs((_arg1 - _arg3)); if (Math.abs((_arg2 - _arg4)) > _local6){ _local6 = Math.abs((_arg2 - _arg4)); }; if (_local6 < _local5){ _local6 = _local5; }; var _local7:Sprite = new Sprite(); _local7.graphics.lineStyle(3, 16720418); _local7.graphics.moveTo((_local6 / 4), (_local6 / 4)); _local7.graphics.lineTo((-(_local6) / 4), (-(_local6) / 4)); _local7.graphics.moveTo((_local6 / 4), (-(_local6) / 4)); _local7.graphics.lineTo((-(_local6) / 4), (_local6 / 4)); _local7.x = (_arg1 + ((_arg3 - _arg1) / 2)); _local7.y = (_arg2 + ((_arg4 - _arg2) / 2)); return (_local7); } protected function beginMoving():void{ var _local1:JointCollection; var _local2:Block; var _local8:Point; var _local10:JointCollection; var _local11:ModeEvent; var _local12:Block; ox = arenaCanvas.mouseX; oy = arenaCanvas.mouseY; movingIllegal = false; movingNumCollisions = countCollisions(); if (movingIllegalNotification){ arenaCanvas.removeChild(movingIllegalNotification); }; movingIllegalNotification = new Sprite(); arenaCanvas.addChild(movingIllegalNotification); _local1 = playerBlocks.getClosestJointCollection(new Point(ox, oy)); if (((!((_local1 == null))) && (((Point.distance(_local1.getPosition(), new Point(ox, oy)) * scaleX) < 8)))){ movingJ = true; this.movingJoint = _local1; movingJOriginal = _local1.getPosition(); movingIllegalNotification.x = ox; movingIllegalNotification.y = oy; movingIllegalNotification.graphics.lineStyle(3, 16720418); movingIllegalNotification.graphics.moveTo(20, 20); movingIllegalNotification.graphics.lineTo(-20, -20); movingIllegalNotification.graphics.moveTo(20, -20); movingIllegalNotification.graphics.lineTo(-20, 20); movingIllegalNotification.visible = false; arenaCanvas.addChild(movingIllegalNotification); _local11 = new ModeEvent(ModeEvent.START_ACTION, true); _local11.actionType = ModeEvent.ACTION_MOVE; dispatchEvent(_local11); currentLevelXml = null; isCurrentDesignSolution = false; return; }; _local2 = playerBlocks.getClosestBlock(new Point(arenaCanvas.mouseX, arenaCanvas.mouseY)); if ((((_local2 == null)) || (((_local2.getDistance(new Point(arenaCanvas.mouseX, arenaCanvas.mouseY)) * scaleX) > 20)))){ beginMoveScreen(mouseX, mouseY); return; }; moving = true; movingBlocks = new SLinkedList(); movingBlocksOriginalPosition = new SLinkedList(); movingJoints = new Dictionary(); movingJointsOriginalPosition = new Dictionary(); var _local3:Number = -1000000; var _local4:Number = -1000000; var _local5:Number = 1000000; var _local6:Number = 1000000; var _local7:Dictionary = new Dictionary(); _local7[_local2] = _local2; var _local9:Boolean; while (!(_local9)) { _local9 = true; for each (_local12 in _local7) { if (movingBlocks.nodeOf(_local12) == null){ _local9 = false; _local12.addJointedBlocks(_local7); _local12.addJoints(movingJoints); movingBlocks.append(_local12); _local8 = _local12.getPosition(); movingBlocksOriginalPosition.append(_local8); delete _local7[_local12]; _local12.alpha = 0.5; if ((_local8.x + 20) > _local3){ _local3 = (_local8.x + 20); }; if ((_local8.y + 20) > _local4){ _local4 = (_local8.y + 20); }; if ((_local8.x - 20) < _local5){ _local5 = (_local8.x - 20); }; if ((_local8.y - 20) < _local6){ _local6 = (_local8.y - 20); }; } else { delete _local7[_local12]; }; }; }; for each (_local10 in movingJoints) { movingJointsOriginalPosition[_local10] = _local10.getPosition(); }; movingIllegalNotification.graphics.lineStyle(3, 16720418); movingIllegalNotification.graphics.moveTo(_local3, _local4); movingIllegalNotification.graphics.lineTo(_local5, _local6); movingIllegalNotification.graphics.moveTo(_local3, _local6); movingIllegalNotification.graphics.lineTo(_local5, _local4); movingIllegalNotification.visible = false; arenaCanvas.addChild(movingIllegalNotification); _local11 = new ModeEvent(ModeEvent.START_ACTION, true); _local11.actionType = ModeEvent.ACTION_MOVE; dispatchEvent(_local11); currentLevelXml = null; isCurrentDesignSolution = false; } protected function initJoints():void{ var _local1:Iterator = playerBlocks.getIterator(); while (_local1.hasNext()) { (_local1.next() as Block).startJoints(physicsWorld); }; } protected function keyUp(_arg1:KeyboardEvent):void{ if ((((_arg1.keyCode == Keyboard.SHIFT)) || ((_arg1.keyCode == Keyboard.CONTROL)))){ dispatchEvent(new ModeEvent(ModeEvent.DEFAULT_MODE)); }; } protected function doWhirledAwards():void{ if (Contraption.VERSION_NAME != "whirled.com"){ return; }; var _local1:Array = new Array(21); var _local2:Array = new Array(21); _local1[0] = 91; _local1[1] = 55; _local1[2] = 16; _local1[3] = 102; _local1[4] = 31; _local1[5] = 89; _local1[6] = 88; _local1[7] = 86; _local1[8] = 100; _local1[9] = 17; _local1[10] = 62; _local1[11] = 19; _local1[12] = 23; _local1[13] = 20; _local1[14] = 24; _local1[15] = 28; _local1[16] = 69; _local1[17] = 76; _local1[18] = 60; _local1[19] = 54; _local1[20] = 4575; var _local3:SharedObject = SharedObject.getLocal("user"); var _local4:int; while (_local4 < _local1.length) { _local2[_local4] = (_local3.data[("level" + _local1[_local4])] == "true"); _local4++; }; if (((((((_local2[0]) && (_local2[1]))) && (_local2[2]))) && (_local2[3]))){ parentContraption.whirledGameControl.player.awardTrophy("Contraption1to4"); }; if (((((((((_local2[4]) && (_local2[5]))) && (_local2[6]))) && (_local2[7]))) && (_local2[8]))){ parentContraption.whirledGameControl.player.awardTrophy("Contraption5to9"); }; if (((((((((_local2[9]) && (_local2[10]))) && (_local2[11]))) && (_local2[12]))) && (_local2[13]))){ parentContraption.whirledGameControl.player.awardTrophy("Contraption10to14"); }; if (((((((((((_local2[14]) && (_local2[15]))) && (_local2[16]))) && (_local2[17]))) && (_local2[18]))) && (_local2[19]))){ parentContraption.whirledGameControl.player.awardTrophy("Contraption15to20"); }; var _local5:Boolean; _local4 = 0; while (_local4 < _local1.length) { if (!_local2[_local4]){ _local5 = false; }; _local4++; }; if (_local5){ parentContraption.whirledGameControl.player.awardTrophy("ContraptionFin"); }; var _local6:int = parentContraption.whirledGameControl.game.getMyId(); parentContraption.whirledGameControl.game.endGameWithScores([_local6], [1], 3); parentContraption.whirledGameControl.game.playerReady(); } protected function checkPlayerBlocksLegality():void{ var _local2:Block; var _local3:Rod; var _local1:Iterator = arenaBlocks.getIterator(); _local1 = playerBlocks.getIterator(); while (_local1.hasNext()) { _local2 = (_local1.next() as Block); if ((_local2 as Wheel)){ }; if ((_local2 as Rod)){ _local3 = (_local2 as Rod); if (((!(startZone.isInside(_local3.point1))) || (!(startZone.isInside(_local3.point2))))){ deleteBlock(_local3); }; }; if (checkCollisions(_local2)){ deleteBlock(_local2); }; }; } override public function getLevelXml():XML{ if (currentLevelXml != null){ return (currentLevelXml); }; return (super.getLevelXml()); } protected function addedBlock(_arg1:Block):void{ } public function addEndTryButton():void{ var _local1:Button; removeChild(menuButton); removeChild(saveButton); _local1 = new Button("Back To Editor"); _local1.x = 600; _local1.y = 340; addChild(_local1); _local1.addEventListener(MouseEvent.MOUSE_DOWN, endTryLevel); } protected function updateMoving(_arg1:Event):void{ var _local5:Block; var _local6:Point; var _local7:JointCollection; if (movingJ){ updateMovingJ(); }; if (!moving){ return; }; var _local2:Number = (arenaCanvas.mouseX - ox); var _local3:Number = (arenaCanvas.mouseY - oy); var _local4:Iterator = movingBlocks.getIterator(); while (_local4.hasNext()) { _local5 = (_local4.next() as Block); _local6 = _local5.getPosition(); _local5.setPosition(new Point((_local6.x + _local2), (_local6.y + _local3))); }; for each (_local7 in movingJoints) { _local6 = _local7.getPosition(); _local7.setPosition(new Point((_local6.x + _local2), (_local6.y + _local3))); }; movingIllegalNotification.x = (movingIllegalNotification.x + _local2); movingIllegalNotification.y = (movingIllegalNotification.y + _local3); if (countCollisions() > movingNumCollisions){ movingIllegal = true; movingIllegalNotification.visible = true; } else { movingIllegal = false; movingIllegalNotification.visible = false; }; ox = arenaCanvas.mouseX; oy = arenaCanvas.mouseY; } protected function resetPhysicsWorld():void{ var _local1:b2AABB = new b2AABB(); _local1.minVertex.Set(-(ARENA_WIDTH), -(ARENA_HEIGHT)); _local1.maxVertex.Set(ARENA_WIDTH, ARENA_HEIGHT); var _local2:b2Vec2 = new b2Vec2(0, 300); var _local3:Boolean; physicsWorld = new b2World(_local1, _local2, _local3); physicsWorld.SetFilter(new NoJointedCollisionsFilter()); } protected function endTryLevel(_arg1:Event):void{ dispatchEvent(new MenuEvent(MenuEvent.MENU_BACK)); } override protected function initAllowableActions():void{ allowableActions = new Actions(); allowableActions.alwaysDrag = true; } override protected function newSaveWindow():SaveWindow{ return (new SaveDesignWindow()); } protected function resetMode():void{ moveMode = false; deleteMode = false; } protected function saveDesign(_arg1:Event):void{ if (_arg1.target == this){ return; }; _arg1.stopPropagation(); var _local2:SaveEvent = new SaveEvent(SaveEvent.SAVE_CONTRAPTION, true, true); _local2.xml = getLevelXml(); _local2.currentLevelId = levelId; _local2.isSolution = isCurrentDesignSolution; dispatchEvent(_local2); } public function handleMouseWheelUpCallback():void{ onMouseWheelUpCallback(); } override protected function keyDown(_arg1:KeyboardEvent):void{ super.keyDown(_arg1); if (!hasFocus()){ return; }; if (_arg1.keyCode == Keyboard.SPACE){ if (running){ stopSimulation(null); } else { startSimulation(null); }; }; if (_arg1.keyCode == Keyboard.SHIFT){ dispatchEvent(new ModeEvent(ModeEvent.MOVE_MODE)); }; if (_arg1.keyCode == Keyboard.CONTROL){ dispatchEvent(new ModeEvent(ModeEvent.DELETE_MODE)); }; if (_arg1.keyCode == 84){ tickCounter.visible = !(tickCounter.visible); }; if (running){ return; }; if (_arg1.keyCode == 82){ hollowRodMode(null); }; if (_arg1.keyCode == 83){ solidRodMode(null); }; if (_arg1.keyCode == 85){ noSpinWheelMode(null); }; if (_arg1.keyCode == 87){ clockwiseWheelMode(null); }; if (_arg1.keyCode == 67){ counterClockwiseWheelMode(null); }; } protected function hasWon():Boolean{ var _local2:Block; var _local3:Point; var _local4:Number; var _local5:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; if (goalBlocks.isEmpty()){ return (false); }; var _local1:Iterator = goalBlocks.getIterator(); var _local6:Number = (endZone.getPosition().x - (endZone.getWidth() / 2)); var _local7:Number = (endZone.getPosition().x + (endZone.getWidth() / 2)); var _local8:Number = (endZone.getPosition().y - (endZone.getHeight() / 2)); var _local9:Number = (endZone.getPosition().y + (endZone.getHeight() / 2)); while (_local1.hasNext()) { _local2 = (_local1.next() as Block); if ((_local2 as Wheel)){ _local10 = (_local2.x - (_local2.getWidth() / 2)); _local11 = (_local2.x + (_local2.getWidth() / 2)); _local12 = (_local2.y - (_local2.getWidth() / 2)); _local13 = (_local2.y + (_local2.getWidth() / 2)); } else { _local10 = (_local2.x - ((_local2.width - 4) / 2)); _local11 = (_local2.x + ((_local2.width - 4) / 2)); _local12 = (_local2.y - ((_local2.height - 4) / 2)); _local13 = (_local2.y + ((_local2.height - 4) / 2)); }; if ((((((((_local10 < _local6)) || ((_local11 > _local7)))) || ((_local12 < _local8)))) || ((_local13 > _local9)))){ return (false); }; }; return (true); } protected function checkCollisions(_arg1:Block):Boolean{ var _local3:Block; var _local4:Block; physicsWorld.CleanBodyList(); physicsWorld.m_contactManager.CleanContactList(); physicsWorld.m_contactManager.Collide(_arg1.getPhysicsBody()); var _local2:b2Contact = physicsWorld.GetContactList(); while (_local2 != null) { _local3 = (_local2.GetShape1().GetBody().GetUserData() as Block); _local4 = (_local2.GetShape2().GetBody().GetUserData() as Block); if ((((((_local2.GetManifoldCount() > 0)) && ((((_local3 == _arg1)) || ((_local4 == _arg1)))))) && (!(_local3.isJointedTo(_local4))))){ return (true); }; _local2 = _local2.m_next; }; return (false); } protected function stopSimulation(_arg1:Event):void{ if (!running){ return; }; running = false; hasFinishedLevel = false; var _local2:Iterator = playerBlocks.getIterator(); while (_local2.hasNext()) { (_local2.next() as Block).stopJoints(physicsWorld); }; _local2 = playerBlocks.getIterator(); while (_local2.hasNext()) { (_local2.next() as Block).resetBlock(physicsWorld); }; _local2 = arenaBlocks.getIterator(); while (_local2.hasNext()) { (_local2.next() as Block).resetBlock(physicsWorld); }; resetPhysicsWorld(); initPlayerBlocks(); initArenaBlocks(); initBuildingBoundries(); var _local3:Sprite = (dashboard.stopButton.parent as Sprite); if (_local3 == null){ _local3 = (dashboard.goButton.parent as Sprite); }; _local3.addChild(dashboard.goButton); _local3.removeChild(dashboard.stopButton); tickCounter.pause(); } public function updateMovingJ():void{ var _local1:Number = (arenaCanvas.mouseX - ox); var _local2:Number = (arenaCanvas.mouseY - oy); movingJoint.moveJoint(new Point(_local1, _local2)); movingIllegalNotification.x = (movingIllegalNotification.x + _local1); movingIllegalNotification.y = (movingIllegalNotification.y + _local2); if (countCollisions() > movingNumCollisions){ movingIllegal = true; movingIllegalNotification.visible = true; } else { movingIllegal = false; movingIllegalNotification.visible = false; }; ox = arenaCanvas.mouseX; oy = arenaCanvas.mouseY; } override public function update(_arg1:Event):void{ var _local2:b2Body; var _local3:b2Joint; var _local4:b2RevoluteJoint; var _local5:b2Vec2; var _local6:SharedObject; if (((running) && (!((physicsWorld == null))))){ tickCounter.increment(); physicsWorld.Step(m_timeStep, m_iterations); _local2 = physicsWorld.m_bodyList; while (_local2) { if ((_local2.m_userData is Block)){ (_local2.m_userData as Block).updateFromPhysicsBody(); }; _local2 = _local2.m_next; }; _local3 = physicsWorld.GetJointList(); while (_local3) { _local4 = (_local3 as b2RevoluteJoint); _local5 = new b2Vec2(_local4.GetAnchor1().x, _local4.GetAnchor1().y); _local5.Subtract(_local4.GetAnchor2()); if ((Math.abs(_local5.x) + Math.abs(_local5.y)) > 50){ physicsWorld.DestroyJoint(_local3); }; _local3 = _local3.m_next; }; if (((!(hasFinishedLevel)) && (hasWon()))){ hasFinishedLevel = true; isCurrentDesignSolution = true; _local6 = SharedObject.getLocal("user"); _local6.data[("level" + levelId)] = "true"; _local6.flush(); doWhirledAwards(); loadNextLevel(); tickCounter.pause(); }; }; super.update(_arg1); } protected function solidRodMode(_arg1:Event=null):void{ resetMode(); buildingBlockType = BlockType.ROD_SOLID; dashboard.hilightButton(dashboard.solidRodButton); dispatchEvent(new ModeEvent(ModeEvent.DEFAULT_MODE)); } protected function enterDeleteMode(_arg1:Event):void{ resetMode(); dashboard.hilightButton(dashboard.deleteButton); deleteMode = true; dispatchEvent(new ModeEvent(ModeEvent.DELETE_MODE)); } override protected function mouseDown(_arg1:MouseEvent):void{ var _local2:Block; var _local3:ModeEvent; if ((((((((visible == false)) || (building))) || (moving))) || (movingJ))){ return; }; if (((running) || (!(startZone.isInside(new Point(arenaCanvas.mouseX, arenaCanvas.mouseY)))))){ if (((running) && (startZone.isInside(new Point(arenaCanvas.mouseX, arenaCanvas.mouseY))))){ dashboard.pingStopButton(); }; beginMoveScreen(mouseX, mouseY); return; }; if (((_arg1.shiftKey) || (moveMode))){ beginMoving(); } else { if (((_arg1.ctrlKey) || (deleteMode))){ _local2 = playerBlocks.getClosestBlock(new Point(arenaCanvas.mouseX, arenaCanvas.mouseY), false); if (((!((_local2 == null))) && (((_local2.getDistance(new Point(arenaCanvas.mouseX, arenaCanvas.mouseY)) * scaleX) < 20)))){ deleteBlock(_local2); currentLevelXml = null; isCurrentDesignSolution = false; }; } else { if (playerBlocks.size < 120){ ox = arenaCanvas.mouseX; oy = arenaCanvas.mouseY; building = true; drawBuilding(null); _local3 = new ModeEvent(ModeEvent.START_ACTION, true); _local3.actionType = ModeEvent.ACTION_BUILD; dispatchEvent(_local3); currentLevelXml = null; isCurrentDesignSolution = false; }; }; }; } protected function updateBlockGraphics(_arg1:Event=null):void{ var _local3:Block; var _local2:Iterator = playerBlocks.getIterator(); while (_local2.hasNext()) { _local3 = (_local2.next() as Block); _local3.reDrawBlock(); }; } protected function countCollisions():int{ var _local1:int; physicsWorld.CleanBodyList(); physicsWorld.m_contactManager.CleanContactList(); physicsWorld.m_contactManager.Collide(); var _local2:b2Contact = physicsWorld.GetContactList(); while (_local2 != null) { _local1 = (_local1 + _local2.GetManifoldCount()); _local2 = _local2.m_next; }; return (_local1); } protected function initPlayerBlocks():void{ var _local2:Block; var _local1:Iterator = playerBlocks.getIterator(); while (_local1.hasNext()) { _local2 = (_local1.next() as Block); _local2.generatePhysicsBody(physicsWorld); _local2.setJointedBlocks(); }; } protected function stopMoving():void{ var _local3:Block; var _local4:Point; var _local5:JointCollection; moving = false; var _local1:Iterator = movingBlocksOriginalPosition.getIterator(); var _local2:Iterator = movingBlocks.getIterator(); while (((_local2.hasNext()) && (_local1.hasNext()))) { _local3 = (_local2.next() as Block); _local4 = (_local1.next() as Point); if (movingIllegal){ _local3.setPosition(_local4); }; _local3.alpha = 1; }; if (movingIllegal){ for each (_local5 in movingJoints) { _local5.setPosition(movingJointsOriginalPosition[_local5]); }; }; movingBlocks = null; movingBlocksOriginalPosition = null; } } }//package contraption
Section 350
//StartZone (contraption.StartZone) package contraption { import flash.events.*; import flash.display.*; import flash.geom.*; public class StartZone extends ActionContainerImpl { protected var zoneWidth:Number; protected var my0:Number; protected var moving:Boolean;// = false protected var editing:Boolean; protected var mx0:Number; protected var resizeCorner:Sprite; protected var resizing:Boolean;// = false protected var zoneHeight:Number; protected static const MIN_ZONE_WIDTH:int = 100; public function StartZone(_arg1:Boolean):void{ setWidth(200); setHeight(200); setPosition(new Point(10, 10)); this.editing = _arg1; if (_arg1){ resizeCorner = newResizeCorner(); addChild(resizeCorner); resizeCorner.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownR); addEventListener(MouseEvent.MOUSE_DOWN, mouseDownM); }; drawZone(); super(); } protected function getColour():int{ return (12377081); } public function setWidth(_arg1:Number):void{ zoneWidth = _arg1; } public function isInside(_arg1:Point):Boolean{ var _local2:Number = (getPosition().x - (getWidth() / 2)); var _local3:Number = (getPosition().x + (getWidth() / 2)); var _local4:Number = (getPosition().y - (getHeight() / 2)); var _local5:Number = (getPosition().y + (getHeight() / 2)); if ((((((((_arg1.x > (_local2 - 4))) && ((_arg1.x < (_local3 + 4))))) && ((_arg1.y > (_local4 - 4))))) && ((_arg1.y < (_local5 + 4))))){ return (true); }; return (false); } protected function mouseDownR(_arg1:MouseEvent):void{ stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveR, false, 0, true); stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpR, false, 0, true); _arg1.stopPropagation(); resizing = true; var _local2:ModeEvent = new ModeEvent(ModeEvent.START_ACTION, true, true); _local2.actionType = ModeEvent.ACTION_BUTTON; dispatchEvent(_local2); } protected function mouseDownM(_arg1:MouseEvent):void{ stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveM, false, 0, true); stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpM, false, 0, true); _arg1.stopPropagation(); mx0 = this.mouseX; my0 = this.mouseY; moving = true; } protected function getBorderColour():int{ return (7829486); } protected function drawZone():void{ graphics.clear(); graphics.lineStyle(4, getBorderColour()); graphics.beginFill(getColour()); graphics.drawRect((-(getWidth()) / 2), (-(getHeight()) / 2), getWidth(), getHeight()); if (resizeCorner != null){ resizeCorner.x = (getWidth() / 2); resizeCorner.y = (getHeight() / 2); }; } override protected function initAllowableActions():void{ allowableActions = new Actions(); allowableActions.alwaysDrag = true; if (!editing){ allowableActions.build = true; allowableActions.drag = true; }; } public function getWidth():Number{ return (zoneWidth); } public function setFromXML(_arg1:XML):void{ setWidth(new Number(_arg1.width)); setHeight(new Number(_arg1.height)); var _local2:Point = new Point(); _local2.x = new Number(_arg1.position.x); _local2.y = new Number(_arg1.position.y); setPosition(_local2); drawZone(); } public function getHeight():Number{ return (zoneHeight); } public function getPosition():Point{ return (new Point(x, y)); } public function getXml():XML{ var _local1:XML = new XML(getXmlRoot()); var _local2:XML = new XML(<position></position> ); _local2.appendChild((("<x>" + getPosition().x) + "</x>")); _local2.appendChild((("<y>" + getPosition().y) + "</y>")); _local1.appendChild(_local2); _local1.appendChild((("<width>" + getWidth()) + "</width>")); _local1.appendChild((("<height>" + getHeight()) + "</height>")); return (_local1); } protected function getXmlRoot():XML{ return (<start/> ); } public function setPosition(_arg1:Point):void{ x = _arg1.x; y = _arg1.y; } protected function mouseUpM(_arg1:MouseEvent):void{ moving = false; } public function setHeight(_arg1:Number):void{ zoneHeight = _arg1; } protected function mouseUpR(_arg1:MouseEvent):void{ resizing = false; } protected function newResizeCorner():Sprite{ var _local1:ActionContainerImpl = new ActionContainerImpl(); var _local2:Actions = new Actions(); _local2.button = true; _local1.setAllowableActions(_local2); _local1.graphics.lineStyle(4, 0xFFFF00); _local1.graphics.beginFill(0xFFFF, 0.5); _local1.graphics.drawRect(-6, -6, 12, 12); return (_local1); } protected function mouseMoveR(_arg1:MouseEvent):void{ if (!resizing){ return; }; var _local2:Number = (mouseX * 2); var _local3:Number = (mouseY * 2); if (_local2 < MIN_ZONE_WIDTH){ _local2 = MIN_ZONE_WIDTH; }; if (_local3 < MIN_ZONE_WIDTH){ _local3 = MIN_ZONE_WIDTH; }; setWidth(_local2); setHeight(_local3); drawZone(); } protected function mouseMoveM(_arg1:MouseEvent):void{ if (!moving){ return; }; setPosition(new Point((parent.mouseX - mx0), (parent.mouseY - my0))); } } }//package contraption
Section 351
//User (contraption.User) package contraption { import flash.events.*; import contraption.menu.*; import flash.net.*; import flash.external.*; public class User extends EventDispatcher { protected var registered:Boolean; protected var userId:int; protected var loggedIn:Boolean; protected var password:String; protected var email:String; protected var userName:String; private static var allowInstantiation:Boolean; private static var instance:User; public function User():void{ if (!allowInstantiation){ throw (new Error("Error: Instantiation failed: Use User.getInstance() instead of new.")); }; registered = false; var _local1:SharedObject = SharedObject.getLocal("user"); if (_local1.data.userId != null){ loggedIn = true; userId = _local1.data.userId; userName = _local1.data.userName; email = _local1.data.email; password = _local1.data.password; registered = _local1.data.registered; } else { loggedIn = false; }; } public function logIn(_arg1:String, _arg2:String):void{ this.userName = _arg1; var _local3:URLLoader = new ContraptionUrlLoader(); _local3.addEventListener(MenuEvent.ADD_SPINNER, bubble); _local3.addEventListener(MenuEvent.REMOVE_SPINNER, bubble); _local3.addEventListener(Event.COMPLETE, logInComplete); var _local4:URLRequest = new URLRequest((Contraption.SERVER_LOCATION + "/logIn_fc.php")); var _local5:URLVariables = new URLVariables(); _local5.userName = _arg1; _local5.password = _arg2; _local4.data = _local5; _local4.method = URLRequestMethod.POST; _local3.load(_local4); } public function resetPassword(_arg1:String, _arg2:String):void{ var _local3:URLLoader = new ContraptionUrlLoader(); _local3.addEventListener(MenuEvent.ADD_SPINNER, bubble); _local3.addEventListener(MenuEvent.REMOVE_SPINNER, bubble); _local3.addEventListener(Event.COMPLETE, resetPasswordComplete); var _local4:URLRequest = new URLRequest((Contraption.SERVER_LOCATION + "/resetPassword.php")); var _local5:URLVariables = new URLVariables(); _local5.userName = _arg1; _local5.email = _arg2; _local4.data = _local5; _local4.method = URLRequestMethod.POST; _local3.load(_local4); } public function newUser(_arg1:String, _arg2:String, _arg3:String):void{ this.userName = _arg1; var _local4:URLLoader = new ContraptionUrlLoader(); _local4.addEventListener(MenuEvent.ADD_SPINNER, bubble); _local4.addEventListener(MenuEvent.REMOVE_SPINNER, bubble); _local4.addEventListener(Event.COMPLETE, logInComplete); var _local5:URLRequest = new URLRequest((Contraption.SERVER_LOCATION + "/newUser.php")); var _local6:URLVariables = new URLVariables(); _local6.userName = _arg1; _local6.email = _arg2; _local6.password = _arg3; _local5.data = _local6; _local5.method = URLRequestMethod.POST; _local4.load(_local5); if (Contraption.VERSION_NAME == "fantasticcontraption.com"){ ExternalInterface.call("pageTracker._trackPageview", "/newUser"); }; } public function getPassword():String{ return (password); } public function isRegistered():Boolean{ return (registered); } public function refreshRegistered():void{ if (!isLoggedIn()){ return; }; var _local1:URLLoader = new ContraptionUrlLoader(); _local1.addEventListener(MenuEvent.ADD_SPINNER, bubble); _local1.addEventListener(MenuEvent.REMOVE_SPINNER, bubble); _local1.addEventListener(Event.COMPLETE, refreshRegisteredComplete); var _local2:URLRequest = new URLRequest((Contraption.SERVER_LOCATION + "/getRegistered.php")); var _local3:URLVariables = new URLVariables(); _local3.userId = userId; _local2.data = _local3; _local2.method = URLRequestMethod.POST; _local1.load(_local2); } public function refreshRegisteredComplete(_arg1:Event):void{ registered = (_arg1.target.data == "1"); var _local2:SharedObject = SharedObject.getLocal("user"); _local2.data.registered = registered; _local2.flush(); if (((registered) && ((Contraption.VERSION_NAME == "fantasticcontraption.com")))){ ExternalInterface.call("setRegistered"); }; } public function updateInfo(_arg1:String, _arg2:String):void{ var _local3:URLLoader = new ContraptionUrlLoader(); _local3.addEventListener(MenuEvent.ADD_SPINNER, bubble); _local3.addEventListener(MenuEvent.REMOVE_SPINNER, bubble); _local3.addEventListener(Event.COMPLETE, updateInfoComplete); var _local4:URLRequest = new URLRequest((Contraption.SERVER_LOCATION + "/updateUserInfo.php")); var _local5:URLVariables = new URLVariables(); _local5.userId = getUserId(); _local5.email = _arg1; _local5.newPassword = _arg2; _local5.originalPassword = getPassword(); _local4.data = _local5; _local4.method = URLRequestMethod.POST; _local3.load(_local4); } public function isLoggedIn():Boolean{ return (loggedIn); } public function logInComplete(_arg1:Event):void{ var _local2:XML; var _local4:MenuEvent; _local2 = new XML(_arg1.target.data); if (_local2.userId.toString() == ""){ _local4 = new MenuEvent(MenuEvent.LOG_IN_FAILED); if (_local2.error.toString() != ""){ _local4.defaultText = _local2.error; }; dispatchEvent(_local4); return; }; userId = _local2.userId; userName = _local2.userName; email = _local2.email; password = _local2.password; registered = (_local2.isRegistered == 1); loggedIn = true; var _local3:SharedObject = SharedObject.getLocal("user"); _local3.data.userId = userId; _local3.data.userName = userName; _local3.data.email = email; _local3.data.password = password; _local3.data.registered = registered; _local3.flush(); dispatchEvent(new MenuEvent(MenuEvent.LOGGED_IN, true, true)); } public function resetPasswordComplete(_arg1:Event):void{ if (_arg1.target.data == "true"){ dispatchEvent(new MenuEvent(MenuEvent.RESET_PASSWORD)); } else { dispatchEvent(new MenuEvent(MenuEvent.RESET_PASSWORD_FAILED)); }; dispatchEvent(new MenuEvent(MenuEvent.MENU_BACK)); } public function bubble(_arg1:Event):void{ dispatchEvent(_arg1); } public function getEmail():String{ return (email); } public function logOut():void{ loggedIn = false; userId = 0; userName = null; email = null; password = null; registered = false; var _local1:SharedObject = SharedObject.getLocal("user"); _local1.data.userId = null; _local1.data.userName = null; _local1.data.email = null; _local1.data.password = null; _local1.data.registered = null; _local1.flush(); } public function getUserName():String{ return (userName); } public function updateInfoComplete(_arg1:Event):void{ var _local2:XML; _local2 = new XML(_arg1.target.data); if (_local2.email.toString() == ""){ throw (new Error(("whoa! badness in the user update server call:" + _arg1.target.data))); }; email = _local2.email; password = _local2.password; var _local3:SharedObject = SharedObject.getLocal("user"); _local3.data.email = email; _local3.data.password = password; _local3.flush(); dispatchEvent(new MenuEvent(MenuEvent.UPDATE_USER_INFO)); } public function getUserId():int{ return (userId); } public static function getInstance():User{ if (instance == null){ allowInstantiation = true; instance = new (User); allowInstantiation = false; }; return (instance); } } }//package contraption
Section 352
//Stream_14 (contraption_objects_fla.Stream_14) package contraption_objects_fla { import flash.display.*; public dynamic class Stream_14 extends MovieClip { public var dropBouncing:MovieClip; } }//package contraption_objects_fla
Section 353
//StreamBG_9 (contraption_objects_fla.StreamBG_9) package contraption_objects_fla { import flash.display.*; public dynamic class StreamBG_9 extends MovieClip { public var dropBouncing:MovieClip; } }//package contraption_objects_fla
Section 354
//Buttons_3 (Dashboard_fla.Buttons_3) package Dashboard_fla { import flash.display.*; import flash.text.*; public dynamic class Buttons_3 extends MovieClip { public var tooltip:TextField; public var saveButton:SaveButton; public var zoomButtons:MovieClip; public var levelButtons:MovieClip; public var contraptionButtons:MovieClip; public var backTestButton:BackTestButton; public var backButton:BackButton; public function Buttons_3(){ addFrameScript(0, frame1); } function frame1(){ } } }//package Dashboard_fla
Section 355
//ContraptionButtons_9 (Dashboard_fla.ContraptionButtons_9) package Dashboard_fla { import flash.display.*; public dynamic class ContraptionButtons_9 extends MovieClip { public var goStopButtons:MovieClip; public var moveButton:MoveButton; public var npWheelButton:NonPoweredWheelButton; public var cwWheelButton:ClockwiseWheelButton; public var solidRodButton:SolidRodButton; public var hollowRodButton:HollowRodButton; public var deleteButton:DeleteButton; public var ccwWheelButton:CounterClockwiseWheelButton; } }//package Dashboard_fla
Section 356
//GoStopButtons_35 (Dashboard_fla.GoStopButtons_35) package Dashboard_fla { import flash.events.*; import flash.display.*; public dynamic class GoStopButtons_35 extends MovieClip { public var stopButtonPing:StopButtonPing; public var goButton:GoButton; public var stopButton:StopButton; public function GoStopButtons_35(){ addFrameScript(0, frame1); } function frame1(){ goButton.addEventListener(MouseEvent.MOUSE_DOWN, buttonPressed); stopButton.addEventListener(MouseEvent.MOUSE_DOWN, buttonPressed); } public function buttonPressed(_arg1:MouseEvent):void{ } } }//package Dashboard_fla
Section 357
//LevelButtons_41 (Dashboard_fla.LevelButtons_41) package Dashboard_fla { import flash.display.*; public dynamic class LevelButtons_41 extends MovieClip { public var dynamicCircleButton:DynamicCircleButton; public var testLevelButton:TestLevelButton; public var staticSquareButton:StaticSquareButton; public var goalSquareButton:GoalSquareButton; public var dynamicSquareButton:DynamicSquareButton; public var staticCircleButton:StaticCircleButton; public var goalCircleButton:GoalCircleButton; } }//package Dashboard_fla
Section 358
//Stream_22 (Dashboard_fla.Stream_22) package Dashboard_fla { import flash.display.*; public dynamic class Stream_22 extends MovieClip { public var dropBouncing:MovieClip; } }//package Dashboard_fla
Section 359
//ZoomButtons_5 (Dashboard_fla.ZoomButtons_5) package Dashboard_fla { import flash.display.*; public dynamic class ZoomButtons_5 extends MovieClip { public var zoomOutButton:ZoomOutButton; public var zoomInButton:ZoomInButton; } }//package Dashboard_fla
Section 360
//compareStringCaseInSensitive (de.polygonal.ds.sort.compare.compareStringCaseInSensitive) package de.polygonal.ds.sort.compare { public function compareStringCaseInSensitive(_arg1:String, _arg2:String):int{ var _local3:int; var _local4:int; var _local5:int; _arg1 = _arg1.toLowerCase(); _arg2 = _arg2.toLowerCase(); if ((_arg1.length + _arg2.length) > 2){ _local3 = 0; _local4 = ((_arg1.length > _arg2.length)) ? _arg1.length : _arg2.length; _local5 = 0; while (_local5 < _local4) { _local3 = (_arg1.charCodeAt(_local5) - _arg2.charCodeAt(_local5)); if (_local3 != 0){ break; }; _local5++; }; return (_local3); //unresolved jump }; return ((_arg1.charCodeAt(0) - _arg2.charCodeAt(0))); } }//package de.polygonal.ds.sort.compare
Section 361
//compareStringCaseInSensitiveDesc (de.polygonal.ds.sort.compare.compareStringCaseInSensitiveDesc) package de.polygonal.ds.sort.compare { public function compareStringCaseInSensitiveDesc(_arg1:String, _arg2:String):int{ var _local3:int; var _local4:int; var _local5:int; _arg1 = _arg1.toLowerCase(); _arg2 = _arg2.toLowerCase(); if ((_arg1.length + _arg2.length) > 2){ _local3 = 0; _local4 = ((_arg1.length > _arg2.length)) ? _arg1.length : _arg2.length; _local5 = 0; while (_local5 < _local4) { _local3 = (_arg2.charCodeAt(_local5) - _arg1.charCodeAt(_local5)); if (_local3 != 0){ break; }; _local5++; }; return (_local3); //unresolved jump }; return ((_arg2.charCodeAt(0) - _arg1.charCodeAt(0))); } }//package de.polygonal.ds.sort.compare
Section 362
//compareStringCaseSensitive (de.polygonal.ds.sort.compare.compareStringCaseSensitive) package de.polygonal.ds.sort.compare { public function compareStringCaseSensitive(_arg1:String, _arg2:String):int{ var _local3:int; var _local4:int; var _local5:int; if ((_arg1.length + _arg2.length) > 2){ _local3 = 0; _local4 = ((_arg1.length > _arg2.length)) ? _arg1.length : _arg2.length; _local5 = 0; while (_local5 < _local4) { _local3 = (_arg1.charCodeAt(_local5) - _arg2.charCodeAt(_local5)); if (_local3 != 0){ break; }; _local5++; }; return (_local3); //unresolved jump }; return ((_arg1.charCodeAt(0) - _arg2.charCodeAt(0))); } }//package de.polygonal.ds.sort.compare
Section 363
//compareStringCaseSensitiveDesc (de.polygonal.ds.sort.compare.compareStringCaseSensitiveDesc) package de.polygonal.ds.sort.compare { public function compareStringCaseSensitiveDesc(_arg1:String, _arg2:String):int{ var _local3:int; var _local4:int; var _local5:int; if ((_arg1.length + _arg2.length) > 2){ _local3 = 0; _local4 = ((_arg1.length > _arg2.length)) ? _arg1.length : _arg2.length; _local5 = 0; while (_local5 < _local4) { _local3 = (_arg2.charCodeAt(_local5) - _arg1.charCodeAt(_local5)); if (_local3 != 0){ break; }; _local5++; }; return (_local3); //unresolved jump }; return ((_arg2.charCodeAt(0) - _arg1.charCodeAt(0))); } }//package de.polygonal.ds.sort.compare
Section 364
//sLinkedInsertionSort (de.polygonal.ds.sort.sLinkedInsertionSort) package de.polygonal.ds.sort { import de.polygonal.ds.*; public function sLinkedInsertionSort(_arg1:SListNode, _arg2:Boolean=false):SListNode{ var _local7:int; var _local8:Number; var _local3:Array = []; var _local4:int; var _local5:SListNode = _arg1; var _local6:SListNode = _arg1; while (_local6) { var _temp1 = _local4; _local4 = (_local4 + 1); var _local10 = _temp1; _local3[_local10] = _local6.data; _local6 = _local6.next; }; if (_local4 <= 1){ return (_local5); }; var _local9 = 1; while (_local9 < _local4) { _local8 = _local3[_local9]; _local7 = _local9; while ((((_local7 > 0)) && ((_local3[int((_local7 - 1))] > _local8)))) { _local3[_local7] = _local3[int((_local7 - 1))]; _local7--; }; _local3[_local7] = _local8; _local9++; }; _local6 = _local5; _local9 = 0; while (_local6) { var _temp2 = _local9; _local9 = (_local9 + 1); _local6.data = _local3[_temp2]; _local6 = _local6.next; }; return (_local5); } }//package de.polygonal.ds.sort
Section 365
//sLinkedInsertionSortCmp (de.polygonal.ds.sort.sLinkedInsertionSortCmp) package de.polygonal.ds.sort { import de.polygonal.ds.*; public function sLinkedInsertionSortCmp(_arg1:SListNode, _arg2:Function, _arg3:Boolean=false):SListNode{ var _local8:int; var _local9:int; var _local10:*; var _local4:Array = []; var _local5:int; var _local6:SListNode = _arg1; var _local7:SListNode = _arg1; while (_local7) { var _temp1 = _local5; _local5 = (_local5 + 1); var _local11 = _temp1; _local4[_local11] = _local7.data; _local7 = _local7.next; }; if (_arg3){ if (_local5 <= 1){ return (_local6); }; _local9 = 1; while (_local9 < _local5) { _local10 = _local4[_local9]; _local8 = _local9; while ((((_local8 > 0)) && ((_arg2(_local4[int((_local8 - 1))], _local10) < 0)))) { _local4[_local8] = _local4[int((_local8 - 1))]; _local8--; }; _local4[_local8] = _local10; _local9++; }; } else { if (_local5 <= 1){ return (_local6); }; _local9 = 1; while (_local9 < _local5) { _local10 = _local4[_local9]; _local8 = _local9; while ((((_local8 > 0)) && ((_arg2(_local4[int((_local8 - 1))], _local10) > 0)))) { _local4[_local8] = _local4[int((_local8 - 1))]; _local8--; }; _local4[_local8] = _local10; _local9++; }; }; _local7 = _local6; _local9 = 0; while (_local7) { var _temp2 = _local9; _local9 = (_local9 + 1); _local7.data = _local4[_temp2]; _local7 = _local7.next; }; return (_local6); } }//package de.polygonal.ds.sort
Section 366
//sLinkedMergeSort (de.polygonal.ds.sort.sLinkedMergeSort) package de.polygonal.ds.sort { import de.polygonal.ds.*; public function sLinkedMergeSort(_arg1:SListNode, _arg2:Boolean=false):SListNode{ var _local4:SListNode; var _local5:SListNode; var _local6:SListNode; var _local7:SListNode; var _local9:int; var _local10:int; var _local11:int; var _local12:int; if (!_arg1){ return (null); }; var _local3:SListNode = _arg1; var _local8 = 1; if (_arg2){ while (true) { _local4 = _local3; _local7 = null; _local3 = _local7; _local9 = 0; while (_local4) { _local9++; _local12 = 0; _local10 = 0; _local5 = _local4; while (_local12 < _local8) { _local10++; _local5 = _local5.next; if (!_local5){ break; }; _local12++; }; _local11 = _local8; while ((((_local10 > 0)) || ((((_local11 > 0)) && (_local5))))) { if (_local10 == 0){ _local6 = _local5; _local5 = _local5.next; _local11--; } else { if ((((_local11 == 0)) || (!(_local5)))){ _local6 = _local4; _local4 = _local4.next; _local10--; } else { if ((_local4.data - _local5.data) >= 0){ _local6 = _local4; _local4 = _local4.next; _local10--; } else { _local6 = _local5; _local5 = _local5.next; _local11--; }; }; }; if (_local7){ _local7.next = _local6; } else { _local3 = _local6; }; _local7 = _local6; }; _local4 = _local5; }; _local7.next = null; if (_local9 <= 1){ return (_local3); }; _local8 = (_local8 << 1); }; } else { while (true) { _local4 = _local3; _local7 = null; _local3 = _local7; _local9 = 0; while (_local4) { _local9++; _local12 = 0; _local10 = 0; _local5 = _local4; while (_local12 < _local8) { _local10++; _local5 = _local5.next; if (!_local5){ break; }; _local12++; }; _local11 = _local8; while ((((_local10 > 0)) || ((((_local11 > 0)) && (_local5))))) { if (_local10 == 0){ _local6 = _local5; _local5 = _local5.next; _local11--; } else { if ((((_local11 == 0)) || (!(_local5)))){ _local6 = _local4; _local4 = _local4.next; _local10--; } else { if ((_local4.data - _local5.data) <= 0){ _local6 = _local4; _local4 = _local4.next; _local10--; } else { _local6 = _local5; _local5 = _local5.next; _local11--; }; }; }; if (_local7){ _local7.next = _local6; } else { _local3 = _local6; }; _local7 = _local6; }; _local4 = _local5; }; _local7.next = null; if (_local9 <= 1){ return (_local3); }; _local8 = (_local8 << 1); }; }; return (null); } }//package de.polygonal.ds.sort
Section 367
//sLinkedMergeSortCmp (de.polygonal.ds.sort.sLinkedMergeSortCmp) package de.polygonal.ds.sort { import de.polygonal.ds.*; public function sLinkedMergeSortCmp(_arg1:SListNode, _arg2:Function, _arg3:Boolean=false):SListNode{ var _local5:SListNode; var _local6:SListNode; var _local7:SListNode; var _local8:SListNode; var _local10:int; var _local11:int; var _local12:int; var _local13:int; if (((!(_arg1)) || ((_arg2 == null)))){ return (null); }; var _local4:SListNode = _arg1; var _local9 = 1; if (_arg3){ while (true) { _local5 = _local4; _local8 = null; _local4 = _local8; _local10 = 0; while (_local5) { _local10++; _local13 = 0; _local11 = 0; _local6 = _local5; while (_local13 < _local9) { _local11++; _local6 = _local6.next; if (!_local6){ break; }; _local13++; }; _local12 = _local9; while ((((_local11 > 0)) || ((((_local12 > 0)) && (_local6))))) { if (_local11 == 0){ _local7 = _local6; _local6 = _local6.next; _local12--; } else { if ((((_local12 == 0)) || (!(_local6)))){ _local7 = _local5; _local5 = _local5.next; _local11--; } else { if (_arg2(_local5.data, _local6.data) >= 0){ _local7 = _local5; _local5 = _local5.next; _local11--; } else { _local7 = _local6; _local6 = _local6.next; _local12--; }; }; }; if (_local8){ _local8.next = _local7; } else { _local4 = _local7; }; _local8 = _local7; }; _local5 = _local6; }; _local8.next = null; if (_local10 <= 1){ return (_local4); }; _local9 = (_local9 << 1); }; } else { while (true) { _local5 = _local4; _local8 = null; _local4 = _local8; _local10 = 0; while (_local5) { _local10++; _local13 = 0; _local11 = 0; _local6 = _local5; while (_local13 < _local9) { _local11++; _local6 = _local6.next; if (!_local6){ break; }; _local13++; }; _local12 = _local9; while ((((_local11 > 0)) || ((((_local12 > 0)) && (_local6))))) { if (_local11 == 0){ _local7 = _local6; _local6 = _local6.next; _local12--; } else { if ((((_local12 == 0)) || (!(_local6)))){ _local7 = _local5; _local5 = _local5.next; _local11--; } else { if (_arg2(_local5.data, _local6.data) <= 0){ _local7 = _local5; _local5 = _local5.next; _local11--; } else { _local7 = _local6; _local6 = _local6.next; _local12--; }; }; }; if (_local8){ _local8.next = _local7; } else { _local4 = _local7; }; _local8 = _local7; }; _local5 = _local6; }; _local8.next = null; if (_local10 <= 1){ return (_local4); }; _local9 = (_local9 << 1); }; }; return (null); } }//package de.polygonal.ds.sort
Section 368
//Collection (de.polygonal.ds.Collection) package de.polygonal.ds { public interface Collection { function get size():int; function isEmpty():Boolean; function getIterator():Iterator; function clear():void; function toArray():Array; function contains(_arg1):Boolean; } }//package de.polygonal.ds
Section 369
//Iterator (de.polygonal.ds.Iterator) package de.polygonal.ds { public interface Iterator { function start():void; function set data(_arg1):void; function get data(); function next(); function hasNext():Boolean; } }//package de.polygonal.ds
Section 370
//LinkedListNode (de.polygonal.ds.LinkedListNode) package de.polygonal.ds { public interface LinkedListNode { } }//package de.polygonal.ds
Section 371
//SLinkedList (de.polygonal.ds.SLinkedList) package de.polygonal.ds { import de.polygonal.ds.sort.*; import de.polygonal.ds.sort.compare.*; public class SLinkedList implements Collection { private var _count:int; public var tail:SListNode; public var head:SListNode; public static const MERGE_SORT:int = (1 << 2); public static const DESCENDING:int = (1 << 4); public static const NUMERIC:int = (1 << 3); public static const INSERTION_SORT:int = (1 << 1); public function SLinkedList(... _args){ head = (tail = null); _count = 0; if (_args.length > 0){ append.apply(this, _args); }; } public function get size():int{ return (_count); } public function isEmpty():Boolean{ return ((_count == 0)); } public function remove(_arg1:SListIterator):Boolean{ if (((!((_arg1.list == this))) || (!(_arg1.node)))){ return (false); }; var _local2:SListNode = head; if (_arg1.node == head){ _arg1.forth(); removeHead(); return (true); }; while (_local2.next != _arg1.node) { _local2 = _local2.next; }; _arg1.forth(); if (_local2.next == tail){ tail = _local2; }; _local2.next = _arg1.node; _count--; return (true); } public function removeHead(){ var _local1:*; var _local2:SListNode; if (head){ _local1 = head.data; if (head == tail){ head = (tail = null); } else { _local2 = head; head = head.next; _local2.next = null; if (head == null){ tail = null; }; }; _count--; return (_local1); }; return (null); } public function clear():void{ var _local2:SListNode; var _local1:SListNode = head; head = null; while (_local1) { _local2 = _local1.next; _local1.next = null; _local1 = _local2; }; _count = 0; } public function prepend(... _args):SListNode{ var _local4:SListNode; var _local5:int; var _local2:int = _args.length; var _local3:SListNode = new SListNode(_args[int((_local2 - 1))]); if (head){ _local3.next = head; head = _local3; } else { head = (tail = _local3); }; if (_local2 > 1){ _local4 = _local3; _local5 = (_local2 - 2); while (_local5 >= 0) { _local3 = new SListNode(_args[_local5]); _local3.next = head; head = _local3; _local5--; }; _count = (_count + _local2); return (_local4); }; _count++; return (_local3); } public function popDown():void{ var _local2:SListNode; var _local1:SListNode = tail; if (head.next == tail){ tail = head; head = _local1; tail.next = null; head.next = tail; } else { _local2 = head; while (_local2.next != tail) { _local2 = _local2.next; }; tail = _local2; tail.next = null; _local1.next = head; head = _local1; }; } public function concat(... _args):SLinkedList{ var _local3:SLinkedList; var _local4:SListNode; var _local2:SLinkedList = new SLinkedList(); _local4 = head; while (_local4) { _local2.append(_local4.data); _local4 = _local4.next; }; var _local5:int = _args.length; var _local6:int; while (_local6 < _local5) { _local3 = _args[_local6]; _local4 = _local3.head; while (_local4) { _local2.append(_local4.data); _local4 = _local4.next; }; _local6++; }; return (_local2); } public function append(... _args):SListNode{ var _local4:SListNode; var _local5:int; var _local2:int = _args.length; var _local3:SListNode = new SListNode(_args[0]); if (head){ tail.next = _local3; tail = _local3; } else { head = (tail = _local3); }; if (_local2 > 1){ _local4 = _local3; _local5 = 1; while (_local5 < _local2) { _local3 = new SListNode(_args[_local5]); tail.next = _local3; tail = _local3; _local5++; }; _count = (_count + _local2); return (_local4); }; _count++; return (_local3); } public function sort(... _args):void{ var _local2:int; var _local3:Function; var _local4:*; if (_count <= 1){ return; }; if (_args.length > 0){ _local2 = 0; _local3 = null; _local4 = _args[0]; if ((_local4 is Function)){ _local3 = _local4; if (_args.length > 1){ _local4 = _args[1]; if ((_local4 is int)){ _local2 = _local4; }; }; } else { if ((_local4 is int)){ _local2 = _local4; }; }; if (Boolean(_local3)){ if ((_local2 & 2)){ head = sLinkedInsertionSortCmp(head, _local3, (_local2 == 18)); } else { head = sLinkedMergeSortCmp(head, _local3, (_local2 == 16)); }; } else { if ((_local2 & 2)){ if ((_local2 & 4)){ if (_local2 == 22){ head = sLinkedInsertionSortCmp(head, compareStringCaseSensitiveDesc); } else { if (_local2 == 14){ head = sLinkedInsertionSortCmp(head, compareStringCaseInSensitive); } else { if (_local2 == 30){ head = sLinkedInsertionSortCmp(head, compareStringCaseInSensitiveDesc); } else { head = sLinkedInsertionSortCmp(head, compareStringCaseSensitive); }; }; }; } else { head = sLinkedInsertionSort(head, (_local2 == 18)); }; } else { if ((_local2 & 4)){ if (_local2 == 20){ head = sLinkedMergeSortCmp(head, compareStringCaseSensitiveDesc); } else { if (_local2 == 12){ head = sLinkedMergeSortCmp(head, compareStringCaseInSensitive); } else { if (_local2 == 28){ head = sLinkedMergeSortCmp(head, compareStringCaseInSensitiveDesc); } else { head = sLinkedMergeSortCmp(head, compareStringCaseSensitive); }; }; }; } else { if ((_local2 & 16)){ head = sLinkedMergeSort(head, true); }; }; }; }; } else { head = sLinkedMergeSort(head); }; } public function reverse():void{ if (_count == 0){ return; }; var _local1:Array = new Array(_count); var _local2:int; var _local3:SListNode = head; while (_local3) { var _temp1 = _local2; _local2 = (_local2 + 1); var _local4 = _temp1; _local1[_local4] = _local3; _local3 = _local3.next; }; _local1.reverse(); _local3 = (head = _local1[0]); _local2 = 1; while (_local2 < _count) { _local3 = (_local3.next = _local1[_local2]); _local2++; }; _local3.next = null; tail = _local3; _local1 = null; } public function insertAfter(_arg1:SListIterator, _arg2):SListNode{ var _local3:SListNode; if (_arg1.list != this){ return (null); }; if (_arg1.node){ _local3 = new SListNode(_arg2); _arg1.node.insertAfter(_local3); if (_arg1.node == tail){ tail = _arg1.node.next; }; _count++; return (_local3); //unresolved jump }; return (append(_arg2)); } public function getIterator():Iterator{ return (new SListIterator(this, head)); } public function toArray():Array{ var _local1:Array = []; var _local2:SListNode = head; while (_local2) { _local1.push(_local2.data); _local2 = _local2.next; }; return (_local1); } public function contains(_arg1):Boolean{ var _local2:SListNode = head; while (_local2) { if (_local2.data == _arg1){ return (true); }; _local2 = _local2.next; }; return (false); } public function getListIterator():SListIterator{ return (new SListIterator(this, head)); } public function join(_arg1):String{ if (_count == 0){ return (""); }; var _local2 = ""; var _local3:SListNode = head; while (_local3.next) { _local2 = (_local2 + (_local3.data + _arg1)); _local3 = _local3.next; }; _local2 = (_local2 + _local3.data); return (_local2); } public function toString():String{ return ((("[SlinkedList, size=" + size) + "]")); } public function removeTail(){ var _local1:*; var _local2:SListNode; if (tail){ _local1 = tail.data; if (head == tail){ head = (tail = null); } else { _local2 = head; while (_local2.next != tail) { _local2 = _local2.next; }; tail = _local2; _local2.next = null; }; _count--; return (_local1); }; return (null); } public function merge(... _args):void{ var _local2:SLinkedList; _local2 = _args[0]; if (head){ tail.next = _local2.head; tail = _local2.tail; } else { head = _local2.head; tail = _local2.tail; }; var _local3:int = _args.length; var _local4 = 1; while (_local4 < _local3) { _local2 = _args[_local4]; tail.next = _local2.head; tail = _local2.tail; _count = (_count + _local2.size); _local4++; }; } public function nodeOf(_arg1, _arg2:SListIterator=null):SListIterator{ if (_arg2 != null){ if (_arg2.list != null){ return (null); }; }; var _local3:SListNode = ((_arg2)==null) ? head : _arg2.node; while (_local3) { if (_local3.data === _arg1){ return (new SListIterator(this, _local3)); }; _local3 = _local3.next; }; return (null); } public function dump():String{ if (!head){ return ("SLinkedList: (empty)"); }; var _local1 = (((("SLinkedList: has " + _count) + " node") + ((_count == 1)) ? "" : "s") + "\n|< Head\n"); var _local2:SListIterator = getListIterator(); while (_local2.valid()) { _local1 = (_local1 + (("\t" + _local2.data) + "\n")); _local2.forth(); }; _local1 = (_local1 + "Tail >|"); return (_local1); } public function splice(_arg1:SListIterator, _arg2:uint=4294967295, ... _args):SLinkedList{ var _local4:SListNode; var _local5:SListNode; var _local6:SLinkedList; var _local7:int; var _local8:int; var _local9:SListNode; if (_arg1){ if (_arg1.list != this){ return (null); }; }; if (_arg1.node){ _local4 = _arg1.node; _local5 = head; while (_local5.next != _local4) { _local5 = _local5.next; }; _local6 = new SLinkedList(); if (_arg2 == 4294967295){ if (_arg1.node == tail){ return (_local6); }; while (_arg1.node) { _local6.append(_arg1.node.data); _arg1.remove(); }; _arg1.list = _local6; _arg1.node = _local4; return (_local6); } else { _local7 = 0; while (_local7 < _arg2) { if (_arg1.node){ _local6.append(_arg1.node.data); _arg1.remove(); } else { break; }; _local7++; }; }; _local8 = _args.length; if (_local8 > 0){ if (_count == 0){ _local7 = 0; while (_local7 < _local8) { append(_args[_local7]); _local7++; }; } else { if (_local5 == null){ _local9 = prepend(_args[0]); _local7 = 1; while (_local7 < _local8) { _local9.insertAfter(new SListNode(_args[_local7])); if (_local9 == tail){ tail = _local9.next; }; _local9 = _local9.next; _count++; _local7++; }; } else { _local9 = _local5; _local7 = 0; while (_local7 < _local8) { _local9.insertAfter(new SListNode(_args[_local7])); if (_local9 == tail){ tail = _local9.next; }; _local9 = _local9.next; _count++; _local7++; }; }; }; _arg1.node = _local9; } else { _arg1.node = _local4; }; _arg1.list = _local6; return (_local6); }; return (null); } public function shiftUp():void{ var _local1:SListNode = head; if (head.next == tail){ head = tail; tail = _local1; tail.next = null; head.next = tail; } else { head = head.next; tail.next = _local1; _local1.next = null; tail = _local1; }; } } }//package de.polygonal.ds
Section 372
//SListIterator (de.polygonal.ds.SListIterator) package de.polygonal.ds { public class SListIterator implements Iterator { public var node:SListNode; public var list:SLinkedList; public function SListIterator(_arg1:SLinkedList=null, _arg2:SListNode=null){ this.list = _arg1; this.node = _arg2; } public function remove():Boolean{ return (list.remove(this)); } public function start():void{ if (list){ node = list.head; }; } public function get data(){ if (node){ return (node.data); }; return (null); } public function forth():void{ if (node){ node = node.next; }; } public function toString():String{ return ((("{SListIterator: data=" + node.data) + "}")); } public function hasNext():Boolean{ return (Boolean(node)); } public function valid():Boolean{ return (Boolean(node)); } public function next(){ var _local1:*; if (hasNext()){ _local1 = node.data; node = node.next; return (_local1); }; return (null); } public function set data(_arg1):void{ node.data = _arg1; } public function end():void{ if (list){ node = list.tail; }; } } }//package de.polygonal.ds
Section 373
//SListNode (de.polygonal.ds.SListNode) package de.polygonal.ds { public class SListNode implements LinkedListNode { public var next:SListNode; public var data; public function SListNode(_arg1){ data = _arg1; next = null; } public function insertAfter(_arg1:SListNode):void{ _arg1.next = next; next = _arg1; } public function toString():String{ return ((("[SListNode, data=" + data) + "]")); } } }//package de.polygonal.ds
Section 374
//FacebookConnectObject (FacebookConnect.FacebookConnectObject) package FacebookConnect { import flash.display.*; import com.facebook.events.*; import com.facebook.session.*; import com.facebook.*; import com.facebook.utils.*; import flash.external.*; public class FacebookConnectObject extends FacebookConnectUtil { private var fldApiKey:String; private var fldFacebook:Facebook; public var name:String; private var fldJsSession:JSSession; public var uid:String; private var fldLoaderInfo:LoaderInfo; public function FacebookConnectObject(_arg1:Facebook, _arg2:String, _arg3:LoaderInfo){ super(_arg3); this.fldFacebook = _arg1; this.fldApiKey = _arg2; this.fldLoaderInfo = _arg3; this.initialize(); } private function onNameCallBack(_arg1:String):void{ name = _arg1; } public function login():void{ ExternalInterface.call("login"); } private function initSession():void{ this.fldJsSession = new JSSession(this.fldApiKey, this.fldLoaderInfo.parameters.as_swf_name); this.fldJsSession.addEventListener(FacebookEvent.CONNECT, onConnectHandler); this.fldFacebook.startSession(this.fldJsSession); this.fldJsSession.verifySession(); } private function onConnectHandler(_arg1:FacebookEvent):void{ this.dispatchEvent(_arg1); } private function onLogInCallBack(_arg1:String):void{ uid = _arg1; this.initSession(); } private function initCallBacks():void{ ExternalInterface.addCallback("onLogIn", this.onLogInCallBack); } private function initialize():void{ this.initCallBacks(); } } }//package FacebookConnect
Section 375
//MochiAd (mochi.as3.MochiAd) package mochi.as3 { import flash.events.*; import flash.display.*; import flash.net.*; import flash.utils.*; import flash.system.*; public class MochiAd { public static function getVersion():String{ return ("3.0 as3"); } public static function showClickAwayAd(_arg1:Object):void{ var clip:Object; var mc:MovieClip; var chk:MovieClip; var options = _arg1; var DEFAULTS:Object = {ad_timeout:2000, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{ }, ad_finished:function ():void{ }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software"); }, ad_skipped:function ():void{ }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; var ad_timeout:Number = options.ad_timeout; delete options.ad_timeout; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ MochiAd._cleanup(mc); options.ad_finished(); }; var wh:Array = MochiAd._getRes(options, clip); var w:Number = wh[0]; var h:Number = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; mc.unloadAd = function ():void{ MochiAd.unload(clip); }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.rpc = function (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; var sendHostProgress:Boolean; mc.regContLC = function (_arg1:String):void{ mc._containerLCName = _arg1; }; chk["onEnterFrame"] = function ():void{ var _local4:Number; if (!this.parent){ delete this.onEnterFrame; return; }; var _local1:Object = this.parent._mochiad_ctr; var _local2:Number = (getTimer() - this.started); var _local3:Boolean; if (!chk.showing){ _local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local4 > 0){ chk.showing = true; _local3 = true; chk.started = getTimer(); } else { if (_local2 > chk.ad_timeout){ options.ad_failed(); _local3 = true; }; }; }; if (this.root == null){ _local3 = true; }; if (_local3){ delete this.onEnterFrame; }; }; doOnEnterFrame(chk); } public static function _isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function _allowDomains(_arg1:String):String{ var _local2:String = _arg1.split("/")[2].split(":")[0]; if (Security.sandboxType == "application"){ return (_local2); }; Security.allowDomain("*"); Security.allowDomain(_local2); Security.allowInsecureDomain("*"); Security.allowInsecureDomain(_local2); return (_local2); } public static function unload(_arg1:Object):Boolean{ if (((_arg1.clip) && (_arg1.clip._mochiad))){ _arg1 = _arg1.clip; }; if (_arg1.origFrameRate != undefined){ _arg1.stage.frameRate = _arg1.origFrameRate; }; if (!_arg1._mochiad){ return (false); }; if (_arg1._mochiad._containerLCName != undefined){ _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"}); }; if (_arg1._mochiad.onUnload){ _arg1._mochiad.onUnload(); }; delete _arg1._mochiad_loaded; delete _arg1._mochiad; return (true); } public static function showInterLevelAd(_arg1:Object):void{ var clip:Object; var mc:MovieClip; var chk:MovieClip; var options = _arg1; var DEFAULTS:Object = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{ if ((this.clip is MovieClip)){ this.clip.stop(); } else { throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_finished:function ():void{ if ((this.clip is MovieClip)){ this.clip.play(); } else { throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software"); }, ad_skipped:function ():void{ }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; var ad_msec:Number = 11000; var ad_timeout:Number = options.ad_timeout; delete options.ad_timeout; var fadeout_time:Number = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ MochiAd._cleanup(mc); options.ad_finished(); }; var wh:Array = MochiAd._getRes(options, clip); var w:Number = wh[0]; var h:Number = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ if (!this.parent){ delete this.onEnterFrame; delete this.fadeFunction; return; }; var _local1:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; mc.unloadAd = function ():void{ MochiAd.unload(clip); }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object = mc._mochiad_wait; _local2.server_control = true; _local2.showing = true; _local2.started = getTimer(); _local2.ad_msec = (_arg1 - 250); }; mc.rpc = function (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; chk["onEnterFrame"] = function ():void{ var _local4:Number; if (!this.parent){ delete this.onEnterFrame; delete this.fadeFunction; return; }; var _local1:Object = this.parent._mochiad_ctr; var _local2:Number = (getTimer() - this.started); var _local3:Boolean; if (!chk.showing){ _local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local4 > 0){ chk.showing = true; chk.started = getTimer(); MochiAd.adShowing(clip); } else { if (_local2 > chk.ad_timeout){ options.ad_failed(); _local3 = true; }; }; }; if (_local2 > chk.ad_msec){ _local3 = true; }; if (_local3){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = this.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function _parseOptions(_arg1:Object, _arg2:Object):Object{ var _local4:String; var _local5:Array; var _local6:Number; var _local7:Array; var _local3:Object = {}; for (_local4 in _arg2) { _local3[_local4] = _arg2[_local4]; }; if (_arg1){ for (_local4 in _arg1) { _local3[_local4] = _arg1[_local4]; }; }; if (_local3.clip == undefined){ throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite.")); }; _arg1 = _local3.clip.loaderInfo.parameters.mochiad_options; if (_arg1){ _local5 = _arg1.split("&"); _local6 = 0; while (_local6 < _local5.length) { _local7 = _local5[_local6].split("="); _local3[unescape(_local7[0])] = unescape(_local7[1]); _local6++; }; }; if (_local3.id == "test"){ trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!"); }; return (_local3); } public static function _cleanup(_arg1:Object):void{ var k:String; var lc:LocalConnection; var f:Function; var mc = _arg1; if (("lc" in mc)){ lc = mc.lc; f = function ():void{ try { lc.client = null; lc.close(); } catch(e:Error) { }; }; setTimeout(f, 0); }; var idx:Number = DisplayObjectContainer(mc).numChildren; while (idx > 0) { idx = (idx - 1); DisplayObjectContainer(mc).removeChildAt(idx); }; for (k in mc) { delete mc[k]; }; } public static function load(_arg1:Object):MovieClip{ var clip:Object; var k:String; var server:String; var hostname:String; var lc:LocalConnection; var name:String; var loader:Loader; var g:Function; var req:URLRequest; var v:Object; var options = _arg1; var DEFAULTS:Object = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"}; options = MochiAd._parseOptions(options, DEFAULTS); options.swfv = 9; options.mav = MochiAd.getVersion(); clip = options.clip; if (!MochiAd._isNetworkAvailable()){ return (null); }; try { if (clip._mochiad_loaded){ return (null); }; } catch(e:Error) { throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic.")); }; var depth:Number = options.depth; delete options.depth; var mc:MovieClip = createEmptyMovieClip(clip, "_mochiad", depth); var wh:Array = MochiAd._getRes(options, clip); options.res = ((wh[0] + "x") + wh[1]); options.server = (options.server + options.id); delete options.id; clip._mochiad_loaded = true; if (clip.loaderInfo.loaderURL.indexOf("http") == 0){ options.as3_swf = clip.loaderInfo.loaderURL; } else { trace("[MochiAd] NOTE: Security Sandbox Violation errors below are normal"); }; var lv:URLVariables = new URLVariables(); for (k in options) { v = options[k]; if (!(v is Function)){ lv[k] = v; }; }; server = lv.server; delete lv.server; hostname = _allowDomains(server); lc = new LocalConnection(); lc.client = mc; name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_"); lc.allowDomain("*", "localhost"); lc.allowInsecureDomain("*", "localhost"); lc.connect(name); mc.lc = lc; mc.lcName = name; lv.lc = name; lv.st = getTimer(); loader = new Loader(); g = function (_arg1:Object):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); MochiAd.unload(clip); }; loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g); req = new URLRequest(((server + ".swf?cacheBust=") + new Date().getTime())); req.contentType = "application/x-www-form-urlencoded"; req.method = URLRequestMethod.POST; req.data = lv; loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, function (_arg1:IOErrorEvent):void{ trace("[MochiAds] Blocked URL"); }); loader.load(req); mc.addChild(loader); mc._mochiad_ctr = loader; return (mc); } public static function runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{ var _local4:Array = _arg2.split("."); var _local5:Number = 0; while (_local5 < (_local4.length - 1)) { if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){ return (undefined); }; _arg1 = _arg1[_local4[_local5]]; _local5++; }; if (typeof(_arg1[_local4[_local5]]) == "function"){ return (_arg1[_local4[_local5]].apply(_arg1, _arg3)); }; return (undefined); } public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{ var _local4:MovieClip = new MovieClip(); if (((false) && (_arg3))){ _arg1.addChildAt(_local4, _arg3); } else { _arg1.addChild(_local4); }; _arg1[_arg2] = _local4; _local4["_name"] = _arg2; return (_local4); } public static function _getRes(_arg1:Object, _arg2:Object):Array{ var _local6:Array; var _local3:Object = _arg2.getBounds(_arg2.root); var _local4:Number = 0; var _local5:Number = 0; if (typeof(_arg1.res) != "undefined"){ _local6 = _arg1.res.split("x"); _local4 = parseFloat(_local6[0]); _local5 = parseFloat(_local6[1]); } else { _local4 = (_local3.xMax - _local3.xMin); _local5 = (_local3.yMax - _local3.yMin); }; if ((((_local4 == 0)) || ((_local5 == 0)))){ _local4 = _arg2.stage.stageWidth; _local5 = _arg2.stage.stageHeight; }; return ([_local4, _local5]); } public static function adShowing(_arg1:Object):void{ _arg1.origFrameRate = _arg1.stage.frameRate; _arg1.stage.frameRate = 30; } public static function getValue(_arg1:Object, _arg2:String):Object{ var _local3:Array = _arg2.split("."); var _local4:Number = 0; while (_local4 < (_local3.length - 1)) { if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){ return (undefined); }; _arg1 = _arg1[_local3[_local4]]; _local4++; }; return (_arg1[_local3[_local4]]); } public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{ var _local4:Object; var _local5:Object; switch (_arg3.id){ case "setValue": MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value); break; case "getValue": _local4 = MochiAd.getValue(_arg1, _arg3.objectName); _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4); break; case "runMethod": _local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args); _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5); break; default: trace(("[mochiads rpc] unknown rpc id: " + _arg3.id)); }; } public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{ var _local4:Array = _arg2.split("."); var _local5:Number = 0; while (_local5 < (_local4.length - 1)) { if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){ return; }; _arg1 = _arg1[_local4[_local5]]; _local5++; }; _arg1[_local4[_local5]] = _arg3; } public static function showPreGameAd(_arg1:Object):void{ var clip:Object; var mc:MovieClip; var w:Number; var chk:MovieClip; var complete:Boolean; var unloaded:Boolean; var sendHostProgress:Boolean; var fn:Function; var r:MovieClip; var options = _arg1; var DEFAULTS:Object = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{ if ((this.clip is MovieClip)){ this.clip.stop(); } else { throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_finished:function ():void{ if ((this.clip is MovieClip)){ this.clip.play(); } else { throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software"); }, ad_skipped:function ():void{ }, ad_progress:function (_arg1:Number):void{ }}; options = MochiAd._parseOptions(options, DEFAULTS); if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){ options.ad_started(); fn = function ():void{ options.ad_finished(); }; setTimeout(fn, 100); return; }; clip = options.clip; var ad_msec:Number = 11000; var ad_timeout:Number = options.ad_timeout; delete options.ad_timeout; var fadeout_time:Number = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ MochiAd._cleanup(mc); var fn:Function = function ():void{ options.ad_finished(); }; setTimeout(fn, 100); }; var wh:Array = MochiAd._getRes(options, clip); w = wh[0]; var h:Number = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.x = (w * -0.5); chk.y = (h * -0.5); var bar:MovieClip = createEmptyMovieClip(chk, "_mochiad_bar", 4); if (options.no_progress_bar){ bar.visible = false; delete options.no_progress_bar; } else { bar.x = 10; bar.y = (h - 20); }; var bar_color:Number = options.color; delete options.color; var bar_background:Number = options.background; delete options.background; var bar_outline:Number = options.outline; delete options.outline; var backing_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 1); var backing:Object = backing_mc.graphics; backing.beginFill(bar_background); backing.moveTo(0, 0); backing.lineTo((w - 20), 0); backing.lineTo((w - 20), 10); backing.lineTo(0, 10); backing.lineTo(0, 0); backing.endFill(); var inside_mc:MovieClip = createEmptyMovieClip(bar, "_inside", 2); var inside:Object = inside_mc.graphics; inside.beginFill(bar_color); inside.moveTo(0, 0); inside.lineTo((w - 20), 0); inside.lineTo((w - 20), 10); inside.lineTo(0, 10); inside.lineTo(0, 0); inside.endFill(); inside_mc.scaleX = 0; var outline_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 3); var outline:Object = outline_mc.graphics; outline.lineStyle(0, bar_outline, 100); outline.moveTo(0, 0); outline.lineTo((w - 20), 0); outline.lineTo((w - 20), 10); outline.lineTo(0, 10); outline.lineTo(0, 0); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.last_pcnt = 0; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ var _local1:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; complete = false; unloaded = false; var f:Function = function (_arg1:Event):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); complete = true; if (unloaded){ MochiAd.unload(clip); }; }; clip.loaderInfo.addEventListener(Event.COMPLETE, f); if ((clip.root is MovieClip)){ r = (clip.root as MovieClip); if (r.framesLoaded >= r.totalFrames){ complete = true; }; }; mc.unloadAd = function ():void{ unloaded = true; if (complete){ MochiAd.unload(clip); }; }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object = mc._mochiad_wait; _local2.server_control = true; _local2.showing = true; _local2.started = getTimer(); _local2.ad_msec = _arg1; }; mc.rpc = function (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; mc.rpcTestFn = function (_arg1:String):Object{ trace(("[MOCHIAD rpcTestFn] " + _arg1)); return (_arg1); }; mc.regContLC = function (_arg1:String):void{ mc._containerLCName = _arg1; }; sendHostProgress = false; mc.sendHostLoadProgress = function (_arg1:String):void{ sendHostProgress = true; }; chk["onEnterFrame"] = function ():void{ var _local11:Number; if (((!(this.parent)) || (!(this.parent.parent)))){ delete this["onEnterFrame"]; return; }; var _local1:Object = this.parent.parent.root; var _local2:Object = this.parent._mochiad_ctr; var _local3:Number = (getTimer() - this.started); var _local4:Boolean; var _local5:Number = _local1.loaderInfo.bytesTotal; var _local6:Number = _local1.loaderInfo.bytesLoaded; if (complete){ _local6 = Math.max(1, _local6); _local5 = _local6; }; var _local7:Number = ((100 * _local6) / _local5); var _local8:Number = ((100 * _local3) / chk.ad_msec); var _local9:Object = this._mochiad_bar._inside; var _local10:Number = Math.min(100, Math.min(((_local7) || (0)), _local8)); _local10 = Math.max(this.last_pcnt, _local10); this.last_pcnt = _local10; _local9.scaleX = (_local10 * 0.01); options.ad_progress(_local10); if (sendHostProgress){ clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local7}); if (_local7 == 100){ sendHostProgress = false; }; }; if (!chk.showing){ _local11 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local11 > 0){ chk.showing = true; chk.started = getTimer(); MochiAd.adShowing(clip); } else { if ((((_local3 > chk.ad_timeout)) && ((_local7 == 100)))){ options.ad_failed(); _local4 = true; }; }; }; if (_local3 > chk.ad_msec){ _local4 = true; }; if (((complete) && (_local4))){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = chk.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function showPreloaderAd(_arg1:Object):void{ trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0"); MochiAd.showPreGameAd(_arg1); } public static function showTimedAd(_arg1:Object):void{ trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0"); MochiAd.showInterLevelAd(_arg1); } public static function doOnEnterFrame(_arg1:MovieClip):void{ var mc = _arg1; var f:Function = function (_arg1:Object):void{ if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){ mc.onEnterFrame(); } else { _arg1.target.removeEventListener(_arg1.type, arguments.callee); }; }; mc.addEventListener(Event.ENTER_FRAME, f); } } }//package mochi.as3
Section 376
//FontAsset (mx.core.FontAsset) package mx.core { import flash.text.*; public class FontAsset extends Font implements IFlexAsset { mx_internal static const VERSION:String = "3.4.0.9271"; } }//package mx.core
Section 377
//IFlexAsset (mx.core.IFlexAsset) package mx.core { public interface IFlexAsset { } }//package mx.core
Section 378
//mx_internal (mx.core.mx_internal) package mx.core { public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal"; }//package mx.core
Section 379
//BackButton (BackButton) package { import contraption.menu.*; public dynamic class BackButton extends DashboardButton { } }//package
Section 380
//BackTestButton (BackTestButton) package { import contraption.menu.*; public dynamic class BackTestButton extends DashboardButton { } }//package
Section 381
//BackToMenuButton (BackToMenuButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class BackToMenuButton extends Button { public function BackToMenuButton(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.MENU_BACK; buttonWidth = 116; buttonHeight = 42; } } }//package
Section 382
//BobbingCloud (BobbingCloud) package { import flash.display.*; public dynamic class BobbingCloud extends MovieClip { } }//package
Section 383
//Border (Border) package { import flash.display.*; public dynamic class Border extends MovieClip { } }//package
Section 384
//BubbleSceneChange (BubbleSceneChange) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class BubbleSceneChange extends SceneChange { public function BubbleSceneChange(){ addFrameScript(0, frame1, 14, frame15); } function frame15(){ if (!doOpen){ stop(); } else { dispatchEvent(new MenuEvent(MenuEvent.OPEN_CURTAIN)); }; } function frame1(){ stop(); } } }//package
Section 385
//BuildingMousePointer (BuildingMousePointer) package { import flash.display.*; public dynamic class BuildingMousePointer extends MovieClip { } }//package
Section 386
//ButtonBack (ButtonBack) package { import contraption.menu.*; public dynamic class ButtonBack extends NoTabButton { } }//package
Section 387
//ButtonMousePointer (ButtonMousePointer) package { import flash.display.*; public dynamic class ButtonMousePointer extends MovieClip { } }//package
Section 388
//BuyGameButton (BuyGameButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class BuyGameButton extends Button { public function BuyGameButton(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.BUY_GAME; buttonWidth = 116; buttonHeight = 42; } } }//package
Section 389
//BuyMenuBackground (BuyMenuBackground) package { import flash.display.*; public dynamic class BuyMenuBackground extends MovieClip { } }//package
Section 390
//ClockwiseWheel (ClockwiseWheel) package { import flash.display.*; public dynamic class ClockwiseWheel extends MovieClip { } }//package
Section 391
//ClockwiseWheelButton (ClockwiseWheelButton) package { import contraption.menu.*; public dynamic class ClockwiseWheelButton extends DashboardButton { } }//package
Section 392
//ClockwiseWheelGraphic (ClockwiseWheelGraphic) package { import flash.display.*; public dynamic class ClockwiseWheelGraphic extends MovieClip { } }//package
Section 393
//Clouds (Clouds) package { import flash.events.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class Clouds extends MovieClip { public var cloudArray:Array; public var SPEED_MODIFIER:Number; public var speedArray:Array; public var SCENE_WIDTH:int; public var NUM_CLOUDS:int; public var SCENE_HEIGHT:int; public function Clouds(){ addFrameScript(0, frame1); } public function getRandomNumber(_arg1:int, _arg2:int):int{ return ((Math.round((Math.random() * (_arg2 - _arg1))) + _arg1)); } public function setRandomBob(_arg1:BobbingCloud):void{ var _local2:int = getRandomNumber(1, 70); _arg1.gotoAndPlay(_local2); } public function getRandomSpeed():int{ return (getRandomNumber(1, 5)); } public function moveClouds(_arg1:Event):void{ var _local2:int; var _local3:BobbingCloud; var _local4:Number; _local2 = 0; while (_local2 < cloudArray.length) { _local3 = cloudArray[_local2]; _local4 = speedArray[_local2]; _local3.x = (_local3.x + ((5 * _local4) * SPEED_MODIFIER)); if (_local3.x > (SCENE_WIDTH + 50)){ removeChild(_local3); _local3 = new BobbingCloud(); _local3.x = -325; _local3.y = getRandomNumber(0, (SCENE_HEIGHT - 200)); addChild(_local3); cloudArray[_local2] = _local3; speedArray[_local2] = getRandomSpeed(); }; _local2++; }; } function frame1(){ cloudArray = new Array(); speedArray = new Array(); SCENE_WIDTH = 2000; SCENE_HEIGHT = 1400; SPEED_MODIFIER = 0.05; NUM_CLOUDS = 5; setup(); addEventListener(Event.ENTER_FRAME, moveClouds); } public function setup():void{ var _local2:BobbingCloud; var _local3:int; var _local1:int; while (_local1 < NUM_CLOUDS) { _local2 = new BobbingCloud(); _local2.x = getRandomNumber(0, (SCENE_WIDTH - 200)); _local2.y = getRandomNumber(0, (SCENE_HEIGHT - 200)); setRandomBob(_local2); _local3 = getRandomSpeed(); addChild(_local2); cloudArray.push(_local2); speedArray.push(_local3); _local1++; }; } } }//package
Section 394
//ContinueButton (ContinueButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class ContinueButton extends Button { public function ContinueButton(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.MENU_BACK; buttonWidth = 116; buttonHeight = 42; } } }//package
Section 395
//ContinueTutorialButton (ContinueTutorialButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class ContinueTutorialButton extends Button { public function ContinueTutorialButton(){ addFrameScript(0, frame1); } function frame1(){ buttonWidth = 116; buttonHeight = 42; } } }//package
Section 396
//Contraption (Contraption) package { import flash.events.*; import contraption.menu.*; import contraption.*; import de.polygonal.ds.*; import flash.display.*; import flash.net.*; import contraption.blocks.*; import flash.geom.*; import contraption.tutorials.*; import flash.text.*; import mochi.as3.*; import flash.ui.*; public dynamic class Contraption extends MovieClip { protected var acting:Boolean;// = false protected var spinner:MovieClip; protected var newMenu:MenuWindow; protected var sceneChange:SceneChange; protected var splash:MovieClip; protected var menuStack:SLinkedList; protected var tf:TextField; protected var editor:Editor; protected var currentMenu:MenuWindow; protected var pointerMode:String; protected var mouseType:int; protected var menuCanvas:Sprite; protected var mainMenu:MainMenu; protected var mousePointer:MousePointer; protected var player:Player; protected var toolTip:Sprite; public static const VERSION_NAME_DEV:String = "qa.fantasticcontraption.com"; public static const INCLUDE_PAYPAL_LINKS:Boolean = true; public static const SERVER_LOCATION:String = "http://www.fantasticcontraption.com"; public static const VERSION_NAME:String = "fantasticcontraption.com"; public static const USE_ADS:Boolean = false; public static const VERSION_NAME_QA:String = "qa.fantasticcontraption.com"; public static const VERSION_NUMBER:String = "1.026"; protected static var LAWS_FONT:Class = Contraption_LAWS_FONT; public function Contraption():void{ super(); if (User.getInstance().isRegistered()){ return (StartAfterAds()); }; if (!USE_ADS){ return (StartAfterAds()); }; var myOptions:Object = {id:"71419b2eb4e776ca", res:"700x500", clip:root, ad_finished:function ():void{ StartAfterAds(); }}; MochiAd.showPreGameAd(myOptions); stop(); } protected function loadUpdateUserInfoMenu(_arg1:MenuEvent):void{ loadModalMenu(new UpdateUserInfoMenu()); } protected function loadUserGenLevels(_arg1:Event):void{ loadMenu(new UserGenLevelsMenu()); } protected function loadOfficialLevel(_arg1:int):void{ player = new Player(stage, this); loadMenu(player); player.loadOfficialLevel(_arg1); finishLoading(); } protected function moveMode(_arg1:Event=null):void{ pointerMode = ModeEvent.MOVE_MODE; setPointer(); } protected function loadSavedLevels(_arg1:MenuEvent):void{ var _local2:int = _arg1.userId; if (_local2 == 0){ _local2 = User.getInstance().getUserId(); }; loadMenu(new UserLevelsMenu(_local2)); } protected function tutorialLevelCompleteMenu(_arg1:MenuEvent):void{ loadModalMenu(new CompletedTutorialLevelMenu(_arg1.tutorialNumber)); } protected function addTooltip(_arg1:TooltipEvent):void{ if (toolTip){ menuCanvas.removeChild(toolTip); }; var _local2:TextField = new TextField(); _local2.autoSize = "left"; _local2.text = _arg1.toolTip; toolTip = new Sprite(); toolTip.graphics.lineStyle(2, 14509636); toolTip.graphics.beginFill(16772795); toolTip.graphics.drawRect(0, 0, (_local2.width + 5), (_local2.height + 5)); toolTip.addChild(_local2); toolTip.x = (mouseX - (toolTip.width / 2)); toolTip.y = ((mouseY - toolTip.height) - 25); if (toolTip.x < 0){ toolTip.x = (mouseX + 20); }; if (toolTip.y < 0){ toolTip.y = (mouseY + 50); }; menuCanvas.addChild(toolTip); } protected function finishLoading(_arg1:MenuEvent=null):void{ if (newMenu == null){ return; }; if (menuCanvas.contains(sceneChange)){ sceneChange.open(); } else { showNewMenu(); }; } protected function loadLevelHandler(_arg1:MenuEvent):void{ loadLevel(_arg1.levelId); } protected function addSpinner(_arg1:MenuEvent):void{ menuCanvas.addChild(spinner); } protected function loadSaveContraptionMenu(_arg1:SaveEvent):void{ loadModalMenu(new SaveContraptionMenu(_arg1.xml, _arg1.isSolution, _arg1.currentLevelId)); } protected function loadLogInMenu(_arg1:MenuEvent):void{ loadModalMenu(new LogInMenu()); } protected function loadResetPasswordMenu(_arg1:MenuEvent):void{ var _local2 = "http://www.sparkworkz.com"; navigateToURL(new URLRequest((_local2 + "/forgotpass.php")), "_top"); } protected function loadDesign(_arg1:int, _arg2:Boolean=false):void{ player = new Player(stage, this, _arg2); loadMenu(player); player.loadDesign(_arg1); } protected function loadLevel(_arg1:int):void{ player = new Player(stage, this); loadMenu(player); player.loadLevel(_arg1); } protected function startAction(_arg1:Event=null):void{ if ((_arg1 as ModeEvent)){ setPointer(true, (_arg1 as ModeEvent).actionType); } else { setPointer(true); }; } public function loadFacebookMenu(_arg1:MenuEvent):void{ loadModalMenu(FacebookMenu.getInstance()); FacebookMenu.getInstance().onLoginClickHandler(); } protected function setPointerHandler(_arg1:Event):void{ setPointer(); } protected function editLevelHandler(_arg1:MenuEvent):void{ editLevel(_arg1.levelId); } protected function loadBuyGameMenu(_arg1:MenuEvent):void{ loadModalMenu(new BuyGameMenu()); } protected function curtainOpenComplete(_arg1:MenuEvent):void{ menuCanvas.removeChild(sceneChange); } protected function showNewMenu(_arg1:MenuEvent=null):void{ var _local2:SListIterator; var _local3:MenuWindow; if (currentMenu != null){ menuCanvas.removeChild(currentMenu); }; newMenu.visible = true; currentMenu = newMenu; newMenu = null; if ((currentMenu as Player)){ _local2 = menuStack.getListIterator(); while (_local2.hasNext()) { _local3 = (_local2.next() as MenuWindow); if ((((((_local3 as ModalMenu)) || ((_local3 as Player)))) && (!((_local3 == currentMenu))))){ if (menuCanvas.contains(_local3)){ menuCanvas.removeChild(_local3); }; menuStack.remove(menuStack.nodeOf(_local3)); }; }; }; } protected function loadMenu(_arg1:MenuWindow):void{ _arg1.visible = false; newMenu = _arg1; addMenu(_arg1); sceneChange.close(); menuCanvas.addChild(sceneChange); if ((newMenu as Arena)){ Music.getInstance().playArena(); } else { Music.getInstance().playMenu(); }; } protected function loadDesignHandler(_arg1:MenuEvent):void{ loadDesign(_arg1.designId); } protected function mouseOut(_arg1:Event):void{ Mouse.show(); mousePointer.visible = false; } protected function loadModalMenu(_arg1:ModalMenu):void{ addMenu(_arg1); } protected function setPointer(_arg1:Boolean=false, _arg2:int=0):void{ var _local6:int; var _local7:ActionContainer; var _local8:Actions; if (VERSION_NAME == "whirled.com"){ return; }; if (acting){ if (_arg2 != ModeEvent.ACTION_UNKNOWN){ menuCanvas.removeChild(mousePointer); if (_arg2 == ModeEvent.ACTION_MOVE){ mousePointer = new MovePointer(acting); } else { if (_arg2 == ModeEvent.ACTION_BUILD){ mousePointer = new BuildingPointer(acting); } else { if (_arg2 == ModeEvent.ACTION_BUTTON){ mousePointer = new ButtonPointer(acting); }; }; }; menuCanvas.addChild(mousePointer); }; return; }; if (_arg1){ acting = true; }; var _local3:Array = getObjectsUnderPoint(localToGlobal(new Point(mouseX, mouseY))); Mouse.hide(); mousePointer.visible = true; var _local4:int = (_local3.length - 1); while (_local4 >= 0) { if ((_local3[_local4] as ActionContainer)){ _local7 = (_local3[_local4] as ActionContainer); if ((((((player == null)) || (player.isInStartZone(new Point(mouseX, mouseY))))) || (!((_local7 as Block))))){ break; }; }; if (((!((_local3[_local4] == this))) && ((_local3[_local4].parent as MouseBlockingBackground)))){ _local7 = (_local3[_local4] as ActionContainer); break; }; _local4--; }; if (_local7 != null){ _local8 = _local7.getAllowableActions(); } else { _local8 = new Actions(); }; var _local5:Boolean; if (((!((player == null))) && (player.isRunning()))){ _local5 = true; }; if (_local8.button){ _local6 = MousePointer.BUTTON_UP; } else { if ((((pointerMode == ModeEvent.DELETE_MODE)) && (!(_local5)))){ if (_local8.delete_){ _local6 = MousePointer.DELETE_UP; } else { _local6 = MousePointer.NORMAL_UP; }; } else { if ((((pointerMode == ModeEvent.MOVE_MODE)) && (_local8.drag))){ _local6 = MousePointer.DRAG_UP; } else { if ((((((pointerMode == ModeEvent.MOVE_MODE)) && (_local8.move))) && (!(_local5)))){ _local6 = MousePointer.MOVE_UP; } else { if (((_local8.build) && (!(_local5)))){ _local6 = MousePointer.BUILDING_UP; } else { if (_local8.alwaysDrag){ _local6 = MousePointer.DRAG_UP; } else { _local6 = MousePointer.NORMAL_UP; }; }; }; }; }; }; if (acting){ _local6++; }; if (_local6 != mouseType){ mouseType = _local6; menuCanvas.removeChild(mousePointer); switch (_local6){ case MousePointer.NORMAL_UP: mousePointer = new MousePointer(false); break; case MousePointer.NORMAL_DOWN: mousePointer = new MousePointer(true); break; case MousePointer.BUILDING_UP: mousePointer = new BuildingPointer(false); break; case MousePointer.BUILDING_DOWN: mousePointer = new BuildingPointer(true); break; case MousePointer.DELETE_UP: mousePointer = new DeletePointer(false); break; case MousePointer.DELETE_DOWN: mousePointer = new DeletePointer(true); break; case MousePointer.MOVE_UP: mousePointer = new MovePointer(false); break; case MousePointer.MOVE_DOWN: mousePointer = new MovePointer(true); break; case MousePointer.DRAG_UP: mousePointer = new DragPointer(false); break; case MousePointer.DRAG_DOWN: mousePointer = new DragPointer(true); break; case MousePointer.BUTTON_UP: mousePointer = new ButtonPointer(false); break; case MousePointer.BUTTON_DOWN: mousePointer = new ButtonPointer(true); break; }; }; menuCanvas.addChild(mousePointer); if (_local8.inputText){ mousePointer.visible = false; } else { mousePointer.visible = true; }; mousePointer.x = mouseX; mousePointer.y = mouseY; } protected function loadLevelSolutions(_arg1:MenuEvent):void{ loadMenu(new UserDesignsMenu(_arg1.levelId, UserDesignsMenu.LEVEL_MODE)); } protected function closeSplash(_arg1:Event):void{ splash.gotoAndPlay("leave"); sceneChange.removeEventListener(MouseEvent.MOUSE_DOWN, closeSplash); GlobalListener.getInstance().removeEventListener(KeyboardEvent.KEY_DOWN, closeSplash); sceneChange.lockClosed = false; sceneChange.open(); _arg1.stopPropagation(); } protected function defaultMode(_arg1:Event=null):void{ pointerMode = ModeEvent.DEFAULT_MODE; setPointer(); } protected function loadTutorialLevel(_arg1:int):void{ player = new TutorialPlayer(stage, this); loadMenu(player); (player as TutorialPlayer).loadTutorialLevel(_arg1); } protected function tryLevel(_arg1:Event):void{ player = new Player(stage, this, false, true); loadMenu(player); player.loadFromXml(editor.getLevelXml()); player.initZoomAndScroll(); } protected function bubble(_arg1:Event):void{ dispatchEvent(_arg1); mainMenu.pagingData.currentPage = 0; mainMenu.refresh(); } protected function addMenuListeners(_arg1:MenuWindow):void{ _arg1.addEventListener(MenuEvent.LOAD_EDITOR, loadEditor, false, 0, true); _arg1.addEventListener(MenuEvent.LOAD_LEVEL, loadLevelHandler, false, 0, true); _arg1.addEventListener(MenuEvent.LOAD_OFFICIAL_LEVEL, loadOfficialLevelHandler, false, 0, true); _arg1.addEventListener(MenuEvent.LOAD_TUTORIAL_LEVEL, loadTutorialLevelHandler, false, 0, true); _arg1.addEventListener(MenuEvent.EDIT_LEVEL, editLevelHandler, false, 0, true); _arg1.addEventListener(MenuEvent.LOAD_SAVED_DESIGNS, loadSavedDesigns, false, 0, true); _arg1.addEventListener(MenuEvent.LOAD_SAVED_LEVELS, loadSavedLevels, false, 0, true); _arg1.addEventListener(MenuEvent.LOAD_TUTORIALS, loadTutorials, false, 0, true); _arg1.addEventListener(MenuEvent.LOAD_USER_GENERATED_LEVELS, loadUserGenLevels, false, 0, true); _arg1.addEventListener(MenuEvent.LOAD_LEVEL_SOLUTIONS, loadLevelSolutions, false, 0, true); _arg1.addEventListener(MenuEvent.LOAD_DESIGN, loadDesignHandler, false, 0, true); _arg1.addEventListener(MenuEvent.TRY_LEVEL, tryLevel, false, 0, true); _arg1.addEventListener(MenuEvent.RETURN_TO_MAIN_MENU, loadMainMenu, false, 0, true); _arg1.addEventListener(MenuEvent.MENU_BACK, menuBack, false, 0, true); _arg1.addEventListener(MenuEvent.FINISHED_LOADING, finishLoading, false, 0, true); _arg1.addEventListener(MenuEvent.LOAD_USER_MENU, loadUserMenu, false, 0, true); _arg1.addEventListener(MenuEvent.LOG_IN, loadLogInMenu, false, 0, true); _arg1.addEventListener(MenuEvent.NEW_USER, loadNewUserMenu, false, 0, true); _arg1.addEventListener(MenuEvent.RESET_PASSWORD, loadResetPasswordMenu, false, 0, true); _arg1.addEventListener(MenuEvent.UPDATE_USER_INFO, loadUpdateUserInfoMenu, false, 0, true); _arg1.addEventListener(MenuEvent.LOAD_LEVEL_LINK_MENU, loadLevelLinkMenu, false, 0, true); _arg1.addEventListener(MenuEvent.LOAD_DESIGN_LINK_MENU, loadDesignLinkMenu, false, 0, true); _arg1.addEventListener(MenuEvent.LEVEL_COMPLETE, levelCompleteMenu, false, 0, true); _arg1.addEventListener(MenuEvent.TUTORIAL_LEVEL_COMPLETE, tutorialLevelCompleteMenu, false, 0, true); _arg1.addEventListener(MenuEvent.LOAD_LINKED_IN_MENU, loadLinkedInMenu, false, 0, true); _arg1.addEventListener(MenuEvent.BUY_GAME, loadBuyGameMenu, false, 0, true); _arg1.addEventListener(MenuEvent.ADD_SPINNER, addSpinner, false, 0, true); _arg1.addEventListener(MenuEvent.REMOVE_SPINNER, removeSpinner, false, 0, true); _arg1.addEventListener(SaveEvent.SAVE_CONTRAPTION, loadSaveContraptionMenu, false, 0, true); _arg1.addEventListener(SaveEvent.SAVE_LEVEL, loadSaveLevelMenu, false, 0, true); _arg1.addEventListener(ModeEvent.MOVE_MODE, moveMode, false, 0, true); _arg1.addEventListener(ModeEvent.DELETE_MODE, deleteMode, false, 0, true); _arg1.addEventListener(ModeEvent.DEFAULT_MODE, defaultMode, false, 0, true); _arg1.addEventListener(ModeEvent.START_ACTION, startAction, false, 0, true); _arg1.addEventListener(MenuEvent.LOGGED_IN, bubble, false, 0, true); _arg1.addEventListener(MenuEvent.LOGGED_OUT, bubble, false, 0, true); _arg1.addEventListener(MenuEvent.SEND_TWITTER, sendTwitter, false, 0, true); _arg1.addEventListener(MenuEvent.LOAD_TWITTER, loadTwitterMenu, false, 0, true); _arg1.addEventListener(MenuEvent.GOTO_TWITTER, gotoTwitter, false, 0, true); _arg1.addEventListener(MenuEvent.LOAD_EMAIL, loadEmailMenu, false, 0, true); _arg1.addEventListener(MenuEvent.LOAD_FACEBOOK, loadFacebookMenu, false, 0, true); _arg1.addEventListener(MenuEvent.DONE_FACEBOOK, doneFacebookMenu, false, 0, true); } protected function loadTutorials(_arg1:MenuEvent):void{ loadTutorialLevel(1); } protected function gotoTwitter(_arg1:MenuEvent):void{ loadModalMenu(new TwitterLinkMenu(_arg1.defaultText)); } public function checkAccess():void{ var _local1:URLLoader = new ContraptionUrlLoader(); _local1.addEventListener(Event.COMPLETE, checkAccessComplete); var _local2:URLRequest = new URLRequest((Contraption.SERVER_LOCATION + "/checkAccess.php")); var _local3:URLVariables = new URLVariables(); _local3.versionName = VERSION_NAME; _local3.versionNumber = VERSION_NUMBER; _local3.requestingDomain = currentDomain(); _local2.data = _local3; _local2.method = URLRequestMethod.GET; _local1.load(_local2); } public function StartAfterAds():void{ Music.getInstance().playMenu(); stage.stageFocusRect = false; var _local1:Object = new YourSavedLevelsButton(); _local1 = new YourSavedContraptionsButton(); _local1 = new NewLevelButton(); _local1 = new UserGenLevelsButton(); _local1 = new LogInButton(); _local1 = new LogOutButton(); _local1 = new NewUserButton(); _local1 = new SmallCancelButton(); _local1 = new ResetPasswordButton(); _local1 = new UpdateUserInfoButton(); _local1 = new PreviousMenuButton(); _local1 = new MainMenuButton(); _local1 = new BuyGameButton(); _local1 = new TutorialNextButton(); if (VERSION_NAME != "whirled.com"){ stage.frameRate = 30; }; graphics.beginFill(8895985); graphics.drawRect(0, 0, 700, 500); menuCanvas = new Sprite(); addChild(menuCanvas); authenticate(); var _local2:Button = new MuteButton(); _local2.x = 10; _local2.y = 455; addChild(_local2); tf = new TextField(); tf.y = 460; tf.width = 2000; addChild(tf); tf.mouseEnabled = false; var _local3:Sprite = new Sprite(); _local3.graphics.beginFill(8895985); _local3.graphics.drawRect(0, 0, 700, 500); addChild(_local3); mask = _local3; spinner = new Spinner(); mousePointer = new MousePointer(acting); mousePointer.visible = false; addChild(mousePointer); pointerMode = ModeEvent.DEFAULT_MODE; sceneChange = new BubbleSceneChange(); sceneChange.addEventListener(MenuEvent.OPEN_CURTAIN, showNewMenu, false, 0, true); sceneChange.addEventListener(MenuEvent.CURTAIN_OPEN_COMPLETE, curtainOpenComplete, false, 0, true); menuStack = new SLinkedList(); mainMenu = new MainMenu(); loadMenu(mainMenu); sceneChange.jumpToClosed(); sceneChange.lockClosed = true; splash = new Splash(); splash.x = 350; splash.y = 250; sceneChange.addChild(splash); sceneChange.addEventListener(MouseEvent.MOUSE_DOWN, closeSplash, false, 0, true); var _local4:GlobalListener = GlobalListener.getInstance(); _local4.init(stage, this); _local4.addEventListener(KeyboardEvent.KEY_DOWN, closeSplash, false, 0, true); var _local5:String = root.loaderInfo.parameters.levelId; var _local6:String = root.loaderInfo.parameters.designId; var _local7:String = root.loaderInfo.parameters.editId; if (((!((_local5 == null))) && (!((_local5 == ""))))){ loadLevel(new int(_local5)); } else { if (((!((_local6 == null))) && (!((_local6 == ""))))){ loadDesign(new int(_local6), true); } else { if (((!((_local7 == null))) && (!((_local7 == ""))))){ editLevel(new int(_local7)); }; }; }; addEventListener(Event.ENTER_FRAME, update, false, 0, true); _local4.addEventListener(Event.MOUSE_LEAVE, mouseOut, false, 0, true); this.addEventListener(MouseEvent.MOUSE_DOWN, startAction, false, 0, true); this.addEventListener(MouseEvent.MOUSE_UP, endAction, false, 0, true); this.addEventListener(MouseEvent.MOUSE_MOVE, setPointerHandler, false, 0, true); _local4.addEventListener(Event.UNLOAD, unload, false, 0, true); addEventListener(TooltipEvent.ADD_TOOLTIP, addTooltip, false, 0, true); addEventListener(TooltipEvent.REMOVE_TOOLTIP, removeTooltip, false, 0, true); var _local8:MovieClip = new Border(); _local8.x = 351; _local8.y = 247; addChild(_local8); FacebookMenu.getInstance().initFacebook(this.stage.loaderInfo); } protected function editLevel(_arg1:int):void{ editor = new Editor(stage, this); loadMenu(editor); editor.loadLevel(_arg1); } protected function currentDomain():String{ var _local1:int = (stage.loaderInfo.loaderURL.indexOf("://") + 3); var _local2:int = stage.loaderInfo.loaderURL.indexOf("/", _local1); var _local3:String = stage.loaderInfo.loaderURL.substring(_local1, _local2); var _local4:int = (_local3.lastIndexOf(".") - 1); var _local5:int = (_local3.lastIndexOf(".", _local4) + 1); if (_local3.substring(_local5, (_local4 + 1)) == "com"){ _local5 = (_local3.lastIndexOf(".", (_local5 - 2)) + 1); }; return (_local3.substring(_local5, _local3.length)); } protected function addMenu(_arg1:MenuWindow):void{ addMenuListeners(_arg1); menuStack.append(_arg1); menuCanvas.addChild(_arg1); acting = false; setPointer(); } protected function loadLinkedInMenu(_arg1:MenuEvent):void{ loadModalMenu(new LinkInMenu()); } private function sayHello():void{ } protected function loadTutorialLevelHandler(_arg1:MenuEvent):void{ loadTutorialLevel(_arg1.tutorialNumber); } protected function loadTwitterMenu(_arg1:MenuEvent):void{ loadModalMenu(TwitterMenu.getInstance()); } protected function loadOfficialLevelHandler(_arg1:MenuEvent):void{ if (_arg1.levelNumber == 0){ return (loadLevel(_arg1.levelId)); }; loadOfficialLevel(_arg1.levelNumber); } protected function deniedPermissionToPlay(_arg1:String):void{ menuCanvas.visible = false; var _local2:TextArea = new TextArea(_arg1, 14); _local2.bold(); _local2.mouseEnabled = true; _local2.x = 200; _local2.y = 100; addChild(_local2); throw (("Error: " + _arg1)); } protected function loadMainMenu(_arg1:MenuEvent=null):void{ var _local3:MenuWindow; var _local2:Iterator = menuStack.getIterator(); while (_local2.hasNext()) { _local3 = _local2.next(); _local3.disposeMenu(); if (menuCanvas.contains(_local3)){ menuCanvas.removeChild(_local3); }; }; menuStack.clear(); mainMenu.refresh(); mainMenu.visible = true; menuCanvas.addChild(mainMenu); menuStack.append(mainMenu); currentMenu = mainMenu; } protected function loadSaveLevelMenu(_arg1:SaveEvent):void{ loadModalMenu(new SaveLevelMenu(_arg1.xml)); } protected function loadNewUserMenu(_arg1:MenuEvent):void{ loadModalMenu(new NewUserMenu()); } protected function update(_arg1:Event):void{ mousePointer.x = mouseX; mousePointer.y = mouseY; } protected function showText(_arg1:String):void{ var _local2:TextArea = new TextArea(_arg1, 14); _local2.bold(); _local2.mouseEnabled = true; _local2.x = 200; _local2.y = 200; addChild(_local2); } protected function sendTwitter(_arg1:Event):void{ } protected function loadUserMenu(_arg1:MenuEvent):void{ loadMenu(new UserMenu(_arg1.userId, _arg1.userName)); finishLoading(); } protected function authenticate(_arg1:String="example.com"):void{ var _local2:TextArea; if (((((!((currentDomain().toLowerCase() == VERSION_NAME))) && (!((currentDomain().toLowerCase() == VERSION_NAME_DEV))))) && (!((currentDomain().toLowerCase() == VERSION_NAME_QA))))){ deniedPermissionToPlay((((("Wrong domain: '" + currentDomain()) + "' expected: '") + VERSION_NAME) + "'")); }; if (currentDomain().toLowerCase() == VERSION_NAME_DEV){ _local2 = new TextArea("CL:98365"); _local2.bold(); _local2.width = 300; _local2.x = 30; _local2.y = 5; addChild(_local2); }; checkAccess(); } protected function loadLevelLinkMenu(_arg1:MenuEvent):void{ loadModalMenu(new LevelLinkMenu(_arg1.levelId)); } protected function loadEmailMenu(_arg1:MenuEvent):void{ } protected function loadDesignLinkMenu(_arg1:MenuEvent):void{ loadModalMenu(new DesignLinkMenu(_arg1.designId)); } protected function removeTooltip(_arg1:TooltipEvent):void{ if (toolTip){ menuCanvas.removeChild(toolTip); }; toolTip = null; } public function checkAccessComplete(_arg1:Event):void{ var _local2:XML = new XML(_arg1.target.data); if (_local2.permission == "false"){ deniedPermissionToPlay(_local2.message); }; } protected function menuBack(_arg1:MenuEvent=null):void{ var _local2:MenuWindow = (menuStack.tail.data as MenuWindow); _local2.disposeMenu(); menuCanvas.removeChild(_local2); menuStack.removeTail(); if (menuStack.tail == null){ loadMainMenu(); }; _local2 = (menuStack.tail.data as MenuWindow); _local2.refresh(); _local2.visible = true; menuCanvas.addChild(_local2); currentMenu = _local2; acting = false; setPointer(); if ((currentMenu as Arena)){ Music.getInstance().playArena(); } else { Music.getInstance().playMenu(); }; } public function doneFacebookMenu(_arg1:MenuEvent):void{ loadModalMenu(new FacebookCompleteMenu()); } protected function levelCompleteMenu(_arg1:MenuEvent):void{ loadModalMenu(new CompletedLevelMenu(_arg1.levelNumber, _arg1.levelId)); } public function isCurrentMenu(_arg1:MenuWindow):Boolean{ return ((_arg1 == (menuStack.tail.data as MenuWindow))); } protected function endAction(_arg1:Event=null):void{ acting = false; setPointer(); } protected function loadEditor(_arg1:MenuEvent):void{ editor = new Editor(stage, this); loadMenu(editor); finishLoading(); } protected function loadSavedDesigns(_arg1:MenuEvent):void{ var _local2:int = _arg1.userId; if (_local2 == 0){ _local2 = User.getInstance().getUserId(); }; loadMenu(new UserDesignsMenu(_local2, UserDesignsMenu.USER_MODE)); } protected function removeSpinner(_arg1:MenuEvent):void{ if (menuCanvas.contains(spinner)){ menuCanvas.removeChild(spinner); }; } protected function deleteMode(_arg1:Event=null):void{ pointerMode = ModeEvent.DELETE_MODE; setPointer(); } public function unload(_arg1:Event):void{ removeEventListener(Event.ENTER_FRAME, update); Music.getInstance().stopSound(); } } }//package
Section 397
//Contraption_LAWS_FONT (Contraption_LAWS_FONT) package { import mx.core.*; public class Contraption_LAWS_FONT extends FontAsset { } }//package
Section 398
//CounterClockwiseWheel (CounterClockwiseWheel) package { import flash.display.*; public dynamic class CounterClockwiseWheel extends MovieClip { } }//package
Section 399
//CounterClockwiseWheelButton (CounterClockwiseWheelButton) package { import contraption.menu.*; public dynamic class CounterClockwiseWheelButton extends DashboardButton { } }//package
Section 400
//CounterClockwiseWheelGraphic (CounterClockwiseWheelGraphic) package { import flash.display.*; public dynamic class CounterClockwiseWheelGraphic extends MovieClip { } }//package
Section 401
//DashBackground (DashBackground) package { import contraption.menu.*; public dynamic class DashBackground extends MouseBlockingBackground { } }//package
Section 402
//DashboardImpl (DashboardImpl) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; import adobe.utils.*; import flash.printing.*; import flash.xml.*; public dynamic class DashboardImpl extends Dashboard { public var expander; public function DashboardImpl(){ addFrameScript(0, frame1); } function frame1(){ expander = (getChildAt(0) as Expander); fatInitFunction = fatInit; initFat(); } public function fatInit(_arg1:String):void{ zoomInButton = expander.dash.zoomButtons.zoomInButton; zoomOutButton = expander.dash.zoomButtons.zoomOutButton; if (_arg1 == MODE_EDIT_LEVEL){ expander.dash.removeChild(expander.dash.contraptionButtons); testLevelButton = expander.dash.levelButtons.testLevelButton; goalCircleButton = expander.dash.levelButtons.goalCircleButton; goalSquareButton = expander.dash.levelButtons.goalSquareButton; staticCircleButton = expander.dash.levelButtons.staticCircleButton; staticSquareButton = expander.dash.levelButtons.staticSquareButton; dynamicCircleButton = expander.dash.levelButtons.dynamicCircleButton; dynamicSquareButton = expander.dash.levelButtons.dynamicSquareButton; } else { expander.dash.removeChild(expander.dash.levelButtons); goButton = expander.dash.contraptionButtons.goStopButtons.goButton; stopButton = expander.dash.contraptionButtons.goStopButtons.stopButton; stopButtonPing = expander.dash.contraptionButtons.goStopButtons.stopButtonPing; cwWheelButton = expander.dash.contraptionButtons.cwWheelButton; ccwWheelButton = expander.dash.contraptionButtons.ccwWheelButton; npWheelButton = expander.dash.contraptionButtons.npWheelButton; hollowRodButton = expander.dash.contraptionButtons.hollowRodButton; solidRodButton = expander.dash.contraptionButtons.solidRodButton; moveButton = expander.dash.contraptionButtons.moveButton; deleteButton = expander.dash.contraptionButtons.deleteButton; }; if (_arg1 == MODE_TEST_LEVEL){ backButton = expander.dash.backTestButton; expander.dash.removeChild(expander.dash.saveButton); expander.dash.removeChild(expander.dash.backButton); } else { saveButton = expander.dash.saveButton; backButton = expander.dash.backButton; expander.dash.removeChild(expander.dash.backTestButton); }; tooltip = expander.dash.tooltip; init(); } } }//package
Section 403
//DefaultMousePointer (DefaultMousePointer) package { import flash.display.*; public dynamic class DefaultMousePointer extends MovieClip { } }//package
Section 404
//DeleteButton (DeleteButton) package { import contraption.menu.*; public dynamic class DeleteButton extends DashboardButton { } }//package
Section 405
//DeleteDesignButton (DeleteDesignButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class DeleteDesignButton extends Button { public function DeleteDesignButton(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.DELETE_DESIGN; toolTip = "Delete this contraption"; buttonWidth = 30; buttonHeight = 30; } } }//package
Section 406
//DeleteLevelButton (DeleteLevelButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class DeleteLevelButton extends Button { public function DeleteLevelButton(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.DELETE_LEVEL; toolTip = "Delete this level"; buttonWidth = 30; buttonHeight = 30; } } }//package
Section 407
//DeleteMousePointer (DeleteMousePointer) package { import flash.display.*; public dynamic class DeleteMousePointer extends MovieClip { } }//package
Section 408
//DoPublishButton (DoPublishButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class DoPublishButton extends Button { public function DoPublishButton(){ addFrameScript(0, frame1); } function frame1(){ buttonWidth = 30; buttonHeight = 30; } } }//package
Section 409
//DragActingMousePointer (DragActingMousePointer) package { import flash.display.*; public dynamic class DragActingMousePointer extends MovieClip { } }//package
Section 410
//DragMousePointer (DragMousePointer) package { import flash.display.*; public dynamic class DragMousePointer extends MovieClip { } }//package
Section 411
//DynamicCircleButton (DynamicCircleButton) package { import contraption.menu.*; public dynamic class DynamicCircleButton extends DashboardButton { } }//package
Section 412
//DynamicSquareButton (DynamicSquareButton) package { import contraption.menu.*; public dynamic class DynamicSquareButton extends DashboardButton { } }//package
Section 413
//EditLevelButton (EditLevelButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class EditLevelButton extends Button { public function EditLevelButton(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.EDIT_LEVEL; toolTip = "Edit this level"; buttonWidth = 30; buttonHeight = 30; } } }//package
Section 414
//EmailThis (EmailThis) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class EmailThis extends Button { public function EmailThis(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.LOAD_EMAIL; buttonWidth = 46; buttonHeight = 46; } } }//package
Section 415
//Expander (Expander) package { import flash.events.*; import flash.display.*; public dynamic class Expander extends MovieClip { public var expandButton:SimpleButton; public var dash:MovieClip; public function Expander(){ addFrameScript(0, frame1, 1, frame2, 12, frame13, 13, frame14); } function frame14(){ stop(); } function frame1(){ expandButton.addEventListener(MouseEvent.CLICK, expandButtonClick); } function frame13(){ gotoAndStop("contracted"); } public function expandButtonClick(_arg1:MouseEvent){ if (currentLabel == "contracted"){ gotoAndPlay("expanding"); } else { if (currentLabel == "expanded"){ gotoAndPlay("contracting"); }; }; } function frame2(){ stop(); } } }//package
Section 416
//FacebookTitle (FacebookTitle) package { import flash.display.*; public dynamic class FacebookTitle extends SimpleButton { } }//package
Section 417
//FCIcon (FCIcon) package { import flash.display.*; public dynamic class FCIcon extends SimpleButton { } }//package
Section 418
//FullVersionButton (FullVersionButton) package { import flash.display.*; public dynamic class FullVersionButton extends SimpleButton { } }//package
Section 419
//GoalCircleButton (GoalCircleButton) package { import contraption.menu.*; public dynamic class GoalCircleButton extends DashboardButton { } }//package
Section 420
//GoalSquareButton (GoalSquareButton) package { import contraption.menu.*; public dynamic class GoalSquareButton extends DashboardButton { } }//package
Section 421
//GoButton (GoButton) package { import contraption.menu.*; public dynamic class GoButton extends DashboardButton { } }//package
Section 422
//GraphicsOffButton (GraphicsOffButton) package { import flash.display.*; public dynamic class GraphicsOffButton extends SimpleButton { } }//package
Section 423
//GraphicsOnButton (GraphicsOnButton) package { import flash.display.*; public dynamic class GraphicsOnButton extends SimpleButton { } }//package
Section 424
//HollowRod (HollowRod) package { import flash.display.*; public dynamic class HollowRod extends MovieClip { public var one:MovieClip; } }//package
Section 425
//HollowRodButton (HollowRodButton) package { import contraption.menu.*; public dynamic class HollowRodButton extends DashboardButton { } }//package
Section 426
//HollowRodGraphic (HollowRodGraphic) package { import flash.events.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; import adobe.utils.*; import flash.printing.*; import flash.xml.*; public dynamic class HollowRodGraphic extends MovieClip { public var four:MovieClip; public var two:MovieClip; public var one:MovieClip; public var three:MovieClip; public function HollowRodGraphic(){ addFrameScript(0, frame1); } function frame1(){ one.gotoAndPlay(1); two.gotoAndPlay(11); three.gotoAndPlay(21); four.gotoAndPlay(31); one.dropBouncing.gotoAndPlay(1); two.dropBouncing.gotoAndPlay(7); three.dropBouncing.gotoAndPlay(14); four.dropBouncing.gotoAndPlay(21); } } }//package
Section 427
//HollowRodGraphicBG (HollowRodGraphicBG) package { import flash.events.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; import adobe.utils.*; import flash.printing.*; import flash.xml.*; public dynamic class HollowRodGraphicBG extends MovieClip { public var four:MovieClip; public var two:MovieClip; public var one:MovieClip; public var three:MovieClip; public function HollowRodGraphicBG(){ addFrameScript(0, frame1); } function frame1(){ one.gotoAndPlay(1); two.gotoAndPlay(11); three.gotoAndPlay(21); four.gotoAndPlay(31); one.dropBouncing.gotoAndPlay(1); two.dropBouncing.gotoAndPlay(7); three.dropBouncing.gotoAndPlay(14); four.dropBouncing.gotoAndPlay(21); } } }//package
Section 428
//LearnToPlayButton (LearnToPlayButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class LearnToPlayButton extends Button { public function LearnToPlayButton(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.LOAD_TUTORIALS; buttonWidth = 218; buttonHeight = 46; } } }//package
Section 429
//LeftArrow (LeftArrow) package { import contraption.menu.*; public dynamic class LeftArrow extends NoTabButton { } }//package
Section 430
//Level4Overlay (Level4Overlay) package { import flash.display.*; public dynamic class Level4Overlay extends MovieClip { } }//package
Section 431
//LevelCircle (LevelCircle) package { import contraption.menu.*; public dynamic class LevelCircle extends NoTabButton { } }//package
Section 432
//LevelCircleChecked (LevelCircleChecked) package { import contraption.menu.*; public dynamic class LevelCircleChecked extends NoTabButton { } }//package
Section 433
//LinkBackButton (LinkBackButton) package { import flash.display.*; public dynamic class LinkBackButton extends SimpleButton { } }//package
Section 434
//LinkDesignButton (LinkDesignButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class LinkDesignButton extends Button { public function LinkDesignButton(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.LOAD_DESIGN_LINK_MENU; toolTip = "Link to this contraption"; buttonWidth = 30; buttonHeight = 30; } } }//package
Section 435
//LinkedInOverlay (LinkedInOverlay) package { import flash.display.*; public dynamic class LinkedInOverlay extends MovieClip { } }//package
Section 436
//LinkLevelButton (LinkLevelButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class LinkLevelButton extends Button { public function LinkLevelButton(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.LOAD_LEVEL_LINK_MENU; toolTip = "Link to this level"; buttonWidth = 30; buttonHeight = 30; } } }//package
Section 437
//LoadFacebook (LoadFacebook) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class LoadFacebook extends Button { public function LoadFacebook(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.LOAD_FACEBOOK; buttonWidth = 46; buttonHeight = 46; } } }//package
Section 438
//LogInButton (LogInButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class LogInButton extends Button { public function LogInButton(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.LOG_IN; buttonWidth = 116; buttonHeight = 42; } } }//package
Section 439
//LogOutButton (LogOutButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class LogOutButton extends Button { public function LogOutButton(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.LOG_OUT; buttonWidth = 116; buttonHeight = 42; } } }//package
Section 440
//MainMenuButton (MainMenuButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class MainMenuButton extends Button { public function MainMenuButton(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.RETURN_TO_MAIN_MENU; buttonWidth = 116; buttonHeight = 42; } } }//package
Section 441
//MainMenuButtons (MainMenuButtons) package { import flash.display.*; public dynamic class MainMenuButtons extends MovieClip { } }//package
Section 442
//MenuBackground (MenuBackground) package { import flash.display.*; public dynamic class MenuBackground extends MovieClip { } }//package
Section 443
//MenuTopButtons (MenuTopButtons) package { import flash.display.*; public dynamic class MenuTopButtons extends MovieClip { } }//package
Section 444
//ModalMenuCloud (ModalMenuCloud) package { import flash.display.*; public dynamic class ModalMenuCloud extends MovieClip { } }//package
Section 445
//ModalMenuLargeCloud (ModalMenuLargeCloud) package { import flash.display.*; public dynamic class ModalMenuLargeCloud extends MovieClip { } }//package
Section 446
//MoveButton (MoveButton) package { import contraption.menu.*; public dynamic class MoveButton extends DashboardButton { } }//package
Section 447
//MoveMousePointer (MoveMousePointer) package { import flash.display.*; public dynamic class MoveMousePointer extends MovieClip { } }//package
Section 448
//NewLevelButton (NewLevelButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class NewLevelButton extends Button { public function NewLevelButton(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.LOAD_EDITOR; buttonWidth = 116; buttonHeight = 42; } } }//package
Section 449
//NewUserButton (NewUserButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class NewUserButton extends Button { public function NewUserButton(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.NEW_USER; buttonWidth = 116; buttonHeight = 42; } } }//package
Section 450
//NextLevelButton (NextLevelButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class NextLevelButton extends Button { public function NextLevelButton(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.LOAD_LEVEL; buttonWidth = 116; buttonHeight = 42; } } }//package
Section 451
//NextPageButton (NextPageButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class NextPageButton extends Button { public function NextPageButton(){ addFrameScript(0, frame1); } function frame1(){ buttonWidth = 37; buttonHeight = 27; } } }//package
Section 452
//NonPoweredWheelButton (NonPoweredWheelButton) package { import contraption.menu.*; public dynamic class NonPoweredWheelButton extends DashboardButton { } }//package
Section 453
//NonPoweredWheelGraphic (NonPoweredWheelGraphic) package { import flash.display.*; public dynamic class NonPoweredWheelGraphic extends MovieClip { } }//package
Section 454
//PlayDesignSmallButton (PlayDesignSmallButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class PlayDesignSmallButton extends Button { public function PlayDesignSmallButton(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.LOAD_DESIGN; toolTip = "View this contraption"; buttonWidth = 30; buttonHeight = 30; } } }//package
Section 455
//PlayGameButton (PlayGameButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class PlayGameButton extends Button { public function PlayGameButton(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.MENU_BACK; buttonWidth = 116; buttonHeight = 42; } } }//package
Section 456
//PlayLevelSmallButton (PlayLevelSmallButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class PlayLevelSmallButton extends Button { public function PlayLevelSmallButton(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.LOAD_LEVEL; toolTip = "Play this level"; buttonWidth = 30; buttonHeight = 30; } } }//package
Section 457
//PreviousMenuButton (PreviousMenuButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class PreviousMenuButton extends Button { public function PreviousMenuButton(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.MENU_BACK; buttonWidth = 116; buttonHeight = 42; } } }//package
Section 458
//PreviousPageButton (PreviousPageButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class PreviousPageButton extends Button { public function PreviousPageButton(){ addFrameScript(0, frame1); } function frame1(){ buttonWidth = 37; buttonHeight = 27; } } }//package
Section 459
//ResetPasswordButton (ResetPasswordButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class ResetPasswordButton extends Button { public function ResetPasswordButton(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.RESET_PASSWORD; buttonWidth = 116; buttonHeight = 42; } } }//package
Section 460
//RightArrow (RightArrow) package { import contraption.menu.*; public dynamic class RightArrow extends NoTabButton { } }//package
Section 461
//SaveButton (SaveButton) package { import contraption.menu.*; public dynamic class SaveButton extends DashboardButton { } }//package
Section 462
//SavedContraptionsButton (SavedContraptionsButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class SavedContraptionsButton extends Button { public function SavedContraptionsButton(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.LOAD_SAVED_DESIGNS; buttonWidth = 116; buttonHeight = 42; } } }//package
Section 463
//SavedLevelBackground (SavedLevelBackground) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class SavedLevelBackground extends SavedLevelBackgroundBase { public function SavedLevelBackground(){ addFrameScript(9, frame10, 19, frame20); } function frame20(){ stop(); } function frame10(){ stop(); } } }//package
Section 464
//SavedLevelBackgroundMask (SavedLevelBackgroundMask) package { import flash.events.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class SavedLevelBackgroundMask extends MovieClip { public function SavedLevelBackgroundMask(){ addFrameScript(9, frame10, 19, frame20); } function frame20(){ stop(); } function frame10(){ stop(); } } }//package
Section 465
//SavedLevelsButton (SavedLevelsButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class SavedLevelsButton extends Button { public function SavedLevelsButton(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.LOAD_SAVED_LEVELS; requiresLogIn = true; buttonWidth = 116; buttonHeight = 42; } } }//package
Section 466
//SeeTweet (SeeTweet) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class SeeTweet extends Button { public function SeeTweet(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.GOTO_TWITTER; buttonWidth = 116; buttonHeight = 42; } } }//package
Section 467
//SendFacebook (SendFacebook) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class SendFacebook extends Button { public function SendFacebook(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.SEND_FACEBOOK; buttonWidth = 116; buttonHeight = 42; } } }//package
Section 468
//SendTweet (SendTweet) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class SendTweet extends Button { public function SendTweet(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.SEND_TWITTER; buttonWidth = 116; buttonHeight = 42; } } }//package
Section 469
//SkipTutorialButton (SkipTutorialButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import contraption.tutorials.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class SkipTutorialButton extends TutorialButton { public function SkipTutorialButton(){ addFrameScript(0, frame1); } function frame1(){ downEvent = TutorialEvent.SKIP_TUTORIAL; buttonWidth = 116; buttonHeight = 42; } } }//package
Section 470
//SmallBackButton (SmallBackButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class SmallBackButton extends Button { public function SmallBackButton(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.MENU_BACK; buttonWidth = 116; buttonHeight = 42; } } }//package
Section 471
//SmallCancelButton (SmallCancelButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class SmallCancelButton extends Button { public function SmallCancelButton(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.MENU_BACK; buttonWidth = 116; buttonHeight = 42; } } }//package
Section 472
//SmallSaveButton (SmallSaveButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class SmallSaveButton extends Button { public function SmallSaveButton(){ addFrameScript(0, frame1); } function frame1(){ buttonWidth = 116; buttonHeight = 42; } } }//package
Section 473
//SolidRodButton (SolidRodButton) package { import contraption.menu.*; public dynamic class SolidRodButton extends DashboardButton { } }//package
Section 474
//SolidRodGraphic (SolidRodGraphic) package { import flash.display.*; public dynamic class SolidRodGraphic extends MovieClip { } }//package
Section 475
//SolidRodGraphicBG (SolidRodGraphicBG) package { import flash.display.*; public dynamic class SolidRodGraphicBG extends MovieClip { } }//package
Section 476
//SolutionsButton (SolutionsButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class SolutionsButton extends Button { public function SolutionsButton(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.LOAD_LEVEL_SOLUTIONS; toolTip = "View published designs people\nhave made for this level"; buttonWidth = 30; buttonHeight = 30; } } }//package
Section 477
//SoundOffButton (SoundOffButton) package { import flash.display.*; public dynamic class SoundOffButton extends SimpleButton { } }//package
Section 478
//SoundOnButton (SoundOnButton) package { import flash.display.*; public dynamic class SoundOnButton extends SimpleButton { } }//package
Section 479
//Splash (Splash) package { import flash.display.*; public dynamic class Splash extends MovieClip { public function Splash(){ addFrameScript(18, frame19, 29, frame30); } function frame30(){ stop(); } function frame19(){ stop(); } } }//package
Section 480
//StartHere (StartHere) package { import flash.display.*; public dynamic class StartHere extends MovieClip { } }//package
Section 481
//StaticCircleButton (StaticCircleButton) package { import contraption.menu.*; public dynamic class StaticCircleButton extends DashboardButton { } }//package
Section 482
//StaticSquareButton (StaticSquareButton) package { import contraption.menu.*; public dynamic class StaticSquareButton extends DashboardButton { } }//package
Section 483
//StopButton (StopButton) package { import contraption.menu.*; public dynamic class StopButton extends DashboardButton { } }//package
Section 484
//StopButtonPing (StopButtonPing) package { import flash.display.*; public dynamic class StopButtonPing extends MovieClip { public function StopButtonPing(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 485
//TestLevelButton (TestLevelButton) package { import contraption.menu.*; public dynamic class TestLevelButton extends DashboardButton { } }//package
Section 486
//tut1DrawWater (tut1DrawWater) package { import contraption.tutorials.*; public dynamic class tut1DrawWater extends AddedBlockBetweenWheelsOverlay { } }//package
Section 487
//tut1DrawWheel (tut1DrawWheel) package { import contraption.tutorials.*; public dynamic class tut1DrawWheel extends AddedBlockOverlay { } }//package
Section 488
//tut1Goal (tut1Goal) package { import contraption.tutorials.*; public dynamic class tut1Goal extends TutorialOverlay { } }//package
Section 489
//tut1PinkBall (tut1PinkBall) package { import contraption.tutorials.*; public dynamic class tut1PinkBall extends TutorialOverlay { } }//package
Section 490
//tut1PressStart (tut1PressStart) package { import contraption.tutorials.*; public dynamic class tut1PressStart extends PressStartOverlay { } }//package
Section 491
//tut1SelectWater (tut1SelectWater) package { import contraption.tutorials.*; public dynamic class tut1SelectWater extends HollowSelectedOverlay { } }//package
Section 492
//tut1SelectWheel (tut1SelectWheel) package { import contraption.tutorials.*; public dynamic class tut1SelectWheel extends WheelSelectedOverlay { } }//package
Section 493
//tut1Welcome (tut1Welcome) package { import contraption.tutorials.*; public dynamic class tut1Welcome extends TutorialOverlay { } }//package
Section 494
//tut1Workshop (tut1Workshop) package { import contraption.tutorials.*; public dynamic class tut1Workshop extends TutorialOverlay { } }//package
Section 495
//tut2DeleteFirstRod (tut2DeleteFirstRod) package { import contraption.tutorials.*; public dynamic class tut2DeleteFirstRod extends DeleteBlockOverlay { } }//package
Section 496
//tut2DeleteSecondRod (tut2DeleteSecondRod) package { import contraption.tutorials.*; public dynamic class tut2DeleteSecondRod extends DeleteBlockOverlay { } }//package
Section 497
//tut2FirstDrawWater (tut2FirstDrawWater) package { import contraption.tutorials.*; public dynamic class tut2FirstDrawWater extends AddedBlockBetweenWheelsOverlay { } }//package
Section 498
//tut2FirstSelectDelete (tut2FirstSelectDelete) package { import contraption.tutorials.*; public dynamic class tut2FirstSelectDelete extends DeleteSelectedOverlay { } }//package
Section 499
//tut2FirstSelectWater (tut2FirstSelectWater) package { import contraption.tutorials.*; public dynamic class tut2FirstSelectWater extends HollowSelectedOverlay { } }//package
Section 500
//tut2FirstStop (tut2FirstStop) package { import contraption.tutorials.*; public dynamic class tut2FirstStop extends PressStopOverlay { } }//package
Section 501
//tut2FirstTry (tut2FirstTry) package { import contraption.tutorials.*; public dynamic class tut2FirstTry extends PressStartOverlay { } }//package
Section 502
//tut2SecondDrawWater (tut2SecondDrawWater) package { import contraption.tutorials.*; public dynamic class tut2SecondDrawWater extends AddedBlockBetweenWheelsOverlay { } }//package
Section 503
//tut2SecondSelectDelete (tut2SecondSelectDelete) package { import contraption.tutorials.*; public dynamic class tut2SecondSelectDelete extends DeleteSelectedOverlay { } }//package
Section 504
//tut2SecondSelectWater (tut2SecondSelectWater) package { import contraption.tutorials.*; public dynamic class tut2SecondSelectWater extends HollowSelectedOverlay { } }//package
Section 505
//tut2SecondStop (tut2SecondStop) package { import contraption.tutorials.*; public dynamic class tut2SecondStop extends PressStopOverlay { } }//package
Section 506
//tut2SecondTry (tut2SecondTry) package { import contraption.tutorials.*; public dynamic class tut2SecondTry extends PressStartOverlay { } }//package
Section 507
//tut2ThirdTry (tut2ThirdTry) package { import contraption.tutorials.*; public dynamic class tut2ThirdTry extends PressStartOverlay { } }//package
Section 508
//tut2Welcome (tut2Welcome) package { import contraption.tutorials.*; public dynamic class tut2Welcome extends TutorialOverlay { } }//package
Section 509
//tut3Back (tut3Back) package { import contraption.tutorials.*; public dynamic class tut3Back extends TutorialOverlay { } }//package
Section 510
//tut3Delete (tut3Delete) package { import contraption.tutorials.*; public dynamic class tut3Delete extends TutorialOverlay { } }//package
Section 511
//tut3Goodbye (tut3Goodbye) package { import contraption.tutorials.*; public dynamic class tut3Goodbye extends TutorialOverlay { } }//package
Section 512
//tut3Move (tut3Move) package { import contraption.tutorials.*; public dynamic class tut3Move extends TutorialOverlay { } }//package
Section 513
//tut3NonPowerWheel (tut3NonPowerWheel) package { import contraption.tutorials.*; public dynamic class tut3NonPowerWheel extends TutorialOverlay { } }//package
Section 514
//tut3Save (tut3Save) package { import contraption.tutorials.*; public dynamic class tut3Save extends TutorialOverlay { } }//package
Section 515
//tut3Start (tut3Start) package { import contraption.tutorials.*; public dynamic class tut3Start extends TutorialOverlay { } }//package
Section 516
//tut3Water (tut3Water) package { import contraption.tutorials.*; public dynamic class tut3Water extends TutorialOverlay { } }//package
Section 517
//tut3Wheels (tut3Wheels) package { import contraption.tutorials.*; public dynamic class tut3Wheels extends TutorialOverlay { } }//package
Section 518
//tut3Wood (tut3Wood) package { import contraption.tutorials.*; public dynamic class tut3Wood extends TutorialOverlay { } }//package
Section 519
//tut3Zoom (tut3Zoom) package { import contraption.tutorials.*; public dynamic class tut3Zoom extends TutorialOverlay { } }//package
Section 520
//tutLocked (tutLocked) package { import contraption.tutorials.*; public dynamic class tutLocked extends TutorialOverlay { } }//package
Section 521
//TutorialNextButton (TutorialNextButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import contraption.tutorials.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class TutorialNextButton extends TutorialButton { public function TutorialNextButton(){ addFrameScript(0, frame1); } function frame1(){ downEvent = TutorialEvent.FINISHED_OVERLAY; buttonWidth = 56; buttonHeight = 42; } } }//package
Section 522
//TweetThis (TweetThis) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class TweetThis extends Button { public function TweetThis(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.LOAD_TWITTER; buttonWidth = 46; buttonHeight = 46; } } }//package
Section 523
//TwitterTitle (TwitterTitle) package { import flash.display.*; public dynamic class TwitterTitle extends SimpleButton { } }//package
Section 524
//UnPublishButton (UnPublishButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class UnPublishButton extends Button { public function UnPublishButton(){ addFrameScript(0, frame1); } function frame1(){ buttonWidth = 30; buttonHeight = 30; } } }//package
Section 525
//UpdateUserInfoButton (UpdateUserInfoButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class UpdateUserInfoButton extends Button { public function UpdateUserInfoButton(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.UPDATE_USER_INFO; buttonWidth = 116; buttonHeight = 42; } } }//package
Section 526
//UpdateUserInfoSubmitButton (UpdateUserInfoSubmitButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class UpdateUserInfoSubmitButton extends Button { public function UpdateUserInfoSubmitButton(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.UPDATE_USER_INFO; buttonWidth = 116; buttonHeight = 42; } } }//package
Section 527
//UserGenLevelsButton (UserGenLevelsButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class UserGenLevelsButton extends Button { public function UserGenLevelsButton(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.LOAD_USER_GENERATED_LEVELS; buttonWidth = 116; buttonHeight = 42; } } }//package
Section 528
//WorkingButton (WorkingButton) package { import flash.display.*; public dynamic class WorkingButton extends SimpleButton { } }//package
Section 529
//YourSavedContraptionsButton (YourSavedContraptionsButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class YourSavedContraptionsButton extends Button { public function YourSavedContraptionsButton(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.LOAD_SAVED_DESIGNS; buttonWidth = 116; buttonHeight = 42; } } }//package
Section 530
//YourSavedLevelsButton (YourSavedLevelsButton) package { import flash.events.*; import contraption.menu.*; import flash.display.*; import flash.net.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.media.*; import flash.ui.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.system.*; public dynamic class YourSavedLevelsButton extends Button { public function YourSavedLevelsButton(){ addFrameScript(0, frame1); } function frame1(){ downEvent = MenuEvent.LOAD_SAVED_LEVELS; buttonWidth = 116; buttonHeight = 42; } } }//package
Section 531
//ZoomInButton (ZoomInButton) package { import contraption.menu.*; public dynamic class ZoomInButton extends DashboardButton { } }//package
Section 532
//ZoomOutButton (ZoomOutButton) package { import contraption.menu.*; public dynamic class ZoomOutButton extends DashboardButton { } }//package

Library Items

Symbol 1 GraphicUsed by:7
Symbol 2 FontUsed by:3
Symbol 3 TextUses:2Used by:7
Symbol 4 GraphicUsed by:7
Symbol 5 FontUsed by:6 106 254 255 279 289 290 376 377 380 381 384 385 388 391 392 395 396 399 400 403 406 407 410 411 416 419 420 423 424 425 428 429 432 433 434 437 438 441 444 452 453 454 457 458 461 462 465 466 469 472 475 478 481 484 487 490 493 496 499 502
Symbol 6 TextUses:5Used by:7
Symbol 7 MovieClip {BuyGameButton} [BuyGameButton]Uses:1 3 4 6
Symbol 8 GraphicUsed by:12
Symbol 9 GraphicUsed by:12
Symbol 10 GraphicUsed by:12
Symbol 11 GraphicUsed by:12
Symbol 12 Button {ButtonBack} [ButtonBack]Uses:8 9 10 11Used by:15 17 26 28 30 32 34 36 38 40 68 70 83 85 89 91 220 222 238 258 260 262 270 304 330
Symbol 13 FontUsed by:14 16 23 25 27 29 31 33 35 37 39 67 69 82 84 90 219 221 235 237 257 259 261 266 269 274 277 278 287 288 293 303 329
Symbol 14 TextUses:13Used by:15
Symbol 15 MovieClip {LogInButton} [LogInButton]Uses:12 14
Symbol 16 TextUses:13Used by:17
Symbol 17 MovieClip {LogOutButton} [LogOutButton]Uses:12 16
Symbol 18 GraphicUsed by:22 234
Symbol 19 GraphicUsed by:22
Symbol 20 GraphicUsed by:22
Symbol 21 GraphicUsed by:22
Symbol 22 ButtonUses:18 19 20 21Used by:24
Symbol 23 TextUses:13Used by:24
Symbol 24 MovieClip {TutorialNextButton} [TutorialNextButton]Uses:22 23Used by:430 439 442 459 463 473 476 479 482 485 488 491 494 497 500 503
Symbol 25 TextUses:13Used by:26
Symbol 26 MovieClip {YourSavedLevelsButton} [YourSavedLevelsButton]Uses:12 25Used by:292
Symbol 27 TextUses:13Used by:28
Symbol 28 MovieClip {NewUserButton} [NewUserButton]Uses:12 27
Symbol 29 TextUses:13Used by:30 89
Symbol 30 MovieClip {PreviousMenuButton} [PreviousMenuButton]Uses:12 29Used by:75
Symbol 31 TextUses:13Used by:32
Symbol 32 MovieClip {ResetPasswordButton} [ResetPasswordButton]Uses:12 31
Symbol 33 TextUses:13Used by:34
Symbol 34 MovieClip {UserGenLevelsButton} [UserGenLevelsButton]Uses:12 33Used by:292
Symbol 35 TextUses:13Used by:36
Symbol 36 MovieClip {NewLevelButton} [NewLevelButton]Uses:12 35Used by:292
Symbol 37 TextUses:13Used by:38
Symbol 38 MovieClip {UpdateUserInfoButton} [UpdateUserInfoButton]Uses:12 37
Symbol 39 TextUses:13Used by:40
Symbol 40 MovieClip {MainMenuButton} [MainMenuButton]Uses:12 39Used by:75
Symbol 41 GraphicUsed by:42
Symbol 42 MovieClipUses:41Used by:47
Symbol 43 GraphicUsed by:44
Symbol 44 MovieClipUses:43Used by:47
Symbol 45 GraphicUsed by:46
Symbol 46 MovieClipUses:45Used by:47
Symbol 47 MovieClip {BubbleSceneChange} [BubbleSceneChange]Uses:42 44 46
Symbol 48 GraphicUsed by:65
Symbol 49 FontUsed by:50
Symbol 50 TextUses:49Used by:65
Symbol 51 GraphicUsed by:59
Symbol 52 GraphicUsed by:53
Symbol 53 MovieClipUses:52Used by:59
Symbol 54 GraphicUsed by:59
Symbol 55 GraphicUsed by:58
Symbol 56 TextUsed by:58
Symbol 57 GraphicUsed by:58
Symbol 58 MovieClipUses:55 56 57Used by:59
Symbol 59 MovieClipUses:51 53 54 58Used by:65
Symbol 60 GraphicUsed by:64
Symbol 61 FontUsed by:62 63
Symbol 62 TextUses:61Used by:64
Symbol 63 TextUses:61Used by:64
Symbol 64 ButtonUses:60 62 63Used by:65
Symbol 65 MovieClipUses:48 50 59 64Used by:66
Symbol 66 MovieClip {Splash} [Splash]Uses:65
Symbol 67 TextUses:13Used by:68
Symbol 68 MovieClip {SmallCancelButton} [SmallCancelButton]Uses:12 67
Symbol 69 TextUses:13Used by:70
Symbol 70 MovieClip {YourSavedContraptionsButton} [YourSavedContraptionsButton]Uses:12 69Used by:292
Symbol 71 GraphicUsed by:72
Symbol 72 MovieClip {Border} [Border]Uses:71
Symbol 73 GraphicUsed by:74
Symbol 74 MovieClip {MenuBackground} [MenuBackground]Uses:73
Symbol 75 MovieClip {MenuTopButtons} [MenuTopButtons]Uses:40 30
Symbol 76 GraphicUsed by:77
Symbol 77 MovieClip {ModalMenuCloud} [ModalMenuCloud]Uses:76
Symbol 78 GraphicUsed by:81
Symbol 79 GraphicUsed by:80
Symbol 80 MovieClipUses:79Used by:81
Symbol 81 MovieClip {ModalMenuLargeCloud} [ModalMenuLargeCloud]Uses:78 80
Symbol 82 TextUses:13Used by:83
Symbol 83 MovieClip {SmallSaveButton} [SmallSaveButton]Uses:12 82
Symbol 84 TextUses:13Used by:85
Symbol 85 MovieClip {UpdateUserInfoSubmitButton} [UpdateUserInfoSubmitButton]Uses:12 84
Symbol 86 BitmapUsed by:87
Symbol 87 GraphicUses:86Used by:88
Symbol 88 MovieClip {LoadFacebook} [LoadFacebook]Uses:87
Symbol 89 MovieClip {SmallBackButton} [SmallBackButton]Uses:12 29
Symbol 90 TextUses:13Used by:91
Symbol 91 MovieClip {SeeTweet} [SeeTweet]Uses:12 90
Symbol 92 GraphicUsed by:95
Symbol 93 GraphicUsed by:95
Symbol 94 GraphicUsed by:95 99
Symbol 95 Button {RightArrow} [RightArrow]Uses:92 93 94Used by:96
Symbol 96 MovieClip {NextPageButton} [NextPageButton]Uses:95
Symbol 97 GraphicUsed by:99
Symbol 98 GraphicUsed by:99
Symbol 99 Button {LeftArrow} [LeftArrow]Uses:97 98 94Used by:100
Symbol 100 MovieClip {PreviousPageButton} [PreviousPageButton]Uses:99
Symbol 101 GraphicUsed by:102 252 264
Symbol 102 MovieClip {DefaultMousePointer} [DefaultMousePointer]Uses:101
Symbol 103 GraphicUsed by:104
Symbol 104 MovieClip {BuildingMousePointer} [BuildingMousePointer]Uses:103
Symbol 105 GraphicUsed by:107
Symbol 106 TextUses:5Used by:107
Symbol 107 MovieClip {Level4Overlay} [Level4Overlay]Uses:105 106
Symbol 108 GraphicUsed by:109
Symbol 109 MovieClip {DashBackground} [DashBackground]Uses:108Used by:206
Symbol 110 GraphicUsed by:116 118
Symbol 111 GraphicUsed by:112 123 126 133 151 155 159 163 181 183 185 187 190 192
Symbol 112 MovieClipUses:111Used by:116 118 123 126 133 151 155 159 163 181 183 185 187 190 192
Symbol 113 GraphicUsed by:116
Symbol 114 GraphicUsed by:116 118
Symbol 115 GraphicUsed by:116 118
Symbol 116 Button {ZoomInButton} [ZoomInButton]Uses:110 112 113 114 115Used by:119
Symbol 117 GraphicUsed by:118
Symbol 118 Button {ZoomOutButton} [ZoomOutButton]Uses:110 112 117 114 115Used by:119
Symbol 119 MovieClip {Dashboard_fla.ZoomButtons_5} [Dashboard_fla.ZoomButtons_5]Uses:116 118Used by:206
Symbol 120 GraphicUsed by:121 123
Symbol 121 MovieClipUses:120Used by:123
Symbol 122 GraphicUsed by:123 126 133 151 155 159 163 181 183 185 187 190 192
Symbol 123 Button {DeleteButton} [DeleteButton]Uses:120 121 112 122 111Used by:179
Symbol 124 GraphicUsed by:125 126
Symbol 125 MovieClipUses:124Used by:126
Symbol 126 Button {MoveButton} [MoveButton]Uses:124 125 112 122 111Used by:179
Symbol 127 GraphicUsed by:128 133
Symbol 128 MovieClipUses:127Used by:131 132
Symbol 129 GraphicUsed by:130 133
Symbol 130 MovieClipUses:129Used by:131 132 522
Symbol 131 MovieClipUses:128 130Used by:133
Symbol 132 MovieClipUses:130 128Used by:133
Symbol 133 Button {SolidRodButton} [SolidRodButton]Uses:131 132 112 122 127 129 111Used by:179
Symbol 134 GraphicUsed by:135 151
Symbol 135 MovieClipUses:134Used by:151
Symbol 136 GraphicUsed by:137
Symbol 137 MovieClipUses:136Used by:138
Symbol 138 MovieClipUses:137Used by:139 352
Symbol 139 MovieClip {Dashboard_fla.Stream_22} [Dashboard_fla.Stream_22]Uses:138Used by:150
Symbol 140 ShapeTweeningUsed by:149
Symbol 141 ShapeTweeningUsed by:149
Symbol 142 ShapeTweeningUsed by:149
Symbol 143 ShapeTweeningUsed by:149
Symbol 144 ShapeTweeningUsed by:149
Symbol 145 ShapeTweeningUsed by:149
Symbol 146 ShapeTweeningUsed by:149
Symbol 147 ShapeTweeningUsed by:149
Symbol 148 GraphicUsed by:149
Symbol 149 MovieClipUses:140 141 142 143 144 145 146 147 148Used by:150
Symbol 150 MovieClip {HollowRod} [HollowRod]Uses:139 149Used by:151
Symbol 151 Button {HollowRodButton} [HollowRodButton]Uses:135 150 112 122 134 111Used by:179
Symbol 152 GraphicUsed by:153 155
Symbol 153 MovieClipUses:152Used by:154 155
Symbol 154 MovieClipUses:153Used by:155
Symbol 155 Button {NonPoweredWheelButton} [NonPoweredWheelButton]Uses:153 154 112 122 152 111Used by:179
Symbol 156 GraphicUsed by:157 159
Symbol 157 MovieClip {CounterClockwiseWheel} [CounterClockwiseWheel]Uses:156Used by:158 159
Symbol 158 MovieClipUses:157Used by:159
Symbol 159 Button {CounterClockwiseWheelButton} [CounterClockwiseWheelButton]Uses:157 158 112 122 156 111Used by:179
Symbol 160 GraphicUsed by:161 162 163
Symbol 161 MovieClip {ClockwiseWheel} [ClockwiseWheel]Uses:160Used by:163
Symbol 162 MovieClipUses:160Used by:163
Symbol 163 Button {ClockwiseWheelButton} [ClockwiseWheelButton]Uses:161 162 112 122 160 111Used by:179
Symbol 164 GraphicUsed by:165
Symbol 165 MovieClipUses:164Used by:166
Symbol 166 MovieClip {StopButtonPing} [StopButtonPing]Uses:165Used by:178
Symbol 167 GraphicUsed by:173 203
Symbol 168 GraphicUsed by:169 173 177 194 203
Symbol 169 MovieClipUses:168Used by:173 177 194 203
Symbol 170 FontUsed by:171 175 189 193 202
Symbol 171 TextUses:170Used by:173
Symbol 172 GraphicUsed by:173 203
Symbol 173 Button {StopButton} [StopButton]Uses:167 169 171 172 168Used by:178
Symbol 174 GraphicUsed by:177 194
Symbol 175 TextUses:170Used by:177
Symbol 176 GraphicUsed by:177 194
Symbol 177 Button {GoButton} [GoButton]Uses:174 169 175 176 168Used by:178
Symbol 178 MovieClip {Dashboard_fla.GoStopButtons_35} [Dashboard_fla.GoStopButtons_35]Uses:166 173 177Used by:179
Symbol 179 MovieClip {Dashboard_fla.ContraptionButtons_9} [Dashboard_fla.ContraptionButtons_9]Uses:123 126 133 151 155 159 163 178Used by:206
Symbol 180 GraphicUsed by:181
Symbol 181 Button {DynamicSquareButton} [DynamicSquareButton]Uses:180 112 122 111Used by:195
Symbol 182 GraphicUsed by:183
Symbol 183 Button {DynamicCircleButton} [DynamicCircleButton]Uses:182 112 122 111Used by:195
Symbol 184 GraphicUsed by:185
Symbol 185 Button {StaticSquareButton} [StaticSquareButton]Uses:184 112 122 111Used by:195
Symbol 186 GraphicUsed by:187
Symbol 187 Button {StaticCircleButton} [StaticCircleButton]Uses:186 112 122 111Used by:195
Symbol 188 GraphicUsed by:190
Symbol 189 TextUses:170Used by:190 192
Symbol 190 Button {GoalSquareButton} [GoalSquareButton]Uses:188 189 112 122 111Used by:195
Symbol 191 GraphicUsed by:192
Symbol 192 Button {GoalCircleButton} [GoalCircleButton]Uses:191 189 112 122 111Used by:195
Symbol 193 TextUses:170Used by:194
Symbol 194 Button {TestLevelButton} [TestLevelButton]Uses:174 169 193 176 168Used by:195
Symbol 195 MovieClip {Dashboard_fla.LevelButtons_41} [Dashboard_fla.LevelButtons_41]Uses:181 183 185 187 190 192 194Used by:206
Symbol 196 GraphicUsed by:199
Symbol 197 GraphicUsed by:199
Symbol 198 GraphicUsed by:199 201
Symbol 199 Button {BackButton} [BackButton]Uses:196 197 198Used by:206
Symbol 200 GraphicUsed by:201
Symbol 201 Button {SaveButton} [SaveButton]Uses:200 198Used by:206
Symbol 202 TextUses:170Used by:203
Symbol 203 Button {BackTestButton} [BackTestButton]Uses:167 169 202 172 168Used by:206
Symbol 204 FontUsed by:205
Symbol 205 EditableTextUses:204Used by:206
Symbol 206 MovieClip {Dashboard_fla.Buttons_3} [Dashboard_fla.Buttons_3]Uses:109 119 179 195 199 201 203 205Used by:210
Symbol 207 GraphicUsed by:209
Symbol 208 GraphicUsed by:209
Symbol 209 ButtonUses:207 208Used by:210
Symbol 210 MovieClip {Expander} [Expander]Uses:206 209Used by:211
Symbol 211 MovieClip {DashboardImpl} [DashboardImpl]Uses:210
Symbol 212 MovieClip {Clouds} [Clouds]
Symbol 213 FontUsed by:214 215 295 296 299 300 301
Symbol 214 TextUses:213Used by:218
Symbol 215 TextUses:213Used by:218
Symbol 216 BitmapUsed by:217
Symbol 217 GraphicUses:216Used by:218
Symbol 218 Button {FacebookTitle} [FacebookTitle]Uses:214 215 217
Symbol 219 TextUses:13Used by:220
Symbol 220 MovieClip {SendFacebook} [SendFacebook]Uses:12 219
Symbol 221 TextUses:13Used by:222
Symbol 222 Button {WorkingButton} [WorkingButton]Uses:12 221
Symbol 223 BitmapUsed by:224
Symbol 224 GraphicUses:223Used by:225
Symbol 225 Button {FCIcon} [FCIcon]Uses:224
Symbol 226 GraphicUsed by:228
Symbol 227 GraphicUsed by:228 230
Symbol 228 Button {SoundOnButton} [SoundOnButton]Uses:226 227
Symbol 229 GraphicUsed by:230 371
Symbol 230 Button {SoundOffButton} [SoundOffButton]Uses:227 229
Symbol 231 GraphicUsed by:234
Symbol 232 GraphicUsed by:234
Symbol 233 GraphicUsed by:234
Symbol 234 ButtonUses:18 231 232 233Used by:236 294
Symbol 235 TextUses:13Used by:236
Symbol 236 MovieClip {NextLevelButton} [NextLevelButton]Uses:234 235
Symbol 237 TextUses:13Used by:238
Symbol 238 MovieClip {BackToMenuButton} [BackToMenuButton]Uses:12 237
Symbol 239 GraphicUsed by:240
Symbol 240 MovieClip {ButtonMousePointer} [ButtonMousePointer]Uses:239
Symbol 241 GraphicUsed by:242
Symbol 242 MovieClip {DragMousePointer} [DragMousePointer]Uses:241
Symbol 243 GraphicUsed by:244
Symbol 244 MovieClip {DragActingMousePointer} [DragActingMousePointer]Uses:243
Symbol 245 BitmapUsed by:246
Symbol 246 GraphicUses:245Used by:247
Symbol 247 MovieClip {EmailThis} [EmailThis]Uses:246
Symbol 248 BitmapUsed by:249
Symbol 249 GraphicUses:248Used by:250
Symbol 250 MovieClip {TweetThis} [TweetThis]Uses:249
Symbol 251 GraphicUsed by:252
Symbol 252 MovieClip {DeleteMousePointer} [DeleteMousePointer]Uses:101 251
Symbol 253 GraphicUsed by:256
Symbol 254 TextUses:5Used by:256
Symbol 255 TextUses:5Used by:256
Symbol 256 MovieClip {LinkedInOverlay} [LinkedInOverlay]Uses:253 254 255
Symbol 257 TextUses:13Used by:258
Symbol 258 MovieClip {ContinueButton} [ContinueButton]Uses:12 257
Symbol 259 TextUses:13Used by:260
Symbol 260 MovieClip {SavedLevelsButton} [SavedLevelsButton]Uses:12 259
Symbol 261 TextUses:13Used by:262
Symbol 262 MovieClip {SavedContraptionsButton} [SavedContraptionsButton]Uses:12 261
Symbol 263 GraphicUsed by:264
Symbol 264 MovieClip {MoveMousePointer} [MoveMousePointer]Uses:101 263
Symbol 265 GraphicUsed by:268
Symbol 266 TextUses:13Used by:268
Symbol 267 GraphicUsed by:268
Symbol 268 MovieClip {BuyMenuBackground} [BuyMenuBackground]Uses:265 266 267
Symbol 269 TextUses:13Used by:270
Symbol 270 MovieClip {SkipTutorialButton} [SkipTutorialButton]Uses:12 269
Symbol 271 GraphicUsed by:273
Symbol 272 GraphicUsed by:273
Symbol 273 ButtonUses:271 272Used by:275
Symbol 274 TextUses:13Used by:275
Symbol 275 MovieClip {LearnToPlayButton} [LearnToPlayButton]Uses:273 274
Symbol 276 GraphicUsed by:284 291
Symbol 277 TextUses:13Used by:284
Symbol 278 TextUses:13Used by:284
Symbol 279 TextUses:5Used by:284
Symbol 280 FontUsed by:281 282
Symbol 281 TextUses:280Used by:284
Symbol 282 EditableTextUses:280Used by:284
Symbol 283 GraphicUsed by:284 291
Symbol 284 Button {LinkBackButton} [LinkBackButton]Uses:276 277 278 279 281 282 283
Symbol 285 GraphicUsed by:286
Symbol 286 MovieClip {StartHere} [StartHere]Uses:285
Symbol 287 TextUses:13Used by:291
Symbol 288 TextUses:13Used by:291
Symbol 289 TextUses:5Used by:291
Symbol 290 TextUses:5Used by:291
Symbol 291 Button {FullVersionButton} [FullVersionButton]Uses:276 287 288 289 290 283
Symbol 292 MovieClip {MainMenuButtons} [MainMenuButtons]Uses:70 34 26 36
Symbol 293 TextUses:13Used by:294
Symbol 294 MovieClip {ContinueTutorialButton} [ContinueTutorialButton]Uses:234 293
Symbol 295 TextUses:213Used by:302
Symbol 296 TextUses:213Used by:302
Symbol 297 BitmapUsed by:298
Symbol 298 GraphicUses:297Used by:302
Symbol 299 TextUses:213Used by:302
Symbol 300 TextUses:213Used by:302
Symbol 301 TextUses:213Used by:302
Symbol 302 Button {TwitterTitle} [TwitterTitle]Uses:295 296 298 299 300 301
Symbol 303 TextUses:13Used by:304
Symbol 304 MovieClip {SendTweet} [SendTweet]Uses:12 303
Symbol 305 GraphicUsed by:315 518
Symbol 306 GraphicUsed by:315 518
Symbol 307 GraphicUsed by:315 518
Symbol 308 GraphicUsed by:315 518
Symbol 309 GraphicUsed by:315 518
Symbol 310 GraphicUsed by:315 518
Symbol 311 GraphicUsed by:315 518
Symbol 312 GraphicUsed by:315 518
Symbol 313 GraphicUsed by:315 518
Symbol 314 GraphicUsed by:315 518
Symbol 315 MovieClip {SavedLevelBackground} [SavedLevelBackground]Uses:305 306 307 308 309 310 311 312 313 314
Symbol 316 GraphicUsed by:317 328
Symbol 317 MovieClip {DeleteDesignButton} [DeleteDesignButton]Uses:316
Symbol 318 GraphicUsed by:319 324
Symbol 319 MovieClip {PlayDesignSmallButton} [PlayDesignSmallButton]Uses:318
Symbol 320 GraphicUsed by:321 325
Symbol 321 MovieClip {LinkDesignButton} [LinkDesignButton]Uses:320
Symbol 322 GraphicUsed by:323
Symbol 323 MovieClip {SolutionsButton} [SolutionsButton]Uses:322
Symbol 324 MovieClip {PlayLevelSmallButton} [PlayLevelSmallButton]Uses:318
Symbol 325 MovieClip {LinkLevelButton} [LinkLevelButton]Uses:320
Symbol 326 GraphicUsed by:327
Symbol 327 MovieClip {EditLevelButton} [EditLevelButton]Uses:326
Symbol 328 MovieClip {DeleteLevelButton} [DeleteLevelButton]Uses:316
Symbol 329 TextUses:13Used by:330
Symbol 330 MovieClip {PlayGameButton} [PlayGameButton]Uses:12 329
Symbol 331 GraphicUsed by:335
Symbol 332 GraphicUsed by:335
Symbol 333 GraphicUsed by:335
Symbol 334 GraphicUsed by:335
Symbol 335 MovieClip {ArtAssets_fla.MultiCloud_107} [ArtAssets_fla.MultiCloud_107]Uses:331 332 333 334Used by:336
Symbol 336 MovieClip {BobbingCloud} [BobbingCloud]Uses:335
Symbol 337 GraphicUsed by:338
Symbol 338 MovieClipUses:337Used by:339
Symbol 339 MovieClipUses:338Used by:340
Symbol 340 MovieClip {contraption_objects_fla.StreamBG_9} [contraption_objects_fla.StreamBG_9]Uses:339Used by:351
Symbol 341 ShapeTweeningUsed by:350
Symbol 342 ShapeTweeningUsed by:350
Symbol 343 ShapeTweeningUsed by:350
Symbol 344 ShapeTweeningUsed by:350
Symbol 345 ShapeTweeningUsed by:350
Symbol 346 ShapeTweeningUsed by:350
Symbol 347 ShapeTweeningUsed by:350
Symbol 348 ShapeTweeningUsed by:350
Symbol 349 GraphicUsed by:350
Symbol 350 MovieClipUses:341 342 343 344 345 346 347 348 349Used by:351
Symbol 351 MovieClip {HollowRodGraphicBG} [HollowRodGraphicBG]Uses:340 350
Symbol 352 MovieClip {contraption_objects_fla.Stream_14} [contraption_objects_fla.Stream_14]Uses:138Used by:363
Symbol 353 ShapeTweeningUsed by:362
Symbol 354 ShapeTweeningUsed by:362
Symbol 355 ShapeTweeningUsed by:362
Symbol 356 ShapeTweeningUsed by:362
Symbol 357 ShapeTweeningUsed by:362
Symbol 358 ShapeTweeningUsed by:362
Symbol 359 ShapeTweeningUsed by:362
Symbol 360 ShapeTweeningUsed by:362
Symbol 361 GraphicUsed by:362
Symbol 362 MovieClipUses:353 354 355 356 357 358 359 360 361Used by:363
Symbol 363 MovieClip {HollowRodGraphic} [HollowRodGraphic]Uses:352 362
Symbol 364 GraphicUsed by:365
Symbol 365 MovieClip {ClockwiseWheelGraphic} [ClockwiseWheelGraphic]Uses:364Used by:450
Symbol 366 GraphicUsed by:367
Symbol 367 MovieClip {NonPoweredWheelGraphic} [NonPoweredWheelGraphic]Uses:366
Symbol 368 GraphicUsed by:369
Symbol 369 MovieClip {CounterClockwiseWheelGraphic} [CounterClockwiseWheelGraphic]Uses:368
Symbol 370 GraphicUsed by:371 372
Symbol 371 Button {GraphicsOffButton} [GraphicsOffButton]Uses:370 229
Symbol 372 Button {GraphicsOnButton} [GraphicsOnButton]Uses:370
Symbol 373 GraphicUsed by:378
Symbol 374 GraphicUsed by:375
Symbol 375 MovieClipUses:374Used by:378 382 389 404 408 426 455
Symbol 376 TextUses:5Used by:378
Symbol 377 TextUses:5Used by:378
Symbol 378 MovieClip {tut2FirstDrawWater} [tut2FirstDrawWater]Uses:373 375 376 377
Symbol 379 GraphicUsed by:382
Symbol 380 TextUses:5Used by:382
Symbol 381 TextUses:5Used by:382
Symbol 382 MovieClip {tut2DeleteSecondRod} [tut2DeleteSecondRod]Uses:379 375 380 381
Symbol 383 GraphicUsed by:386
Symbol 384 TextUses:5Used by:386
Symbol 385 TextUses:5Used by:386
Symbol 386 MovieClip {tut2FirstStop} [tut2FirstStop]Uses:383 384 385
Symbol 387 GraphicUsed by:389
Symbol 388 TextUses:5Used by:389
Symbol 389 MovieClip {tut2FirstSelectWater} [tut2FirstSelectWater]Uses:387 375 388
Symbol 390 GraphicUsed by:393
Symbol 391 TextUses:5Used by:393
Symbol 392 TextUses:5Used by:393
Symbol 393 MovieClip {tut2FirstSelectDelete} [tut2FirstSelectDelete]Uses:390 391 392
Symbol 394 GraphicUsed by:397
Symbol 395 TextUses:5Used by:397
Symbol 396 TextUses:5Used by:397
Symbol 397 MovieClip {tut2ThirdTry} [tut2ThirdTry]Uses:394 395 396
Symbol 398 GraphicUsed by:401
Symbol 399 TextUses:5Used by:401
Symbol 400 TextUses:5Used by:401
Symbol 401 MovieClip {tut2SecondTry} [tut2SecondTry]Uses:398 399 400
Symbol 402 GraphicUsed by:404
Symbol 403 TextUses:5Used by:404
Symbol 404 MovieClip {tut2SecondSelectWater} [tut2SecondSelectWater]Uses:402 375 403
Symbol 405 GraphicUsed by:408
Symbol 406 TextUses:5Used by:408
Symbol 407 TextUses:5Used by:408
Symbol 408 MovieClip {tut2DeleteFirstRod} [tut2DeleteFirstRod]Uses:405 375 406 407
Symbol 409 GraphicUsed by:412
Symbol 410 TextUses:5Used by:412
Symbol 411 TextUses:5Used by:412
Symbol 412 MovieClip {tut2FirstTry} [tut2FirstTry]Uses:409 410 411
Symbol 413 GraphicUsed by:414
Symbol 414 MovieClip {tutLocked} [tutLocked]Uses:413
Symbol 415 GraphicUsed by:417
Symbol 416 TextUses:5Used by:417
Symbol 417 MovieClip {tut2SecondSelectDelete} [tut2SecondSelectDelete]Uses:415 416
Symbol 418 GraphicUsed by:421
Symbol 419 TextUses:5Used by:421
Symbol 420 TextUses:5Used by:421
Symbol 421 MovieClip {tut2SecondStop} [tut2SecondStop]Uses:418 419 420
Symbol 422 GraphicUsed by:426
Symbol 423 TextUses:5Used by:426
Symbol 424 TextUses:5Used by:426
Symbol 425 TextUses:5Used by:426
Symbol 426 MovieClip {tut2SecondDrawWater} [tut2SecondDrawWater]Uses:422 375 423 424 425
Symbol 427 GraphicUsed by:430
Symbol 428 TextUses:5Used by:430
Symbol 429 TextUses:5Used by:430
Symbol 430 MovieClip {tut2Welcome} [tut2Welcome]Uses:427 428 429 24
Symbol 431 GraphicUsed by:435
Symbol 432 TextUses:5Used by:435
Symbol 433 TextUses:5Used by:435
Symbol 434 TextUses:5Used by:435
Symbol 435 MovieClip {tut1SelectWater} [tut1SelectWater]Uses:431 432 433 434
Symbol 436 GraphicUsed by:439
Symbol 437 TextUses:5Used by:439
Symbol 438 TextUses:5Used by:439
Symbol 439 MovieClip {tut1Welcome} [tut1Welcome]Uses:436 437 438 24
Symbol 440 GraphicUsed by:442
Symbol 441 TextUses:5Used by:442
Symbol 442 MovieClip {tut1Goal} [tut1Goal]Uses:440 441 24
Symbol 443 GraphicUsed by:450
Symbol 444 TextUses:5Used by:450
Symbol 445 GraphicUsed by:450
Symbol 446 GraphicUsed by:450
Symbol 447 GraphicUsed by:450
Symbol 448 GraphicUsed by:450
Symbol 449 GraphicUsed by:450
Symbol 450 MovieClip {tut1DrawWater} [tut1DrawWater]Uses:443 444 445 446 365 447 448 449
Symbol 451 GraphicUsed by:455
Symbol 452 TextUses:5Used by:455
Symbol 453 TextUses:5Used by:455
Symbol 454 TextUses:5Used by:455
Symbol 455 MovieClip {tut1PressStart} [tut1PressStart]Uses:451 375 452 453 454
Symbol 456 GraphicUsed by:459
Symbol 457 TextUses:5Used by:459
Symbol 458 TextUses:5Used by:459
Symbol 459 MovieClip {tut1Workshop} [tut1Workshop]Uses:456 457 458 24
Symbol 460 GraphicUsed by:463
Symbol 461 TextUses:5Used by:463
Symbol 462 TextUses:5Used by:463
Symbol 463 MovieClip {tut1PinkBall} [tut1PinkBall]Uses:460 461 462 24
Symbol 464 GraphicUsed by:467
Symbol 465 TextUses:5Used by:467
Symbol 466 TextUses:5Used by:467
Symbol 467 MovieClip {tut1SelectWheel} [tut1SelectWheel]Uses:464 465 466
Symbol 468 GraphicUsed by:470
Symbol 469 TextUses:5Used by:470
Symbol 470 MovieClip {tut1DrawWheel} [tut1DrawWheel]Uses:468 469
Symbol 471 GraphicUsed by:473
Symbol 472 TextUses:5Used by:473
Symbol 473 MovieClip {tut3Move} [tut3Move]Uses:471 472 24
Symbol 474 GraphicUsed by:476
Symbol 475 TextUses:5Used by:476
Symbol 476 MovieClip {tut3Water} [tut3Water]Uses:474 475 24
Symbol 477 GraphicUsed by:479
Symbol 478 TextUses:5Used by:479
Symbol 479 MovieClip {tut3Save} [tut3Save]Uses:477 478 24
Symbol 480 GraphicUsed by:482
Symbol 481 TextUses:5Used by:482
Symbol 482 MovieClip {tut3Goodbye} [tut3Goodbye]Uses:480 481 24
Symbol 483 GraphicUsed by:485
Symbol 484 TextUses:5Used by:485
Symbol 485 MovieClip {tut3Wood} [tut3Wood]Uses:483 484 24
Symbol 486 GraphicUsed by:488
Symbol 487 TextUses:5Used by:488
Symbol 488 MovieClip {tut3Back} [tut3Back]Uses:486 487 24
Symbol 489 GraphicUsed by:491
Symbol 490 TextUses:5Used by:491
Symbol 491 MovieClip {tut3Zoom} [tut3Zoom]Uses:489 490 24
Symbol 492 GraphicUsed by:494
Symbol 493 TextUses:5Used by:494
Symbol 494 MovieClip {tut3NonPowerWheel} [tut3NonPowerWheel]Uses:492 493 24
Symbol 495 GraphicUsed by:497
Symbol 496 TextUses:5Used by:497
Symbol 497 MovieClip {tut3Delete} [tut3Delete]Uses:495 496 24
Symbol 498 GraphicUsed by:500
Symbol 499 TextUses:5Used by:500
Symbol 500 MovieClip {tut3Wheels} [tut3Wheels]Uses:498 499 24
Symbol 501 GraphicUsed by:503
Symbol 502 TextUses:5Used by:503
Symbol 503 MovieClip {tut3Start} [tut3Start]Uses:501 502 24
Symbol 504 GraphicUsed by:505
Symbol 505 MovieClipUses:504Used by:508
Symbol 506 GraphicUsed by:507 508
Symbol 507 MovieClipUses:506Used by:508
Symbol 508 Button {LevelCircleChecked} [LevelCircleChecked]Uses:505 507 506
Symbol 509 GraphicUsed by:510
Symbol 510 MovieClipUses:509Used by:513
Symbol 511 GraphicUsed by:512 513
Symbol 512 MovieClipUses:511Used by:513
Symbol 513 Button {LevelCircle} [LevelCircle]Uses:510 512 511
Symbol 514 GraphicUsed by:515
Symbol 515 MovieClip {DoPublishButton} [DoPublishButton]Uses:514
Symbol 516 GraphicUsed by:517
Symbol 517 MovieClip {UnPublishButton} [UnPublishButton]Uses:516
Symbol 518 MovieClip {SavedLevelBackgroundMask} [SavedLevelBackgroundMask]Uses:305 306 307 308 309 310 311 312 313 314
Symbol 519 GraphicUsed by:520
Symbol 520 MovieClipUses:519Used by:522
Symbol 521 GraphicUsed by:522
Symbol 522 MovieClip {SolidRodGraphic} [SolidRodGraphic]Uses:520 521 130
Symbol 523 GraphicUsed by:524
Symbol 524 MovieClip {SolidRodGraphicBG} [SolidRodGraphicBG]Uses:523
Symbol 525 Font {Contraption_LAWS_FONT}

Instance Names

"zoomInButton"Symbol 119 MovieClip {Dashboard_fla.ZoomButtons_5} [Dashboard_fla.ZoomButtons_5] Frame 1Symbol 116 Button {ZoomInButton} [ZoomInButton]
"zoomOutButton"Symbol 119 MovieClip {Dashboard_fla.ZoomButtons_5} [Dashboard_fla.ZoomButtons_5] Frame 1Symbol 118 Button {ZoomOutButton} [ZoomOutButton]
"dropBouncing"Symbol 139 MovieClip {Dashboard_fla.Stream_22} [Dashboard_fla.Stream_22] Frame 1Symbol 138 MovieClip
"one"Symbol 150 MovieClip {HollowRod} [HollowRod] Frame 1Symbol 139 MovieClip {Dashboard_fla.Stream_22} [Dashboard_fla.Stream_22]
"stopButtonPing"Symbol 178 MovieClip {Dashboard_fla.GoStopButtons_35} [Dashboard_fla.GoStopButtons_35] Frame 1Symbol 166 MovieClip {StopButtonPing} [StopButtonPing]
"stopButton"Symbol 178 MovieClip {Dashboard_fla.GoStopButtons_35} [Dashboard_fla.GoStopButtons_35] Frame 1Symbol 173 Button {StopButton} [StopButton]
"goButton"Symbol 178 MovieClip {Dashboard_fla.GoStopButtons_35} [Dashboard_fla.GoStopButtons_35] Frame 1Symbol 177 Button {GoButton} [GoButton]
"deleteButton"Symbol 179 MovieClip {Dashboard_fla.ContraptionButtons_9} [Dashboard_fla.ContraptionButtons_9] Frame 1Symbol 123 Button {DeleteButton} [DeleteButton]
"moveButton"Symbol 179 MovieClip {Dashboard_fla.ContraptionButtons_9} [Dashboard_fla.ContraptionButtons_9] Frame 1Symbol 126 Button {MoveButton} [MoveButton]
"solidRodButton"Symbol 179 MovieClip {Dashboard_fla.ContraptionButtons_9} [Dashboard_fla.ContraptionButtons_9] Frame 1Symbol 133 Button {SolidRodButton} [SolidRodButton]
"hollowRodButton"Symbol 179 MovieClip {Dashboard_fla.ContraptionButtons_9} [Dashboard_fla.ContraptionButtons_9] Frame 1Symbol 151 Button {HollowRodButton} [HollowRodButton]
"npWheelButton"Symbol 179 MovieClip {Dashboard_fla.ContraptionButtons_9} [Dashboard_fla.ContraptionButtons_9] Frame 1Symbol 155 Button {NonPoweredWheelButton} [NonPoweredWheelButton]
"ccwWheelButton"Symbol 179 MovieClip {Dashboard_fla.ContraptionButtons_9} [Dashboard_fla.ContraptionButtons_9] Frame 1Symbol 159 Button {CounterClockwiseWheelButton} [CounterClockwiseWheelButton]
"cwWheelButton"Symbol 179 MovieClip {Dashboard_fla.ContraptionButtons_9} [Dashboard_fla.ContraptionButtons_9] Frame 1Symbol 163 Button {ClockwiseWheelButton} [ClockwiseWheelButton]
"goStopButtons"Symbol 179 MovieClip {Dashboard_fla.ContraptionButtons_9} [Dashboard_fla.ContraptionButtons_9] Frame 1Symbol 178 MovieClip {Dashboard_fla.GoStopButtons_35} [Dashboard_fla.GoStopButtons_35]
"dynamicSquareButton"Symbol 195 MovieClip {Dashboard_fla.LevelButtons_41} [Dashboard_fla.LevelButtons_41] Frame 1Symbol 181 Button {DynamicSquareButton} [DynamicSquareButton]
"dynamicCircleButton"Symbol 195 MovieClip {Dashboard_fla.LevelButtons_41} [Dashboard_fla.LevelButtons_41] Frame 1Symbol 183 Button {DynamicCircleButton} [DynamicCircleButton]
"staticSquareButton"Symbol 195 MovieClip {Dashboard_fla.LevelButtons_41} [Dashboard_fla.LevelButtons_41] Frame 1Symbol 185 Button {StaticSquareButton} [StaticSquareButton]
"staticCircleButton"Symbol 195 MovieClip {Dashboard_fla.LevelButtons_41} [Dashboard_fla.LevelButtons_41] Frame 1Symbol 187 Button {StaticCircleButton} [StaticCircleButton]
"goalSquareButton"Symbol 195 MovieClip {Dashboard_fla.LevelButtons_41} [Dashboard_fla.LevelButtons_41] Frame 1Symbol 190 Button {GoalSquareButton} [GoalSquareButton]
"goalCircleButton"Symbol 195 MovieClip {Dashboard_fla.LevelButtons_41} [Dashboard_fla.LevelButtons_41] Frame 1Symbol 192 Button {GoalCircleButton} [GoalCircleButton]
"testLevelButton"Symbol 195 MovieClip {Dashboard_fla.LevelButtons_41} [Dashboard_fla.LevelButtons_41] Frame 1Symbol 194 Button {TestLevelButton} [TestLevelButton]
"zoomButtons"Symbol 206 MovieClip {Dashboard_fla.Buttons_3} [Dashboard_fla.Buttons_3] Frame 1Symbol 119 MovieClip {Dashboard_fla.ZoomButtons_5} [Dashboard_fla.ZoomButtons_5]
"contraptionButtons"Symbol 206 MovieClip {Dashboard_fla.Buttons_3} [Dashboard_fla.Buttons_3] Frame 1Symbol 179 MovieClip {Dashboard_fla.ContraptionButtons_9} [Dashboard_fla.ContraptionButtons_9]
"levelButtons"Symbol 206 MovieClip {Dashboard_fla.Buttons_3} [Dashboard_fla.Buttons_3] Frame 1Symbol 195 MovieClip {Dashboard_fla.LevelButtons_41} [Dashboard_fla.LevelButtons_41]
"backButton"Symbol 206 MovieClip {Dashboard_fla.Buttons_3} [Dashboard_fla.Buttons_3] Frame 1Symbol 199 Button {BackButton} [BackButton]
"saveButton"Symbol 206 MovieClip {Dashboard_fla.Buttons_3} [Dashboard_fla.Buttons_3] Frame 1Symbol 201 Button {SaveButton} [SaveButton]
"backTestButton"Symbol 206 MovieClip {Dashboard_fla.Buttons_3} [Dashboard_fla.Buttons_3] Frame 1Symbol 203 Button {BackTestButton} [BackTestButton]
"tooltip"Symbol 206 MovieClip {Dashboard_fla.Buttons_3} [Dashboard_fla.Buttons_3] Frame 1Symbol 205 EditableText
"dash"Symbol 210 MovieClip {Expander} [Expander] Frame 1Symbol 206 MovieClip {Dashboard_fla.Buttons_3} [Dashboard_fla.Buttons_3]
"expandButton"Symbol 210 MovieClip {Expander} [Expander] Frame 1Symbol 209 Button
"dropBouncing"Symbol 340 MovieClip {contraption_objects_fla.StreamBG_9} [contraption_objects_fla.StreamBG_9] Frame 1Symbol 339 MovieClip
"four"Symbol 351 MovieClip {HollowRodGraphicBG} [HollowRodGraphicBG] Frame 1Symbol 340 MovieClip {contraption_objects_fla.StreamBG_9} [contraption_objects_fla.StreamBG_9]
"three"Symbol 351 MovieClip {HollowRodGraphicBG} [HollowRodGraphicBG] Frame 1Symbol 340 MovieClip {contraption_objects_fla.StreamBG_9} [contraption_objects_fla.StreamBG_9]
"two"Symbol 351 MovieClip {HollowRodGraphicBG} [HollowRodGraphicBG] Frame 1Symbol 340 MovieClip {contraption_objects_fla.StreamBG_9} [contraption_objects_fla.StreamBG_9]
"one"Symbol 351 MovieClip {HollowRodGraphicBG} [HollowRodGraphicBG] Frame 1Symbol 340 MovieClip {contraption_objects_fla.StreamBG_9} [contraption_objects_fla.StreamBG_9]
"dropBouncing"Symbol 352 MovieClip {contraption_objects_fla.Stream_14} [contraption_objects_fla.Stream_14] Frame 1Symbol 138 MovieClip
"four"Symbol 363 MovieClip {HollowRodGraphic} [HollowRodGraphic] Frame 1Symbol 352 MovieClip {contraption_objects_fla.Stream_14} [contraption_objects_fla.Stream_14]
"three"Symbol 363 MovieClip {HollowRodGraphic} [HollowRodGraphic] Frame 1Symbol 352 MovieClip {contraption_objects_fla.Stream_14} [contraption_objects_fla.Stream_14]
"two"Symbol 363 MovieClip {HollowRodGraphic} [HollowRodGraphic] Frame 1Symbol 352 MovieClip {contraption_objects_fla.Stream_14} [contraption_objects_fla.Stream_14]
"one"Symbol 363 MovieClip {HollowRodGraphic} [HollowRodGraphic] Frame 1Symbol 352 MovieClip {contraption_objects_fla.Stream_14} [contraption_objects_fla.Stream_14]

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata present, AS3.
SWFMetaData (77)Timeline Frame 1458 bytes "<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'><rdf:Description rdf:about='' xmlns ..."
ScriptLimits (65)Timeline Frame 1MaxRecursionDepth: 1000, ScriptTimeout: 60 seconds
ExportAssets (56)Timeline Frame 1Symbol 7 as "BuyGameButton"
ExportAssets (56)Timeline Frame 1Symbol 15 as "LogInButton"
ExportAssets (56)Timeline Frame 1Symbol 17 as "LogOutButton"
ExportAssets (56)Timeline Frame 1Symbol 24 as "TutorialNextButton"
ExportAssets (56)Timeline Frame 1Symbol 26 as "YourSavedLevelsButton"
ExportAssets (56)Timeline Frame 1Symbol 28 as "NewUserButton"
ExportAssets (56)Timeline Frame 1Symbol 30 as "PreviousMenuButton"
ExportAssets (56)Timeline Frame 1Symbol 32 as "ResetPasswordButton"
ExportAssets (56)Timeline Frame 1Symbol 34 as "UserGenLevelsButton"
ExportAssets (56)Timeline Frame 1Symbol 36 as "NewLevelButton"
ExportAssets (56)Timeline Frame 1Symbol 38 as "UpdateUserInfoButton"
ExportAssets (56)Timeline Frame 1Symbol 40 as "MainMenuButton"
ExportAssets (56)Timeline Frame 1Symbol 47 as "BubbleSceneChange"
ExportAssets (56)Timeline Frame 1Symbol 66 as "Splash"
ExportAssets (56)Timeline Frame 1Symbol 68 as "SmallCancelButton"
ExportAssets (56)Timeline Frame 1Symbol 70 as "YourSavedContraptionsButton"
ExportAssets (56)Timeline Frame 1Symbol 72 as "Border"
ExportAssets (56)Timeline Frame 1Symbol 12 as "ButtonBack"
ExportAssets (56)Timeline Frame 1Symbol 74 as "MenuBackground"
ExportAssets (56)Timeline Frame 1Symbol 75 as "MenuTopButtons"
ExportAssets (56)Timeline Frame 1Symbol 77 as "ModalMenuCloud"
ExportAssets (56)Timeline Frame 1Symbol 81 as "ModalMenuLargeCloud"
ExportAssets (56)Timeline Frame 1Symbol 83 as "SmallSaveButton"
ExportAssets (56)Timeline Frame 1Symbol 85 as "UpdateUserInfoSubmitButton"
ExportAssets (56)Timeline Frame 1Symbol 88 as "LoadFacebook"
ExportAssets (56)Timeline Frame 1Symbol 89 as "SmallBackButton"
ExportAssets (56)Timeline Frame 1Symbol 91 as "SeeTweet"
ExportAssets (56)Timeline Frame 1Symbol 96 as "NextPageButton"
ExportAssets (56)Timeline Frame 1Symbol 100 as "PreviousPageButton"
ExportAssets (56)Timeline Frame 1Symbol 102 as "DefaultMousePointer"
ExportAssets (56)Timeline Frame 1Symbol 104 as "BuildingMousePointer"
ExportAssets (56)Timeline Frame 1Symbol 107 as "Level4Overlay"
ExportAssets (56)Timeline Frame 1Symbol 211 as "DashboardImpl"
ExportAssets (56)Timeline Frame 1Symbol 212 as "Clouds"
ExportAssets (56)Timeline Frame 1Symbol 218 as "FacebookTitle"
ExportAssets (56)Timeline Frame 1Symbol 220 as "SendFacebook"
ExportAssets (56)Timeline Frame 1Symbol 222 as "WorkingButton"
ExportAssets (56)Timeline Frame 1Symbol 225 as "FCIcon"
ExportAssets (56)Timeline Frame 1Symbol 228 as "SoundOnButton"
ExportAssets (56)Timeline Frame 1Symbol 230 as "SoundOffButton"
ExportAssets (56)Timeline Frame 1Symbol 236 as "NextLevelButton"
ExportAssets (56)Timeline Frame 1Symbol 238 as "BackToMenuButton"
ExportAssets (56)Timeline Frame 1Symbol 240 as "ButtonMousePointer"
ExportAssets (56)Timeline Frame 1Symbol 242 as "DragMousePointer"
ExportAssets (56)Timeline Frame 1Symbol 244 as "DragActingMousePointer"
ExportAssets (56)Timeline Frame 1Symbol 247 as "EmailThis"
ExportAssets (56)Timeline Frame 1Symbol 250 as "TweetThis"
ExportAssets (56)Timeline Frame 1Symbol 252 as "DeleteMousePointer"
ExportAssets (56)Timeline Frame 1Symbol 256 as "LinkedInOverlay"
ExportAssets (56)Timeline Frame 1Symbol 258 as "ContinueButton"
ExportAssets (56)Timeline Frame 1Symbol 260 as "SavedLevelsButton"
ExportAssets (56)Timeline Frame 1Symbol 262 as "SavedContraptionsButton"
ExportAssets (56)Timeline Frame 1Symbol 264 as "MoveMousePointer"
ExportAssets (56)Timeline Frame 1Symbol 268 as "BuyMenuBackground"
ExportAssets (56)Timeline Frame 1Symbol 270 as "SkipTutorialButton"
ExportAssets (56)Timeline Frame 1Symbol 275 as "LearnToPlayButton"
ExportAssets (56)Timeline Frame 1Symbol 284 as "LinkBackButton"
ExportAssets (56)Timeline Frame 1Symbol 286 as "StartHere"
ExportAssets (56)Timeline Frame 1Symbol 291 as "FullVersionButton"
ExportAssets (56)Timeline Frame 1Symbol 292 as "MainMenuButtons"
ExportAssets (56)Timeline Frame 1Symbol 294 as "ContinueTutorialButton"
ExportAssets (56)Timeline Frame 1Symbol 302 as "TwitterTitle"
ExportAssets (56)Timeline Frame 1Symbol 304 as "SendTweet"
ExportAssets (56)Timeline Frame 1Symbol 95 as "RightArrow"
ExportAssets (56)Timeline Frame 1Symbol 99 as "LeftArrow"
ExportAssets (56)Timeline Frame 1Symbol 315 as "SavedLevelBackground"
ExportAssets (56)Timeline Frame 1Symbol 317 as "DeleteDesignButton"
ExportAssets (56)Timeline Frame 1Symbol 319 as "PlayDesignSmallButton"
ExportAssets (56)Timeline Frame 1Symbol 321 as "LinkDesignButton"
ExportAssets (56)Timeline Frame 1Symbol 323 as "SolutionsButton"
ExportAssets (56)Timeline Frame 1Symbol 324 as "PlayLevelSmallButton"
ExportAssets (56)Timeline Frame 1Symbol 325 as "LinkLevelButton"
ExportAssets (56)Timeline Frame 1Symbol 327 as "EditLevelButton"
ExportAssets (56)Timeline Frame 1Symbol 328 as "DeleteLevelButton"
ExportAssets (56)Timeline Frame 1Symbol 330 as "PlayGameButton"
ExportAssets (56)Timeline Frame 1Symbol 210 as "Expander"
ExportAssets (56)Timeline Frame 1Symbol 336 as "BobbingCloud"
ExportAssets (56)Timeline Frame 1Symbol 351 as "HollowRodGraphicBG"
ExportAssets (56)Timeline Frame 1Symbol 363 as "HollowRodGraphic"
ExportAssets (56)Timeline Frame 1Symbol 365 as "ClockwiseWheelGraphic"
ExportAssets (56)Timeline Frame 1Symbol 367 as "NonPoweredWheelGraphic"
ExportAssets (56)Timeline Frame 1Symbol 369 as "CounterClockwiseWheelGraphic"
ExportAssets (56)Timeline Frame 1Symbol 371 as "GraphicsOffButton"
ExportAssets (56)Timeline Frame 1Symbol 372 as "GraphicsOnButton"
ExportAssets (56)Timeline Frame 1Symbol 378 as "tut2FirstDrawWater"
ExportAssets (56)Timeline Frame 1Symbol 382 as "tut2DeleteSecondRod"
ExportAssets (56)Timeline Frame 1Symbol 386 as "tut2FirstStop"
ExportAssets (56)Timeline Frame 1Symbol 389 as "tut2FirstSelectWater"
ExportAssets (56)Timeline Frame 1Symbol 393 as "tut2FirstSelectDelete"
ExportAssets (56)Timeline Frame 1Symbol 397 as "tut2ThirdTry"
ExportAssets (56)Timeline Frame 1Symbol 401 as "tut2SecondTry"
ExportAssets (56)Timeline Frame 1Symbol 404 as "tut2SecondSelectWater"
ExportAssets (56)Timeline Frame 1Symbol 408 as "tut2DeleteFirstRod"
ExportAssets (56)Timeline Frame 1Symbol 412 as "tut2FirstTry"
ExportAssets (56)Timeline Frame 1Symbol 414 as "tutLocked"
ExportAssets (56)Timeline Frame 1Symbol 417 as "tut2SecondSelectDelete"
ExportAssets (56)Timeline Frame 1Symbol 421 as "tut2SecondStop"
ExportAssets (56)Timeline Frame 1Symbol 426 as "tut2SecondDrawWater"
ExportAssets (56)Timeline Frame 1Symbol 430 as "tut2Welcome"
ExportAssets (56)Timeline Frame 1Symbol 435 as "tut1SelectWater"
ExportAssets (56)Timeline Frame 1Symbol 439 as "tut1Welcome"
ExportAssets (56)Timeline Frame 1Symbol 442 as "tut1Goal"
ExportAssets (56)Timeline Frame 1Symbol 450 as "tut1DrawWater"
ExportAssets (56)Timeline Frame 1Symbol 455 as "tut1PressStart"
ExportAssets (56)Timeline Frame 1Symbol 459 as "tut1Workshop"
ExportAssets (56)Timeline Frame 1Symbol 463 as "tut1PinkBall"
ExportAssets (56)Timeline Frame 1Symbol 467 as "tut1SelectWheel"
ExportAssets (56)Timeline Frame 1Symbol 470 as "tut1DrawWheel"
ExportAssets (56)Timeline Frame 1Symbol 473 as "tut3Move"
ExportAssets (56)Timeline Frame 1Symbol 476 as "tut3Water"
ExportAssets (56)Timeline Frame 1Symbol 479 as "tut3Save"
ExportAssets (56)Timeline Frame 1Symbol 482 as "tut3Goodbye"
ExportAssets (56)Timeline Frame 1Symbol 485 as "tut3Wood"
ExportAssets (56)Timeline Frame 1Symbol 488 as "tut3Back"
ExportAssets (56)Timeline Frame 1Symbol 491 as "tut3Zoom"
ExportAssets (56)Timeline Frame 1Symbol 494 as "tut3NonPowerWheel"
ExportAssets (56)Timeline Frame 1Symbol 497 as "tut3Delete"
ExportAssets (56)Timeline Frame 1Symbol 500 as "tut3Wheels"
ExportAssets (56)Timeline Frame 1Symbol 503 as "tut3Start"
ExportAssets (56)Timeline Frame 1Symbol 508 as "LevelCircleChecked"
ExportAssets (56)Timeline Frame 1Symbol 513 as "LevelCircle"
ExportAssets (56)Timeline Frame 1Symbol 515 as "DoPublishButton"
ExportAssets (56)Timeline Frame 1Symbol 517 as "UnPublishButton"
ExportAssets (56)Timeline Frame 1Symbol 518 as "SavedLevelBackgroundMask"
ExportAssets (56)Timeline Frame 1Symbol 206 as "Dashboard_fla.Buttons_3"
ExportAssets (56)Timeline Frame 1Symbol 335 as "ArtAssets_fla.MultiCloud_107"
ExportAssets (56)Timeline Frame 1Symbol 340 as "contraption_objects_fla.StreamBG_9"
ExportAssets (56)Timeline Frame 1Symbol 352 as "contraption_objects_fla.Stream_14"
ExportAssets (56)Timeline Frame 1Symbol 522 as "SolidRodGraphic"
ExportAssets (56)Timeline Frame 1Symbol 524 as "SolidRodGraphicBG"
ExportAssets (56)Timeline Frame 1Symbol 203 as "BackTestButton"
ExportAssets (56)Timeline Frame 1Symbol 201 as "SaveButton"
ExportAssets (56)Timeline Frame 1Symbol 119 as "Dashboard_fla.ZoomButtons_5"
ExportAssets (56)Timeline Frame 1Symbol 109 as "DashBackground"
ExportAssets (56)Timeline Frame 1Symbol 179 as "Dashboard_fla.ContraptionButtons_9"
ExportAssets (56)Timeline Frame 1Symbol 199 as "BackButton"
ExportAssets (56)Timeline Frame 1Symbol 195 as "Dashboard_fla.LevelButtons_41"
ExportAssets (56)Timeline Frame 1Symbol 118 as "ZoomOutButton"
ExportAssets (56)Timeline Frame 1Symbol 116 as "ZoomInButton"
ExportAssets (56)Timeline Frame 1Symbol 123 as "DeleteButton"
ExportAssets (56)Timeline Frame 1Symbol 126 as "MoveButton"
ExportAssets (56)Timeline Frame 1Symbol 163 as "ClockwiseWheelButton"
ExportAssets (56)Timeline Frame 1Symbol 178 as "Dashboard_fla.GoStopButtons_35"
ExportAssets (56)Timeline Frame 1Symbol 151 as "HollowRodButton"
ExportAssets (56)Timeline Frame 1Symbol 159 as "CounterClockwiseWheelButton"
ExportAssets (56)Timeline Frame 1Symbol 155 as "NonPoweredWheelButton"
ExportAssets (56)Timeline Frame 1Symbol 133 as "SolidRodButton"
ExportAssets (56)Timeline Frame 1Symbol 192 as "GoalCircleButton"
ExportAssets (56)Timeline Frame 1Symbol 181 as "DynamicSquareButton"
ExportAssets (56)Timeline Frame 1Symbol 190 as "GoalSquareButton"
ExportAssets (56)Timeline Frame 1Symbol 187 as "StaticCircleButton"
ExportAssets (56)Timeline Frame 1Symbol 185 as "StaticSquareButton"
ExportAssets (56)Timeline Frame 1Symbol 194 as "TestLevelButton"
ExportAssets (56)Timeline Frame 1Symbol 183 as "DynamicCircleButton"
ExportAssets (56)Timeline Frame 1Symbol 161 as "ClockwiseWheel"
ExportAssets (56)Timeline Frame 1Symbol 173 as "StopButton"
ExportAssets (56)Timeline Frame 1Symbol 177 as "GoButton"
ExportAssets (56)Timeline Frame 1Symbol 166 as "StopButtonPing"
ExportAssets (56)Timeline Frame 1Symbol 150 as "HollowRod"
ExportAssets (56)Timeline Frame 1Symbol 157 as "CounterClockwiseWheel"
ExportAssets (56)Timeline Frame 1Symbol 139 as "Dashboard_fla.Stream_22"
SerialNumber (41)Timeline Frame 1

Labels

"Contraption"Frame 1
"close"Symbol 47 MovieClip {BubbleSceneChange} [BubbleSceneChange] Frame 1
"open"Symbol 47 MovieClip {BubbleSceneChange} [BubbleSceneChange] Frame 15
"appear"Symbol 66 MovieClip {Splash} [Splash] Frame 1
"stop"Symbol 66 MovieClip {Splash} [Splash] Frame 19
"leave"Symbol 66 MovieClip {Splash} [Splash] Frame 20
"start"Symbol 210 MovieClip {Expander} [Expander] Frame 1
"expanded"Symbol 210 MovieClip {Expander} [Expander] Frame 2
"contracting"Symbol 210 MovieClip {Expander} [Expander] Frame 3
"contracted"Symbol 210 MovieClip {Expander} [Expander] Frame 14
"expanding"Symbol 210 MovieClip {Expander} [Expander] Frame 15
"up"Symbol 315 MovieClip {SavedLevelBackground} [SavedLevelBackground] Frame 1
"default"Symbol 315 MovieClip {SavedLevelBackground} [SavedLevelBackground] Frame 10
"over"Symbol 315 MovieClip {SavedLevelBackground} [SavedLevelBackground] Frame 11
"open"Symbol 315 MovieClip {SavedLevelBackground} [SavedLevelBackground] Frame 20
"up"Symbol 518 MovieClip {SavedLevelBackgroundMask} [SavedLevelBackgroundMask] Frame 1
"default"Symbol 518 MovieClip {SavedLevelBackgroundMask} [SavedLevelBackgroundMask] Frame 10
"over"Symbol 518 MovieClip {SavedLevelBackgroundMask} [SavedLevelBackgroundMask] Frame 11




http://swfchan.com/20/98878/info.shtml
Created: 22/3 -2019 07:27:31 Last modified: 22/3 -2019 07:27:31 Server time: 25/04 -2024 14:58:26